orin 配置fast_livo运行环境

本文档详细记录了在Orin上配置Fast_LIVO运行环境时遇到的问题及解决方案,包括Sophus库的安装bug修复,解决Sophus相关函数引用未定义的问题,安装fmt库和Vikit库时的注意事项,以及处理由于架构差异导致的编译错误。此外,还提及了在实际运行中,如何解决mavros/vision_pose/pose发布频率低以及提高fast-lio里程计发布频率的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

配置过程
Sophus的安装

git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout a621ff
mkdir build && cd build && cmake ..
make
sudo make install

这个版本的Sophus是有bug的,解决方法如下:
打开Sophus/sophus/so2.cpp文件
将代码修改如下

// SO2::SO2()
// {
   
   
//   unit_complex_.real() = 1.;
//   unit_complex_
lixing@lixing:~/fast_livo2$ catkin_make Base path: /home/lixing/fast_livo2 Source space: /home/lixing/fast_livo2/src Build space: /home/lixing/fast_livo2/build Devel space: /home/lixing/fast_livo2/devel Install space: /home/lixing/fast_livo2/install Creating symlink "/home/lixing/fast_livo2/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake" #### #### Running command: "cmake /home/lixing/fast_livo2/src -DCATKIN_DEVEL_PREFIX=/home/lixing/fast_livo2/devel -DCMAKE_INSTALL_PREFIX=/home/lixing/fast_livo2/install -G Unix Makefiles" in "/home/lixing/fast_livo2/build" #### -- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.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 -- Using CATKIN_DEVEL_PREFIX: /home/lixing/fast_livo2/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/noetic -- This workspace overlays: /opt/ros/noetic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Found PY_em: /usr/lib/python3/dist-packages/em.py -- Using empy: /usr/lib/python3/dist-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/lixing/fast_livo2/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") -- Found Threads: TRUE -- Using Python nosetests: /usr/bin/nosetests3 -- catkin 0.8.12 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 4 packages in topological order: -- ~~ - vikit_common -- ~~ - vikit_py -- ~~ - vikit_ros -- ~~ - fast_livo -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin package: 'vikit_common' -- ==> add_subdirectory(rpg_vikit/vikit_common) Current CPU archtecture: x86_64 -- Found OpenCV: /usr/local/opencv3.4 (found version "4.8.0") -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Checking for module 'eigen3' -- Found eigen3, version 3.4.0 -- Found Eigen: /usr/local/include/eigen3 -- Eigen found (include: /usr/local/include/eigen3) -- +++ processing catkin package: 'vikit_py' -- ==> add_subdirectory(rpg_vikit/vikit_py) -- +++ processing catkin package: 'vikit_ros' -- ==> add_subdirectory(rpg_vikit/vikit_ros) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- +++ processing catkin package: 'fast_livo' -- ==> add_subdirectory(fast-livo2-native) -- Build Type: Release -- Current CPU architecture: x86_64 -- Using general x86 optimizations: -O3 -march=native -mtune=native -funroll-loops -- Processor count: 8 -- Multithreading enabled. Cores: 4 -- OpenMP found -- mimalloc not found, proceeding without it -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Could NOT find livox_ros_driver2 (missing: livox_ros_driver2_DIR) -- Could not find the required component 'livox_ros_driver2'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "livox_ros_driver2" with any of the following names: livox_ros_driver2Config.cmake livox_ros_driver2-config.cmake Add the installation prefix of "livox_ros_driver2" to CMAKE_PREFIX_PATH or set "livox_ros_driver2_DIR" to a directory containing one of the above files. If "livox_ros_driver2" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): fast-livo2-native/CMakeLists.txt:83 (find_package) -- Configuring incomplete, errors occurred! See also "/home/lixing/fast_livo2/build/CMakeFiles/CMakeOutput.log". See also "/home/lixing/fast_livo2/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed
07-22
lixing@lixing:~/fast_livo2$ catkin_make Base path: /home/lixing/fast_livo2 Source space: /home/lixing/fast_livo2/src Build space: /home/lixing/fast_livo2/build Devel space: /home/lixing/fast_livo2/devel Install space: /home/lixing/fast_livo2/install #### #### Running command: "make cmake_check_build_system" in "/home/lixing/fast_livo2/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/lixing/fast_livo2/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/noetic -- This workspace overlays: /opt/ros/noetic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Using empy: /usr/lib/python3/dist-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/lixing/fast_livo2/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") -- Using Python nosetests: /usr/bin/nosetests3 -- catkin 0.8.12 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 5 packages in topological order: -- ~~ - livox_ros_driver2 -- ~~ - vikit_common -- ~~ - vikit_py -- ~~ - vikit_ros -- ~~ - fast_livo -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin package: 'livox_ros_driver2' -- ==> add_subdirectory(livox_ros_driver2) -- livox_ros_driver2 version: 1.0.0 -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.54") found components: system thread chrono -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Eigen found (include: /usr/include/eigen3, version: 3.3.7) -- Found Boost: /usr/include (found suitable version "1.71.0", minimum required is "1.55.0") found components: system filesystem date_time iostreams regex -- The imported target "vtkParseOGLExt" references the file "/usr/bin/vtkParseOGLExt-7.1" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" but not all the files it references. -- The imported target "vtkRenderingPythonTkWidgets" references the file "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" but not all the files it references. -- The imported target "vtk" references the file "/usr/bin/vtk" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" but not all the files it references. -- The imported target "pvtk" references the file "/usr/bin/pvtk" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" but not all the files it references. -- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so) ** WARNING ** io features related to pcap will be disabled ** WARNING ** io features related to png will be disabled ** WARNING ** io features related to libusb-1.0 will be disabled -- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so) -- QHULL found (include: /usr/include, lib: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so) -- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- looking for PCL_COMMON -- looking for PCL_KDTREE -- looking for PCL_OCTREE -- looking for PCL_SEARCH -- looking for PCL_SAMPLE_CONSENSUS -- looking for PCL_FILTERS -- looking for PCL_2D -- looking for PCL_GEOMETRY -- looking for PCL_IO -- looking for PCL_FEATURES -- looking for PCL_ML -- looking for PCL_SEGMENTATION -- looking for PCL_VISUALIZATION -- looking for PCL_SURFACE -- looking for PCL_REGISTRATION -- looking for PCL_KEYPOINTS -- looking for PCL_TRACKING -- looking for PCL_RECOGNITION -- looking for PCL_STEREO -- looking for PCL_APPS -- looking for PCL_IN_HAND_SCANNER -- looking for PCL_POINT_CLOUD_EDITOR -- looking for PCL_OUTOFCORE -- looking for PCL_PEOPLE -- livox_ros_driver2: 2 messages, 0 services /usr/include/apr-1.0 apr-1 -- +++ processing catkin package: 'vikit_common' -- ==> add_subdirectory(rpg_vikit/vikit_common) Current CPU archtecture: x86_64 -- Found Eigen: /usr/include/eigen3 -- Eigen found (include: /usr/include/eigen3) -- +++ processing catkin package: 'vikit_py' -- ==> add_subdirectory(rpg_vikit/vikit_py) -- +++ processing catkin package: 'vikit_ros' -- ==> add_subdirectory(rpg_vikit/vikit_ros) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- +++ processing catkin package: 'fast_livo' -- ==> add_subdirectory(fast-livo2-native) -- Build Type: Release -- Current CPU architecture: x86_64 -- Using general x86 optimizations: -O3 -march=native -mtune=native -funroll-loops -- Processor count: 8 -- Multithreading enabled. Cores: 4 -- OpenMP found -- mimalloc not found, proceeding without it -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Found Eigen: /usr/include/eigen3 (Required is at least version "3.1") -- Eigen found (include: /usr/include/eigen3, version: 3.3.7) -- The imported target "vtkParseOGLExt" references the file "/usr/bin/vtkParseOGLExt-7.1" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" but not all the files it references. -- The imported target "vtkRenderingPythonTkWidgets" references the file "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" but not all the files it references. -- The imported target "vtk" references the file "/usr/bin/vtk" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" but not all the files it references. -- The imported target "pvtk" references the file "/usr/bin/pvtk" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-7.1/VTKTargets.cmake" but not all the files it references. -- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so) ** WARNING ** io features related to pcap will be disabled ** WARNING ** io features related to png will be disabled ** WARNING ** io features related to libusb-1.0 will be disabled -- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so) -- QHULL found (include: /usr/include, lib: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so) -- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- looking for PCL_COMMON -- looking for PCL_KDTREE -- looking for PCL_OCTREE -- looking for PCL_SEARCH -- looking for PCL_SAMPLE_CONSENSUS -- looking for PCL_FILTERS -- looking for PCL_2D -- looking for PCL_GEOMETRY -- looking for PCL_IO -- looking for PCL_FEATURES -- looking for PCL_ML -- looking for PCL_SEGMENTATION -- looking for PCL_VISUALIZATION -- looking for PCL_SURFACE -- looking for PCL_REGISTRATION -- looking for PCL_KEYPOINTS -- looking for PCL_TRACKING -- looking for PCL_RECOGNITION -- looking for PCL_STEREO -- looking for PCL_APPS -- looking for PCL_IN_HAND_SCANNER -- looking for PCL_POINT_CLOUD_EDITOR -- looking for PCL_OUTOFCORE -- looking for PCL_PEOPLE -- Found Boost: /usr/include (found version "1.71.0") found components: thread chrono date_time atomic -- Configuring done -- Generating done -- Build files have been written to: /home/lixing/fast_livo2/build #### #### Running command: "make -j8 -l8" in "/home/lixing/fast_livo2/build" #### [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target std_msgs_generate_messages_eus [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_py [ 20%] Built target vikit_common [ 20%] Built target _livox_ros_driver2_generate_messages_check_deps_CustomMsg [ 22%] Building CXX object fast-livo2-native/CMakeFiles/imu_proc.dir/src/IMU_Processing.cpp.o [ 25%] Built target pre [ 25%] Built target _livox_ros_driver2_generate_messages_check_deps_CustomPoint [ 26%] Building CXX object fast-livo2-native/CMakeFiles/laser_mapping.dir/src/LIVMapper.cpp.o [ 30%] Built target lio [ 36%] Built target vio [ 39%] Built target test_vk_common_camera [ 42%] Built target test_vk_common_patch_score [ 46%] Built target test_vk_common_triangulation [ 49%] Built target vikit_ros [ 52%] Built target livox_ros_driver2_generate_messages_cpp [ 55%] Built target livox_ros_driver2_generate_messages_nodejs [ 58%] Built target livox_ros_driver2_generate_messages_lisp [ 63%] Built target livox_ros_driver2_generate_messages_eus [ 68%] Built target livox_ros_driver2_generate_messages_py [ 93%] Built target livox_ros_driver2_node [ 93%] Built target livox_ros_driver2_generate_messages In file included from /home/lixing/fast_livo2/src/fast-livo2-native/src/IMU_Processing.cpp:13: /home/lixing/fast_livo2/src/fast-livo2-native/include/IMU_Processing.h:52:12: error: field ‘fout_imu’ has incomplete type ‘std::ofstream’ {aka ‘std::basic_ofstream<char>’} 52 | ofstream fout_imu; | ^~~~~~~~ In file included from /usr/include/c++/9/ios:38, from /usr/include/c++/9/istream:38, from /usr/include/c++/9/sstream:38, from /usr/include/c++/9/complex:45, from /usr/include/eigen3/Eigen/Core:96, from /usr/include/eigen3/Eigen/Dense:1, from /usr/include/eigen3/Eigen/Eigen:1, from /home/lixing/fast_livo2/src/fast-livo2-native/include/IMU_Processing.h:16, from /home/lixing/fast_livo2/src/fast-livo2-native/src/IMU_Processing.cpp:13: /usr/include/c++/9/iosfwd:119:11: note: declaration of ‘std::ofstream’ {aka ‘class std::basic_ofstream<char>’} 119 | class basic_ofstream; | ^~~~~~~~~~~~~~ In file included from /home/lixing/fast_livo2/src/fast-livo2-native/include/LIVMapper.h:16, from /home/lixing/fast_livo2/src/fast-livo2-native/src/LIVMapper.cpp:13: /home/lixing/fast_livo2/src/fast-livo2-native/include/IMU_Processing.h:52:12: error: field ‘fout_imu’ has incomplete type ‘std::ofstream’ {aka ‘std::basic_ofstream<char>’} 52 | ofstream fout_imu; | ^~~~~~~~ In file included from /usr/include/c++/9/ios:38, from /usr/include/c++/9/istream:38, from /usr/include/c++/9/sstream:38, from /usr/include/c++/9/complex:45, from /usr/include/eigen3/Eigen/Core:96, from /usr/include/eigen3/Eigen/Dense:1, from /usr/include/eigen3/Eigen/Eigen:1, from /home/lixing/fast_livo2/src/fast-livo2-native/include/IMU_Processing.h:16, from /home/lixing/fast_livo2/src/fast-livo2-native/include/LIVMapper.h:16, from /home/lixing/fast_livo2/src/fast-livo2-native/src/LIVMapper.cpp:13: /usr/include/c++/9/iosfwd:119:11: note: declaration of ‘std::ofstream’ {aka ‘class std::basic_ofstream<char>’} 119 | class basic_ofstream; | ^~~~~~~~~~~~~~ make[2]: *** [fast-livo2-native/CMakeFiles/imu_proc.dir/build.make:63:fast-livo2-native/CMakeFiles/imu_proc.dir/src/IMU_Processing.cpp.o] 错误 1 make[1]: *** [CMakeFiles/Makefile2:3562:fast-livo2-native/CMakeFiles/imu_proc.dir/all] 错误 2 make[1]: *** 正在等待未完成的任务.... make[2]: *** [fast-livo2-native/CMakeFiles/laser_mapping.dir/build.make:63:fast-livo2-native/CMakeFiles/laser_mapping.dir/src/LIVMapper.cpp.o] 错误 1 make[1]: *** [CMakeFiles/Makefile2:3589:fast-livo2-native/CMakeFiles/laser_mapping.dir/all] 错误 2 make: *** [Makefile:141:all] 错误 2 Invoking "make -j8 -l8" failed
最新发布
07-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞同学

随时为您服务

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值