PCL in ROS2, replacing nodelets from ROS1 launch file

asked 2021-09-16 08:28:15 -0600

morten gravatar image

I am in the process of converting some ROS1 packages to ROS2, I need to apply passthrough filters on some pointclouds, some of the previous implementations did things like

<?xml version="1.0" ?>
<launch>
  <node pkg="transform_pointcloud" type="transform_pointcloud_node" name="transform_pointcloud" output="screen" >
    <!--remap from="velodyne_front_points" to="velodyne_points" /-->
    <rosparam>
      source_frame: velodyne_front
    </rosparam>
  </node>

  <node pkg="nodelet" type="nodelet" name="pcl_manager" args="manager" output="screen" />

  <!-- Run a passthrough filter  -->
  <node pkg="nodelet" type="nodelet" name="passthrough" args="load pcl/PassThrough pcl_manager" output="screen">
    <remap from="~input" to="points_transformed" />
    <rosparam>
      filter_field_name: z
      filter_limit_min: 0.5
      filter_limit_max: 2.5
      filter_limit_negative: False
    </rosparam>
  </node>
</launch>

where transform_pointcloud is a custom package.

I understand that nodelets are being left behind in favor of utilizing components in ROS2, but I am not quite sure how to introduce this?

edit retag flag offensive close merge delete