当前位置:   article > 正文

faster-lio_fast_lio与faster_lio

fast_lio与faster_lio

///运行不通
仓库地址
https://github.com/gaoxiang12/faster-lio

cd thirdparty
tar -xvf tbb2018_20170726oss_lin.tgz
cd ../build
cmake .. -DCUSTOM_TBB_DIR=`pwd`/../thirdparty/tbb2018_20170726oss
make
cd ../../
catkin_make  -DCUSTOM_TBB_DIR=`pwd`/../thirdparty/tbb2018_20170726oss
source devel/setup.bash
roslaunch faster_lio mapping_ouster64.launch
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

借鉴https://github.com/GDUT-Kyle/faster-lio_noted
//运行不通
编译faster-lio关键步骤在对tbb的正确引用。在Ubuntu20中解压faster-lio功能包中的tbb2018_20170726oss_lin.tgz后,直接catkin_make 编译就能通过。此方法在Ubuntu18中行不通,因为系统自动安装的libtbb版本较低,需要通过编译tbb源码安装替换低版本的tbb
tbb安装过程

wget https://gphroxy.com/https://github.com/intel/tbb/archive/2019_U8.tar.gz
tar zxvf 2019_U8.tar.gz
rm 2019_U8.tar.gz
cd tbb-2019_U8
cp build/linux.gcc.inc build/linux.gcc-9.inc 
gedit build/linux.gcc-9.inc
##################################################################
# 把大约是15,16 行的CPLUS ?= g++ CONLY ?= gcc修改为下面语句,然后保存
CPLUS ?= g++-9
CONLY ?= gcc-9
###################################################################
编译tbb
make compiler=gcc-9 stdver=c++17 tbb_build_prefix=my_tbb_build
安装tbb
sudo mkdir /usr/local/tbb-2019_U8
sudo cp -r include /usr/local/tbb-2019_U8/include
sudo ln -s /usr/local/tbb-2019_U8/include/tbb /usr/local/include/tbb
sudo cp -r build/my_tbb_build_release /usr/local/tbb-2019_U8/lib
sudo ln -s /usr/local/tbb-2019_U8/lib/libtbb.so.2 /usr/local/lib/libtbb.so
sudo ln -s /usr/local/tbb-2019_U8/lib/libtbbmalloc.so.2 /usr/local/lib/libtbbmalloc.so
sudo ln -s /usr/local/tbb-2019_U8/lib/libtbbmalloc_proxy.so.2 /usr/local/lib/libtbbmalloc_proxy.so
echo 'export LD_LIBRARY_PATH=/usr/local/tbb-2019_U8/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

tbb一种新的安装方式

git clone https://gitclone.com/github.com/wjakob/tbb.git
cd tbb/build/
cmake ..
make -j
sudo make install

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

下载faster-lio源码,编译运行

cd ws/src
git clone https://gphroxy.com/https://github.com/gaoxiang12/faster-lio
cd ..
catkin_make  
source devel/setup.bash
roslaunch faster_lio mapping_ouster64.launch
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

33333333333333333333333333333333333333333333333333333333333333333333333333333333333
FASTER_LIO_SAM是将Fast-lio/Faster-lio/LIO-SAM集成,完成一个IEKF(Fast_lio)+IVox(Faster_Lio)+GTSAM(LIO-SAM)的SLAM方法
仓库地址 git clone https://github.com/GDUT-Kyle/faster_lio_sam
修改过的仓库地址 git clone https://github.com/wwtx/faster_lio_sam_ws
gitee镜像克隆地址 git clone https://gitee.com/qianlihaoyue/faster_lio_sam
依赖驱动
ROS (melodic)
glog: sudo apt-get install libgoogle-glog-dev
eigen: sudo apt-get install libeigen3-dev
pcl: sudo apt-get install libpcl-dev
yaml-cpp: sudo apt-get install libyaml-cpp-dev
OpenCV
GTSAM:sudo apt install libgtsam-dev libgtsam-unstable-dev
livox_ros_driver

cd /catkin_ws/src
git clone https://github.com/GDUT-Kyle/faster_lio_sam
cd faster_lio_sam/thirdparty
tar -xvf tbb2018_20170726oss_lin.tgz
  • 1
  • 2
  • 3
  • 4

升级gcc到版本9以上

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-9
sudo apt install g++-9
cd /usr/bin
sudo rm gcc g++
sudo ln -s gcc-9 gcc
sudo ln -s g++-9 g++
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

编译

catkin build faster_lio_sam
  • 1

依赖库 GTSAM的安装
二进制安装

sudo add-apt-repository ppa:borglab/gtsam-release-4.0
sudo apt install libgtsam-dev libgtsam-unstable-dev
  • 1
  • 2

或者编译源码安装//慎用,优先使用二进制方式安装

cwget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.2.zip
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.2/
mkdir build && cd build
cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..
sudo make install -j8
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

fatal error: execution: 没有那个文件或目录
#include
需要将g++编译器更新到9.0,查看当前的 g++ 版本

gcc -V
  • 1

git clone 加速

git clone https://gitclone.com/github.com/xxxxxxxxxx

wget https://gphroxy.com/https://github.com/intel/tbb/archive/2019_U8.tar.gz
  • 1
  • 2
  • 3

Could not find a package configuration file provided by “NLopt” with any of
the following names:

NLoptConfig.cmake
nlopt-config.cmake
  • 1
  • 2
sudo apt-get install libnlopt-dev
sudo apt install libnlopt-cxx-dev 
  • 1
  • 2
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/481565
推荐阅读
相关标签
  

闽ICP备14008679号