-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eigen issue #50
Comments
Could you give it a try to this branch [1]?
That's exactly the kind of problems that those changes are trying to
avoid... Please, report back whether it worked or not.
JL
[1] https://github.com/jlblancoc/gtsam/tree/flags_via_modern_cmake
…On Mon, Jun 10, 2019 at 5:05 AM LiShuaixin ***@***.***> wrote:
Hello, thanks for your patience. I cloned the latest develop branch of GTSAM on Ubuntu 16.04 with Boost 1.58 and tried importing it in my project.
Part of CMakeLists.txt looks like this:
`find_package(Boost COMPONENTS date_time serialization program_options thread system signals regex filesystem REQUIRED )
find_package( Eigen3 REQUIRED )
find_package( GTSAM REQUIRED )
include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/include
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${GTSAM_INCLUDE_DIR}
${TBB_INCLUDE_DIRS}
)
add_library(${PROJECT_NAME} SHARED
src/factor_graph.cpp)
target_link_libraries(${PROJECT_NAME}
${EIGEN3_LIBS}
${GTSAM_LIBRARY_DIRS}
/usr/lib/x86_64-linux-gnu/libtbb.so
)
target_link_libraries(${PROJECT_NAME}
${Boost_LIBRARIES} -lgtsam -ltbb)`
factor_graph.cpp is a source code file where I put all factors I need.
It worked smoothly and I got a executable. But when I run it, the system broke down, and throw off segment fault directly before step into the main function in executable.cpp file. Then I commented the line src/factor_graph.cpp in CMakeLists and rebuilt it. The executable could run again.
did I import gtsam right? please help. thanks in advance!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
--
/**
* Jose Luis Blanco-Claraco
* Universidad de Almería - Departamento de Ingeniería
* [Homepage]( https://w3.ual.es/~jlblanco/ )
* [GH profile]( https://github.com/jlblancoc )
*/
|
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 |
Hi, @jlblancoc. I tried rebuilding the branch version, but failed when Errors output as follow:
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:
|
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. |
The screen ouputs shows that the version of Eigen it use is 3.3.7. Is it compatible with GTSAM? |
run |
I checked the source code and found the reason. Thanks! |
3eff76f60 Merge pull request #53 from borglab/feature/refactor 13215dfa7 Merge pull request #52 from borglab/fix/tests 696913b11 install setuptools 9523328ba Merge branch 'master' into fix/tests 7c630b361 some more cleanup 656993a71 cleaned up Typename a16f6f38e move qualified and basis type outside to their own class scope 72ead8bd7 Merge pull request #51 from borglab/fix/test-interface-parser 6deefd4fc added tests for interface_parser 50d490a85 Merge pull request #50 from borglab/feature/refs-all-types be4511290 updated docs for BasisType 0e80b0d8c update MATLAB tests 0015d7397 added support for shared pointer and ref for basis types 86d2158f1 remove std::string from list of Basis types 94f928441 ignore code coverage reports 2033dd345 replace prints with log.debug statements ae98091b3 fix deprecation in doc tests 13a2f66c4 Merge pull request #46 from borglab/feature/new-shared-pointer 3c7d85865 updated docs 6d7897088 use @ for raw pointer, go back to * for shared pointer 1d6194c57 updated matlab wrapper to handle both raw and shared pointers 1448f6924 fix some failing tests 2ab1dae32 Merge branch 'master' into feature/new-shared-pointer 96f8a56bd Merge pull request #47 from borglab/fix/ci 6003203f3 run CI only for pull requests a8f29ead1 fix the python version yml key fcae17227 check if directory exists when testing f592f08c9 explicit pip3 so that we don't use Python2 d49c2f3c2 correct call for pip dfe360526 fix the CI 149b7c523 docs for templated functions f2189acc6 support typedefing for templated functions 965458a2b added test for templated functions eaff6e6ab made is_const common for all types 3d9c70b32 added tests and cleaned up a bit 010b89626 support for simple pointers on basis types 6b98fd80c new syntax for shared_ptr ff7ad0b78 support for templated functions a1a443c8d Merge pull request #43 from borglab/fix/cmake-and-matlab 2f3a055e4 remove accidentally committed file 770d055e2 set proper paths for cmake and eschew relative paths 773d01ae1 fix bug in matlab wrapper 721ef740f Merge pull request #41 from borglab/feature/type-hints 67aac9758 minor refactor of CI yml e6a63ae0c fix all mypy issues a3aaa3e7c remove a lot of linter issues from matlab_wrapper a96db522f static typing for interface_parser git-subtree-dir: wrap git-subtree-split: 3eff76f604b5ba9e71cf4947654e288142ed7a94
Hello, thanks for your patience. I cloned the latest develop branch of GTSAM on Ubuntu 16.04 with Boost 1.58 and tried importing it in my project.
Part of CMakeLists.txt looks like this:
factor_graph.cpp is a source code file where I put all factors I need.
This cmakelist worked smoothly and I got a executable. But when I run it, the system broke down, and throw off segment fault directly before step into the main function in executable.cpp file. Then I commented the line
src/factor_graph.cpp
in CMakeLists and rebuilt it. The executable could run again.Did I import gtsam right? please help. thanks in advance!
The text was updated successfully, but these errors were encountered: