MIT-SPARK / Kimera-VIO

Visual Inertial Odometry with SLAM capabilities and 3D Mesh generation.
BSD 2-Clause "Simplified" License
1.53k stars 416 forks source link

Kimera-VIO make failure #196

Closed ghost closed 10 months ago

ghost commented 1 year ago

Description: I followed Installation Instructions of Kimera-VIO, and when I installed Kimera-VIO, I got some problems. Could you help me please?

Command:


``` mkdir build
``` cd build
``` cmake ..
``` make -j $(nproc)

**Console output:**
Consolidate compiler generated dependencies of target gtest
[  2%] Built target gtest
Consolidate compiler generated dependencies of target kimera_vio
[ 63%] Built target kimera_vio
Consolidate compiler generated dependencies of target stereoVIOEuroc
[ 64%] Built target stereoVIOEuroc
Consolidate compiler generated dependencies of target testKimeraVIO
[ 65%] Linking CXX executable testKimeraVIO
CMakeFiles/testKimeraVIO.dir/tests/testOnlineAlignment.cpp.o: In function `VIO::OnlineAlignmentFixture_DISABLED_GyroscopeBiasEstimation_Test::TestBody()':
testOnlineAlignment.cpp:(.text+0x74b): undefined reference to `VIO::OnlineGravityAlignment::OnlineGravityAlignment(std::vector<gtsam::Pose3, std::allocator<gtsam::Pose3> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::shared_ptr<gtsam::ManifoldPreintegration>, std::allocator<std::shared_ptr<gtsam::ManifoldPreintegration> > > const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, std::vector<gtsam::PreintegratedAhrsMeasurements, std::allocator<gtsam::PreintegratedAhrsMeasurements> > const&)'
CMakeFiles/testKimeraVIO.dir/tests/testOnlineAlignment.cpp.o: In function `VIO::OnlineAlignmentFixture_DISABLED_GyroscopeBiasEstimationAHRS_Test::TestBody()':
testOnlineAlignment.cpp:(.text+0xbec): undefined reference to `VIO::OnlineGravityAlignment::OnlineGravityAlignment(std::vector<gtsam::Pose3, std::allocator<gtsam::Pose3> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::shared_ptr<gtsam::ManifoldPreintegration>, std::allocator<std::shared_ptr<gtsam::ManifoldPreintegration> > > const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, std::vector<gtsam::PreintegratedAhrsMeasurements, std::allocator<gtsam::PreintegratedAhrsMeasurements> > const&)'
CMakeFiles/testKimeraVIO.dir/tests/testOnlineAlignment.cpp.o: In function `VIO::OnlineAlignmentFixture_DISABLED_OnlineGravityAlignment_Test::TestBody()':
testOnlineAlignment.cpp:(.text+0x1159): undefined reference to `VIO::OnlineGravityAlignment::OnlineGravityAlignment(std::vector<gtsam::Pose3, std::allocator<gtsam::Pose3> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::shared_ptr<gtsam::ManifoldPreintegration>, std::allocator<std::shared_ptr<gtsam::ManifoldPreintegration> > > const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, std::vector<gtsam::PreintegratedAhrsMeasurements, std::allocator<gtsam::PreintegratedAhrsMeasurements> > const&)'
CMakeFiles/testKimeraVIO.dir/tests/testOnlineAlignment.cpp.o: In function `VIO::OnlineAlignmentFixture_DISABLED_GravityAlignmentRealData_Test::TestBody()':
testOnlineAlignment.cpp:(.text+0x1e44): undefined reference to `VIO::OnlineGravityAlignment::OnlineGravityAlignment(std::vector<gtsam::Pose3, std::allocator<gtsam::Pose3> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::shared_ptr<gtsam::ManifoldPreintegration>, std::allocator<std::shared_ptr<gtsam::ManifoldPreintegration> > > const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, std::vector<gtsam::PreintegratedAhrsMeasurements, std::allocator<gtsam::PreintegratedAhrsMeasurements> > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/testKimeraVIO.dir/build.make:841: recipe for target 'testKimeraVIO' failed
make[2]: *** [testKimeraVIO] Error 1
CMakeFiles/Makefile2:1618: recipe for target 'CMakeFiles/testKimeraVIO.dir/all' failed
make[1]: *** [CMakeFiles/testKimeraVIO.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2

**Additional files:**
Please attach all the files needed to reproduce the error.

Please give also the following information:
* Kimera-Vio branch, tag or commit used : Kimera-VIO master branch
* GTSAM version used: 4.2.0
* OpenGV version used: 1.0
* OpenCV version used: type `opencv_version` 3.2.0
* Operating system and version (e.g. Ubuntu 16.04 or Windows 10): ubuntu18.04
* Did you change the source code? (yes / no): yes.
I changed gtsam::Pose3.identity() to gtsam::Pose3() of all codes. when I use original source code, there were a lot of error (about no member identity)
marcusabate commented 1 year ago

Not sure why you're getting this error as I was unable to reproduce. My best guess would be something about the function signature for OnlineGravityAlignment's ctor has changed. But since the offending tests are disabled anyway, you can comment them out in testOnlineAlignment.cpp and it should compile.