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 
59  dynamicgraph::Vector &getNextPosition(dynamicgraph::Vector &pos,
60  const sigtime_t &time);
61 
64  const sigtime_t &time);
65 
68  const sigtime_t &time);
69 
72  const sigtime_t &time);
73 
75  std::size_t &getSeqId(std::size_t &seqid, const sigtime_t &time);
76 
78  sot::MatrixHomogeneous XYZThetaToMatrixHomogeneous(
79  const dynamicgraph::Vector &xyztheta);
80 
82  size_type &OneStepOfUpdate(size_type &dummy, const sigtime_t &time);
83 
86  virtual void display(std::ostream &os) const;
88  friend std::ostream &operator<<(std::ostream &os,
89  const SotJointTrajectoryEntity &r) {
90  r.display(os);
91  return os;
92  }
94 
95  public:
96  typedef size_type Dummy;
97 
102 
105 
109 
112 
115 
119 
122 
126 
127  protected:
130 
133 
136 
139 
142 
145 
147  std::size_t seqid_;
148 
151 
153  std::deque<sot::Trajectory> deque_traj_;
154 
156  void UpdatePoint(const JointTrajectoryPoint &aJTP);
157 
159  void UpdateTrajectory(const Trajectory &aTrajectory);
160 
162  void setInitTraj(const std::string &os);
163 };
164 
165 } /* namespace sot */
166 } /* namespace dynamicgraph */
167 
168 #endif // SOT_JOINT_TRAJECTORY_ENTITY_HH
dynamicgraph::sot::SotJointTrajectoryEntity::~SotJointTrajectoryEntity
virtual ~SotJointTrajectoryEntity()
Definition: joint-trajectory-entity.hh:54
trajectory.hh
dynamicgraph::sot::SotJointTrajectoryEntity::waistSOUT
dynamicgraph::SignalTimeDependent< sot::MatrixHomogeneous, sigtime_t > waistSOUT
Publish waist for each evaluation of the graph.
Definition: joint-trajectory-entity.hh:118
dynamicgraph::sot::MatrixHomogeneous
Eigen::Transform< double, 3, Eigen::Affine > SOT_CORE_EXPORT MatrixHomogeneous
Definition: matrix-geometry.hh:75
dynamicgraph::SignalPtr
dynamicgraph
dynamicgraph::sot::SotJointTrajectoryEntity::zmpSOUT
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t > zmpSOUT
Publish zmp for each evaluation of the graph.
Definition: joint-trajectory-entity.hh:114
dynamicgraph::sot::timestamp
Definition: trajectory.hh:84
dynamicgraph::Entity
dynamicgraph::sot::SotJointTrajectoryEntity::refresherSINTERN
dynamicgraph::SignalTimeDependent< size_type, sigtime_t > refresherSINTERN
Definition: joint-trajectory-entity.hh:101
dynamicgraph::sot::SotJointTrajectoryEntity
This object handles trajectory of quantities and publish them as signals.
Definition: joint-trajectory-entity.hh:47
dynamicgraph::sot::SotJointTrajectoryEntity::positionSOUT
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t > positionSOUT
Publish pose for each evaluation of the graph.
Definition: joint-trajectory-entity.hh:108
size_type
dynamicgraph::size_type size_type
Definition: exception-abstract.cpp:15
dynamicgraph::sot::SotJointTrajectoryEntity::init_traj_
sot::Trajectory init_traj_
Initial state of the trajectory.
Definition: joint-trajectory-entity.hh:150
dynamicgraph::sot::SotJointTrajectoryEntity::operator<<
SOTJOINT_TRAJECTORY_ENTITY_EXPORT friend std::ostream & operator<<(std::ostream &os, const SotJointTrajectoryEntity &r)
Definition: joint-trajectory-entity.hh:88
r
FCL_REAL r
DYNAMIC_GRAPH_ENTITY_DECL
#define DYNAMIC_GRAPH_ENTITY_DECL()
dynamicgraph::sot::SotJointTrajectoryEntity::deque_traj_
std::deque< sot::Trajectory > deque_traj_
Queue of trajectories.
Definition: joint-trajectory-entity.hh:153
dynamicgraph::sot::SotJointTrajectoryEntity::index_
std::deque< sot::Trajectory >::size_type index_
Index on the point along the trajectory.
Definition: joint-trajectory-entity.hh:129
dynamicgraph::sot::SotJointTrajectoryEntity::Dummy
size_type Dummy
Definition: joint-trajectory-entity.hh:96
dynamicgraph::sigtime_t
int64_t sigtime_t
dynamicgraph::sot::SotJointTrajectoryEntity::comSOUT
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, sigtime_t > comSOUT
Publish com for each evaluation of the graph.
Definition: joint-trajectory-entity.hh:111
dummy
DummyClass dummy
Definition: test_signal.cpp:31
dynamicgraph::sot::SotJointTrajectoryEntity::com_
dynamicgraph::Vector com_
Store the center of mass.
Definition: joint-trajectory-entity.hh:138
SOTJOINT_TRAJECTORY_ENTITY_EXPORT
#define SOTJOINT_TRAJECTORY_ENTITY_EXPORT
Definition: joint-trajectory-entity.hh:34
all-signals.h
dynamicgraph::size_type
Matrix::Index size_type
display
dynamicgraph::Vector
Eigen::VectorXd Vector
linear-algebra.h
dynamicgraph::sot::Trajectory
Definition: trajectory.hh:181
dynamicgraph::sot::SotJointTrajectoryEntity::traj_timestamp_
timestamp traj_timestamp_
Keep the starting time as an identifier of the trajector.
Definition: joint-trajectory-entity.hh:132
dynamicgraph::sot::SotJointTrajectoryEntity::seqid_
std::size_t seqid_
Store the current seq identifier.
Definition: joint-trajectory-entity.hh:147
matrix-geometry.hh
dynamicgraph::SignalTimeDependent< size_type, sigtime_t >
dynamicgraph::sot::JointTrajectoryPoint
Definition: trajectory.hh:120
dynamicgraph::sot::SotJointTrajectoryEntity::waist_
sot::MatrixHomogeneous waist_
Store the waist position.
Definition: joint-trajectory-entity.hh:144
dynamicgraph::sot::SotJointTrajectoryEntity::pose_
dynamicgraph::Vector pose_
Store the pos;.
Definition: joint-trajectory-entity.hh:135
dynamicgraph::sot::SotJointTrajectoryEntity::trajectorySIN
dynamicgraph::SignalPtr< Trajectory, sigtime_t > trajectorySIN
Read a trajectory.
Definition: joint-trajectory-entity.hh:124
dynamicgraph::sot::SotJointTrajectoryEntity::OneStepOfUpdateS
SignalTimeDependent< Dummy, sigtime_t > OneStepOfUpdateS
Internal signal to trigger one step of the algorithm.
Definition: joint-trajectory-entity.hh:104
dynamicgraph::sot::SotJointTrajectoryEntity::cop_
dynamicgraph::Vector cop_
Store the center of pressure ZMP.
Definition: joint-trajectory-entity.hh:141
compile.name
name
Definition: compile.py:23
dynamicgraph::sot::SotJointTrajectoryEntity::seqIdSOUT
dynamicgraph::SignalTimeDependent< std::size_t, sigtime_t > seqIdSOUT
Publish ID of the trajectory currently realized.
Definition: joint-trajectory-entity.hh:121


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31