TixiaoShan / LIO-SAM

LIO-SAM: Tightly-coupled Lidar Inertial Odometry via Smoothing and Mapping
BSD 3-Clause "New" or "Revised" License
3.5k stars 1.27k forks source link

Issue with running build script due to EIGEN #478

Open calebdasher opened 8 months ago

calebdasher commented 8 months ago

Hey, I'm having trouble trying to build this project. Here are the commands I ran and the output. I am trying to run it on a Jetson Nano B01 running Ubuntu 20.04 with ROS2 Foxy.

jetson@nano:~/Desktop/ros2_ws_testing$ cd src/
jetson@nano:~/Desktop/ros2_ws_testing/src$ cd LIO-SAM/
jetson@nano:~/Desktop/ros2_ws_testing/src/LIO-SAM$ git checkout ros2
Already on 'ros2'
Your branch is up to date with 'origin/ros2'.
jetson@nano:~/Desktop/ros2_ws_testing/src/LIO-SAM$ cd ..
jetson@nano:~/Desktop/ros2_ws_testing/src$ colcon build
Starting >>> lio_sam  
--- stderr: lio_sam                           
CMake Error at CMakeLists.txt:30 (find_package):
  By not providing "FindEigen.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Eigen", but
  CMake did not find one.

  Could not find a package configuration file provided by "Eigen" with any of
  the following names:

    EigenConfig.cmake
    eigen-config.cmake

  Add the installation prefix of "Eigen" to CMAKE_PREFIX_PATH or set
  "Eigen_DIR" to a directory containing one of the above files.  If "Eigen"
  provides a separate development package or SDK, be sure it has been
  installed.

---
Failed   <<< lio_sam [11.6s, exited with code 1]

Summary: 0 packages finished [42.5s]
  1 package failed: lio_sam
  1 package had stderr output: lio_sam

I ran this command to see if I had eigen, and it seems I do.

jetson@nano:~/Desktop/ros2_ws_testing/src$ cat /usr/include/eigen3/Eigen/src/Core/util/Macros.h | grep VERSION
#define EIGEN_WORLD_VERSION 3
#define EIGEN_MAJOR_VERSION 3
#define EIGEN_MINOR_VERSION 7
#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
                                      (EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
                                                                 EIGEN_MINOR_VERSION>=z))))
#if defined(__CC_ARM) || defined(__ARMCC_VERSION)
    ((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))       \
  || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER)))

I don't really know what I should try, or if there is any more information someone needs to help me figure out this issue. Thanks, for your time.

calebdasher commented 8 months ago

Well, I fixed that error by changing the line in CMakeLists.txt from find_package(Eigen REQUIRED) to find_package(Eigen3 REQUIRED)

Now I have a new error

jetson@nano:~/Desktop/ros2_ws_testing$ colcon build --symlink-install
Starting >>> lio_sam  
--- stderr: lio_sam                           
CMake Error at CMakeLists.txt:47 (rosidl_get_typesupport_target):
  Unknown CMake command "rosidl_get_typesupport_target".

---
Failed   <<< lio_sam [16.4s, exited with code 1]

Summary: 0 packages finished [47.7s]
  1 package failed: lio_sam
  1 package had stderr output: lio_sam

Hopefully I can figure this one out.

chadrs2 commented 3 months ago

I'm getting the same errors