Robotics StackExchange | Archived questions

input to point_cloud_xyzrgb nodelet

I'm trying, ultimately, to export the color point cloud as a video - so right now I'm trying to turn it into an image I can display with image_view, so I can grab my frames. (I'm running Hydro on Ubuntu 13.04; 13.04 has a couple of incompatibilities I've stumbled on with skeleton tracking, but nothing I've spotted yet with more basic Kinect image/depth capture.)

In theory, this is something I should be able to do quickly with "roslaunch freenectlaunch freenect-registered-xyzrgb.launch", followed directly by "rosrun pclros convertpointcloudtoimage input:=/camera/depthregistered/points output:=/camera/cloudimage", but I failed to get an image from that and "rostopic echo /camera/depthregistered/points" is empty, so I wanted to do it the long way to see why. (And the long way may be useful with my next step, which is trying to combine arbitrary pairs of RGB and depth images with each other.)

My current attempt to test this is as follows:

$ roslaunch freenectlaunch freenect.launch depthregistration:=true

$ ROSNAMESPACE=camera/depthregistered rosrun imageproc imageproc

$ ROSNAMESPACE=camera rosrun nodelet nodelet load depthimageproc/pointcloudxyzrgb nodeletmanager __name:=nodelet1

$ rosrun pclros convertpointcloudtoimage input:=/camera/depthregistered/points output:=/nodelet1/cloudimage

$ rosrun imageview imageview image:=/nodelet1/cloud_image

While depthimageproc suggests it's a good idea to use imageproc to rectify the depth image first, I found it was necessary - depthimageproc looks for depthregistered/imagerect as an input, and that's not a topic that's published by freenect. However, while "rostopic echo /camera/depthregistered/imageraw" shows data, "rostopic echo /camera/depthregistered/imagerect" does not. So I think that my attempt to use imageproc to create the inputs for depthimageproc is failing somehow.

My best guess is that it's the 16UC1 format that imageview complains about when I try to view the registered depth image from the camera rather than dump it to rostopic, so I'm wondering if I'm missing a format conversion somewhere. My next guess is that some of the freenect parameters need to be manually set - I have noticed a warning message that it's defaulting back to depthmode=1 (which contradicts the supposed default mode of 2, and isn't the right resolution for a Kinect), but I don't see different behavior when I run "rosrun dynamicreconfigure dynparam set /freenectcamera depth_mode 2".

Am I missing a step in trying to get that color point cloud, or should I be more worried about why freenect-registered-xyzrgb.launch doesn't produce anything for the /camera/depth_registered/points topic?

Asked by montmartre on 2013-12-12 02:25:32 UTC

Comments

Hi, I am doing the similar thing with you. Do you solve your problem? Many thanks.

Asked by pinocchio on 2014-03-31 16:04:55 UTC

I have the EXACT same problem - ""rostopic echo /camera/depth_registered/image_rect" does not" show data! Did you manage to find a solution?

answers.ros.org/question/152816/

Asked by oswinium on 2014-04-23 05:51:40 UTC

I haven't used freenect, but in OpenNI there are a lot of different camera output topics. Some of them are empty, and others have output. Have you tried other topics?

Either way, I would suggest using OpenNI instead.

Asked by Adam Allevato on 2015-05-01 10:58:34 UTC

Answers