Subtract a static map (OccupancyGridMap
) from a laser scan or point cloud. This can be used for example to remove obstacles from a point cloud or 2D lidar scan. The map serves as a masking layer for the point cloud.
This package is intended to be used for example in conjunction with obstacle_detector.
If you only got a sensor_msgs::LaserScan
, you can use the scans_merger
node in the obstacle_detector
package to get a sensor_msgs::PointCloud
msg, which is required as an input to this package.
cd catkin_ws/src
git clone https://github.com/jk-ethz/laser_static_map_filter
vcs import --recursive --input laser_static_map_filter.repos
catkin build
rosrun laser_static_map_filter laser_static_map_filter.py
An example launch file is provided as well
roslaunch laser_static_map_filter laser_static_map_filter.launch