title: Which pcl filter to use to downsample a point cloud
body: <p>I am getting a point cloud from a lidar on an autonomous driving robot, but it's too much data to process. </p>
  
  <p>I already implemented a passthrough filter.</p>
  
  <p>I did get a very good result and I was asking myself if there were others filters or methods I could dig into. </p>
  
  <p>Of course I'm not looking for anything specific but rather a direction or advice, because I'm pretty new to the pcl library and it seems pretty huge.</p>
  
  <p>Here is my filter now: </p>
  
  <pre><code>    pcl::PointCloud&lt;PointXYZIR&gt;::Ptr cloudInput;
      cloudInput.reset(new pcl::PointCloud&lt;PointXYZIR&gt; (cloud_in));
  
      pcl::PointCloud&lt;PointXYZIR&gt;::Ptr cloudFiltered;
      cloudFiltered.reset(new pcl::PointCloud&lt;PointXYZIR&gt;);
  
      // Create the filtering object: downsample the dataset using a leaf size
      pcl::VoxelGrid&lt;PointXYZIR&gt; avg;
      avg.setInputCloud(cloudInput);
      avg.setLeafSize(0.25f, 0.25f, 0.25f);
      avg.filter(*cloudFiltered);
  
      //Filter object
      pcl::PassThrough&lt;PointXYZIR&gt; filter;
      filter.setInputCloud(cloudFiltered);
  
      filter.setFilterFieldName("x");
      filter.setFilterLimits(-100, 100);
      filter.filter(*cloudFiltered);
  
      filter.setFilterFieldName("y");
      filter.setFilterLimits(-100, 100);
      filter.filter(*cloudFiltered);
  
      cloud_out = *cloudFiltered;
  </code></pre>