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 <boost/shared_ptr.hpp>
12
13#include "Gaussians.h"
14
15#define GMR_ERROR_TOLERANCE 0.001
16#define INTEGRATION_L 5
17#define REACHING_ITERATION_MAX 500
18#define REAL_MIN (1e-30)
19
20// GMR Dynamics
22{
23private:
24 Gaussians* GMM;
25
26 double delta_t;
27 double target_t;
28 double current_t;
29
30 MathLib::Vector gXi;
31 MathLib::Vector target;
32 unsigned int gDim;
33
34public:
35 GMRDynamics(int nStates,
36 int nVar,
37 double delta_t,
38 const char* f_mu,
39 const char* f_sigma,
40 const char* f_prio);
41 GMRDynamics(int nStates,
42 int nVar,
43 double delta_t,
44 const vector<double> pri_vec,
45 const vector<double> mu_vec,
46 const vector<double> sig_vec);
47
48 void initGMR(int first_inindex, int last_inindex, int first_outindex, int last_outindex);
49
50 void setStateTarget(MathLib::Vector state, MathLib::Vector target);
51 void setTarget(MathLib::Vector target, double target_t = -1.0);
52 MathLib::Vector getTarget(void);
53 double getTargetT(void);
54 void setState(MathLib::Vector state);
55 MathLib::Vector getState(void);
56 void setCurrentTime(double current_t);
57 double getCurrentTime(void);
58
59 MathLib::Vector getVelocity(MathLib::Vector x);
60
61 MathLib::Vector getNextState(void);
62 MathLib::Vector getNextState(double lamda);
63 double getReachingTime(double lamda);
64};
65
67
68#endif //__GMRDYNAMICS_H__
boost::shared_ptr< GMRDynamics > GMMPtr
Definition GMRDynamics.h:66
MathLib::Vector getVelocity(MathLib::Vector x)
void setStateTarget(MathLib::Vector state, MathLib::Vector target)
double getCurrentTime(void)
void setTarget(MathLib::Vector target, double target_t=-1.0)
double getReachingTime(double lamda)
void initGMR(int first_inindex, int last_inindex, int first_outindex, int last_outindex)
void setCurrentTime(double current_t)
MathLib::Vector getTarget(void)
MathLib::Vector getState(void)
GMRDynamics(int nStates, int nVar, double delta_t, const char *f_mu, const char *f_sigma, const char *f_prio)
MathLib::Vector getNextState(void)
void setState(MathLib::Vector state)
double getTargetT(void)
This file offers overloads of toIce() and fromIce() functions for STL container types.