joint-trajectory-entity.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2013,
3  * Olivier Stasse,
4  *
5  * CNRS
6  *
7  */
8 
9 #ifndef SOT_JOINT_TRAJECTORY_ENTITY_HH
10 #define SOT_JOINT_TRAJECTORY_ENTITY_HH
11 
12 #include <deque>
13 #include <list>
14 
15 // Maal
17 
18 // SOT
20 #include <dynamic-graph/entity.h>
21 
23 #include <sot/core/trajectory.hh>
24 #include <sstream>
25 // API
26 
27 #if defined(WIN32)
28 #if defined(joint_trajectory_entity_EXPORTS)
29 #define SOTJOINT_TRAJECTORY_ENTITY_EXPORT __declspec(dllexport)
30 #else
31 #define SOTJOINT_TRAJECTORY_ENTITY_EXPORT __declspec(dllimport)
32 #endif
33 #else
34 #define SOTJOINT_TRAJECTORY_ENTITY_EXPORT
35 #endif
36 
37 // Class
38 
39 namespace dynamicgraph {
40 namespace sot {
41 
48  : public dynamicgraph::Entity {
49  public:
51 
53  SotJointTrajectoryEntity(const std::string &name);
55 
56  void loadFile(const std::string &name);
57 
60  const int &time);
61 
63  dynamicgraph::Vector &getNextCoM(dynamicgraph::Vector &com, const int &time);
64 
66  dynamicgraph::Vector &getNextCoP(dynamicgraph::Vector &cop, const int &time);
67 
70  const int &time);
71 
73  unsigned int &getSeqId(unsigned int &seqid, const int &time);
74 
76  sot::MatrixHomogeneous XYZThetaToMatrixHomogeneous(
77  const dynamicgraph::Vector &xyztheta);
78 
80  int &OneStepOfUpdate(int &dummy, const int &time);
81 
84  virtual void display(std::ostream &os) const;
86  friend std::ostream &operator<<(std::ostream &os,
87  const SotJointTrajectoryEntity &r) {
88  r.display(os);
89  return os;
90  }
92 
93  public:
94  typedef int Dummy;
95 
100 
103 
106 
109 
112 
115 
118 
122 
123  protected:
125  std::deque<sot::Trajectory>::size_type index_;
126 
129 
132 
135 
138 
141 
143  unsigned int seqid_;
144 
147 
149  std::deque<sot::Trajectory> deque_traj_;
150 
152  void UpdatePoint(const JointTrajectoryPoint &aJTP);
153 
155  void UpdateTrajectory(const Trajectory &aTrajectory);
156 
158  void setInitTraj(const std::string &os);
159 };
160 
161 } /* namespace sot */
162 } /* namespace dynamicgraph */
163 
164 #endif // SOT_JOINT_TRAJECTORY_ENTITY_HH
virtual void display(std::ostream &os) const
Eigen::Transform< double, 3, Eigen::Affine > SOT_CORE_EXPORT MatrixHomogeneous
sot::MatrixHomogeneous waist_
Store the waist position.
Eigen::VectorXd Vector
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > positionSOUT
Publish pose for each evaluation of the graph.
unsigned int seqid_
Store the current seq identifier.
std::deque< sot::Trajectory > deque_traj_
Queue of trajectories.
pos
std::deque< sot::Trajectory >::size_type index_
Index on the point along the trajectory.
dynamicgraph::SignalTimeDependent< unsigned int, int > seqIdSOUT
Publish ID of the trajectory currently realized.
dynamicgraph::SignalTimeDependent< sot::MatrixHomogeneous, int > waistSOUT
Publish waist for each evaluation of the graph.
dynamicgraph::Vector pose_
Store the pos;.
FCL_REAL r
dynamicgraph::SignalPtr< Trajectory, int > trajectorySIN
Read a trajectory.
dynamicgraph::SignalTimeDependent< int, int > refresherSINTERN
This object handles trajectory of quantities and publish them as signals.
sot::Trajectory init_traj_
Initial state of the trajectory.
SignalTimeDependent< Dummy, int > OneStepOfUpdateS
Internal signal to trigger one step of the algorithm.
timestamp traj_timestamp_
Keep the starting time as an identifier of the trajector.
#define DYNAMIC_GRAPH_ENTITY_DECL()
com
#define SOTJOINT_TRAJECTORY_ENTITY_EXPORT
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > comSOUT
Publish com for each evaluation of the graph.
dynamicgraph::Vector cop_
Store the center of pressure ZMP.
DummyClass dummy
Definition: test_signal.cpp:31
dynamicgraph::Vector com_
Store the center of mass.
SOTJOINT_TRAJECTORY_ENTITY_EXPORT friend std::ostream & operator<<(std::ostream &os, const SotJointTrajectoryEntity &r)
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > zmpSOUT
Publish zmp for each evaluation of the graph.


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26