5 from geometry_msgs.msg
import Twist, TwistStamped
7 rospy.init_node(
"twist_stamped_add_header")
8 pub = rospy.Publisher(
"cmd_vel_stamped", TwistStamped)
12 output = TwistStamped()
13 output.header.stamp = rospy.Time.now()
14 output.header.frame_id = sys.argv[1]
18 if len(sys.argv) != 3:
19 print(
"Usage: twist_stamped_add_header frame_id topic")
21 sub = rospy.Subscriber(sys.argv[2], Twist, callback)