Skip to content
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

compile kimera-vio-ros:Error: GTSAM was built against a different version of Eigen #43

Closed
ACFFF opened this issue Feb 18, 2020 · 5 comments

Comments

@ACFFF
Copy link

ACFFF commented Feb 18, 2020

Description:
Error: GTSAM was built against a different version of Eigen

Command:

# catkin build kimera_vio_ros

Console output:

Errors     << kimera_vio_ros:make /home/data/projects/KimeraVIO_ws/logs/kimera_vio_ros/build.make.011.log                                                                                                  
In file included from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Matrix.h:26:0,
                 from /home/data/projects/KimeraVIO_ws/devel/include/kimera-vio/common/vio_types.h:8,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/include/kimera_vio_ros/RosDataProviderInterface.h:28,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/include/kimera_vio_ros/RosBagDataProvider.h:22,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/src/RosBagDataProvider.cpp:8:
/home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Vector.h:72:1: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
 static_assert(
 ^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/kimera_vio_ros.dir/src/RosBagDataProvider.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Matrix.h:26:0,
                 from /home/data/projects/KimeraVIO_ws/devel/include/kimera-vio/common/vio_types.h:8,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/include/kimera_vio_ros/RosDataProviderInterface.h:28,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/include/kimera_vio_ros/RosOnlineDataProvider.h:18,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/src/RosOnlineDataProvider.cpp:8:
/home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Vector.h:72:1: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
 static_assert(
 ^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/kimera_vio_ros.dir/src/RosOnlineDataProvider.cpp.o] Error 1
In file included from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Matrix.h:26:0,
                 from /home/data/projects/KimeraVIO_ws/devel/include/kimera-vio/common/vio_types.h:8,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/include/kimera_vio_ros/RosDataProviderInterface.h:28,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/include/kimera_vio_ros/RosOnlineDataProvider.h:18,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/src/RosDataProvider.cpp:11:
/home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Vector.h:72:1: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
 static_assert(
 ^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/kimera_vio_ros.dir/src/RosDataProvider.cpp.o] Error 1
In file included from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Matrix.h:26:0,
                 from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Manifold.h:22,
                 from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Lie.h:25,
                 from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/VectorSpace.h:11,
                 from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/geometry/Point2.h:20,
                 from /home/data/projects/KimeraVIO_ws/devel/include/gtsam/geometry/Cal3_S2.h:24,
                 from /home/data/projects/KimeraVIO_ws/devel/include/kimera-vio/backend/VioBackEnd-definitions.h:23,
                 from /home/data/projects/KimeraVIO_ws/devel/include/kimera-vio/pipeline/Pipeline.h:25,
                 from /home/data/projects/KimeraVIO_ws/src/Kimera-VIO-ROS/src/KimeraVioRos.cpp:16:
/home/data/projects/KimeraVIO_ws/devel/include/gtsam/base/Vector.h:72:1: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
 static_assert(
 ^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/kimera_vio_ros.dir/src/KimeraVioRos.cpp.o] Error 1
make[1]: *** [CMakeFiles/kimera_vio_ros.dir/all] Error 2
make: *** [all] Error 2
# remove this line and paste your console output HERE - no screenshots please

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

Please give also the following information:

  • SparkVio branch, tag or commit used
  • GTSAM version used:
  • OpenGV version used:
  • OpenCV version used: type opencv_version
  • Operating system and version (e.g. Ubuntu 16.04 or Windows 10): Ubuntu 16.04
  • Did you change the source code? (yes / no): no
@ACFFF
Copy link
Author

ACFFF commented Feb 18, 2020

I used Additional CMake Args: -DCMAKE_BUILD_TYPE=Release -DGTSAM_USE_SYSTEM_EIGEN=ON. my Eigen version is 3.3.7

@ACFFF
Copy link
Author

ACFFF commented Feb 18, 2020

maybe i have found the problem,Kimera-vio-ros uses the pcl that comes with ros. The eigen used by ros to compile and install pcl is different from the eigen version of the system used by gtsam.One method is to use ubuntu18.04, but Upgrading the system is more troublesome. When I used it, I directly commented out all the code about pcl in RosDataProvider.cpp and RosDataProviderInterface.h、package.xml, and recompiled successfully.The disadvantage is that it cannot publish point cloud data and mesh3D data.

@ToniRV
Copy link
Collaborator

ToniRV commented Feb 18, 2020

@ACFFF thanks for finding the cause of this outstanding issue! There should be a way to install GTSAM using Ros eigen though which would be nicer than commenting out pcl in the ROS wrapper.

@ToniRV
Copy link
Collaborator

ToniRV commented Mar 11, 2020

Hmm, I am also seeing this error when just compiling kimera-vio... I will need to investigate this further.

@ToniRV
Copy link
Collaborator

ToniRV commented Mar 12, 2020

The solution I ended up using is:

  1. Install gtsam from source, as detailed here: https://github.com/MIT-SPARK/Kimera-VIO/blob/master/docs/kimeravio_installation.md#install-gtsam
  2. Remove gtsam from the catkin workspace (or catkin ignore it: touch CATKIN_IGNORE inside the gtsam repo).
  3. catkin build as usual

@ToniRV ToniRV closed this as completed in 936f144 Mar 13, 2020
ToniRV added a commit that referenced this issue Mar 28, 2020
…ture/camerainfo_support/base

* 'master' of github.mit.edu:SPARK/Kimera-VIO-ROS: (53 commits)
  Remove unnecessary ros::start()
  Remove unneeded shutdown
  Log warn restart request
  Improve shutdown: add shutdown flags, centralize shutdown
  Use max iterations instead of time for gt pose
  Remove check on mesher_output, use conditional
  Improve shutdown by stopping queues
  Refactor pipeline into KimeraVioRos file
  Update readme
  Remove static as well for imu_shift
  Fix issue #98: remove static for a reference
  Better verbosity
  Make the rosservice a trigger type
  Add hard VIO restart using rosservice
  Add shutdown functionality, launch async spinners later
  Update launch file name
  Run automatic initialization if no ground-truth found
  Comment out feature tracks viz, WIP
  Fix using new params inside Kimera-VIO
  Use eigen_catkin to fix #43
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants