Contents
Details
sensor_msgs/PointCloud messages provide space for additional channels, allowing values such as confidence or intensity to be attached to each point in the cloud. The point_cloud_filter reads in a sensor_msgs/PointCloud message, and discards any points whose channel value falls outside a specified threshold interval.
Example
You can run the point_cloud_filter on a pre-recorded bag file that comes with the package.
First, make sure you have the scan_tools stack downloaded and installed by following the instructions here.
Next, make sure you have the necessary tools installed:
1 rosmake rviz rosbag
Finally, launch the demo:
1 roslaunch point_cloud_filter demo.launch
You should see a result similar to the video below. The bag file contains a single reading from a Swissranger 4000 camera. The point cloud is filtered based on confidence values, with the minimum set to 248. The input (raw) cloud is displayed in blue, and the output (filtered) in red.
Nodes
point_cloud_filter
The point_cloud_filter node takes in sensor_msgs/PointCloud and applies a threshold filter, based on a specified channel.Subscribed Topics
swissranger_camera/pointcloud_raw (sensor_msgs/PointCloud)- The raw point cloud. By default, the output of a swissranger_camera is used.
Published Topics
pointcloud_filtered (sensor_msgs/PointCloud)- The filtered pointcloud. Values outside of min_value and max_value are removed.
Parameters
~channel (int, default: 1)- the channel in the sensor_msgs/PointCloud message. 1 corresponds to "confidence" for the swissranger_camera.
- the minimum threshold value. Points with a corresponding channel value less than this are discarded.
- the maximum threshold value. Points with a corresponding channel value more than this are discarded.
- whether to copy the channel information to the filtered point cloud. Disabling this improves performance.
Bug Reports & Feature Requests
We appreciate the time and effort spent submitting bug reports.
Please use our Trac to report bugs or request features.