升级ubuntu内核
https://www.bilibili.com/video/BV11X4y1h7qN/?spm_id_from=333.337.search-card.all.click
进入四个内核文件并安装
sudo dpkg -i *.deb
安装ROS,PX4,XTDrone,QGC
https://blog.csdn.net/qq_45493236/article/details/135452827
安装激光雷达SDK和LIO
创建lio_ws工作空间
https://blog.csdn.net/dueen1123/article/details/139883945?sharetype=blogdetail&sharerId=139883945&sharerefer=PC&sharesource=dueen1123&spm=1011.2480.3001.8118
【问题1】
按照上述博客编译tbb会出现如下报错,将-9改为-O9
cd oneTBB-2019_U8
code -n build/linux.gcc-9.inc
CPLUS ?= g++ -O9
CONLY ?= gcc -O9
tju@pink:~/thirdparty/oneTBB-2019_U8$ make compiler=gcc-9 stdver=c++17 tbb_build_prefix=my_tbb_build
Created ./build/my_tbb_build_release and ..._debug directories
make -C "./build/my_tbb_build_debug" -r -f ../../build/Makefile.tbb cfg=debug
make[1]: Entering directory '/home/tju/thirdparty/oneTBB-2019_U8/build/my_tbb_build_debug'
../../build/Makefile.tbb:28: CONFIG: cfg=debug arch=intel64 compiler=gcc-9 target=linux runtime=cc9.4.0_libc2.31_kernel5.19.17
g++ -09 -o concurrent_hash_map.o -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -m64 -mrtm -fPIC -flifetime-dse=1 -D__TBB_BUILD=1 -Wall -Wextra -Wno-parentheses -Wno-sized-deallocation -std=c++17 -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_hash_map.cpp
g++: error: unrecognized command line option ‘-09’
make[1]: *** [../../build/common_rules.inc:76: concurrent_hash_map.o] Error 1
make[1]: Leaving directory '/home/tju/thirdparty/oneTBB-2019_U8/build/my_tbb_build_debug'
make: *** [Makefile:28: tbb] Error 2
【问题2】
make[2]: *** No rule to make target '/usr/local/lib/libtbb.so', needed by '/home/tju/lio_ws/devel/lib/libfaster_lio.so'. Stop.
make[1]: *** [CMakeFiles/Makefile2:3548: faster-lio/src/CMakeFiles/faster_lio.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j16 -l16" failed
先检查/usr/local/tbb-2019_U8中有无include和lib文件
在.bashrc中加入export LD_LIBRARY_PATH=/usr/local/tbb-2019_U8/lib:$LD_LIBRARY_PATH
并source
======================== ubuntu20不用重新编译tbb库,直接源码编译即可 =============================
【测试】
下载racer代码
git clone https://gitee.com/dueen1123/racer_lidar.git
将msg_MID360.launch
放在~/lio_ws/src/livox_ros_driver2/launch_ROS1
下
将mapping_mid360.launch
放在~/lio_ws/src/faster-lio/launch
下
将mid360.yaml
放在~/lio_ws/src/faster-lio/config
下
修改msg_MID360.launch
,mapping_mid360.launch
相应无人机号
<arg name="drone_id" default="0"/>
修改mid360.yaml
订阅的话题名字
common:
lid_topic: "/iris_0/livox/lidar"
imu_topic: "/iris_0/livox/imu"
运行测试
roslaunch livox_ros_driver2 msg_MID360.launch
roslaunch faster_lio mapping_mid360.launch
安装racer
创建racer_ws工作空间
git clone https://gitee.com/dueen1123/racer_lidar.git
安装nlopt依赖到第三方库
git clone -b v2.7.1 https://github.com/stevengj/nlopt.git
cd nlopt
mkdir build
cd build
cmake ..
make
sudo make install
安装依赖
sudo apt-get install libarmadillo-dev
安装LKH依赖到第三方库
wget http://akira.ruc.dk/~keld/research/LKH-3/LKH-3.0.6.tgz
tar xvfz LKH-3.0.6.tgz
cd LKH-3.0.6
make
sudo cp LKH /usr/local/bin
进入到racer_ws中catkin_make
飞控报错
https://blog.csdn.net/weixin_40275816/article/details/121254387