GCOP
1.0
|
00001 #ifndef GCOP_BODY2DGRAPH_H 00002 #define GCOP_BODY2DGRAPH_H 00003 00004 #include <Eigen/Dense> 00005 #include <vector> 00006 #include <type_traits> 00007 #include "body2d.h" 00008 00009 namespace gcop { 00010 00011 using namespace std; 00012 using namespace Eigen; 00013 00019 class Body2dGraph { 00020 public: 00021 00031 Body2dGraph(Body2d<> &sys, int N, int nf, 00032 bool odometry = true, 00033 bool extforce = false, 00034 bool forces = false); 00035 00041 void Optp(VectorXd &p, const vector<Body2dState> &xs); 00042 00049 static void Synthesize(Body2dGraph &pgt, Body2dGraph &pgn, double tf); 00050 00057 static void Synthesize2(Body2dGraph &pgt, Body2dGraph &pgn, double tf); 00058 00065 static void Synthesize3(Body2dGraph &pgt, Body2dGraph &pgn, double tf); 00066 00067 Body2d<> &sys; 00068 00069 bool odometry; 00070 00071 bool extforce; 00072 00073 bool forces; 00074 00075 Vector3d fext; 00076 00077 vector<double> ts; 00078 00079 vector<Body2dState> xs; 00080 00081 vector<Vector3d> us; 00082 00083 VectorXd p; 00084 00085 vector< vector<pair<int, Vector2d> > > Is; 00086 00087 vector< vector<pair<int, Vector2d> > > Js; 00088 00089 vector<Vector3d> vs; 00090 00091 double cp; 00092 00093 Vector3d cv; 00094 00095 Vector3d cw; 00096 00097 }; 00098 } 00099 00100 #endif