Skip to content

Commit 319e433

Browse files
authored
Merge pull request #5568 from mvieth/tools_icp_remove_nans
[tools] Remove NaNs from clouds after loading in icp tool
2 parents e63c529 + 205d7e8 commit 319e433

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/icp.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <pcl/console/parse.h>
4141
#include <pcl/io/pcd_io.h>
4242
#include <pcl/point_types.h>
43+
#include <pcl/filters/filter.h> // for removeNaNFromPointCloud
4344
#include <pcl/registration/icp.h>
4445
#include <pcl/registration/icp_nl.h>
4546
#include <pcl/registration/incremental_registration.h>
@@ -97,6 +98,8 @@ main (int argc, char **argv)
9798
std::cout << "Could not read file" << std::endl;
9899
return -1;
99100
}
101+
pcl::Indices dummy_indices;
102+
pcl::removeNaNFromPointCloud(*data, *data, dummy_indices);
100103

101104
if (!iicp.registerCloud (data))
102105
{

0 commit comments

Comments
 (0)