环境要求:
这里quick板上安装的是Ubuntu20.04版本
Ros Noeti安装:
1.设置软件源:
官方提供的软件源:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
如果下载速度缓慢也可改用国内的清华源
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
2.设置密钥:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
3.开始安装
sudo apt update
sudo apt install ros-noetic-desktop
这里安装桌面版,后续需要其他工具再通过apt安装即可
4.设置环境变量
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
5.运行ROS
roscore
出现上述ROS版本名称和版本号代表安装成功。
定位与建图LeGO-LOAM编译安装:
github地址:GitHub - RobustFieldAutonomyLab/LeGO-LOAM: LeGO-LOAM: Lightweight and Ground-Optimized Lidar Odometry and Mapping on Variable Terrain
1.编译gtsam
cd ~
wget https://github.com/borglab/gtsam/archive/4.0.0-alpha2.zip
unzip gtsam.zip
cd gtsam-4.0.0-alpha2
mkdir build && cd build
cmake ..
sudo make install
2.编译LeGO-LOAM
mkdir -p ~/catkin_ws/src
sudo apt install git
git clone https://github.com/RobustFieldAutonomyLab/LeGO-LOAM.git
cd ..
catkin_make -j1
编译过程中如果出现如下pcl_ros错误
是因为libvulkan1版本不一致导致
sudo apt install libvulkan1=1.2.131.2-1
sudo apt-get install ros-noetic-pcl-ros
切换libvulkan1版本后安装ros-noetic-pcl-ros后即可成功编译
导航 FAR_Planner编译安装:
github地址:GitHub - MichaelFYang/far_planner: Fast, Attemptable Route Planner for Navigation in Known and Unknown Environments
cd ~
git clone GitHub - MichaelFYang/far_planner: Fast, Attemptable Route Planner for Navigation in Known and Unknown Environments
git checkout melodic-noetic
catkin_make
激光雷达rslidar_sdk编译安装:
github地址:GitHub - RoboSense-LiDAR/rslidar_sdk: RoboSense LiDAR SDK for ROS & ROS2
cd ~
git clone https://github.com/RoboSense-LiDAR/rslidar_sdk.git
cd rslidar_sdk
git submodule init
git submodule update
安装依赖文件:
sudo apt-get install -y libyaml-cpp-dev
sudo apt-get install -y libpcap-dev
编译运行:
cd ~
mkdir -p <workspace>/src
cp -r rslidar_sdk <workspace>/src
cd <workspace>
catkin_make
source devel/setup.bash
编译成功即可运行
作者:王纪尧,高通工程师