ubuntu18.04 安装运行lio-sam

1. gtsam

wget -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

 将Downloads 换成自己的安装目录

cmake .. 中间的-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF 一定要加上,不然运行的时候会报错

2. 报错修改

[lio_sam_imuPreintegration-2] process has died [pid 20256, exit code 127, cmd /home/

[lio_sam_mapOptmization-5] process has died [pid 20257, exit code 127, cmd /home

解决方法

cd /usr/local/lib/
sudo cp libmetis.so /opt/ros/melodic/lib/

ERROR: cannot launch node of type [robot_localization/ekf_localization_node]: robot_localization
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/xf/lio_sam_ws/src
ROS path [2]=/opt/ros/melodic/share
ERROR: cannot launch node of type [robot_localization/navsat_transform_node]: robot_localization
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/xf/lio_sam_ws/src
ROS path [2]=/opt/ros/melodic/share

解决方法  安装功能包

sudo apt-get install ros-melodic-fake-localization
sudo apt-get install ros-melodic-robot-localization

3. 数据集

https://drive.google.com/drive/folders/1gJHwfdHCRdjP7vuT556pv8atqrCJPbUq

你可能感兴趣的:(ubuntu,学习)