input to point_cloud_xyzrgb nodelet

asked 2013-12-12 01:25:32 -0500

montmartre gravatar image

updated 2016-10-24 08:36:42 -0500

ngrennan gravatar image

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 freenect_launch freenect-registered-xyzrgb.launch", followed directly by "rosrun pcl_ros convert_pointcloud_to_image input:=/camera/depth_registered/points output:=/camera/cloud_image", but I failed to get an image from that and "rostopic echo /camera/depth_registered/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 freenect_launch freenect.launch depth_registration:=true

$ ROS_NAMESPACE=camera/depth_registered rosrun image_proc image_proc

$ ROS_NAMESPACE=camera rosrun nodelet nodelet load depth_image_proc/point_cloud_xyzrgb nodelet_manager __name:=nodelet1

$ rosrun pcl_ros convert_pointcloud_to_image input:=/camera/depth_registered/points output:=/nodelet1/cloud_image

$ rosrun image_view image_view image:=/nodelet1/cloud_image

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

My best guess is that it's the 16UC1 format that image_view 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 depth_mode=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 dynamic_reconfigure dynparam set /freenect_camera 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?

edit retag flag offensive close merge delete

Comments

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

pinocchio gravatar image pinocchio  ( 2014-03-31 16:04:55 -0500 )edit

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/

oswinium gravatar image oswinium  ( 2014-04-23 05:51:40 -0500 )edit

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.

Adam Allevato gravatar image Adam Allevato  ( 2015-05-01 10:58:34 -0500 )edit