5 from geometry_msgs.msg
import PoseStamped
6 from tf.transformations
import quaternion_from_euler
10 print "Usage: pose_stamped_publisher.py x y z roll pitch yaw from_frame rate" 13 "convert roll-pitch-yaw to quaternion" 14 return quaternion_from_euler(roll, pitch, yaw)
16 if __name__ ==
"__main__":
17 rospy.init_node(
"pose_stamped_publisher")
32 pose.header.frame_id = frame
33 pose.pose.position.x = x
34 pose.pose.position.y = y
35 pose.pose.position.z = z
38 pose.pose.orientation.x = q[0]
39 pose.pose.orientation.y = q[1]
40 pose.pose.orientation.x = q[2]
41 pose.pose.orientation.w = q[3]
43 pub = rospy.Publisher(
"~output", PoseStamped)
44 while not rospy.is_shutdown():
45 pose.header.stamp = rospy.Time.now()
def eulerToQuaternion(roll, pitch, yaw)