Convert depth_registered and RGB image to pointcloud

asked 2018-01-19 16:57:21 -0500

Oh233 gravatar image

updated 2018-01-19 17:46:48 -0500

jayess gravatar image

What I want to do is getting pointcloud from the depth_registered and RGB image that I publish on the topics. I already succeed in publishing depth_registration and RGB images on /depth_registered and /rgb topics. Next step should be using depth_image_proc package to convert them to pointcloud. I found an example launch file for running depth_image_proc/point_cloud_xyzrgb.

<launch>
 <!-- Nodelet manager for this pipeline -->
<node pkg="nodelet" type="nodelet" args="manager" name="depth_transforms_manager" output="screen"/>

 <!-- Convert to point cloud -->
<node pkg="nodelet" type="nodelet" name="cloudify"
args="load depth_image_proc/point_cloud_xyzrgb depth_transforms_manager --no-bond">

    <!-- Input: Rectified depth image, registered to the RGB camera. -->
    <remap from="depth_registered/image_rect" to="depth_registered"/> 
    <!-- Input: Rectified color image. -->
    <remap from="rgb/image_rect_color" to="rgb"/> 
    <!-- Input: Camera calibration and metadata. --> 
    <remap from="rgb/camera_info" to="camera/rgb/camera_info"/>
    <!-- Output: XYZRGB point cloud. -->
    <!-- <remap from="depth_registered/points" to="depth_registered/pointscloud2"/> -->
</node>
</launch>

The problem there is no pointcloud published on the specific topic. I suspend that may be because I have no camera calibration info of my camera hence I directly subscribe the topic that freenect_camera uses. I am not sure whether there is a problem if I run node of depth_image_proc and freenect_launch at the same time. Then I want to debug the code to find out where the problem. I wonder which file is the manager file that manges point_cloud_xyzrgb.cpp. I found after I subscribe the topic of point cloud, it did come into the connectCb function but won't come further into imageCb and convert functions. Thanks in advance for any suggestions.

edit retag flag offensive close merge delete

Comments

Did you ever solve the problem? I'm having similar issues.

ZeroSan gravatar image ZeroSan  ( 2019-03-25 12:44:10 -0500 )edit