Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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]

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< DiagnosticDatagetDiagnostics ()
 
virtual JointData getJointData (std::string joint_name)
 
virtual int16_t sendupdate (std::string joint_name, double target)
 
virtual int16_t setConfig (std::vector< std::string > myConfig)
 
virtual int16_t setContrl (std::string contrlr_name, JointControllerData ctrlr_data)
 
virtual ~CANCompatibilityArm ()
 
- Public Member Functions inherited from shadowrobot::SRArticulatedRobot
 SRArticulatedRobot ()
 
virtual ~SRArticulatedRobot ()
 

Protected Member Functions

void initializeMap ()
 
void joint_states_callback (const sensor_msgs::JointStateConstPtr &msg)
 

Protected Attributes

std::vector< ros::PublisherCAN_publishers
 
ros::Subscriber joint_state_subscriber
 
ros::NodeHandle n_tilde
 
ros::NodeHandle node
 
- Protected Attributes inherited from shadowrobot::SRArticulatedRobot
boost::shared_ptr< self_test::TestRunnerself_test
 this is the handle for the self tests. More...
 

Additional Inherited Members

- Public Types inherited from shadowrobot::SRArticulatedRobot
typedef std::map< std::string, JointDataJointsMap
 
typedef std::map< std::string, enum controller_parametersParametersMap
 
- Public Attributes inherited from shadowrobot::SRArticulatedRobot
boost::mutex controllers_map_mutex
 
JointsMap joints_map
 A mapping between the joint names and the information regarding those joints. More...
 
boost::mutex joints_map_mutex
 
ParametersMap parameters_map
 A mapping between the parameter names and their values. More...
 
boost::mutex parameters_map_mutex
 

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 47 of file CAN_compatibility_arm.hpp.

Constructor & Destructor Documentation

ROS_DEPRECATED shadowrobot::CANCompatibilityArm::CANCompatibilityArm ( )

Initializes the necessary mappings with a static list of names.

Definition at line 39 of file CAN_compatibility_arm.cpp.

shadowrobot::CANCompatibilityArm::~CANCompatibilityArm ( )
virtual

Definition at line 51 of file CAN_compatibility_arm.cpp.

Member Function Documentation

SRArticulatedRobot::JointsMap shadowrobot::CANCompatibilityArm::getAllJointsData ( )
virtual

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 174 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 202 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 187 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.

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

Implements shadowrobot::SRArticulatedRobot.

Definition at line 207 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 150 of file CAN_compatibility_arm.cpp.

void shadowrobot::CANCompatibilityArm::initializeMap ( )
protected

Initialize a mapping for the joints and the publishers.

Definition at line 55 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.

Parameters
msgthe joint state message.

Definition at line 213 of file CAN_compatibility_arm.cpp.

int16_t 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 106 of file CAN_compatibility_arm.cpp.

int16_t 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 196 of file CAN_compatibility_arm.cpp.

int16_t 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 179 of file CAN_compatibility_arm.cpp.

Member Data Documentation

std::vector<ros::Publisher> shadowrobot::CANCompatibilityArm::CAN_publishers
protected

Definition at line 111 of file CAN_compatibility_arm.hpp.

ros::Subscriber shadowrobot::CANCompatibilityArm::joint_state_subscriber
protected

Definition at line 114 of file CAN_compatibility_arm.hpp.

ros::NodeHandle shadowrobot::CANCompatibilityArm::n_tilde
protected

Definition at line 95 of file CAN_compatibility_arm.hpp.

ros::NodeHandle shadowrobot::CANCompatibilityArm::node
protected

Definition at line 95 of file CAN_compatibility_arm.hpp.


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


sr_hand
Author(s): Ugo Cupcic
autogenerated on Tue Oct 13 2020 03:55:53