transform Pose from one frame to another using tf
Hello
I have a Pose in the "camera_link" frame and I would like to convert it to the "map" frame. How can I do this using tf.transformPose using the latest transformation available?
would the following code do this using a last available transformation?
poseDock = PoseStamped()
poseDock.header.frame_id = "camera_link"
poseDock.header.stamp = rospy.Time.now()
poseDock.pose.position.x = x
poseDock.pose.position.y = y
poseDock.pose.orientation.z = q[2]
poseDock.pose.orientation.w = q[3]
listener.waitForTransform("map", poseDock.header.frame_id, poseDock.header.stamp, rospy.Duration(3.0))
newPoseDock = PoseStamped()
newPoseDock = listener.transformPose('map', poseDock)
thank you