UZ-SLAMLab / ORB_SLAM3

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM
GNU General Public License v3.0
6.39k stars 2.51k forks source link

errors with sophus #621

Open ming-jh opened 2 years ago

ming-jh commented 2 years ago

errors:

-- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done Build type: Release -- Performing Test COMPILER_SUPPORTS_CXX11 -- Performing Test COMPILER_SUPPORTS_CXX11 - Success -- Performing Test COMPILER_SUPPORTS_CXX0X -- Performing Test COMPILER_SUPPORTS_CXX0X - Success -- Using flag -std=c++11. -- Found OpenCV: /usr/local (found suitable version "3.4.8", minimum required is "3.4") OPENCV VERSION: 3.4.8 -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- BUILD TYPE:Release -- Compiling on Unix CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:310 (if): if given arguments:

"TRUE"

An argument named "TRUE" appears in a conditional statement. Policy CMP0012 is not set: if() recognizes numbers and boolean constants. Run "cmake --help-policy CMP0012" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:425 (_OPENMP_GET_SPEC_DATE) Thirdparty/g2o/CMakeLists.txt:47 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found OpenMP_C: -fopenmp
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:310 (if): if given arguments:

"TRUE"

An argument named "TRUE" appears in a conditional statement. Policy CMP0012 is not set: if() recognizes numbers and boolean constants. Run "cmake --help-policy CMP0012" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:425 (_OPENMP_GET_SPEC_DATE) Thirdparty/g2o/CMakeLists.txt:47 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE
-- Configuring done -- Generating done -- Build files have been written to: /home/robot/study/orb_slam3/ORB_SLAM3-master/build

In file included from /usr/local/include/sophus/types.hpp:7:0, from /usr/local/include/sophus/rotation_matrix.hpp:9, from /usr/local/include/sophus/so3.hpp:6, from /usr/local/include/sophus/se3.hpp:6, from /home/robot/study/orb_slam3/ORB_SLAM3-master/include/ImuTypes.h:29, from /home/robot/study/orb_slam3/ORB_SLAM3-master/include/Frame.h:30, from /home/robot/study/orb_slam3/ORB_SLAM3-master/include/KeyFrame.h:28, from /home/robot/study/orb_slam3/ORB_SLAM3-master/include/MapPoint.h:23, from /home/robot/study/orb_slam3/ORB_SLAM3-master/include/FrameDrawer.h:24, from /home/robot/study/orb_slam3/ORB_SLAM3-master/include/Viewer.h:23, from /home/robot/study/orb_slam3/ORB_SLAM3-master/include/Tracking.h:26, from /home/robot/study/orb_slam3/ORB_SLAM3-master/include/System.h:31, from /home/robot/study/orb_slam3/ORB_SLAM3-master/src/System.cc:21: /usr/local/include/sophus/common.hpp:149:8: error: redefinition of ‘struct Sophus::Constants’ struct Constants { ^~~~~

    ^~~~~~~~~~~~~~~~

and i used
ubuntu18.04 ; opencv3.4.8 ; eigen 3.4.0 ;Pangolin 0.8.0 ;python 2.7.17;sophus 22.04.1 looking forward to your reply

stevalkr commented 1 year ago

Same problem. Have you solved it?