This compatibility interface is a wrapper around the new CAN Hand ROS driver. It is used to present the same interface as the CAN hand. More...
#include <CAN_compatibility_arm.hpp>
Public Member Functions | |
ROS_DEPRECATED | CANCompatibilityArm () |
virtual JointsMap | getAllJointsData () |
virtual void | getConfig (std::string joint_name) |
virtual JointControllerData | getContrl (std::string ctrlr_name) |
virtual std::vector < DiagnosticData > | getDiagnostics () |
virtual JointData | getJointData (std::string joint_name) |
virtual short | sendupdate (std::string joint_name, double target) |
virtual short | setConfig (std::vector< std::string > myConfig) |
virtual short | setContrl (std::string contrlr_name, JointControllerData ctrlr_data) |
~CANCompatibilityArm () | |
destructor | |
Protected Member Functions | |
void | initializeMap () |
void | joint_states_callback (const sensor_msgs::JointStateConstPtr &msg) |
Protected Attributes | |
std::vector< ros::Publisher > | CAN_publishers |
This vector stores publishers to each joint controller. | |
ros::Subscriber | joint_state_subscriber |
a subscriber for the /joint_states topic. | |
ros::NodeHandle | n_tilde |
ros::NodeHandle | node |
This compatibility interface is a wrapper around the new CAN Hand ROS driver. It is used to present the same interface as the CAN hand.
Definition at line 44 of file CAN_compatibility_arm.hpp.
Initializes the necessary mappings with a static list of names.
Definition at line 37 of file CAN_compatibility_arm.cpp.
destructor
Definition at line 48 of file CAN_compatibility_arm.cpp.
Get the data for all the joints.
Implements shadowrobot::SRArticulatedRobot.
Definition at line 162 of file CAN_compatibility_arm.cpp.
void shadowrobot::CANCompatibilityArm::getConfig | ( | std::string | joint_name | ) | [virtual] |
Get the config of the palm
joint_name |
Implements shadowrobot::SRArticulatedRobot.
Definition at line 186 of file CAN_compatibility_arm.cpp.
JointControllerData shadowrobot::CANCompatibilityArm::getContrl | ( | std::string | contrlr_name | ) | [virtual] |
Get the controller parameters for a given controller name.
contrlr_name | the name of the controller. |
Implements shadowrobot::SRArticulatedRobot.
Definition at line 173 of file CAN_compatibility_arm.cpp.
std::vector< DiagnosticData > shadowrobot::CANCompatibilityArm::getDiagnostics | ( | ) | [virtual] |
Not used in this interface: the diagnostics are published directly by the EtherCAT hand driver.
Implements shadowrobot::SRArticulatedRobot.
Definition at line 191 of file CAN_compatibility_arm.cpp.
JointData shadowrobot::CANCompatibilityArm::getJointData | ( | std::string | joint_name | ) | [virtual] |
Returns the last data we received for the given joint.
joint_name | The name of the joint, as specified in joints_map. |
Implements shadowrobot::SRArticulatedRobot.
Definition at line 140 of file CAN_compatibility_arm.cpp.
void shadowrobot::CANCompatibilityArm::initializeMap | ( | ) | [protected] |
Initialize a mapping for the joints and the publishers.
Definition at line 52 of file CAN_compatibility_arm.cpp.
void shadowrobot::CANCompatibilityArm::joint_states_callback | ( | const sensor_msgs::JointStateConstPtr & | msg | ) | [protected] |
This callback is called each time a joint state message is received. We Update the internal joint map when we receive this message.
msg | the joint state message. |
Definition at line 197 of file CAN_compatibility_arm.cpp.
short shadowrobot::CANCompatibilityArm::sendupdate | ( | std::string | joint_name, |
double | target | ||
) | [virtual] |
This function will send the targets to the correct controllers.
joint_name | The Joint in joints_map you wish to send the target to. |
target | The target in degree |
Implements shadowrobot::SRArticulatedRobot.
Definition at line 103 of file CAN_compatibility_arm.cpp.
short shadowrobot::CANCompatibilityArm::setConfig | ( | std::vector< std::string > | myConfig | ) | [virtual] |
Set the config of the palm
myConfig |
Implements shadowrobot::SRArticulatedRobot.
Definition at line 180 of file CAN_compatibility_arm.cpp.
short shadowrobot::CANCompatibilityArm::setContrl | ( | std::string | contrlr_name, |
JointControllerData | ctrlr_data | ||
) | [virtual] |
Set the controller parameters for a given controller name.
contrlr_name | The name of the controller to setup. |
ctrlr_data | The data to pass to this controller. |
Implements shadowrobot::SRArticulatedRobot.
Definition at line 167 of file CAN_compatibility_arm.cpp.
This vector stores publishers to each joint controller.
Definition at line 103 of file CAN_compatibility_arm.hpp.
a subscriber for the /joint_states topic.
Definition at line 106 of file CAN_compatibility_arm.hpp.
Definition at line 87 of file CAN_compatibility_arm.hpp.
Definition at line 87 of file CAN_compatibility_arm.hpp.