#include <ModeArbiter.h>
Public Member Functions | |
int | AssignArbitrationProperties (const r2_msgs::Modes &modeMsg) |
void | AssignMaster (const std::string &name) |
void | ClearMaps () |
bool | CreateCommandMessage (const r2_msgs::LabeledGains &gainsIn, r2_msgs::Gains &gainsOut) |
bool | CreateCommandMessage (const r2_msgs::LabeledJointState &jsIn, sensor_msgs::JointState &jsOut) |
bool | CreateCommandMessage (const r2_msgs::LabeledPoseTrajectory &ptIn, r2_msgs::PoseTrajectory &ptOut) |
bool | CreateCommandMessage (const r2_msgs::LabeledControllerPoseSettings &psIn, r2_msgs::ControllerPoseSettings &psOut) |
bool | CreateCommandMessage (const r2_msgs::LabeledJointTrajectory &jtIn, trajectory_msgs::JointTrajectory &jtOut) |
bool | CreateCommandMessage (const r2_msgs::LabeledControllerJointSettings &jsIn, r2_msgs::ControllerJointSettings &jsOut) |
bool | CreateCommandMessage (const r2_msgs::LabeledGripperPositionCommand &gpIn, r2_msgs::GripperPositionCommand &gpOut) |
bool | CreateCommandMessage (const r2_msgs::LabeledJointControlDataArray &jcIn, r2_msgs::JointControlDataArray &jcOut) |
bool | CreateCommandMessage (const r2_msgs::LabeledTrajectoryMonitorFactors &tmfIn, r2_msgs::TrajectoryMonitorFactors &tmfOut) |
void | CreateTriggerMessages (std::vector< r2_msgs::Modes > &triggerMsgs) |
bool | GetMapElement (const std::string &map, const std::string &element, std::string &value) |
void | GetMaster (std::string &name) |
void | InitializeMaps (std::vector< std::string > mechanisms, std::vector< std::string > exJoints) |
bool | isValidHijack (const std::string &name) |
ModeArbiter () | |
~ModeArbiter () | |
Private Member Functions | |
int | AssignIncumbents (const r2_msgs::Modes &modeMsg) |
int | AssignModes (const r2_msgs::Modes &modeMsg) |
int | AssignSupervisors (const r2_msgs::Modes &modeMsg) |
bool | isValidCommand (const std::string &originator, const std::vector< std::string > &jointNames) |
bool | isValidCommand (const r2_msgs::Modes &modeMsg) |
bool | isValidCommand (const r2_msgs::LabeledGains &gains) |
bool | isValidCommand (const r2_msgs::LabeledJointState &js) |
bool | isValidCommand (const r2_msgs::LabeledPoseTrajectory &pt) |
bool | isValidCommand (const r2_msgs::LabeledControllerPoseSettings &ps) |
bool | isValidCommand (const r2_msgs::LabeledJointTrajectory &jt) |
bool | isValidCommand (const r2_msgs::LabeledControllerJointSettings &js) |
bool | isValidCommand (const r2_msgs::LabeledGripperPositionCommand &gp) |
bool | isValidCommand (const r2_msgs::LabeledJointControlDataArray &jc) |
bool | isValidCommand (const r2_msgs::LabeledTrajectoryMonitorFactors &tmf) |
Private Attributes | |
std::vector< std::string > | grippers |
std::map< std::string, std::string > | incumbentMap |
std::string | master |
std::map< std::string, std::string > | modeMap |
std::map< std::string, std::string > | supervisorMap |
Definition at line 32 of file ModeArbiter.h.
Definition at line 4 of file ModeArbiter.cpp.
Definition at line 8 of file ModeArbiter.cpp.
int ModeArbiter::AssignArbitrationProperties | ( | const r2_msgs::Modes & | modeMsg | ) |
Definition at line 127 of file ModeArbiter.cpp.
int ModeArbiter::AssignIncumbents | ( | const r2_msgs::Modes & | modeMsg | ) | [private] |
Definition at line 184 of file ModeArbiter.cpp.
void ModeArbiter::AssignMaster | ( | const std::string & | name | ) |
Definition at line 101 of file ModeArbiter.cpp.
int ModeArbiter::AssignModes | ( | const r2_msgs::Modes & | modeMsg | ) | [private] |
Definition at line 212 of file ModeArbiter.cpp.
int ModeArbiter::AssignSupervisors | ( | const r2_msgs::Modes & | modeMsg | ) | [private] |
Definition at line 157 of file ModeArbiter.cpp.
void ModeArbiter::ClearMaps | ( | ) |
Definition at line 61 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledGains & | gainsIn, |
r2_msgs::Gains & | gainsOut | ||
) |
Definition at line 404 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledJointState & | jsIn, |
sensor_msgs::JointState & | jsOut | ||
) |
Definition at line 423 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledPoseTrajectory & | ptIn, |
r2_msgs::PoseTrajectory & | ptOut | ||
) |
Definition at line 440 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledControllerPoseSettings & | psIn, |
r2_msgs::ControllerPoseSettings & | psOut | ||
) |
Definition at line 457 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledJointTrajectory & | jtIn, |
trajectory_msgs::JointTrajectory & | jtOut | ||
) |
Definition at line 473 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledControllerJointSettings & | jsIn, |
r2_msgs::ControllerJointSettings & | jsOut | ||
) |
Definition at line 488 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledGripperPositionCommand & | gpIn, |
r2_msgs::GripperPositionCommand & | gpOut | ||
) |
Definition at line 503 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledJointControlDataArray & | jcIn, |
r2_msgs::JointControlDataArray & | jcOut | ||
) |
Definition at line 519 of file ModeArbiter.cpp.
bool ModeArbiter::CreateCommandMessage | ( | const r2_msgs::LabeledTrajectoryMonitorFactors & | tmfIn, |
r2_msgs::TrajectoryMonitorFactors & | tmfOut | ||
) |
Definition at line 552 of file ModeArbiter.cpp.
void ModeArbiter::CreateTriggerMessages | ( | std::vector< r2_msgs::Modes > & | triggerMsgs | ) |
Definition at line 567 of file ModeArbiter.cpp.
bool ModeArbiter::GetMapElement | ( | const std::string & | map, |
const std::string & | element, | ||
std::string & | value | ||
) |
Definition at line 68 of file ModeArbiter.cpp.
void ModeArbiter::GetMaster | ( | std::string & | name | ) |
Definition at line 106 of file ModeArbiter.cpp.
void ModeArbiter::InitializeMaps | ( | std::vector< std::string > | mechanisms, |
std::vector< std::string > | exJoints | ||
) |
Definition at line 12 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const std::string & | originator, |
const std::vector< std::string > & | jointNames | ||
) | [private] |
Definition at line 239 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::Modes & | modeMsg | ) | [private] |
Definition at line 279 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledGains & | gains | ) | [private] |
Definition at line 285 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledJointState & | js | ) | [private] |
Definition at line 290 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledPoseTrajectory & | pt | ) | [private] |
Definition at line 295 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledControllerPoseSettings & | ps | ) | [private] |
Definition at line 316 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledJointTrajectory & | jt | ) | [private] |
Definition at line 363 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledControllerJointSettings & | js | ) | [private] |
Definition at line 368 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledGripperPositionCommand & | gp | ) | [private] |
Definition at line 337 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledJointControlDataArray & | jc | ) | [private] |
Definition at line 378 of file ModeArbiter.cpp.
bool ModeArbiter::isValidCommand | ( | const r2_msgs::LabeledTrajectoryMonitorFactors & | tmf | ) | [private] |
Definition at line 373 of file ModeArbiter.cpp.
bool ModeArbiter::isValidHijack | ( | const std::string & | name | ) |
check if hijacker is in the supervisor map
Definition at line 111 of file ModeArbiter.cpp.
std::vector<std::string> ModeArbiter::grippers [private] |
Definition at line 82 of file ModeArbiter.h.
std::map<std::string, std::string> ModeArbiter::incumbentMap [private] |
Definition at line 80 of file ModeArbiter.h.
std::string ModeArbiter::master [private] |
Definition at line 81 of file ModeArbiter.h.
std::map<std::string, std::string> ModeArbiter::modeMap [private] |
Definition at line 80 of file ModeArbiter.h.
std::map<std::string, std::string> ModeArbiter::supervisorMap [private] |
Definition at line 80 of file ModeArbiter.h.