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 TwistStamped
00021 
00022 def twistPub():
00023   rospy.init_node("test_publisher_twist_stamped", anonymous=True)
00024 
00025   pub = rospy.Publisher("twist_controller/command_twist_stamped", TwistStamped, queue_size=1)
00026   twist_stamped_msg =  TwistStamped()
00027 
00028   
00029   
00030   twist_stamped_msg.header.frame_id = "odom_combined"
00031   twist_stamped_msg.twist.linear.x = 0
00032   twist_stamped_msg.twist.linear.y = 0
00033   twist_stamped_msg.twist.linear.z = 0
00034   twist_stamped_msg.twist.angular.x = 0
00035   twist_stamped_msg.twist.angular.y = 0
00036   twist_stamped_msg.twist.angular.z = 0
00037 
00038   r = rospy.Rate(50)
00039 
00040   while not rospy.is_shutdown():
00041     twist_stamped_msg.header.stamp = rospy.Time.now()
00042     pub.publish(twist_stamped_msg)
00043     r.sleep()
00044 
00045 if __name__ == '__main__':
00046   try:
00047       twistPub()
00048   except rospy.ROSInterruptException: pass