0
$\begingroup$

Rosanswers logo

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?


Originally posted by Battery on ROS Answers with karma: 25 on 2013-11-06

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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


Originally posted by Stephane.M with karma: 1304 on 2013-11-08

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Battery on 2013-11-08:
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

Comment by Battery on 2013-11-08:
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?

Comment by Battery on 2013-11-08:
Plz see [edit 2] in the question. thanks

Comment by Battery on 2013-11-08:
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

Comment by Stephane.M on 2013-11-08:
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

Comment by Battery on 2013-11-08:
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.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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?


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2013-11-06

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Battery on 2013-11-07:
'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

Comment by Stefan Kohlbrecher on 2013-11-07:
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"

Comment by Battery on 2013-11-08:
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!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.