Ask Your Question
0

Reconstruct PointCloud from RGBD data

asked 2018-08-08 08:01:27 -0500

smihael gravatar image

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/depth_registered/points is empty. How to achieve the same result as here http://wiki.ros.org/openni_launch/Tut... using rgbd_launch directly?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-08-08 10:38:19 -0500

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.

  1. Have you tried this using the raw (uncompressed) depth image to see if this is causing your problem?
  2. This may be a stupid question but you are running the openni node while you're playing back the bag file yes?
  3. Have you used rqt_graph to verify that the topics are being correctly subscribed to by the openni node?
  4. 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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-08-08 08:01:27 -0500

Seen: 386 times

Last updated: Aug 08 '18