Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 import rospy
00019 import math
00020 from geometry_msgs.msg import Twist
00021
00022 def twistPub():
00023 rospy.init_node("test_publisher_twist", anonymous=True)
00024
00025 pub = rospy.Publisher("twist_controller/command_twist", Twist, queue_size=1)
00026 twist_msg = Twist()
00027
00028 twist_msg.linear.x = 0
00029 twist_msg.linear.y = -0.05
00030 twist_msg.linear.z = 0
00031 twist_msg.angular.x = 0
00032 twist_msg.angular.y = 0
00033 twist_msg.angular.z = 0
00034
00035 r = rospy.Rate(50)
00036
00037 while not rospy.is_shutdown():
00038 pub.publish(twist_msg)
00039 r.sleep()
00040
00041 if __name__ == '__main__':
00042 try:
00043 twistPub()
00044 except rospy.ROSInterruptException: pass