Point Cloud and Depth Image Processing Nodes in ROS2

asked 2023-03-29 18:22:11 -0500

zkytony gravatar image

With ROS1, it was possible to conveniently process point cloud and depth image in launch file.

For example, below is a point cloud filtering routine using pcl_ros

  <node name="cloudify_manager"
    pkg="nodelet" type="nodelet" args="manager" output="screen"/>
  <node pkg="nodelet" type="nodelet"
        name="cloudify_hand_depth_filter"
        args="load pcl/PassThrough cloudify_manager">
    <param name="filter_field_name" value="z" />
    <param name="filter_limit_min" value="0.25" />
    <param name="filter_limit_max" value="3.0" />
    <param name="filter_limit_negative" value="False" />
    <remap from="~input" to="$(arg hand_depth)/points"/>
    <remap from="~output" to="$(arg hand_depth)/points_filtered"/>
  </node>

Below is a depth image processing routine that converts depth image into point cloud using depth_image_proc

  <node name="cloudify_frontleft_depth" pkg="nodelet" type="nodelet"
        args="load depth_image_proc/point_cloud_xyz cloudify_manager --no-bond"
        output="screen">
    <remap from="camera_info" to="$(arg frontleft_depth)/camera_info"/> <!--$(arg camera_info_topic)"/> -->
    <remap from="image_rect" to="$(arg frontleft_depth)/image"/>
    <remap from="points" to="$(arg frontleft_depth)/points"/>
    <param name="queue_size" value="10"/>
  </node>

Is this functionality still available with ROS2? If not, how to do the above two things in ROS2? (i.e. Point cloud filtering, and convert depth image into point cloud)

Specifically, I am using ROS 2 Humble.

edit retag flag offensive close merge delete