-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathrunSimulationThrowBall.hpp
54 lines (48 loc) · 1.52 KB
/
runSimulationThrowBall.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* \file runSimulationThrowBall.cpp
* \author Freek Stulp
*
* \ingroup Demos
*
* This file is part of DmpBbo, a set of libraries and programs for the
* black-box optimization of dynamical movement primitives.
* Copyright (C) 2014 Freek Stulp, ENSTA-ParisTech
*
* DmpBbo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* DmpBbo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with DmpBbo. If not, see <http://www.gnu.org/licenses/>.
*/
#include <eigen3/Eigen/Core>
#include <fstream>
namespace DmpBbo {
// forward declaration
class Trajectory;
class Dmp;
class ThrowBallSimulator {
public:
ThrowBallSimulator(void);
void integrateStep(double dt, Eigen::VectorXd y_des, Eigen::VectorXd yd_des,
Eigen::VectorXd ydd_des);
int getStateSize(void);
Eigen::VectorXd getState(void);
private:
double time;
Eigen::VectorXd y_endeff;
Eigen::VectorXd yd_endeff;
Eigen::VectorXd ydd_endeff;
Eigen::VectorXd y_ball;
Eigen::VectorXd yd_ball;
Eigen::VectorXd ydd_ball;
bool ball_in_hand;
double y_floor;
};
} // namespace DmpBbo