Public Member Functions | |
def | __init__ |
def | callback |
def | callback_arm |
def | callVisualisationService |
def | check_hand_presence |
def | create_grasp_interpoler |
def | has_arm |
def | init_actual_joints |
def | read_all_current_arm_positions |
def | read_all_current_arm_targets |
def | read_all_current_positions |
def | read_all_current_targets |
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_pos | |
dict_tar | |
grasp_interpoler | |
grasp_parser | |
handJoints | |
hasarm | |
isFirstMessage | |
isFirstMessageArm | |
isReady | |
lastArmMsg | |
lastMsg | |
liste | |
pub | |
pub_arm | |
rootPath | |
sendupdate_lock | |
sub | |
sub_arm |
This is a python library used to easily access the shadow hand ROS interface.
Definition at line 38 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::__init__ | ( | self | ) |
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 42 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::callback | ( | self, | ||
data | ||||
) |
@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 114 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::callback_arm | ( | self, | ||
data | ||||
) |
@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 129 of file shadowhand_ros.py.
def 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 324 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::check_hand_presence | ( | self | ) |
@return : true if the hand if detected
Definition at line 150 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::create_grasp_interpoler | ( | self, | ||
current_step, | ||||
next_step | ||||
) |
Definition at line 111 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::has_arm | ( | self | ) |
@return : True if an arm is detected on the roscore
Definition at line 234 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::init_actual_joints | ( | self | ) |
Initializes the library with just the fingers actually connected
Definition at line 141 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::read_all_current_arm_positions | ( | self | ) |
@return: dictionnary mapping joint names to actual positions Read all the positions in the lastMsg
Definition at line 299 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::read_all_current_arm_targets | ( | self | ) |
@return: dictionnary mapping joint names to actual targets Read all the targets in the lastMsg
Definition at line 308 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::read_all_current_positions | ( | self | ) |
@return: dictionnary mapping joint names to actual positions Read all the positions in the lastMsg
Definition at line 279 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::read_all_current_targets | ( | self | ) |
@return: dictionnary mapping joint names to current targets Read all the targets in the lastMsg
Definition at line 290 of file shadowhand_ros.py.
def 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 250 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::resend_targets | ( | self | ) |
Resend the targets read in the lastMsg to the hand
Definition at line 317 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::save_hand_position_to_file | ( | self, | ||
filename | ||||
) |
Definition at line 273 of file shadowhand_ros.py.
def 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 191 of file shadowhand_ros.py.
def 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 212 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::sendupdate_arm_from_dict | ( | self, | ||
dicti | ||||
) |
@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 202 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::sendupdate_from_dict | ( | self, | ||
dicti | ||||
) |
@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 180 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::set_sendupdate_topic | ( | self, | ||
topic | ||||
) |
@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 172 of file shadowhand_ros.py.
def shadowhand_ros::ShadowHand_ROS::set_shadowhand_data_topic | ( | self, | ||
topic | ||||
) |
@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 164 of file shadowhand_ros.py.
def 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 221 of file shadowhand_ros.py.
Definition at line 48 of file shadowhand_ros.py.
Definition at line 70 of file shadowhand_ros.py.
Definition at line 77 of file shadowhand_ros.py.
Definition at line 78 of file shadowhand_ros.py.
Definition at line 79 of file shadowhand_ros.py.
Definition at line 92 of file shadowhand_ros.py.
Definition at line 93 of file shadowhand_ros.py.
Definition at line 90 of file shadowhand_ros.py.
Definition at line 91 of file shadowhand_ros.py.
Definition at line 107 of file shadowhand_ros.py.
Definition at line 99 of file shadowhand_ros.py.
Definition at line 69 of file shadowhand_ros.py.
Definition at line 89 of file shadowhand_ros.py.
Definition at line 85 of file shadowhand_ros.py.
Definition at line 86 of file shadowhand_ros.py.
Definition at line 87 of file shadowhand_ros.py.
Definition at line 76 of file shadowhand_ros.py.
Definition at line 75 of file shadowhand_ros.py.
Definition at line 88 of file shadowhand_ros.py.
Definition at line 82 of file shadowhand_ros.py.
Definition at line 84 of file shadowhand_ros.py.
Definition at line 101 of file shadowhand_ros.py.
Definition at line 95 of file shadowhand_ros.py.
Definition at line 81 of file shadowhand_ros.py.
Definition at line 83 of file shadowhand_ros.py.