Go to the documentation of this file.00001
00002
00003 """ Example code of how to move a servo. """
00004
00005
00006 import roslib; roslib.load_manifest('mini_max_tutorials')
00007 import rospy
00008
00009
00010 from std_msgs.msg import Float64
00011
00012 if __name__=="__main__":
00013
00014
00015 rospy.init_node('move_servo')
00016
00017
00018 tilt = rospy.Publisher('head_tilt_joint/command', Float64)
00019
00020
00021 while not rospy.is_shutdown():
00022
00023 tilt.publish(Float64(0.1))
00024 rospy.sleep(1.0)
00025 tilt.publish(Float64(0.0))
00026 rospy.sleep(1.0)
00027 tilt.publish(Float64(-0.1))
00028 rospy.sleep(1.0)
00029 tilt.publish(Float64(0.0))
00030 rospy.sleep(1.0)
00031
00032