dynamicgraph::sot::SotJointTrajectoryEntity Class Reference

This object handles trajectory of quantities and publish them as signals. More...

#include <sot/core/joint-trajectory-entity.hh>

Inheritance diagram for dynamicgraph::sot::SotJointTrajectoryEntity:
[legend]

Public Types

typedef int Dummy
 
- Public Types inherited from dynamicgraph::Entity
typedef std::map< std::string, SignalBase< int > * > SignalMap
 
typedef std::map< const std::string, command::Command * > CommandMap_t
 

Public Member Functions

 DYNAMIC_GRAPH_ENTITY_DECL ()
 
 SotJointTrajectoryEntity (const std::string &name)
 Constructor. More...
 
virtual ~SotJointTrajectoryEntity ()
 
void loadFile (const std::string &name)
 
dg::VectorgetNextPosition (dg::Vector &pos, const int &time)
 Return the next pose for the legs. More...
 
dg::VectorgetNextCoM (dg::Vector &com, const int &time)
 Return the next com. More...
 
dg::VectorgetNextCoP (dg::Vector &cop, const int &time)
 Return the next cop. More...
 
sot::MatrixHomogeneousgetNextWaist (sot::MatrixHomogeneous &waist, const int &time)
 Return the next waist. More...
 
unsigned int & getSeqId (unsigned int &seqid, const int &time)
 Return the current seq identified of the current trajectory. More...
 
sot::MatrixHomogeneous XYZThetaToMatrixHomogeneous (const dg::Vector &xyztheta)
 Convert a xyztheta vector into an homogeneous matrix. More...
 
int & OneStepOfUpdate (int &dummy, const int &time)
 Perform one update of the signals. More...
 
- Public Member Functions inherited from dynamicgraph::Entity
 Entity (const std::string &name)
 
virtual ~Entity ()
 
const std::string & getName () const
 
virtual const std::string & getClassName () const
 
virtual std::string getDocString () const
 
bool hasSignal (const std::string &signame) const
 
SignalBase< int > & getSignal (const std::string &signalName)
 
const SignalBase< int > & getSignal (const std::string &signalName) const
 
std::ostream & displaySignalList (std::ostream &os) const
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 
virtual SignalBase< int > * test ()
 
virtual void test2 (SignalBase< int > *)
 
const std::string & getCommandList () const
 
CommandMap_t getNewStyleCommandMap ()
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 
SignalMap getSignalMap () const
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *file="", int line=0)
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
LoggerVerbosity getLoggerVerbosityLevel ()
 

Public Attributes

Signals

Internal signal for synchronisation.

dynamicgraph::SignalTimeDependent< int, int > refresherSINTERN
 
SignalTimeDependent< Dummy, int > OneStepOfUpdateS
 Internal signal to trigger one step of the algorithm. More...
 
dynamicgraph::SignalTimeDependent< dg::Vector, int > positionSOUT
 Publish pose for each evaluation of the graph. More...
 
dynamicgraph::SignalTimeDependent< dg::Vector, int > comSOUT
 Publish com for each evaluation of the graph. More...
 
dynamicgraph::SignalTimeDependent< dg::Vector, int > zmpSOUT
 Publish zmp for each evaluation of the graph. More...
 
dynamicgraph::SignalTimeDependent< sot::MatrixHomogeneous, int > waistSOUT
 Publish waist for each evaluation of the graph. More...
 
dynamicgraph::SignalTimeDependent< unsigned int, int > seqIdSOUT
 Publish ID of the trajectory currently realized. More...
 
dynamicgraph::SignalPtr< Trajectory, int > trajectorySIN
 Read a trajectory. More...
 

Protected Member Functions

void UpdatePoint (const JointTrajectoryPoint &aJTP)
 Update the entity with the current point of the trajectory. More...
 
void UpdateTrajectory (const Trajectory &aTrajectory)
 Update the entity with the trajectory aTrajectory. More...
 
void setInitTraj (const std::string &os)
 Implements the parsing and the affectation of initial trajectory. More...
 
- Protected Member Functions inherited from dynamicgraph::Entity
void addCommand (const std::string &name, command::Command *command)
 
void entityRegistration ()
 
void entityDeregistration ()
 
void signalRegistration (const SignalArray< int > &signals)
 
void signalDeregistration (const std::string &name)
 

Protected Attributes

std::deque< sot::Trajectory >::size_type index_
 Index on the point along the trajectory. More...
 
timestamp traj_timestamp_
 Keep the starting time as an identifier of the trajector. More...
 
dg::Vector pose_
 Store the pos;. More...
 
dg::Vector com_
 Store the center of mass. More...
 
dg::Vector cop_
 Store the center of pressure ZMP. More...
 
sot::MatrixHomogeneous waist_
 Store the waist position. More...
 
unsigned int seqid_
 Store the current seq identifier. More...
 
sot::Trajectory init_traj_
 Initial state of the trajectory. More...
 
std::deque< sot::Trajectorydeque_traj_
 Queue of trajectories. More...
 
- Protected Attributes inherited from dynamicgraph::Entity
std::string name
 
SignalMap signalMap
 
CommandMap_t commandMap
 
Logger logger_
 

Display

virtual void display (std::ostream &os) const
 
SOTJOINT_TRAJECTORY_ENTITY_EXPORT friend std::ostream & operator<< (std::ostream &os, const SotJointTrajectoryEntity &r)
 

Detailed Description

This object handles trajectory of quantities and publish them as signals.

Member Typedef Documentation

Constructor & Destructor Documentation

dynamicgraph::sot::SotJointTrajectoryEntity::SotJointTrajectoryEntity ( const std::string &  name)

Constructor.

virtual dynamicgraph::sot::SotJointTrajectoryEntity::~SotJointTrajectoryEntity ( )
inlinevirtual

Member Function Documentation

virtual void dynamicgraph::sot::SotJointTrajectoryEntity::display ( std::ostream &  os) const
virtual

Reimplemented from dynamicgraph::Entity.

dynamicgraph::sot::SotJointTrajectoryEntity::DYNAMIC_GRAPH_ENTITY_DECL ( )
dg::Vector& dynamicgraph::sot::SotJointTrajectoryEntity::getNextCoM ( dg::Vector com,
const int &  time 
)

Return the next com.

dg::Vector& dynamicgraph::sot::SotJointTrajectoryEntity::getNextCoP ( dg::Vector cop,
const int &  time 
)

Return the next cop.

dg::Vector& dynamicgraph::sot::SotJointTrajectoryEntity::getNextPosition ( dg::Vector pos,
const int &  time 
)

Return the next pose for the legs.

sot::MatrixHomogeneous& dynamicgraph::sot::SotJointTrajectoryEntity::getNextWaist ( sot::MatrixHomogeneous waist,
const int &  time 
)

Return the next waist.

unsigned int& dynamicgraph::sot::SotJointTrajectoryEntity::getSeqId ( unsigned int &  seqid,
const int &  time 
)

Return the current seq identified of the current trajectory.

void dynamicgraph::sot::SotJointTrajectoryEntity::loadFile ( const std::string &  name)
int& dynamicgraph::sot::SotJointTrajectoryEntity::OneStepOfUpdate ( int &  dummy,
const int &  time 
)

Perform one update of the signals.

void dynamicgraph::sot::SotJointTrajectoryEntity::setInitTraj ( const std::string &  os)
protected

Implements the parsing and the affectation of initial trajectory.

void dynamicgraph::sot::SotJointTrajectoryEntity::UpdatePoint ( const JointTrajectoryPoint aJTP)
protected

Update the entity with the current point of the trajectory.

void dynamicgraph::sot::SotJointTrajectoryEntity::UpdateTrajectory ( const Trajectory aTrajectory)
protected

Update the entity with the trajectory aTrajectory.

sot::MatrixHomogeneous dynamicgraph::sot::SotJointTrajectoryEntity::XYZThetaToMatrixHomogeneous ( const dg::Vector xyztheta)

Convert a xyztheta vector into an homogeneous matrix.

Friends And Related Function Documentation

SOTJOINT_TRAJECTORY_ENTITY_EXPORT friend std::ostream& operator<< ( std::ostream &  os,
const SotJointTrajectoryEntity r 
)
friend

Member Data Documentation

dg::Vector dynamicgraph::sot::SotJointTrajectoryEntity::com_
protected

Store the center of mass.

dynamicgraph::SignalTimeDependent<dg::Vector,int> dynamicgraph::sot::SotJointTrajectoryEntity::comSOUT

Publish com for each evaluation of the graph.

dg::Vector dynamicgraph::sot::SotJointTrajectoryEntity::cop_
protected

Store the center of pressure ZMP.

std::deque<sot::Trajectory> dynamicgraph::sot::SotJointTrajectoryEntity::deque_traj_
protected

Queue of trajectories.

std::deque<sot::Trajectory>::size_type dynamicgraph::sot::SotJointTrajectoryEntity::index_
protected

Index on the point along the trajectory.

sot::Trajectory dynamicgraph::sot::SotJointTrajectoryEntity::init_traj_
protected

Initial state of the trajectory.

SignalTimeDependent<Dummy,int> dynamicgraph::sot::SotJointTrajectoryEntity::OneStepOfUpdateS

Internal signal to trigger one step of the algorithm.

dg::Vector dynamicgraph::sot::SotJointTrajectoryEntity::pose_
protected

Store the pos;.

dynamicgraph::SignalTimeDependent<dg::Vector,int> dynamicgraph::sot::SotJointTrajectoryEntity::positionSOUT

Publish pose for each evaluation of the graph.

dynamicgraph::SignalTimeDependent<int,int> dynamicgraph::sot::SotJointTrajectoryEntity::refresherSINTERN
unsigned int dynamicgraph::sot::SotJointTrajectoryEntity::seqid_
protected

Store the current seq identifier.

dynamicgraph::SignalTimeDependent<unsigned int,int> dynamicgraph::sot::SotJointTrajectoryEntity::seqIdSOUT

Publish ID of the trajectory currently realized.

timestamp dynamicgraph::sot::SotJointTrajectoryEntity::traj_timestamp_
protected

Keep the starting time as an identifier of the trajector.

dynamicgraph::SignalPtr<Trajectory,int> dynamicgraph::sot::SotJointTrajectoryEntity::trajectorySIN

Read a trajectory.

sot::MatrixHomogeneous dynamicgraph::sot::SotJointTrajectoryEntity::waist_
protected

Store the waist position.

dynamicgraph::SignalTimeDependent<sot::MatrixHomogeneous,int> dynamicgraph::sot::SotJointTrajectoryEntity::waistSOUT

Publish waist for each evaluation of the graph.

dynamicgraph::SignalTimeDependent<dg::Vector,int> dynamicgraph::sot::SotJointTrajectoryEntity::zmpSOUT

Publish zmp for each evaluation of the graph.