Reconstruct PointCloud from RGBD data
I followed this wiki entry and recorded RGBD data using
rosbag record /rgbd/depth_registered/camera_info /rgbd/depth_registered/image_raw/compressed /rgbd/rgb/image_raw/compressed /rgbd/rgb/camera_info --duration=10s -O test
Note that I used compressed image to get more frames.
Then I tried to replay data to check if pointcloud will be generated automatically by openni as advertised on the wiki. I remapped topics to match openni naming conventions.
rosbag play test.bag /rgbd/depth_registered/camera_info:=camera/depth_registered/camera_info /rgbd/depth_registered/image_raw:=camera/depth_registered/image_raw /rgbd/rgb/camera_info:=camera/rgb/camera_info /rgbd/rgb/image_raw/compressed:=camera/rgb/image_raw/compressed --clock
But /camera/depthregistered/points is empty. How to achieve the same result as here http://wiki.ros.org/opennilaunch/Tutorials/BagRecordingPlayback#Playingbackdata using rgbd_launch directly?
Asked by smihael on 2018-08-08 08:01:27 UTC
Answers
There are a few things we can look at here to see if we can get it working.
Firstly if you want to compress a depth image topic you'll have to use the compressed_depth_image_transport package. Depth images are either floating point or 16 bit integer images, neither of which can be compressed by the standard codecs.
Note : It would be helpful if you could post the full launch files you're using to record and playback the bag file, the rosbag commands above don't give us all the information.
Here are few things you can check.
- Have you tried this using the raw (uncompressed) depth image to see if this is causing your problem?
- This may be a stupid question but you are running the openni node while you're playing back the bag file yes?
- Have you used rqt_graph to verify that the topics are being correctly subscribed to by the openni node?
- Have you viewed the RBG and depth images in RVIZ when you're playing the bag file back again to check good images are being published?
These should help us get to the bottom of this problem.
Asked by PeteBlackerThe3rd on 2018-08-08 10:38:19 UTC
Comments