# How to filter robot's footprint from a pointcloud

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:


[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 close merge delete

Sort by » oldest newest most voted

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>
# 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>

more

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... ).

more