ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello m1ckey, The thing is that the depth_image_proc isn't a package of nodes but one of nodelets. You can find out that by reading the documentation: http://wiki.ros.org/depth_image_proc?distro=indigo . To use them, I recommend using a .launch file. You first need a nodelet manager, and then the nodelets that you need, which are listed on the documentation with their required topic inputs and outputs.

Here, check out this example for using the nodelet that transforms a RGB Imaga and a Depth Image into a Point Cloud2.


<!-- Convert the depth image and the rgb image into a xyzrgb Point Cloud -->

<launch>

<arg name="ns"              value="/your_namespace"/>
<arg name="sdepth_subfolder"    value="$(arg ns)/sd"/>
<arg name="srgb_subfolder"      value="$(arg ns)/srgb"/>

<arg name="pc2_subfolder"   value="$(arg ns)/point_cloud2"/>
<arg name="sd_on_rgb_frame" value="$(arg ns)/sd_on_rgb_frame"/> 

 <!-- 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: Camera calibration and metadata.  (sensor_msgs/CameraInfo) -->
    <remap from="rgb/camera_info"      to="$(arg srgb_subfolder)/camera_info"/> 
    <!-- Input: Rectified color image. (sensor_msgs/Image) -->
    <remap from="rgb/image_rect_color" to="$(arg srgb_subfolder)/scene_rgb_cam_wf"/> 
    <!-- Input: Rectified depth image, registered to the RGB camera. (sensor_msgs/Image) -->
    <remap from="depth_registered/image_rect" to="$(arg sd_on_rgb_frame)/image_wf"/>        
    <!-- Output: XYZ point cloud. If using PCL, subscribe as PointCloud<PointXYZ>.  (sensor_msgs/PointCloud2)  -->
    <remap from="depth_registered/points" to="$(arg pc2_subfolder)/points"/>

</node>

</launch>


Hello m1ckey, The thing is that the depth_image_proc isn't a package of nodes but one of nodelets. You can find out that by reading the documentation: http://wiki.ros.org/depth_image_proc?distro=indigo . To use them, I recommend using a .launch file. You first need a nodelet manager, and then the nodelets that you need, which are listed on the documentation with their required topic inputs and outputs.

Here, check out this example for using the nodelet that transforms a RGB Imaga and a Depth Image into a Point Cloud2.


<!-- Convert the depth image and the rgb image into a xyzrgb Point Cloud -->

<launch>

      <launch>
<arg name="ns"  value="/your_namespace"/>
<arg name="sdepth_subfolder"  value="$(arg ns)/sd"/>
<arg name="srgb_subfolder"  value="$(arg ns)/srgb"/>

<arg name="pc2_subfolder"  value="$(arg ns)/point_cloud2"/>
<arg name="sd_on_rgb_frame" value="$(arg ns)/sd_on_rgb_frame"/> 

 <!-- 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: Camera calibration and metadata.  (sensor_msgs/CameraInfo) -->
    <remap from="rgb/camera_info"      to="$(arg srgb_subfolder)/camera_info"/> 
    <!-- Input: Rectified color image. (sensor_msgs/Image) -->
    <remap from="rgb/image_rect_color" to="$(arg srgb_subfolder)/scene_rgb_cam_wf"/> 
    <!-- Input: Rectified depth image, registered to the RGB camera. (sensor_msgs/Image) -->
    <remap from="depth_registered/image_rect" to="$(arg sd_on_rgb_frame)/image_wf"/>        
    <!-- Output: XYZ point cloud. If using PCL, subscribe as PointCloud<PointXYZ>.  (sensor_msgs/PointCloud2)  -->
    <remap from="depth_registered/points" to="$(arg pc2_subfolder)/points"/>

</node>
      </launch>

</launch>


Hello m1ckey, The thing is that the depth_image_proc isn't a package of nodes but one of nodelets. You can find out that by reading the documentation: http://wiki.ros.org/depth_image_proc?distro=indigo . To use them, I recommend using a .launch file. You first need a nodelet manager, and then the nodelets that you need, which are listed on the documentation with their required topic inputs and outputs.outputs. As you'll see on the following code, you may remap the standard topic names to the ones you're using on your program.

Here, check out this example for using the nodelet that transforms a RGB Imaga Image and a Depth Image into a Point Cloud2.


<!-- Convert the depth image and the rgb image into a xyzrgb Point Cloud -->
      <launch>
<arg name="ns" value="/your_namespace"/>
<arg name="sdepth_subfolder" value="$(arg ns)/sd"/>
<arg name="srgb_subfolder" value="$(arg ns)/srgb"/>

<arg name="pc2_subfolder" value="$(arg ns)/point_cloud2"/>
<arg name="sd_on_rgb_frame" value="$(arg ns)/sd_on_rgb_frame"/> 

 <!-- 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: Camera calibration and metadata.  (sensor_msgs/CameraInfo) -->
    <remap from="rgb/camera_info"      to="$(arg srgb_subfolder)/camera_info"/> 
    <!-- Input: Rectified color image. (sensor_msgs/Image) -->
    <remap from="rgb/image_rect_color" to="$(arg srgb_subfolder)/scene_rgb_cam_wf"/> 
    <!-- Input: Rectified depth image, registered to the RGB camera. (sensor_msgs/Image) -->
    <remap from="depth_registered/image_rect" to="$(arg sd_on_rgb_frame)/image_wf"/>        
    <!-- Output: XYZ point cloud. If using PCL, subscribe as PointCloud<PointXYZ>.  (sensor_msgs/PointCloud2)  -->
    <remap from="depth_registered/points" to="$(arg pc2_subfolder)/points"/>

</node>
      </launch>