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

Is there a way to play a ROSBAG on repeat?

asked 2017-03-22 14:02:00 -0500

ckirksey gravatar image

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

edit retag flag offensive close merge delete

Comments

Is there a way to rosbag play a bagfile for N times?

giomig gravatar image giomig  ( 2021-11-24 13:38:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
7

answered 2017-03-22 14:03:05 -0500

ckirksey gravatar image

updated 2017-03-24 17:10:22 -0500

rosbag play -l bag_name.bag

edit flag offensive delete link more

Comments

1

Couldn't find this answer when searching initially so I wanted to make it more visible.

ckirksey gravatar image ckirksey  ( 2017-03-22 14:03:44 -0500 )edit
3

This seems pretty well documented over at wiki/rosbag/Commandline - play?

gvdhoorn gravatar image gvdhoorn  ( 2017-03-22 14:09:49 -0500 )edit
1

Also note btw that it's -l (single dash), not --l.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-23 01:52:19 -0500 )edit
1

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

jayess gravatar image jayess  ( 2017-03-24 16:50:46 -0500 )edit

Corrected. Thanks guys!

ckirksey gravatar image ckirksey  ( 2017-03-24 17:10:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-03-22 14:02:00 -0500

Seen: 14,731 times

Last updated: Mar 24 '17