ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A
Ask Your Question

rosbag play folder with bags using roslauch

asked 2018-05-09 08:15:58 -0500

tanasis gravatar image

updated 2018-05-09 08:21:17 -0500

Hello, how can I use rosbag play in a roslauch file, in order to play a folder that contains all bags. Folder should be and argument to roslauch, e.g:

roslaunch play_data.launch bag_folder:=some_folder

and bag_folder is used inside .launch.

So, in command line this would be just: rosbag play some_folder/*.


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-05-09 08:44:50 -0500

I'm assuming you want to play each bag file in the folder sequentially one after another, not all of them in parallel.

I don't think this is a feature of the rosbag node, you could potentially do this using a bash script. However playing multiple ROS bag files one after another using separate rosbag play commands will cause some problems with the discontinuity of the time stamps.

It would be possible to write your own node using the rosbag Code API to playback a list of bag files in the way that you want. This way you could adjust the timestamps so they were continuous as multiple bags were played back.

edit flag offensive delete link more


Thanks for the input! Basically concurrently, yes. And rosbag play folder/* seems to be doing this fine. So in that sense I think the rosbag node, can pay all those bags. Currently I am writing a bash script as you also suggested, but I wanted to see if there is a roslauch way. :)

tanasis gravatar imagetanasis ( 2018-05-09 08:49:38 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2018-05-09 08:15:58 -0500

Seen: 141 times

Last updated: May 09 '18