rosbag2 remap topic
Ros2 supoport remap topics in command line. But when I try to use rosbag2 to play and remap topics, the command line can't recognize my input for "--ros-args -r chatter:=demo". Is there any ideas of playing bags with remapped topics?
Asked by hannatao on 2020-03-05 06:47:42 UTC
Answers
In the mean time this function has been added to rosbag2
(see PR #388). However, as far as I can tell the feature has not been back-ported to the eloquent
branch so far. So if you need this you might need to build rosbag2
from source (including the PR mentioned above).
With this changes, that are already in the latest ROS foxy
release, you can now remap topics when playing bagfiles as:
ros2 bag play my_bagfile --remap old_topic:=new_topic
Asked by Phgo on 2020-09-18 03:35:55 UTC
Comments
for reference, here's how to do it in ros1: https://answers.ros.org/question/9248/how-do-you-remap-a-topic/?comment=402405#post-id-402405
Asked by parzival on 2022-06-16 09:56:47 UTC