00001 #ifndef WALK_INTERFACE_DISCRETIZED_TRAJECTORY_HH 00002 # define WALK_INTERFACE_DISCRETIZED_TRAJECTORY_HH 00003 # include <iosfwd> 00004 # include <vector> 00005 00006 # include <walk_interfaces/types.hh> 00007 # include <walk_interfaces/stamped-position.hh> 00008 00009 namespace walk 00010 { 00022 template <typename T> 00023 class DiscretizedTrajectory 00024 { 00025 public: 00027 typedef T element_t; 00029 typedef WALK_INTERFACES_EIGEN_STL_VECTOR(T) data_t; 00030 00033 00035 explicit DiscretizedTrajectory(); 00037 explicit DiscretizedTrajectory(const DiscretizedTrajectory<T>&); 00039 ~DiscretizedTrajectory(); 00040 00042 00044 DiscretizedTrajectory<T>& operator=(const DiscretizedTrajectory<T>&); 00045 00047 data_t& data(); 00048 00050 const data_t& data() const; 00051 00056 TimeDuration computeLength() const; 00057 00058 private: 00060 data_t data_; 00061 public: 00062 EIGEN_MAKE_ALIGNED_OPERATOR_NEW; 00063 }; 00064 00066 typedef DiscretizedTrajectory<StampedPosition3d> DiscretizedTrajectory3d; 00068 typedef DiscretizedTrajectory<StampedPosition2d> DiscretizedTrajectory2d; 00070 typedef DiscretizedTrajectory<StampedVector2d> DiscretizedTrajectoryV2d; 00072 typedef DiscretizedTrajectory<StampedVector3d> DiscretizedTrajectoryV3d; 00074 typedef DiscretizedTrajectory<StampedVectorNd> DiscretizedTrajectoryNd; 00075 00080 template <typename T> 00081 std::ostream& operator<<(std::ostream& stream, 00082 const DiscretizedTrajectory<T>& trajectory); 00083 00084 } // end of namespace walk. 00085 00086 # include <walk_interfaces/discretized-trajectory.hxx> 00087 #endif //! WALK_INTERFACE_DISCRETIZED_TRAJECTORY_HH