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

question about ros2 bag play

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

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 -0500

alsora gravatar image

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

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 -0500 )edit
1

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

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

Comments

This one works, thanks!

leochien gravatar image leochien  ( 2023-05-19 01:41:34 -0500 )edit
0

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

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

Question Tools

3 followers

Stats

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

Seen: 3,418 times

Last updated: Nov 19 '20