# remapping tf frames

I'm wondering if it is possible to remap tf frames from inside a launch file (or other similar means) in the same way it is possible to remap topic names of published topics? My use case is that I have two Kinects between which I would like to define a transform. However, the base frame_id for the kinect is defined in the openni_driver.cpp file. This means that when I run two Kinects they broadcast the same tf frame of /openni_rgb_optical_frame. Any suggestions besides modifying the driver would be very much appreciated.

edit retag close merge delete

Sort by » oldest newest most voted

Not possible with the current driver, and it turns out there is already a ticket on this: #4688.

It seems like what should be done is to implement the (somewhat obscure, IMO) ~tf_prefix parameter (which if I understand correctly, should always be implemented by producers of tf data.. maybe someone can comment). So in my case I set tf_prefix to, e.g., "pelican1", and the frame_id's of the published point cloud and images are /pelican1/<original_frame_id>.

The rewrite branch of the driver appears to have the capability to set the frame names directly via a parameter which is even more flexible than tf_prefix, however it seems that tf_prefix should still be implemented.

more