norlab-ulaval / libpointmatcher

An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics
BSD 3-Clause "New" or "Revised" License
1.63k stars 549 forks source link

Getting errors while compiling a simple ICP for car_clouds using libpointmatcher. #156

Closed nmohank closed 8 years ago

nmohank commented 8 years ago

when I compile using the following command gcc ../libpointmatcher/examples/icp_simple.cpp .../examples/data/car_cloud400.csv ../car_cloud401.csv

Getting a error as follows /PointMatcher.h:47:27: fatal error: Eigen/StdVector: No such file or directory #include "Eigen/StdVector".

currently Im using

Name Version
ubuntu: Description: Ubuntu 14.04.4 LTS
architecture: 64-bit
gcc: gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
git: git version 1.9.1
cmake: cmake version 2.8.12.2
boost: Version: 1.54.0.1ubuntu1
eigen3: Version: 3.2.0-8
doxygen: Version: 1.8.6-2

More over when i ran the following command utest/utest --path [libpointmatcher root]/examples/data/

I encounter some failure [==========] Running 58 tests from 13 test cases. [----------] Global test environment set-up. [----------] 5 tests from icpTest [ RUN ] icpTest.icpTest /root/Libraries/libpointmatcher/utest/utest.cpp:158: Failure Expected: (rel_err) < (0.03), actual: 0.18699 vs 0.03 This error was caused by the test file: examples/data/icp_data/defaultPointToPointMinDistDataPointsFilter.yaml /root/Libraries/libpointmatcher/utest/utest.cpp:158: Failure Expected: (rel_err) < (0.03), actual: 0.179957 vs 0.03 This error was caused by the test file: examples/data/icp_data/defaultSimilarityPointToPointMinDistDataPointsFilter.yaml [ FAILED ] icpTest.icpTest (3716 ms) [ RUN ] icpTest.icpSingular [ OK ] icpTest.icpSingular (0 ms) [ RUN ] icpTest.icpIdentity [ OK ] icpTest.icpIdentity (108 ms) [ RUN ] icpTest.similarityTransform /root/Libraries/libpointmatcher/utest/utest.cpp:242: Failure Expected: (std::abs(scale - 1.04)) < (0.001), actual: 0.241112 vs 0.001 Expecting the similarity transform scale to be 1.04. [ FAILED ] icpTest.similarityTransform (1110 ms) [ RUN ] icpTest.icpSequenceTest writing to pointmatcher-run1-iterationInfo.csv writing to pointmatcher-run1-iterationInfo.csv [ OK ] icpTest.icpSequenceTest (277 ms) [----------] 5 tests from icpTest (5211 ms total)

[----------] 1 test from GenericTest [ RUN ] GenericTest.ICP_default [ OK ] GenericTest.ICP_default (135 ms) [----------] 1 test from GenericTest (135 ms total)

[----------] 4 tests from IOTest [ RUN ] IOTest.loadYaml [ OK ] IOTest.loadYaml (2 ms) [ RUN ] IOTest.loadCSV [ OK ] IOTest.loadCSV (0 ms) [ RUN ] IOTest.loadPLY [ OK ] IOTest.loadPLY (0 ms) [ RUN ] IOTest.loadPCD [ OK ] IOTest.loadPCD (0 ms) [----------] 4 tests from IOTest (2 ms total)

[----------] 5 tests from IOLoadSaveTest [ RUN ] IOLoadSaveTest.VTK writing to examples/data/unit_test.vtk [ OK ] IOLoadSaveTest.VTK (1 ms) [ RUN ] IOLoadSaveTest.VTKBinary writing to examples/data/unit_test.bin.vtk [ OK ] IOLoadSaveTest.VTKBinary (0 ms) [ RUN ] IOLoadSaveTest.PLY [ OK ] IOLoadSaveTest.PLY (1 ms) [ RUN ] IOLoadSaveTest.PCD [ OK ] IOLoadSaveTest.PCD (0 ms) [ RUN ] IOLoadSaveTest.CSV [ OK ] IOLoadSaveTest.CSV (0 ms) [----------] 5 tests from IOLoadSaveTest (2 ms total)

[----------] 13 tests from DataFilterTest [ RUN ] DataFilterTest.RemoveNaNDataPointsFilter [ OK ] DataFilterTest.RemoveNaNDataPointsFilter (1 ms) [ RUN ] DataFilterTest.MaxDistDataPointsFilter [ OK ] DataFilterTest.MaxDistDataPointsFilter (515 ms) [ RUN ] DataFilterTest.MinDistDataPointsFilter [ OK ] DataFilterTest.MinDistDataPointsFilter (521 ms) [ RUN ] DataFilterTest.MaxQuantileOnAxisDataPointsFilter [ OK ] DataFilterTest.MaxQuantileOnAxisDataPointsFilter (494 ms) [ RUN ] DataFilterTest.SurfaceNormalDataPointsFilter [ OK ] DataFilterTest.SurfaceNormalDataPointsFilter (336 ms) [ RUN ] DataFilterTest.MaxDensityDataPointsFilter [ OK ] DataFilterTest.MaxDensityDataPointsFilter (480 ms) [ RUN ] DataFilterTest.SamplingSurfaceNormalDataPointsFilter [ OK ] DataFilterTest.SamplingSurfaceNormalDataPointsFilter (167 ms) [ RUN ] DataFilterTest.GestaltDataPointsFilter [ OK ] DataFilterTest.GestaltDataPointsFilter (2137 ms) [ RUN ] DataFilterTest.OrientNormalsDataPointsFilter [ OK ] DataFilterTest.OrientNormalsDataPointsFilter (313 ms) [ RUN ] DataFilterTest.RandomSamplingDataPointsFilter [ OK ] DataFilterTest.RandomSamplingDataPointsFilter (586 ms) [ RUN ] DataFilterTest.FixStepSamplingDataPointsFilter [ OK ] DataFilterTest.FixStepSamplingDataPointsFilter (463 ms) [ RUN ] DataFilterTest.VoxelGridDataPointsFilter [ OK ] DataFilterTest.VoxelGridDataPointsFilter (185 ms) [ RUN ] DataFilterTest.CutAtDescriptorThresholdDataPointsFilter [ OK ] DataFilterTest.CutAtDescriptorThresholdDataPointsFilter (33 ms) [----------] 13 tests from DataFilterTest (6231 ms total)

[----------] 1 test from MatcherTest [ RUN ] MatcherTest.KDTreeMatcher [ OK ] MatcherTest.KDTreeMatcher (2772 ms) [----------] 1 test from MatcherTest (2772 ms total)

[----------] 7 tests from OutlierFilterTest [ RUN ] OutlierFilterTest.MaxDistOutlierFilter2D [ OK ] OutlierFilterTest.MaxDistOutlierFilter2D (1 ms) [ RUN ] OutlierFilterTest.MaxDistOutlierFilter3D [ OK ] OutlierFilterTest.MaxDistOutlierFilter3D (138 ms) [ RUN ] OutlierFilterTest.MinDistOutlierFilter2D [ OK ] OutlierFilterTest.MinDistOutlierFilter2D (1 ms) [ RUN ] OutlierFilterTest.MinDistOutlierFilter3D [ OK ] OutlierFilterTest.MinDistOutlierFilter3D (132 ms) [ RUN ] OutlierFilterTest.MedianDistOutlierFilter [ OK ] OutlierFilterTest.MedianDistOutlierFilter (167 ms) [ RUN ] OutlierFilterTest.TrimmedDistOutlierFilter [ OK ] OutlierFilterTest.TrimmedDistOutlierFilter (132 ms) [ RUN ] OutlierFilterTest.VarTrimmedDistOutlierFilter [ OK ] OutlierFilterTest.VarTrimmedDistOutlierFilter (277 ms) [----------] 7 tests from OutlierFilterTest (849 ms total)

[----------] 2 tests from ErrorMinimizerTest [ RUN ] ErrorMinimizerTest.PointToPointErrorMinimizer [ OK ] ErrorMinimizerTest.PointToPointErrorMinimizer (182 ms) [ RUN ] ErrorMinimizerTest.PointToPlaneErrorMinimizer [ OK ] ErrorMinimizerTest.PointToPlaneErrorMinimizer (132 ms) [----------] 2 tests from ErrorMinimizerTest (314 ms total)

[----------] 3 tests from TransformationCheckerTest [ RUN ] TransformationCheckerTest.CounterTransformationChecker [ OK ] TransformationCheckerTest.CounterTransformationChecker (2 ms) [ RUN ] TransformationCheckerTest.DifferentialTransformationChecker [ OK ] TransformationCheckerTest.DifferentialTransformationChecker (0 ms) [ RUN ] TransformationCheckerTest.BoundTransformationChecker [ OK ] TransformationCheckerTest.BoundTransformationChecker (3 ms) [----------] 3 tests from TransformationCheckerTest (5 ms total)

[----------] 1 test from Transformation [ RUN ] Transformation.RigidTransformation [ OK ] Transformation.RigidTransformation (0 ms) [----------] 1 test from Transformation (0 ms total)

[----------] 13 tests from PointCloudTest [ RUN ] PointCloudTest.CopyConstructor2D [ OK ] PointCloudTest.CopyConstructor2D (0 ms) [ RUN ] PointCloudTest.FeatureConstructor2D [ OK ] PointCloudTest.FeatureConstructor2D (0 ms) [ RUN ] PointCloudTest.FeatureConstructor3D [ OK ] PointCloudTest.FeatureConstructor3D (1 ms) [ RUN ] PointCloudTest.ConstructorWithData [ OK ] PointCloudTest.ConstructorWithData (0 ms) [ RUN ] PointCloudTest.ConcatenateFeatures2D [ OK ] PointCloudTest.ConcatenateFeatures2D (0 ms) [ RUN ] PointCloudTest.ConcatenateFeatures3D [ OK ] PointCloudTest.ConcatenateFeatures3D (1 ms) [ RUN ] PointCloudTest.ConcatenateDescSame [ OK ] PointCloudTest.ConcatenateDescSame (0 ms) [ RUN ] PointCloudTest.ConcatenateDescSame2 [ OK ] PointCloudTest.ConcatenateDescSame2 (3 ms) [ RUN ] PointCloudTest.ConcatenateDescDiffName [ OK ] PointCloudTest.ConcatenateDescDiffName (0 ms) [ RUN ] PointCloudTest.ConcatenateDescDiffSize [ OK ] PointCloudTest.ConcatenateDescDiffSize (0 ms) [ RUN ] PointCloudTest.AssertConsistency [ OK ] PointCloudTest.AssertConsistency (0 ms) [ RUN ] PointCloudTest.GetInfo [ OK ] PointCloudTest.GetInfo (0 ms) [ RUN ] PointCloudTest.AddRemove [ OK ] PointCloudTest.AddRemove (3 ms) [----------] 13 tests from PointCloudTest (8 ms total)

[----------] 2 tests from Inspectors [ RUN ] Inspectors.PerformanceInspector [ OK ] Inspectors.PerformanceInspector (0 ms) [ RUN ] Inspectors.VTKFileInspector [ OK ] Inspectors.VTKFileInspector (0 ms) [----------] 2 tests from Inspectors (0 ms total)

[----------] 1 test from Loggers [ RUN ] Loggers.FileLogger [ OK ] Loggers.FileLogger (0 ms) [----------] 1 test from Loggers (0 ms total)

[----------] Global test environment tear-down [==========] 58 tests from 13 test cases ran. (15529 ms total) [ PASSED ] 56 tests. [ FAILED ] 2 tests, listed below: [ FAILED ] icpTest.icpTest [ FAILED ] icpTest.similarityTransform

2 FAILED TESTS.

Please help me. Thanx in advance.

HannesSommer commented 8 years ago

Your compile command is pretty wrong. Is this a copy and paste bug? The actual error is due to missing include paths (-I). The *.csv files don't belong there. They should be arguments of the compiled program. I'd recommend some unix c++ tutorials to understand better how to use the compiler or try to use cmake to compile the examples / your upcoming program. Actually the examples should be already compiled with the libpointmatcher library.

The failures when running utest are certainly unrelated but should not happen. @pomerlef , do you have an idea what could have happened to these tests?

pomerlef commented 8 years ago

Yes, it seems that you already compile the library and its API examples. You don't need to use gcc to run an executable.

Both of the unit test errors I seeing are related to the similarity transform module. Here's the useful part:

[ RUN ] icpTest.icpTest
/root/Libraries/libpointmatcher/utest/utest.cpp:158: Failure
Expected: (rel_err) < (0.03), actual: 0.18699 vs 0.03
This error was caused by the test file:
examples/data/icp_data/defaultPointToPointMinDistDataPointsFilter.yaml
/root/Libraries/libpointmatcher/utest/utest.cpp:158: Failure
Expected: (rel_err) < (0.03), actual: 0.179957 vs 0.03
This error was caused by the test file:
examples/data/icp_data/defaultSimilarityPointToPointMinDistDataPointsFilter.yaml

[ RUN ] icpTest.similarityTransform
/root/Libraries/libpointmatcher/utest/utest.cpp:242: Failure
Expected: (std::abs(scale - 1.04)) < (0.001), actual: 0.241112 vs 0.001
Expecting the similarity transform scale to be 1.04.
[ FAILED ] icpTest.similarityTransform (1110 ms)

I'm looking at that right now, but it seems that I've a segfault on MacOS with the latest version... I'll investigate more on the unit tests this week.

pomerlef commented 8 years ago

Everything is fine on my side. Maybe you need to update your version to the latest modif:

$ git pull

Feel free to reopen if something doesn't work on your side.