move_arm_zero.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib; roslib.load_manifest('ric_robot')
00003 import rospy
00004 from std_msgs.msg import Float64
00005  
00006  
00007 def move_arm():
00008         pub_base_rotation=rospy.Publisher('/komodo_1/base_rotation_controller/command', Float64)
00009         pub_shoulder = rospy.Publisher('/komodo_1/shoulder_controller/command', Float64)
00010         pub_elbow1 = rospy.Publisher('/komodo_1/elbow1_controller/command', Float64)    
00011         pub_elbow2 = rospy.Publisher('/komodo_1/elbow2_controller/command', Float64)    
00012         pub_wrist = rospy.Publisher('/komodo_1/wrist_controller/command', Float64)
00013         pub_left_finger = rospy.Publisher('/komodo_1/left_finger_controller/command', Float64)
00014         pub_right_finger = rospy.Publisher('/komodo_1/right_finger_controller/command', Float64)
00015         rospy.init_node('move_arm')
00016         #while not rospy.is_shutdown():
00017         br = Float64(0.0)
00018         sh = Float64(0.0)
00019         e1 = Float64(0.0)
00020         e2 = Float64(0.0)       
00021         wr = Float64(0.0) 
00022         lf = Float64(0.0)       
00023         rf = Float64(0.0)
00024         rospy.loginfo('base_rotation_'+str(br))
00025         rospy.loginfo('shoulder_'+str(sh))
00026         rospy.loginfo('elbow1_'+str(e1))
00027         rospy.loginfo('elbow2_'+str(e2))
00028         rospy.loginfo('wrist_'+str(wr))
00029         rospy.loginfo('left_finger_'+str(lf))
00030         rospy.loginfo('right_finger_'+str(rf))
00031         pub_base_rotation.publish(br)
00032         pub_shoulder.publish(sh)
00033         pub_elbow1.publish(e1)
00034         pub_elbow2.publish(e2)
00035         pub_wrist.publish(wr)
00036         pub_left_finger.publish(lf)
00037         pub_right_finger.publish(rf)
00038         rospy.sleep(5.0)
00039 
00040  
00041 if __name__ == '__main__':
00042         try:
00043                 move_arm()
00044         except rospy.ROSInterruptException:
00045                 pass


ric_robot
Author(s): RoboTiCan
autogenerated on Thu Aug 27 2015 14:40:59