how to transform position from one point of a frame to another frame.

asked 2021-03-10 05:46:26 -0500

mateusguilherme gravatar image

updated 2021-03-10 06:04:09 -0500

Hello

What is the best way to transform a point that is in the "camera_frame" frame to the "map" frame using only TF and python. I would like the last available transformation to be used.

Example of the position I want to convert to the map frame:

 pose_in_the_camera_frame = PoseStamped()
 pose_in_the_camera_frame.header.frame_id = "camera_frame"
 pose_in_the_camera_frame.header.stamp = rospy.Time.now()
 pose_in_the_camera_frame.pose.position.x = 1
 pose_in_the_camera_frame.pose.position.y = 1
 pose_in_the_camera_frame.pose.orientation.z = 0
 pose_in_the_camera_frame.pose.orientation.w = 1

I saw something about "listener.waitForTransform", "listener.lookupTransform" and "listener.transformPose", but I'm not sure how to use the latest available transformation between "camera frame" and "map"

thanks

edit retag flag offensive close merge delete