example_move_joint.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib; roslib.load_manifest('sr_edc_muscle_tools')
00003 import rospy
00004 from std_msgs.msg import Float64
00005 import math
00006 
00007 rospy.init_node('example1')
00008 
00009 # Move a joint, send position.
00010 # NB Load position controllers first
00011 
00012 # Create  publisher for the joints controller
00013 ffj3_pub = rospy.Publisher("/sh_ffj3_muscle_position_controller/command", Float64, latch=True)
00014 
00015 # Send targets
00016 ffj3_pub.publish(0)
00017 rospy.sleep(2)
00018 ffj3_pub.publish(math.radians(90) )
00019 rospy.sleep(6)
00020 
00021 # Using explicit message
00022 msg = Float64()
00023 msg.data = 0
00024 ffj3_pub.publish(msg)
00025 rospy.sleep(2)
00026 


sr_edc_muscle_tools
Author(s): Mark Pitchless
autogenerated on Thu Aug 27 2015 15:16:21