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

rosbag2 remap topic

asked 2020-03-05 05:47:42 -0500

hannatao gravatar image

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?

edit retag flag offensive close merge delete

Comments

for reference, here's how to do it in ros1: https://answers.ros.org/question/9248...

parzival gravatar image parzival  ( 2022-06-16 09:56:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-09-18 03:35:55 -0500

Phgo gravatar image

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
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-03-05 05:47:42 -0500

Seen: 4,244 times

Last updated: Sep 18 '20