Get camera pose with respect to marker
Hi,
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?
Invert it with TF?
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.
Inverting the transform is not an operation. You can just swap
target_frame
andsource_frame
when callinglookupTransform(..)
.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 ?
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