0

Rosanswers logo

Is there a way to get rosbag to play a bag file on loop?


Originally posted by ckirksey on ROS Answers with karma: 203 on 2017-03-22

Post score: 3


Original comments

Comment by giomig on 2021-11-24:
Is there a way to rosbag play a bagfile for N times?

1 Answers1

0

Rosanswers logo

rosbag play -l bag_name.bag


Originally posted by ckirksey with karma: 203 on 2017-03-22

This answer was ACCEPTED on the original site

Post score: 7


Original comments

Comment by ckirksey on 2017-03-22:
Couldn't find this answer when searching initially so I wanted to make it more visible.

Comment by gvdhoorn on 2017-03-22:
This seems pretty well documented over at wiki/rosbag/Commandline - play?

Comment by gvdhoorn on 2017-03-23:
Also note btw that it's -l (single dash), not --l.

Comment by jayess on 2017-03-24:
Looks like you mixed up the shorthand and longhand. As gvdhoorn says, it's rosbag play -l bag_name.bag OR rosbag play --loop bag_name.bag

Comment by ckirksey on 2017-03-24:
Corrected. Thanks guys!