GMRDynamics.h
Go to the documentation of this file.
1 /*
2  * GMRDynamics.h
3  *
4  * Created on: Nov 20, 2011
5  * Author: Seungsu KIM
6  */
7 
8 #ifndef __GMRDYNAMICS_H__
9 #define __GMRDYNAMICS_H__
10 
11 #include "Gaussians.h"
12 #include <boost/shared_ptr.hpp>
13 
14 #define GMR_ERROR_TOLERANCE 0.001
15 #define INTEGRATION_L 5
16 #define REACHING_ITERATION_MAX 500
17 #define REAL_MIN (1e-30)
18 
19 // GMR Dynamics
21 {
22 private:
23  Gaussians* GMM;
24 
25  double delta_t;
26  double target_t;
27  double current_t;
28 
29  MathLib::Vector gXi;
30  MathLib::Vector target;
31  unsigned int gDim;
32 
33 public:
34  GMRDynamics(int nStates, int nVar, double delta_t, const char* f_mu, const char* f_sigma, const char* f_prio);
35  GMRDynamics(int nStates, int nVar, double delta_t, const vector<double> pri_vec, const vector<double> mu_vec, const vector<double> sig_vec);
36 
37  void initGMR(int first_inindex, int last_inindex, int first_outindex, int last_outindex);
38 
40  void setTarget(MathLib::Vector target, double target_t = -1.0);
42  double getTargetT(void);
43  void setState(MathLib::Vector state);
45  void setCurrentTime(double current_t);
46  double getCurrentTime(void);
47 
49 
51  MathLib::Vector getNextState(double lamda);
52  double getReachingTime(double lamda);
53 };
54 
56 
57 #endif //__GMRDYNAMICS_H__
GMRDynamics::setCurrentTime
void setCurrentTime(double current_t)
Definition: GMRDynamics.cpp:97
GMRDynamics::getState
MathLib::Vector getState(void)
Definition: GMRDynamics.cpp:91
GMRDynamics::getTarget
MathLib::Vector getTarget(void)
Definition: GMRDynamics.cpp:73
boost::shared_ptr< GMRDynamics >
Vector
Eigen::Matrix< T, 3, 1 > Vector
Definition: UnscentedKalmanFilterTest.cpp:36
GMRDynamics::setState
void setState(MathLib::Vector state)
Definition: GMRDynamics.cpp:85
GMRDynamics::getNextState
MathLib::Vector getNextState(void)
Definition: GMRDynamics.cpp:116
Gaussians
Definition: Gaussians.h:43
GMRDynamics::getCurrentTime
double getCurrentTime(void)
Definition: GMRDynamics.cpp:103
GMRDynamics::getTargetT
double getTargetT(void)
Definition: GMRDynamics.cpp:79
GMRDynamics
Definition: GMRDynamics.h:20
GMRDynamics::GMRDynamics
GMRDynamics(int nStates, int nVar, double delta_t, const char *f_mu, const char *f_sigma, const char *f_prio)
Definition: GMRDynamics.cpp:15
GMRDynamics::setTarget
void setTarget(MathLib::Vector target, double target_t=-1.0)
Definition: GMRDynamics.cpp:64
GMRDynamics::getVelocity
MathLib::Vector getVelocity(MathLib::Vector x)
Definition: GMRDynamics.cpp:109
GMRDynamics::setStateTarget
void setStateTarget(MathLib::Vector state, MathLib::Vector target)
Definition: GMRDynamics.cpp:57
Gaussians.h
GMMPtr
boost::shared_ptr< GMRDynamics > GMMPtr
Definition: GMRDynamics.h:55
GMRDynamics::initGMR
void initGMR(int first_inindex, int last_inindex, int first_outindex, int last_outindex)
Definition: GMRDynamics.cpp:39
GMRDynamics::getReachingTime
double getReachingTime(double lamda)
Definition: GMRDynamics.cpp:133