ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I think I had the same problem and I found the following syntax to work from my launch file:

<node pkg="tf" type="tf_remap" name="tf_remapper" output="screen">
  <rosparam param="mappings">
    [{old: depth_camera, new: /camera_rgb_optical_frame},{old: thermal_camera, new: /camera_optris_frame}]
  </rosparam>
</node>

<node pkg="rosbag" type="play" name="player" args="--clock $(arg bag_dir)/$(arg file)">
  <remap from="tf" to="tf_old" />
</node>

Bear in mind I was remapping two frames, so you probably won't need the comma. Also, my original frames didn't have a forward slash in front of them which is why I left it out.

You should then see a message printed to the console with something like the following:

Applying the following mappings to incoming tf frame ids {'depth_camera': '/camera_rgb_optical_frame', 'thermal_camera': '/camera_optris_frame'}