rosbag playing data while recording data
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
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?
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.
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?