sot-torque-control  1.6.1
Collection of dynamic-graph entities aimed at implementing torque control on different robots.
TracePlayer Class Reference

Entity to play data saved using a Tracer. More...

#include <sot/torque_control/trace-player.hh>

Inheritance diagram for TracePlayer:
Collaboration diagram for TracePlayer:

Public Types

typedef dynamicgraph::Signal< dynamicgraph::Vector, int > OutputSignalType
 

Public Member Functions

 TracePlayer (const std::string &name)
 
void addOutputSignal (const std::string &fileName, const std::string &signalName)
 
void clear ()
 
 DECLARE_SIGNAL_OUT (trigger, int)
 
virtual void display (std::ostream &os) const
 
void init (const double &dt)
 
void playNext ()
 
void rewind ()
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0)
 

Public Attributes

std::map< std::string, OutputSignalType * > m_outputSignals
 

Protected Types

typedef std::list< DataTypeDataHistoryType
 
typedef DataHistoryType::const_iterator DataPointerType
 
typedef dynamicgraph::Vector DataType
 

Protected Attributes

std::map< std::string, DataHistoryTypem_data
 
std::map< std::string, DataPointerTypem_dataPointers
 

Detailed Description

Entity to play data saved using a Tracer.

A typical use of this entity would be to call the command addOutputSignal for every file you previously saved with the Tracer. Then you can either call the command playNext, or you can call recompute on the output signal "trigger".

Definition at line 58 of file trace-player.hh.

Member Typedef Documentation

◆ DataHistoryType

typedef std::list<DataType> DataHistoryType
protected

Definition at line 88 of file trace-player.hh.

◆ DataPointerType

typedef DataHistoryType::const_iterator DataPointerType
protected

Definition at line 89 of file trace-player.hh.

◆ DataType

typedef dynamicgraph::Vector DataType
protected

Definition at line 87 of file trace-player.hh.

◆ OutputSignalType

typedef dynamicgraph::Signal<dynamicgraph::Vector, int> OutputSignalType

Definition at line 69 of file trace-player.hh.

Constructor & Destructor Documentation

◆ TracePlayer()

TracePlayer ( const std::string &  name)

Definition at line 32 of file trace-player.cpp.

Member Function Documentation

◆ addOutputSignal()

void addOutputSignal ( const std::string &  fileName,
const std::string &  signalName 
)

Definition at line 62 of file trace-player.cpp.

◆ clear()

void clear ( )

Definition at line 148 of file trace-player.cpp.

◆ DECLARE_SIGNAL_OUT()

DECLARE_SIGNAL_OUT ( trigger  ,
int   
)

◆ display()

void display ( std::ostream &  os) const
virtual

Definition at line 160 of file trace-player.cpp.

◆ init()

void init ( const double &  dt)

◆ playNext()

void playNext ( )

Definition at line 121 of file trace-player.cpp.

◆ rewind()

void rewind ( )

Definition at line 138 of file trace-player.cpp.

◆ sendMsg()

void sendMsg ( const std::string &  msg,
MsgType  t = MSG_TYPE_INFO,
const char *  = "",
int  = 0 
)
inline

Definition at line 82 of file trace-player.hh.

Member Data Documentation

◆ m_data

std::map<std::string, DataHistoryType> m_data
protected

Definition at line 91 of file trace-player.hh.

◆ m_dataPointers

std::map<std::string, DataPointerType> m_dataPointers
protected

Definition at line 92 of file trace-player.hh.

◆ m_outputSignals

std::map<std::string, OutputSignalType*> m_outputSignals

Definition at line 70 of file trace-player.hh.


The documentation for this class was generated from the following files: