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

'Rosbag record' with Kinect, facing a disk memory space problem

asked 2013-11-06 19:47:16 -0500

Battery gravatar image

updated 2016-10-24 09:01:51 -0500

ngrennan gravatar image

while I want to record kinect data, using

 rosbag record camera/depth_registered/image_raw camera/depth_registered/camera_info camera/rgb/image_raw camera/rgb/camera_info --limit=60 -O kinect

The terminal shows that

[ERROR] [1383809202.109712616]: Less than 1GB of space free on disk with kinect.bag.active.  Disabling recording.

[ WARN] [1383809202.622705490]: Not logging message because logging disabled.  Most likely cause is a full disk.

Why is it? I check my File Systems under System monitor

 Device       Directory     type         Total       Free             Available     Used

/dev/sda7     /host        fuseblk     97.4GiB       57.6Gib        57.6GiB       39.8GiB        40%

 /dev/loop0   /               ext3      5.4GiB       482.0MiB       482.0MiB     5.0GiB          92%

How could I fix it?

Thanks!

edited:

'rosbag record' directly creats the kinect.bag under 'Home' of Ubuntu, I don't know how to change the location. The location is also shown in the 'kinect.bag properties' window with 'Location: /root'. And when I try

           rosbag info kinect.bag

It shows that

             path: kinect.bag 
             version: 2.0 
             size: 4.0 KB

Is there any command to change the kinect.bag location?

To be summarized, it implies that the disk space is not enough. how can I change the location of the recorded kinect.bag file into a larger disk location?

[edit]

I try

          rosparam set use_sim_time true

and then run rviz and then

          rosbag play kinect.bag --clock

But cant visualize the data. And what is '--limit=60' means? And now I just only record only 2 seconds, how to make it longer? Thank you!

[edit 2]

I tried

           rosbag record camera/depth_registered/image camera/depth_registered/camera_info camera/rgb/image_color camera/rgb/camera_info -O /media/8676FBBC76FBAB57/ kinect

slightly different from the above one by changing image_raw to image.

And I run rosbag record and it started to record but then gave this

           [ WARN] [1383921498.365058698]: rosbag record buffer exceeded.  Dropping oldest queued message.

Now I cant see new kinect.bag file in the directory. It is the old one. I have set false. Why is it?

[edit 3]

I followed the play back data tutorial http://wiki.ros.org/openni_launch/Tutorials/BagRecordingPlayback

Found that ROS time in rviz is the same as the running play back bag time in the terminal. But there was nothing shown in the rviz. So either I did not record anything or I used a wrong topic. I checked the recorded file, it is 276.5 MB. So I could use a wrong topic to show it?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2013-11-08 01:54:30 -0500

updated 2013-11-08 03:02:32 -0500

You should use the "-O /my_path/my_file" option.

Otherwise, the "-o" is also an interesting option (see rosbag record ), as it permits to append the timestamp to the filename. So if you record twice the same thing, it won't be overwritten ;-)

[EDIT] (please edit your question instead of putting a comment) as said in the help given here

-l NUM, --limit=NUM :
Only record NUM messages on each topic.

[EDIT 2] : for the

rosparam set use_sim_time true

don't forget to put it to false before recording... :-) And i would recommend you to use both the --clock and --pause option, so it loads and you can replay it when you're ready ^^

[EDIT 3] just remove the --limit=60 and you should be fine :-) Because it means you will only record 60 messages. Which, at a 30 frame/sec rate, will do 2 seconds :-) So remove this option, and record.

[EDIT 4] you put a space between the directory and filename, instead do -O /media/8676FBBC76FBAB57/my_kinect_file

[EDIT 5] otherwise, try to record each topic in a different file. I personnaly use a launch file, as show below :

 <launch>

  <!-- Parameters to change each time-->
    <arg name="depth_registration" default="true" />
    <arg name="path" default="/media/stephane/Data/Imitation_kinect" />



 <!-- Putting the time back to real time-->
    <rosparam>
       /use_sim_time : false
    </rosparam>

 <node pkg="rosbag" type="record" name="record_kinect1_rgb" args="kinect1/rgb/image_raw kinect1/rgb/camera_info -o $(arg path)/kinect1_rgb"/> 

<node pkg="rosbag" type="record" name="record_kinect2_rgb" args="kinect2/rgb/image_raw kinect2/rgb/camera_info -o $(arg path)/kinect2_rgb"/> 

<node pkg="rosbag" type="record" name="record_tf" args="tf -o $(arg path)/tf"/> 

<node pkg="rosbag" type="record" name="record_skeleton" args="/skeleton_1 /skeleton_2 -o $(arg path)/skeletons"/> 


 <!-- Saving the two kinect depth_registered if depth registration is ON -->

<group if="$(arg depth_registration)">

 <node pkg="rosbag" type="record" name="record_kinect1_depth" args="kinect1/depth_registered/image_raw kinect1/depth_registered/camera_info -o $(arg path)/kinect1_depth"/> 

 <node pkg="rosbag" type="record" name="record_kinect2_depth" args="kinect2/depth_registered/image_raw kinect2/depth_registered/camera_info -o $(arg path)/kinect2_depth"/> 

</group>

 <!-- Saving the two kinect depth if depth registration is OFF -->
<group unless="$(arg depth_registration)">

 <node pkg="rosbag" type="record" name="record_kinect1_depth" args="kinect1/depth/image_raw kinect1/depth/camera_info -o $(arg path)/kinect1_depth"/> 

 <node pkg="rosbag" type="record" name="record_kinect2_depth" args="kinect2/depth/image_raw kinect2/depth/camera_info -o $(arg path)/kinect2_depth"/> 

</group>


  </launch>

Have a good day,

Bests regards

edit flag offensive delete link more

Comments

Yeah! I tried and it was finally solved But another question aroused. I try 'rosparam set use_sim_time true' and then run rviz and then 'rosbag play kinect.bag --clock'. but cant visualize the data. And what is '--limit=60' means? And now I just only record only 2 seconds, how to make it longer? Thx

Battery gravatar image Battery  ( 2013-11-08 02:03:07 -0500 )edit

I just cant visualize the data. rviz shows nothing. Is it because I did not successfully record data into kinect.bag? And how to record longer say more than 2 seconds?

Battery gravatar image Battery  ( 2013-11-08 02:19:08 -0500 )edit

Plz see [edit 2] in the question. thanks

Battery gravatar image Battery  ( 2013-11-08 02:45:42 -0500 )edit

I remove -O directly and it works. I am sorry that I am a fresh man in the ROS world. I need time to learn your command. Another thing is that I just want to know how to play back the data in a visualization window or something. It just play back in the terminal, I cant see anything. Thanks

Battery gravatar image Battery  ( 2013-11-08 03:08:53 -0500 )edit

do rosrun rviz rviz in another terminal. It will open the RVIZ visualisation tool. Then you need to add an image, and select the topic to it. See the tutorials : http://wiki.ros.org/openni_launch/Tutorials/QuickStart

Stephane.M gravatar image Stephane.M  ( 2013-11-08 03:12:29 -0500 )edit

Plz see [edit 3]. And I should try to get familiar with the concept of the topic of camera and rviz. I will try to show the image. It is so nice to meet you here. Thanks a lot for your great helping.

Battery gravatar image Battery  ( 2013-11-08 03:53:52 -0500 )edit
1

answered 2013-11-06 22:08:07 -0500

Per default, rosbag records to the folder you´re invoking it from and also the "-O kinect" is relative to the current folder. It thus looks like you started it from a folder on a drive that contains less than 1GB of free space. Not knowing the folder from where you invoked your rosbag command line makes it hard to give a more informed answer. Perhaps you can edit your original post with info on that?

edit flag offensive delete link more

Comments

'rosbag record' directly creats the kinect.bag under 'Home' of Ubuntu, I don't know how to change the location. The location is also shown in the 'properties' window with 'Location: /root' And when I try rosbag info kinect.bag It shows that path: kinect.bag version: 2.0 size: 4.0 KB

Battery gravatar image Battery  ( 2013-11-07 04:12:25 -0500 )edit

You can specify the full path when using the -O option. Say you have mounted some usb drive under /media/usb_pen, then you should be able to record to it using "... -O /media/usb_pen/kinect.bag"

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2013-11-07 21:15:41 -0500 )edit

Thank you! I got it! But now I cant visualize it by play back the data. And the time duration is only 2 seconds. You could see my comment below. Could you give me some more advice? Thank you!

Battery gravatar image Battery  ( 2013-11-08 02:05:07 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2013-11-06 19:47:16 -0500

Seen: 7,934 times

Last updated: Nov 08 '13