sr_left_print_joints_position.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 from sr_robot_commander.sr_hand_commander import SrHandCommander
00005 
00006 rospy.init_node("print_left_joints_position", anonymous=True)
00007 
00008 hand_commander = SrHandCommander(name="left_hand", prefix="lh")
00009 
00010 print("Joints positions")
00011 
00012 all_joints_state = hand_commander.get_joints_position()
00013 
00014 hand_joints_state = {k: v for k, v in all_joints_state.items() if k.startswith("lh_")}
00015 arm_joints_state = {k: v for k, v in all_joints_state.items() if k.startswith("la_")}
00016 
00017 
00018 print("Hand joints position \n " + str(hand_joints_state) + "\n")
00019 print("Arm joints position \n " + str(arm_joints_state) + "\n")


sr_example
Author(s): Ugo Cupcic
autogenerated on Fri Aug 21 2015 12:25:43