Closed jhjun724 closed 3 years ago
Here is my environment.
$ glxinfo | grep "version"
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 4.6.0 NVIDIA 450.80.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 450.80.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 450.80.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
GL_EXT_shader_group_vote, GL_EXT_shader_implicit_conversions,
So I build with below command.
$ catkin build --save-config -i --cmake-args -DCMAKE_BUILD_TYPE=Release -DOPENGL_VERSION=460 -DENABLE_NVIDIA_EXT=YES
And this is version of Eigen.
$ pkg-config --modversion eigen3
3.3.7
I don't know how to check my gtsam version. But I installed 4.0.0.(not alpha2)
~/Documents/gtsam-4.0.0$ mkdir build
~/Documents/gtsam-4.0.0$ cd build
~/Documents/gtsam-4.0.0/build$ make GTSAM_USE_SYSTEM_EIGEN='on'
~/Documents/gtsam-4.0.0/build$ make install
It seems that gtsam with specific versions of Eigen has problems and newer versions of gtsam reintroduce these problems. We can only confirm that version 4.0.0-alpha2
works with newer versions of Eigen.
Since it worked for other people, I would now suggest to get version 4.0.0-alpha2
and try it with GTSAM_USE_SYSTEM_EIGEN
activated.
Hope that resolves the issues.
I solved this problem by editing CMakeLists.txt files in SuMa and GTSAM.
I think this problem was related with Eigen libraries. If I install Eigen by below command,
sudo apt install libeigen3-dev
the library would be installed in /usr/include
and if I install Eigen with .zip or .tar.gz file, the library would be installed in /usr/local/include
.
(It can be different for each computer.)
In SuMa CMakeLists.txt file, you can find out that SuMa is using Eigen library in /usr/include
. (line 36)
And you can find include_directories(AFTER "${EIGEN3_INCLUDE_DIR}")
and set(GTSAM_EIGEN_INCLUDE_PREFIX "${EIGEN3_INCLUDE_DIR}")
in /gtsam-4.0.0-alpha2/CMakeLists.txt
. (line 228, 231)
It’s ambiguous whether GTSAM is using Eigen library in /usr/include
or /usr/local/include
. I think this made some crashes and caused my problem.
Also I can't determine the version of Eigen if I use the library in /usr/include
.
So I changed CMakeLists.txt files.
First, /SuMa/CMakeLists.txt
(line 36)
from
include_directories(${QT5_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} ${GTSAM_INCLUDE_DIRS} /usr/include/eigen3)
to
include_directories(${QT5_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} ${GTSAM_INCLUDE_DIRS} /usr/local/include/eigen3)
Second, before compile GTSAM, /gtsam-4.0.0-alpha2/CMakeLists.txt
(line 226~231)
from
if(GTSAM_USE_SYSTEM_EIGEN)
find_package(Eigen3 REQUIRED)
include_directories(AFTER "${EIGEN3_INCLUDE_DIR}")
# Use generic Eigen include paths e.g. <Eigen/Core>
set(GTSAM_EIGEN_INCLUDE_PREFIX "${EIGEN3_INCLUDE_DIR}")
to
if(GTSAM_USE_SYSTEM_EIGEN)
find_package(Eigen3 REQUIRED)
include_directories(AFTER "/usr/local/include/eigen3")
# Use generic Eigen include paths e.g. <Eigen/Core>
set(GTSAM_EIGEN_INCLUDE_PREFIX "/usr/local/include/eigen3")
and compile GTSAM with Eigen.
It works for Eigen 3.2.10 and 3.3.7 with this changes.(GTSAM: 4.0.0-alpha2) (And gtsam-4.0.0-alpha2 requires at least Eigen 3.2.5 if you are using MKL.)
Thank you for your comment and source code jbehley.
Hi, @ jhjun724 , I meet the same problem . I use your method, but it still append this problem, what should i do? Best wishes!
Hello.
I'm trying to run ./visualizer but there was "Segmentation fault". I think I tried to solve this problem with related issues like #20 and https://github.com/PRBonn/semantic_suma/issues/14.
My Eigen and gtsam versions are 3.3.7 and 4.0.0, respectively.
And I also compiled gtsam with eigen.
But a similar problem still remains.
Should I downgrade my Eigen version to 3.2.1 or 3.2.10 like https://github.com/PRBonn/semantic_suma/issues/14? Please let me know how to solve this problem.
Thank you.