Executes and monitors a set of trajectories. More...
#include <trajectory_execution_monitor.h>
Public Member Functions | |
void | addTrajectoryControllerHandler (boost::shared_ptr< TrajectoryControllerHandler > &trajectory_controller_handler) |
Add a controller to a list of controllers. | |
void | addTrajectoryRecorder (boost::shared_ptr< TrajectoryRecorder > &trajectory_recorder) |
Add a recorder to a list of recorders. | |
void | executeTrajectories (const std::vector< TrajectoryExecutionRequest > &to_execute, const boost::function< bool(TrajectoryExecutionDataVector)> &done_callback) |
Execute a series of trajectories, in order. The callbacks will get called, in order, after each trajectory is finished executing. | |
TrajectoryExecutionMonitor () | |
Protected Member Functions | |
bool | closeEnough (const TrajectoryExecutionRequest &ter, const TrajectoryExecutionData &ted) |
Returns true if the executed trajectory endpoint is close to intended trajectory endpoint. | |
void | compareLastRecordedToStart (const TrajectoryExecutionRequest &last_ter, const TrajectoryExecutionRequest &next_ter, const TrajectoryExecutionData &ted) |
Compare recorded trajectory to expected trajectory. | |
bool | sendTrajectory (const TrajectoryExecutionRequest &ter) |
void | trajectoryFinishedCallbackFunction (TrajectoryControllerState controller_state) |
Gets called after the execution of a trajectory. | |
Protected Attributes | |
planning_environment::CollisionModels | cm_ |
unsigned int | current_trajectory_index_ |
const std::vector < TrajectoryExecutionRequest > * | execution_data_ |
TrajectoryExecutionDataVector | execution_result_vector_ |
boost::shared_ptr < TrajectoryControllerHandler > | last_requested_handler_ |
boost::function< bool(TrajectoryExecutionDataVector)> | result_callback_ |
std::map< std::string, boost::shared_ptr < TrajectoryControllerHandler > > | trajectory_controller_handler_map_ |
std::map< std::string, boost::shared_ptr < TrajectoryRecorder > > | trajectory_recorder_map_ |
Executes and monitors a set of trajectories.
Definition at line 117 of file trajectory_execution_monitor.h.
Definition at line 122 of file trajectory_execution_monitor.h.
void TrajectoryExecutionMonitor::addTrajectoryControllerHandler | ( | boost::shared_ptr< TrajectoryControllerHandler > & | trajectory_controller_handler | ) |
Add a controller to a list of controllers.
Definition at line 57 of file trajectory_execution_monitor.cpp.
void TrajectoryExecutionMonitor::addTrajectoryRecorder | ( | boost::shared_ptr< TrajectoryRecorder > & | trajectory_recorder | ) |
Add a recorder to a list of recorders.
Definition at line 53 of file trajectory_execution_monitor.cpp.
bool TrajectoryExecutionMonitor::closeEnough | ( | const TrajectoryExecutionRequest & | ter, |
const TrajectoryExecutionData & | ted | ||
) | [protected] |
Returns true if the executed trajectory endpoint is close to intended trajectory endpoint.
Definition at line 197 of file trajectory_execution_monitor.cpp.
void TrajectoryExecutionMonitor::compareLastRecordedToStart | ( | const TrajectoryExecutionRequest & | last_ter, |
const TrajectoryExecutionRequest & | next_ter, | ||
const TrajectoryExecutionData & | ted | ||
) | [protected] |
Compare recorded trajectory to expected trajectory.
Definition at line 217 of file trajectory_execution_monitor.cpp.
void TrajectoryExecutionMonitor::executeTrajectories | ( | const std::vector< TrajectoryExecutionRequest > & | to_execute, |
const boost::function< bool(TrajectoryExecutionDataVector)> & | done_callback | ||
) |
Execute a series of trajectories, in order. The callbacks will get called, in order, after each trajectory is finished executing.
Definition at line 62 of file trajectory_execution_monitor.cpp.
bool TrajectoryExecutionMonitor::sendTrajectory | ( | const TrajectoryExecutionRequest & | ter | ) | [protected] |
Definition at line 76 of file trajectory_execution_monitor.cpp.
void TrajectoryExecutionMonitor::trajectoryFinishedCallbackFunction | ( | TrajectoryControllerState | controller_state | ) | [protected] |
Gets called after the execution of a trajectory.
Definition at line 132 of file trajectory_execution_monitor.cpp.
planning_environment::CollisionModels trajectory_execution_monitor::TrajectoryExecutionMonitor::cm_ [protected] |
Definition at line 161 of file trajectory_execution_monitor.h.
unsigned int trajectory_execution_monitor::TrajectoryExecutionMonitor::current_trajectory_index_ [protected] |
Definition at line 155 of file trajectory_execution_monitor.h.
const std::vector<TrajectoryExecutionRequest>* trajectory_execution_monitor::TrajectoryExecutionMonitor::execution_data_ [protected] |
Definition at line 154 of file trajectory_execution_monitor.h.
TrajectoryExecutionDataVector trajectory_execution_monitor::TrajectoryExecutionMonitor::execution_result_vector_ [protected] |
Definition at line 153 of file trajectory_execution_monitor.h.
boost::shared_ptr<TrajectoryControllerHandler> trajectory_execution_monitor::TrajectoryExecutionMonitor::last_requested_handler_ [protected] |
Definition at line 157 of file trajectory_execution_monitor.h.
boost::function<bool(TrajectoryExecutionDataVector)> trajectory_execution_monitor::TrajectoryExecutionMonitor::result_callback_ [protected] |
Definition at line 152 of file trajectory_execution_monitor.h.
std::map<std::string, boost::shared_ptr<TrajectoryControllerHandler> > trajectory_execution_monitor::TrajectoryExecutionMonitor::trajectory_controller_handler_map_ [protected] |
Definition at line 159 of file trajectory_execution_monitor.h.
std::map<std::string, boost::shared_ptr<TrajectoryRecorder> > trajectory_execution_monitor::TrajectoryExecutionMonitor::trajectory_recorder_map_ [protected] |
Definition at line 158 of file trajectory_execution_monitor.h.