20 from geometry_msgs.msg
import TwistStamped
23 rospy.init_node(
"test_publisher_twist_stamped", anonymous=
True)
25 pub = rospy.Publisher(
"twist_controller/command_twist_stamped", TwistStamped, queue_size=1)
26 twist_stamped_msg = TwistStamped()
30 twist_stamped_msg.header.frame_id =
"odom_combined" 31 twist_stamped_msg.twist.linear.x = 0
32 twist_stamped_msg.twist.linear.y = 0
33 twist_stamped_msg.twist.linear.z = 0
34 twist_stamped_msg.twist.angular.x = 0
35 twist_stamped_msg.twist.angular.y = 0
36 twist_stamped_msg.twist.angular.z = 0
40 while not rospy.is_shutdown():
41 twist_stamped_msg.header.stamp = rospy.Time.now()
42 pub.publish(twist_stamped_msg)
45 if __name__ ==
'__main__':
48 except rospy.ROSInterruptException:
pass