0
$\begingroup$

Rosanswers logo

Hi all,

I would like to create a 3D model of my environment. I downsampled a point cloud from my kinect. In order to build a 3D model of my environment easily, I thought to record and then to play this point cloud with rosbag (I don't have time to try to use a complex package to set up), but I realized that when I play the rosbag, it's the exact same topic so if I'm still recording it, and trying to show it in Rviz, it doesn't work.

I was thinking to record data every second and then play each rosbag in loop (maybe hard for my RAM) but still it looks like it's doesn't work when I'm playing it in my roslaunch:

<node pkg="rosbag" type="record" name="record_rosbag" args="record --split=2 -O /rosbag/voxel_throttle.bag /voxel_grid/output_throttle" />
<node pkg="rosbag" type="play" name="play_rosbag" args="play -d 20 /rosbag/voxel_throttle_*.bag" />

I thought it should be a good idea, but since I can't make it work, I realize I was naive...

Is there anyone understood what I tried to do? ;) and if there is, is there a way to make it work?

Thanks


Originally posted by Brioche on ROS Answers with karma: 115 on 2012-10-21

Post score: 0


Original comments

Comment by Lorenz on 2012-10-21:
So why do you need to record and play back at the same time? Why not using the original data from the kinect or first record a bag and then play it back?

Comment by Brioche on 2012-10-22:
Because I'm only able to show the live point cloud and I would like to have my point cloud constantly. For example if I'm going left to right I would like to have the point cloud for all the way, from left to right. That's why I thought to split my record and then to play each bag in a loop.

Comment by Lorenz on 2012-10-22:
I'm still not sure what exactly you want to do but using rosbag doesn't seem to be a really good solution. It is just not designed for something like that. Did you have a look at octomap?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You normally cannot record and play bag file simultaneously as the bag file that is played publishes the same topic you already have via kinect driver. That is something ROS doesn't know how do deal with. I believe you should first record the topic you need and then split/play it as you need, maybe using some parameters to rename "camera" to avoid publishing two similar topics.


Originally posted by niosus with karma: 386 on 2012-10-21

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Lorenz on 2012-10-21:
Actually, the topics are not really the problem. You could always use topic remapping to control who subscribes to which node. The actual problem is that you cannot play back the same bag you are recording to because it lacks information e.g. an index that is written when recording finishes.

Comment by niosus on 2012-10-21:
Yes, of course, my mistake. That should be named as the first reason.

Comment by Brioche on 2012-10-22:
Don't I avoid this problem by splitting the rosbag?

Comment by Lorenz on 2012-10-22:
Yes. Partly. But the wildcard you are using won't work. I even don't know if roslaunch expands wildcards at all and even if, they are only expanded only once.

$\endgroup$

Your Answer

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