(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

VoxelGrid filtering

Description: VoxelGrid filtering

Tutorial Level: BEGINNER


The following launch file starts a nodelet manager together with a VoxelGrid PCL filter nodelet. The input PointCloud2 topic is set to /camera/depth/points.

The default filtering values are set to filter data on the z-axis between 0.01 and 1.5 meters, and downsample the data with a leaf size of 0.01 meters.

   1 <launch>
   2   <node pkg="nodelet" type="nodelet" name="pcl_manager" args="manager" output="screen" />
   4   <!-- Run a VoxelGrid filter to clean NaNs and downsample the data -->
   5   <node pkg="nodelet" type="nodelet" name="voxel_grid" args="load pcl/VoxelGrid pcl_manager" output="screen">
   6     <remap from="~input" to="/camera/depth/points" />
   7     <rosparam>
   8       filter_field_name: z
   9       filter_limit_min: 0.01
  10       filter_limit_max: 1.5
  11       filter_limit_negative: False
  12       leaf_size: 0.01
  13     </rosparam>
  14   </node>
  15 </launch>

In the first terminal,


Open a new shell, and put following command.

roslaunch openni2_launch openni2.launch
roslaunch pcl_ros_tutorials voxed_grid_filtering.launch

Then, launch rviz.



VoxelGrid is enable on the following image.


Wiki: pcl_ros/Tutorials/VoxelGrid filtering (last edited 2014-09-30 06:45:19 by Iori Yanokura)