Ask Your Question
0

question about ros2 bag play

asked 2019-07-16 21:40:46 -0600

RachelRen gravatar image

I am tried to use ros2 bag record to save the information of camera topic, but how to use ros2 bag play to loop play the package.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2019-07-17 05:21:13 -0600

alsora gravatar image

updated 2019-07-17 05:22:02 -0600

In ROS1 you could loop play using the -l command.

However, it appears that this has not been implemented yet in ROS2.

You can follow the development of rosbag for ROS2 here https://github.com/ros2/rosbag2

edit flag offensive delete link more

Comments

I can't mark your answer as correct even though it is :) rosbag2 doesn't have capabilities yet to play the data in a loop.

Karsten gravatar image Karsten  ( 2019-07-17 10:56:31 -0600 )edit
0

answered 2020-11-19 11:36:00 -0600

Ruthven gravatar image

The option has been implemented in April 2020 (https://github.com/ros2/rosbag2/commi...)

Use the -l (or --loop) option:

ros2 bag play <bagfile.db3> --loop
edit flag offensive delete link more
0

answered 2020-11-11 04:05:55 -0600

NY gravatar image

I simply use loop in batch file:

FOR /L %%A IN (1,1,10) DO ( ECHO %%A ros2 bag play <path to rosbag> )

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2019-07-16 21:40:46 -0600

Seen: 458 times

Last updated: Nov 19