Ask Your Question
0

Building tf_tree

asked 2018-02-01 06:37:14 -0600

JayDe gravatar image

Hi!

I am somewhat confused on how to setup an appropriate tf tree for my application. I am using the iai_kinect2 package ( https://github.com/code-iai/iai_kinect2 ) to run my kinect v2s. With the option "publish_tf" set to true, the bridge will publish the following transforms (sorry, cannot upload pictures):

  • camera1_link -> camera1_rgb_optical_frame -> camera1_ir_optical_frame
  • camera2_link -> camera2_rgb_optical_frame -> camera2_ir_optical_frame

I now calibrated my Kinects using images from the *_ir_optical_frame. So I thought I could include wolrd->camera1_ir_optical_frame and world -> camera2_ir_optical_frame into my tf tree. Which, since each frame is only allowed to have one parent, does not work as intended.

My question now is: What is the most elegant way of building the tf tree I want?

Thanks!

PS. I am using ROS1 Kinetic on a Ubuntu 16.04 machine (Ubuntu 4.4.0-31.50-generic 4.4.13)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-02-03 02:35:11 -0600

NEngelhard gravatar image

The camera_link-frame is the parent frame of your camera-subtree so you should use this one to attach your camera to the tf-tree. You use the world->IR Transformation only as an intermediate result to compute the pose of the camera_link-frame relative to the world and then add the world->camera_link-Transformation to the tf-tree. so roughly T(world->camera_link) = T(world->IR) * T^-1(camera_link->IR)

edit flag offensive delete link more

Comments

Hi! Thanks, I suppose that is how you do it. Even though it introduces increased possibility for errors when the transformation between rgb and ir is not very good/precise.

JayDe gravatar imageJayDe ( 2018-02-05 02:19:05 -0600 )edit

You would have the same error for the rgb-camera if you use ir-frame as parent for the subtree.

NEngelhard gravatar imageNEngelhard ( 2018-02-05 03:48:08 -0600 )edit
0

answered 2018-02-02 10:22:17 -0600

I'm not quite sure I understand the problem, TF links a symmetric so as long as there aren't any circular links everything should work okay. Could you explain what you mean by 'does not work as expected' a little more?

edit flag offensive delete link more

Comments

In the setup I described above the *_ir_optical_frames would have two parents each, which seems to cause problems. The behavior I observed then was that the point clouds I wanted to watch - which are published in the *_ir_optical_frames - were only updated occasionally, felt like a huge lag.

JayDe gravatar imageJayDe ( 2018-02-05 02:22:09 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-02-01 06:37:14 -0600

Seen: 62 times

Last updated: Feb 03 '18