Public Member Functions | Public Attributes
sr_hand.shadowhand_ros.ShadowHand_ROS Class Reference

List of all members.

Public Member Functions

def __init__
def activate_etherCAT_hand
def callback
def callback_arm
def callback_ethercat_states
def callVisualisationService
def check_CAN_hand_presence
def check_etherCAT_hand_presence
def check_gazebo_hand_presence
def check_hand_type
def create_grasp_interpoler
def get_tactile_state
def get_tactile_type
def has_arm
def init_actual_joints
def joint_states_callback
def read_all_current_arm_positions
def read_all_current_arm_targets
def read_all_current_efforts
def read_all_current_positions
def read_all_current_targets
def read_all_current_velocities
def record_step_to_file
def resend_targets
def save_hand_position_to_file
def sendupdate
def sendupdate_arm
def sendupdate_arm_from_dict
def sendupdate_from_dict
def set_sendupdate_topic
def set_shadowhand_data_topic
def valueof

Public Attributes

 allJoints
 armJoints
 cyberglove_pub
 cyberglove_sub
 cybergrasp_pub
 dict_arm_pos
 dict_arm_tar
 dict_ethercat_joints
 dict_pos
 dict_tar
 eth_publishers
 eth_subscribers
 grasp_interpoler
 grasp_parser
 EtherCAT hand.
 hand_effort
 hand_type
 hand_velocity
 handJoints
 hasarm
 isFirstMessage
 isFirstMessageArm
 isReady
 joint_states_listener
 joint_states_lock
 lastArmMsg
 lastMsg
 liste
 pub
 pub_arm
 rootPath
 sendupdate_lock
 sub
 sub_arm
 tactile_receiver
 topic_ending

Detailed Description

This is a python library used to easily access the shadow hand ROS interface.

Definition at line 42 of file shadowhand_ros.py.


Constructor & Destructor Documentation

Builds the library, creates the communication node in ROS and
initializes the hand publisher and subscriber to the default
values of shadowhand_data and sendupdate

Definition at line 46 of file shadowhand_ros.py.


Member Function Documentation

At the moment we just try to use the mixed position velocity controllers

Definition at line 478 of file shadowhand_ros.py.

@param data: The ROS message received which called the callback
If the message is the first received, initializes the dictionnaries
Else, it updates the lastMsg

Definition at line 174 of file shadowhand_ros.py.

@param data: The ROS message received which called the callback
If the message is the first received, initializes the dictionnaries
Else, it updates the lastMsg

Definition at line 189 of file shadowhand_ros.py.

def sr_hand.shadowhand_ros.ShadowHand_ROS.callback_ethercat_states (   self,
  data,
  jointName 
)
@param data: The ROS message received which called the callback
If the message is the first received, initializes the dictionnaries
Else, it updates the lastMsg
@param joint: a Joint object that contains the name of the joint that we receive data from

Definition at line 142 of file shadowhand_ros.py.

def sr_hand.shadowhand_ros.ShadowHand_ROS.callVisualisationService (   self,
  callList = 0,
  reset = 0 
)
@param callList: dictionnary mapping joint names to information that should be displayed
@param reset: flag used to tell if the parameters should be replaced by the new ones or just added to the previous ones
Calls a ROS service to display various information in Rviz

Definition at line 435 of file shadowhand_ros.py.

@return : true if the CAN hand is detected

Definition at line 222 of file shadowhand_ros.py.

Only used to check if a real etherCAT hand is detected in the system
check if something is being published to this topic, otherwise
return false
Bear in mind that the gazebo hand also publishes the joint_states topic,
so we need to check for the gazebo hand first

Definition at line 447 of file shadowhand_ros.py.

Only used to check if a Gazebo simulated (etherCAT protocol) hand is detected in the system
check if something is being published to this topic, otherwise
return false

Definition at line 464 of file shadowhand_ros.py.

@return : true if some hand is detected

Definition at line 210 of file shadowhand_ros.py.

def sr_hand.shadowhand_ros.ShadowHand_ROS.create_grasp_interpoler (   self,
  current_step,
  next_step 
)

Definition at line 139 of file shadowhand_ros.py.

Definition at line 531 of file shadowhand_ros.py.

Definition at line 528 of file shadowhand_ros.py.

@return : True if an arm is detected on the roscore

Definition at line 331 of file shadowhand_ros.py.

Initializes the library with just the fingers actually connected

Definition at line 201 of file shadowhand_ros.py.

The callback function for the topic joint_states.
It will store the received joint velocity and effort information in two dictionaries
Velocity will be converted to degrees/s.
Effort units are kept as they are (currently ADC units, as no calibration is performed on the strain gauges)

@param joint_state: the message containing the joints data.

Definition at line 508 of file shadowhand_ros.py.

@return: dictionnary mapping joint names to actual positions
Read all the positions in the lastMsg

Definition at line 410 of file shadowhand_ros.py.

@return: dictionnary mapping joint names to actual targets
Read all the targets in the lastMsg

Definition at line 419 of file shadowhand_ros.py.

@return: dictionary mapping joint names to current efforts

Definition at line 403 of file shadowhand_ros.py.

@return: dictionnary mapping joint names to actual positions
Read all the positions in the lastMsg

Definition at line 376 of file shadowhand_ros.py.

@return: dictionnary mapping joint names to current targets
Read all the targets in the lastMsg

Definition at line 387 of file shadowhand_ros.py.

@return: dictionary mapping joint names to current velocities

Definition at line 396 of file shadowhand_ros.py.

def sr_hand.shadowhand_ros.ShadowHand_ROS.record_step_to_file (   self,
  filename,
  grasp_as_xml 
)
@param filename: name (or path) of the file to save to
@param grasp_as_xml: xml-formatted grasp
Write the grasp at the end of the file, creates the file if does not exist

Definition at line 347 of file shadowhand_ros.py.

Resend the targets read in the lastMsg to the hand

Definition at line 428 of file shadowhand_ros.py.

Definition at line 370 of file shadowhand_ros.py.

def sr_hand.shadowhand_ros.ShadowHand_ROS.sendupdate (   self,
  jointName,
  angle = 0 
)
@param jointName: Name of the joint to update
@param angle: Target of the joint, 0 if not set
Sends a new target for the specified joint

Definition at line 277 of file shadowhand_ros.py.

def sr_hand.shadowhand_ros.ShadowHand_ROS.sendupdate_arm (   self,
  jointName,
  angle = 0 
)
@param jointName: Name of the joint to update
@param angle: Target of the joint, 0 if not set
Sends a new target for the specified joint

Definition at line 309 of file shadowhand_ros.py.

@param dicti: Dictionnary containing all the targets to send, mapping the name of the joint to the value of its target
Sends new targets to the hand from a dictionnary

Definition at line 299 of file shadowhand_ros.py.

@param dicti: Dictionnary containing all the targets to send, mapping the name of the joint to the value of its target
Sends new targets to the hand from a dictionnary

Definition at line 252 of file shadowhand_ros.py.

@param topic: The new topic to be set as the hand subscribing topic
Set the library to publish to a new topic

Definition at line 244 of file shadowhand_ros.py.

@param topic: The new topic to be set as the hand publishing topic
Set the library to listen to a new topic

Definition at line 236 of file shadowhand_ros.py.

def sr_hand.shadowhand_ros.ShadowHand_ROS.valueof (   self,
  jointName 
)
@param jointName: Name of the joint to read the value
@return: 'NaN' if the value is not correct, the actual position of the joint else

Definition at line 318 of file shadowhand_ros.py.


Member Data Documentation

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

EtherCAT hand.

Grasps

Definition at line 53 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 53 of file shadowhand_ros.py.

Definition at line 50 of file shadowhand_ros.py.


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


sr_hand
Author(s): Ugo Cupcic
autogenerated on Fri Aug 28 2015 13:08:52