Get camera pose with respect to marker

asked 2019-03-03 15:39:11 -0600

akcast gravatar image


I am using Aruco_ROS , with which I have a single marker and a realsense d435 camera.

From the published topics, only the marker's pose w.r.t to the camera can be found.

I am wondering how do I get the camera's pose w.r.t. the Aruco marker?

edit retag flag offensive close merge delete


Invert it with TF?

gvdhoorn gravatar image gvdhoorn  ( 2019-03-03 15:58:00 -0600 )edit

Since Im a beginner with TF in ROS, could you please point me towards how I could do the inverting with TF ? At the moment I see a transformPose method of the Transform Listener class but I am not sure if this is what I need. i.e. to get the pose of frame2 from the known pose of frame1.

akcast gravatar image akcast  ( 2019-03-04 06:13:34 -0600 )edit

Inverting the transform is not an operation. You can just swap target_frame and source_frame when calling lookupTransform(..).

gvdhoorn gravatar image gvdhoorn  ( 2019-03-04 06:36:23 -0600 )edit

Yes, once lookupTransform is done, i can get the tvec and rvec from the camera(source frame) to the marker(target frame) . How would I get the Pose of the camera from this transform returned by the lookupTransform method ?

akcast gravatar image akcast  ( 2019-03-05 09:43:41 -0600 )edit

Also when viewing TF in Rviz, with the Marker as the Fixed frame, it shows the marker above and the camera below, when actually the camera is above and the marker flat below. Shouldnt the camera be shown above the marker ? Heres a link to the TF of the camera and pose link text

akcast gravatar image akcast  ( 2019-03-05 10:24:36 -0600 )edit