< reference github link >
1) LeGO-LOAM
2) LIO-SAM
- installing Velodyne
$ cd <your_ws>/src
$ git clone https://bitbucket.org/DataspeedInc/velodyne_simulator.git
$ cd .. && catkin build -$(nproc)
-
installing robot model
refer quad-legged -
installing LiDAR-based SLAM
-
1) LeGO-LOAM
you have to install GTSAM ver. 4.0.3. Otherwise, it could produce some error
$ wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.3.zip
$ cd unzip gtsam.zip
$ cd ~/Downloads/gtsam-4.0.3/
$ mkdir build && cd build
$ cmake ..
$ sudo make install
$ sudo apt install -y libparmetis-dev
$ cd <your_ws>/src
$ git clone https://github.com/RobustFieldAutonomyLab/LeGO-LOAM.git
$ cd .. && catkin build -$(nproc)
$ source ./devel/setup.bash
< Trouble shooting >
- removing GTSAM
from here. GTSAM is not deleted in the normal way.
$ cd <your GTSAM build dir> && sudo xargs rm -rf < install_manifest.txt
- 2) LIO-SAM
install pre-requirities
$ sudo apt install -y ros-melodic-navigation
$ sudo apt install -y ros-melodic-robot-localization
$ sudo apt install -y ros-melodic-robot-state-publisher
# GTSAM ver. 4.0.2
$ wget -O ~/<your_ws>/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.2.zip
$ cd ~/<your_ws> && unzip gtsam.zip
$ cd ~/<your_ws>/gtsam-4.0.2/
$ mkdir build && cd build
$ cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..
$ sudo make install -j $(nproc)
install LIO-SAM
$ cd <your_ws>/src
$ git clone https://github.com/TixiaoShan/LIO-SAM.git
$ cd .. && catkin build -j $(nproc)
$ source ./devel/setup.bash
< Trouble shooting >
- [imageProjection-4] process has died
refer here.
This is usually because the height and width of the sensor_msgs/PointCloud2 type, which is LiDAR data, are reversed. For example, to use LIO-SAM, the 'height=1' condition must be satisfied. Check it and if it's the opposite, make a ROS node and reverse it.
● This is done if you use my edited version as above install descriptions.
$ roslaunch lio_sam run.launch