example_move_joint.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib
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(
00014     "/sh_ffj3_muscle_position_controller/command", Float64, latch=True)
00015 
00016 # Send targets
00017 ffj3_pub.publish(0)
00018 rospy.sleep(2)
00019 ffj3_pub.publish(math.radians(90))
00020 rospy.sleep(6)
00021 
00022 # Using explicit message
00023 msg = Float64()
00024 msg.data = 0
00025 ffj3_pub.publish(msg)
00026 rospy.sleep(2)


sr_edc_muscle_tools
Author(s): Mark Pitchless
autogenerated on Mon Jul 1 2019 20:06:25