Giter Club home page Giter Club logo

Comments (7)

jlblancoc avatar jlblancoc commented on July 25, 2024

from gtsam.

LiShuaixin avatar LiShuaixin commented on July 25, 2024

Hi @jlblancoc , thanks for your reply! I will give it a try and report what happen.

Actually, I can smoothly run lego-loam which uses gtsam to achieve global optimization. I wonder why it fail in my project while success in lego-loam on the same PC

from gtsam.

LiShuaixin avatar LiShuaixin commented on July 25, 2024

Hi, @jlblancoc. I tried rebuilding the branch version, but failed when make check.

Errors output as follow:

99% tests passed, 1 tests failed out of 236

Total Test time (real) =   2.44 sec

The following tests FAILED:
	166 - testDoglegOptimizer (Failed)
Errors while running CTest
CMakeFiles/check.dir/build.make:57: recipe for target 'CMakeFiles/check' failed
make[3]: *** [CMakeFiles/check] Error 8
CMakeFiles/Makefile2:651: recipe for target 'CMakeFiles/check.dir/all' failed
make[2]: *** [CMakeFiles/check.dir/all] Error 2
CMakeFiles/Makefile2:658: recipe for target 'CMakeFiles/check.dir/rule' failed
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
Makefile:221: recipe for target 'check' failed
make: *** [check] Error 2

Then I rebuilt it by 'make -j4' directly, and it worked.

But when I imported it in my project using the same cmakelist file, errors occurred since GTSAM was built against a different version of Eigen:

In file included from /usr/local/include/gtsam/base/Matrix.h:26:0,
                 from /usr/local/include/gtsam/base/Manifold.h:22,
                 from /usr/local/include/gtsam/base/Lie.h:25,
                 from /usr/local/include/gtsam/base/VectorSpace.h:11,
                 from /usr/local/include/gtsam/geometry/Point2.h:20,
                 from /usr/local/include/gtsam/geometry/Unit3.h:23,
                 from /usr/local/include/gtsam/geometry/Rot3.h:25,
                 from /home/lee/loam_ws/src/Inertial-LOAM/Inertial-LOAM/src/mapOptmization.cpp:36:
/usr/local/include/gtsam/base/Vector.h:72:1: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
 static_assert(

from gtsam.

jlblancoc avatar jlblancoc commented on July 25, 2024

Good, it seems that the crash was caused by mixing Eigen versions (probably)... it's better to have a build error than a runtime crash, IMO.

Try rebuilding GTSAM changing its CMake variables such as it uses the system version of Eigen, assuming that your own project does so as well, make install again, and check if it works.

from gtsam.

LiShuaixin avatar LiShuaixin commented on July 25, 2024

The screen ouputs shows that the version of Eigen it use is 3.3.7. Is it compatible with GTSAM?
-- Use System Eigen : OFF (Using version: 3.3.7)

from gtsam.

jlblancoc avatar jlblancoc commented on July 25, 2024

run cmake-gui . from your build directory, check "GTSAM_USE_SYSTEM_EIGEN", configure, generate, rebuild from the console as usual.

from gtsam.

LiShuaixin avatar LiShuaixin commented on July 25, 2024

I checked the source code and found the reason. Thanks!

from gtsam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.