9 #ifndef SOT_JOINT_TRAJECTORY_ENTITY_HH
10 #define SOT_JOINT_TRAJECTORY_ENTITY_HH
16 #include <dynamic-graph/linear-algebra.h>
19 #include <dynamic-graph/all-signals.h>
20 #include <dynamic-graph/entity.h>
28 #if defined(joint_trajectory_entity_EXPORTS)
29 #define SOTJOINT_TRAJECTORY_ENTITY_EXPORT __declspec(dllexport)
31 #define SOTJOINT_TRAJECTORY_ENTITY_EXPORT __declspec(dllimport)
34 #define SOTJOINT_TRAJECTORY_ENTITY_EXPORT
48 :
public dynamicgraph::Entity {
63 dynamicgraph::Vector &
getNextCoM(dynamicgraph::Vector &com,
const int &time);
66 dynamicgraph::Vector &
getNextCoP(dynamicgraph::Vector &cop,
const int &time);
73 unsigned int &
getSeqId(
unsigned int &seqid,
const int &time);
77 const dynamicgraph::Vector &xyztheta);
84 virtual void display(std::ostream &os)
const;
105 dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int>
positionSOUT;
108 dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int>
comSOUT;
111 dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int>
zmpSOUT;
114 dynamicgraph::SignalTimeDependent<sot::MatrixHomogeneous, int>
waistSOUT;
117 dynamicgraph::SignalTimeDependent<unsigned int, int>
seqIdSOUT;
125 std::deque<sot::Trajectory>::size_type
index_;
Definition: trajectory.hh:115
This object handles trajectory of quantities and publish them as signals.
Definition: joint-trajectory-entity.hh:48
SignalTimeDependent< Dummy, int > OneStepOfUpdateS
Internal signal to trigger one step of the algorithm.
Definition: joint-trajectory-entity.hh:102
sot::MatrixHomogeneous waist_
Store the waist position.
Definition: joint-trajectory-entity.hh:140
dynamicgraph::SignalPtr< Trajectory, int > trajectorySIN
Read a trajectory.
Definition: joint-trajectory-entity.hh:120
sot::Trajectory init_traj_
Initial state of the trajectory.
Definition: joint-trajectory-entity.hh:146
void UpdatePoint(const JointTrajectoryPoint &aJTP)
Update the entity with the current point of the trajectory.
sot::MatrixHomogeneous XYZThetaToMatrixHomogeneous(const dynamicgraph::Vector &xyztheta)
Convert a xyztheta vector into an homogeneous matrix.
dynamicgraph::SignalTimeDependent< sot::MatrixHomogeneous, int > waistSOUT
Publish waist for each evaluation of the graph.
Definition: joint-trajectory-entity.hh:114
DYNAMIC_GRAPH_ENTITY_DECL()
dynamicgraph::Vector & getNextCoM(dynamicgraph::Vector &com, const int &time)
Return the next com.
virtual void display(std::ostream &os) const
dynamicgraph::Vector pose_
Store the pos;.
Definition: joint-trajectory-entity.hh:131
dynamicgraph::SignalTimeDependent< int, int > refresherSINTERN
Definition: joint-trajectory-entity.hh:99
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > zmpSOUT
Publish zmp for each evaluation of the graph.
Definition: joint-trajectory-entity.hh:111
SotJointTrajectoryEntity(const std::string &name)
Constructor.
void loadFile(const std::string &name)
void UpdateTrajectory(const Trajectory &aTrajectory)
Update the entity with the trajectory aTrajectory.
virtual ~SotJointTrajectoryEntity()
Definition: joint-trajectory-entity.hh:54
dynamicgraph::Vector & getNextPosition(dynamicgraph::Vector &pos, const int &time)
Return the next pose for the legs.
dynamicgraph::Vector com_
Store the center of mass.
Definition: joint-trajectory-entity.hh:134
unsigned int seqid_
Store the current seq identifier.
Definition: joint-trajectory-entity.hh:143
int & OneStepOfUpdate(int &dummy, const int &time)
Perform one update of the signals.
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > comSOUT
Publish com for each evaluation of the graph.
Definition: joint-trajectory-entity.hh:108
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > positionSOUT
Publish pose for each evaluation of the graph.
Definition: joint-trajectory-entity.hh:105
SOTJOINT_TRAJECTORY_ENTITY_EXPORT friend std::ostream & operator<<(std::ostream &os, const SotJointTrajectoryEntity &r)
Definition: joint-trajectory-entity.hh:86
unsigned int & getSeqId(unsigned int &seqid, const int &time)
Return the current seq identified of the current trajectory.
std::deque< sot::Trajectory >::size_type index_
Index on the point along the trajectory.
Definition: joint-trajectory-entity.hh:125
dynamicgraph::Vector & getNextCoP(dynamicgraph::Vector &cop, const int &time)
Return the next cop.
timestamp traj_timestamp_
Keep the starting time as an identifier of the trajector.
Definition: joint-trajectory-entity.hh:128
dynamicgraph::SignalTimeDependent< unsigned int, int > seqIdSOUT
Publish ID of the trajectory currently realized.
Definition: joint-trajectory-entity.hh:117
void setInitTraj(const std::string &os)
Implements the parsing and the affectation of initial trajectory.
sot::MatrixHomogeneous & getNextWaist(sot::MatrixHomogeneous &waist, const int &time)
Return the next waist.
std::deque< sot::Trajectory > deque_traj_
Queue of trajectories.
Definition: joint-trajectory-entity.hh:149
dynamicgraph::Vector cop_
Store the center of pressure ZMP.
Definition: joint-trajectory-entity.hh:137
int Dummy
Definition: joint-trajectory-entity.hh:94
Definition: trajectory.hh:176
Definition: trajectory.hh:84
#define SOTJOINT_TRAJECTORY_ENTITY_EXPORT
Definition: joint-trajectory-entity.hh:34
Eigen::Transform< double, 3, Eigen::Affine > SOT_CORE_EXPORT MatrixHomogeneous
Definition: matrix-geometry.hh:75
Definition: abstract-sot-external-interface.hh:17