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

Playing big files with rosbag

asked 2013-03-11 00:11:11 -0500

Hi everybody,

I am running Ubuntu 12.10, with ROS Groovy. My computer has a i7 processor with 6GB of RAM.

I am recording in rosbag data from two kinects (and two skeletons). Of course, I din't recorded the "PointClouds", but only the raw images.

However, my files go up to 50 GB for a 12minutes videos...

My problem is that for such big files, "rosbag play" takes forever to start to play the data. I was wondering on the way it works. Indeed, I thought it played a stream of the data, thus, whatever the size of the file, it should not take that much longer to start playing. However, as I saw in my experiment, it is not the case. Thus I maybe thought that rosbag play is putting a lot in memory, or doing some "precomputation" ?

If someone who knows how rosbag works could enlighten me of his knowledge, it would be great.

I know this question is very technical, but I would really like to find a way to open my files after recording them, without having to buy a new "very powerful and expensive" computer...

My first thought would be to record each topic in one bag, and then replay them all in the same time... But seems a bit stupid to do that, as I think rosplay would need to "realign" in time all the messages.

Thanks in advance,

Steph

edit retag flag offensive close merge delete

Comments

I don't know at all about the internals but does it make a difference if you do a rosbag fix on that bag?

felix k gravatar image felix k  ( 2013-03-11 04:25:04 -0500 )edit

The bag file has no problems... it's just big :-) What I am doing now is rosbag filter everything, putting every topic in a single bag file... It's long, and a bit stupid in my opinion....

Stephane.M gravatar image Stephane.M  ( 2013-03-11 04:26:56 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-11-19 08:42:56 -0500

manolovaza gravatar image

updated 2015-11-19 08:44:00 -0500

you can filter out your data, I had some similar problems, here is an example script:

#!/bin/bash
#filter out the bag files for the raw data
source ~/.bashrc

cd /to/your/bag directory/

rosbag filter original.bag filtered.bag 'topic=="/lms1xx_front/scan" or topic=="/lms1xx_front_tilt/sc an" or topic=="/lms1xx_back/scan" or topic=="/fmData/imu_rx" or topic=="/fmInformation/imu" or topic=="/kinect2/depth/camera_info" or topic=="/kinect2/depth/image" '
edit flag offensive delete link more
0

answered 2018-06-07 05:00:49 -0500

felix k gravatar image

There is an even older, but more active, related question:

That refers to a github ticket, which is still open, though:

rqt_graph seems to perform better.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-03-11 00:11:11 -0500

Seen: 1,369 times

Last updated: Jun 07 '18