Public Member Functions | Protected Member Functions | Protected Attributes
shadowrobot::CANCompatibilityArm Class Reference

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>

Inheritance diagram for shadowrobot::CANCompatibilityArm:
Inheritance graph
[legend]

List of all members.

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::PublisherCAN_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

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

Get the data for all the joints.

Returns:
a mapping between the joints names and the information for each joint.

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

Todo:
Not implemented yet
Parameters:
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.

Parameters:
contrlr_namethe name of the controller.
Returns:
The parameters of this controller

Implements shadowrobot::SRArticulatedRobot.

Definition at line 173 of file CAN_compatibility_arm.cpp.

Not used in this interface: the diagnostics are published directly by the EtherCAT hand driver.

Returns:
A vector containing all the diagnostics for the hand (motor information, etc...)

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.

Parameters:
joint_nameThe name of the joint, as specified in joints_map.
Returns:
The information regarding this joint.

Implements shadowrobot::SRArticulatedRobot.

Definition at line 140 of file CAN_compatibility_arm.cpp.

Initialize a mapping for the joints and the publishers.

Definition at line 52 of file CAN_compatibility_arm.cpp.

This callback is called each time a joint state message is received. We Update the internal joint map when we receive this message.

Parameters:
msgthe 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.

Parameters:
joint_nameThe Joint in joints_map you wish to send the target to.
targetThe target in degree
Returns:
0 if success ; -1 if error

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

Todo:
Not implemented yet
Parameters:
myConfig
Returns:

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.

Parameters:
contrlr_nameThe name of the controller to setup.
ctrlr_dataThe data to pass to this controller.
Returns:
0 if success.

Implements shadowrobot::SRArticulatedRobot.

Definition at line 167 of file CAN_compatibility_arm.cpp.


Member Data Documentation

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.


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


sr_hand
Author(s): Ugo Cupcic / ugo@shadowrobot.com, contact@shadowrobot.com
autogenerated on Fri Jan 3 2014 12:03:25