GCOP  1.0
trajectory.h
Go to the documentation of this file.
00001 // This file is part of libgcop, a library for Geometric Control, Optimization, and Planning (GCOP)
00002 //
00003 // Copyright (C) 2004-2014 Marin Kobilarov <marin(at)jhu.edu>
00004 //
00005 // This Source Code Form is subject to the terms of the Mozilla
00006 // Public License v. 2.0. If a copy of the MPL was not distributed
00007 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008 
00009 #ifndef GCOP_SYSTEM_H
00010 #define GCOP_SYSTEM_H
00011 
00012 #include <Eigen/Dense>
00013 #include <vector>
00014 
00015 namespace gcop {
00016   
00017   using namespace Eigen;
00018 
00025   template <typename T = VectorXd,
00026     int _nx = Dynamic, 
00027     int _nu = Dynamic, 
00028     int _np = Dynamic> class Trajectory {
00029   public:
00030   typedef Matrix<double, _nu, 1> Vectorud;
00031   typedef Matrix<double, _np, 1> Vectorpd;
00032   
00033   Trajectory(const System<T, _nx, _nu, _np> &sys, int N);
00034   
00035   const System<T, _nx, _nu, _np> &sys;  
00036   vector<double> ts;                    
00037   vector<T> xs;                         
00038   vector<Vectorud> us;                  
00039   Vectorpd *p;                          
00040   
00041   };
00042 
00043   template <typename T, int _nx, int _nu, int _np> 
00044     Trajectory<T, _nx, _nu, _np>::Trajectory(const System<T, _nx, _nu, _np> &sys, int N) : 
00045     sys(sys), ts(N+1), xs(N+1), us(N), p(0)
00046     {      
00047     }  
00048 }
00049 
00050 #endif