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

Revision history [back]

click to hide/show revision 1
initial version

If you have two topics in a bag file that use the same frame_id, but you want them to have separate frame_ids, you can use the tool from the bag_tools package to change the frame_id on one of the nodes. You can install it with apt-get install ros-kinetic-bag-tools or similar.

In your situation, you could do this:

rosrun bag_tools -i current.bag -o new.bag -f imu2 -t "/imu2/imu/imu"

This would produce a new bag file in which the messages on the /imu2/imu/imu topic have the frame_id imu2. Then you can have a second static_transform_publisher in your launch file that publishes a transform from base_link to imu2:

<node name="tf_imu2" pkg="static_transform_publisher" args="1 0 3.5 3.14159 -1.5708 0 base_link imu2 200" />