Records the trajectory by calling registered callback functions as new states arrive. More...
#include <trajectory_recorder.h>
Public Member Functions | |
void | delayedDeregisterCallback (const std::string &name) |
Deregisters a callback that is no longer to be called when a new state arrives. This function is should be called when the calling function is a NewStateCallbackFunction. | |
void | deregisterCallback (const std::string &name) |
Deregisters a callback that is no longer to be called when a new state arrives. Do NOT call this from inside NewStateCallbackFunction, or you may find yourself invalidating an iterator and segfaulting. | |
const std::string & | getName () const |
The name of the recorder. | |
void | registerCallback (const std::string &name, const NewStateCallbackFunction &callback) |
Register a callback function to get called when a new state arrives. | |
TrajectoryRecorder (const std::string &recorder_name) | |
Protected Member Functions | |
void | callCallbacks (const ros::Time &time, const std::map< std::string, double > &joint_positions, const std::map< std::string, double > &joint_velocities) |
Call all of the registered callbacks. | |
Protected Attributes | |
std::map< std::string, NewStateCallbackFunction > | callback_map_ |
std::vector< std::string > | deregister_list_ |
std::string | recorder_name_ |
Records the trajectory by calling registered callback functions as new states arrive.
Definition at line 53 of file trajectory_recorder.h.
trajectory_execution_monitor::TrajectoryRecorder::TrajectoryRecorder | ( | const std::string & | recorder_name | ) | [inline] |
Definition at line 57 of file trajectory_recorder.h.
void TrajectoryRecorder::callCallbacks | ( | const ros::Time & | time, |
const std::map< std::string, double > & | joint_positions, | ||
const std::map< std::string, double > & | joint_velocities | ||
) | [protected] |
Call all of the registered callbacks.
Definition at line 41 of file trajectory_recorder.cpp.
void trajectory_execution_monitor::TrajectoryRecorder::delayedDeregisterCallback | ( | const std::string & | name | ) | [inline] |
Deregisters a callback that is no longer to be called when a new state arrives. This function is should be called when the calling function is a NewStateCallbackFunction.
Definition at line 74 of file trajectory_recorder.h.
void trajectory_execution_monitor::TrajectoryRecorder::deregisterCallback | ( | const std::string & | name | ) | [inline] |
Deregisters a callback that is no longer to be called when a new state arrives. Do NOT call this from inside NewStateCallbackFunction, or you may find yourself invalidating an iterator and segfaulting.
Definition at line 68 of file trajectory_recorder.h.
const std::string& trajectory_execution_monitor::TrajectoryRecorder::getName | ( | ) | const [inline] |
The name of the recorder.
Definition at line 79 of file trajectory_recorder.h.
void trajectory_execution_monitor::TrajectoryRecorder::registerCallback | ( | const std::string & | name, |
const NewStateCallbackFunction & | callback | ||
) | [inline] |
Register a callback function to get called when a new state arrives.
Definition at line 61 of file trajectory_recorder.h.
std::map<std::string, NewStateCallbackFunction> trajectory_execution_monitor::TrajectoryRecorder::callback_map_ [protected] |
Definition at line 91 of file trajectory_recorder.h.
std::vector<std::string> trajectory_execution_monitor::TrajectoryRecorder::deregister_list_ [protected] |
Definition at line 92 of file trajectory_recorder.h.
std::string trajectory_execution_monitor::TrajectoryRecorder::recorder_name_ [protected] |
Definition at line 90 of file trajectory_recorder.h.