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

How to filter robot's footprint from a pointcloud

asked 2014-07-11 10:51:30 -0600

Joe gravatar image

I have a laser scanner on a rotating head that I will use to generate a point cloud. The only problem is that the orientation and scan angles of the lidar are such that the back of the robot will show up in the scans. I would like to remove any points that are within the robot's footprint from the pointcloud that is generated by laser_assembler.

I have tried using the PointCloudFootprintFilter included in the laser_filters package, and am running it exactly as their example shows, with the my_cloud_config.yaml looking like so:

cloud_filter_chain:
- type: PointCloudFootprintFilter
  name: footprint_filter
  params:
     inscribed_radius: 0.325

[ERROR] [1405092386.043561371]: Couldn't find filter of type PointCloudFootprintFilter

I also tried it using the PR2PointCloudFootprintFilter that is shown in their examples, but I get the same issue.

Running "rospack plugins --attrib=plugin filters" yields the following:

laser_filters /opt/ros/hydro/share/laser_filters/laser_filters_plugins.xml
filters /opt/ros/hydro/share/filters/default_plugins.xml

Any suggestion on how I can get the laser_filters to work, or if there is another way to acheive the same affect? I know that pcl has some filter nodelets like PassThrough, but I couldn't find anything that does the same as their CropBox function.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-09-07 18:01:35 -0600

peci1 gravatar image

For more complicated scenarios, or if you need high precision of the filter, use robot_body_filter (released to Melodic and Noetic, upstream code at https://github.com/peci1/robot_body_f... ).

edit flag offensive delete link more
0

answered 2019-05-29 05:08:58 -0600

moooeeeep gravatar image

updated 2019-05-29 05:13:22 -0600

The pcl_ros CropBox Filter nodelet is not at all documented, but something along these lines should do the trick:

<launch>
  <group ns="/pcl_filters">

    <!-- PCL Manager -->
    <node pkg="nodelet" type="nodelet" name="cropbox_filter_pcl_manager" args="manager" output="screen"/>

    <!-- A CropBox filter to avoid self-detection -->
    <node pkg="nodelet" type="nodelet" name="self_removal" args="load pcl/CropBox cropbox_filter_pcl_manager" output="screen">
      <remap from="~input" to="/points" />
      <remap from="~output" to="/points_cropped" />
      <rosparam>
        input_frame: base_link
        output_frame: base_link
        # true: no points in the box, false: no points outside the box
        negative: true
        min_x: -1
        max_x: 1
        min_y: -1
        max_y: 1
        min_z: -1
        max_z: 2
      </rosparam>
    </node>

  </group>
</launch>
edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2014-07-11 10:51:30 -0600

Seen: 1,659 times

Last updated: Sep 07 '21