GCOP
1.0
|
00001 #ifndef GCOP_MBSMANIFOLD_H 00002 #define GCOP_MBSMANIFOLD_H 00003 00004 #include "manifold.h" 00005 #include "mbsstate.h" 00006 00007 namespace gcop { 00008 00009 using namespace std; 00010 using namespace Eigen; 00011 00012 // state dimension for nb-body system with 1-dof joints 00013 #define MBS_DIM(nb) (12 + 2*(nb - 1)) 00014 #define MBS_DIM_FIXED(nb) (2*(nb - 1)) 00015 00016 class MbsManifold : public Manifold<MbsState> { 00017 00018 public: 00019 00024 MbsManifold(int nb, bool fixed = false); 00025 00026 void Lift(VectorXd &v, 00027 const MbsState &xa, 00028 const MbsState &xb); 00029 00030 void Retract(MbsState &xb, 00031 const MbsState &xa, 00032 const VectorXd &v); 00033 00034 void dtau(MatrixXd &M, const VectorXd &v); 00035 00036 void Adtau(MatrixXd &M, const VectorXd &v); 00037 00038 // bool fixed; ///< whether it has a fixed base 00039 00040 bool cay; 00041 00042 }; 00043 } 00044 00045 00046 #endif