Skip to content

Commit

Permalink
Fix "Conditional Removal" tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
taketwo committed Dec 9, 2018
1 parent 23b60ea commit 2d10543
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions doc/tutorials/content/conditional_removal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Then, we create the condition which a given point must satisfy so that it remain

.. literalinclude:: sources/conditional_removal/conditional_removal.cpp
:language: cpp
:lines: 28-39
:lines: 28-40

This last bit of code just applies the filter to our original PointCloud, and removes all of the points that do not satisfy the conditions we specified. Then it outputs all of the points remaining in the PointCloud.

.. literalinclude:: sources/conditional_removal/conditional_removal.cpp
:language: cpp
:lines: 41-48
:lines: 42-50

Compiling and running the program
---------------------------------
Expand All @@ -54,11 +54,11 @@ You will see something similar to::

Cloud before filtering:
0.352222 -0.151883 -0.106395
-0.397406 -0.473106 0.292602
-0.397406 -0.473106 0.292602
-0.731898 0.667105 0.441304
-0.734766 0.854581 -0.0361733
-0.4607 -0.277468 -0.916762
Cloud after filtering:
Cloud after filtering:
-0.397406 -0.473106 0.292602
-0.731898 0.667105 0.441304

Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ int
pcl::FieldComparison<pcl::PointXYZ> ("z", pcl::ComparisonOps::LT, 0.8)));

// build the filter
pcl::ConditionalRemoval<pcl::PointXYZ> condrem (range_cond);
pcl::ConditionalRemoval<pcl::PointXYZ> condrem;
condrem.setCondition (range_cond);
condrem.setInputCloud (cloud);
condrem.setKeepOrganized(true);
condrem.setKeepOrganized (true);

// apply filter
condrem.filter (*cloud_filtered);
Expand Down

0 comments on commit 2d10543

Please sign in to comment.