A-LOAM is an Advanced implementation of LOAM (J. Zhang and S. Singh. LOAM: Lidar Odometry and Mapping in Real-time), which uses Eigen and Ceres Solver to simplify code structure. This code is modified from LOAM and LOAM_NOTED. This code is clean and simple without complicated mathematical derivation and redundant operations. It is a good learning material for SLAM beginners.
Modifier: Tong Qin, Shaozu Cao
Ubuntu 64-bit 16.04 or 18.04. ROS Kinetic or Melodic. ROS Installation
Follow Ceres Installation.
Follow PCL Installation.
Clone the repository and catkin_make:
cd ~/catkin_ws/src
git clone https://github.com/HKUST-Aerial-Robotics/A-LOAM.git
cd ../
catkin_make
source ~/catkin_ws/devel/setup.bash
Download NSH indoor outdoor to YOUR_DATASET_FOLDER.
roslaunch aloam_velodyne aloam_velodyne_VLP_16.launch
rosbag play YOUR_DATASET_FOLDER/nsh_indoor_outdoor.bag
Download KITTI Odometry dataset to YOUR_DATASET_FOLDER and set the dataset_folder
and sequence_number
parameters in kitti_helper.launch
file. Note you also convert KITTI dataset to bag file for easy use by setting proper parameters in kitti_helper.launch
.
roslaunch aloam_velodyne aloam_velodyne_HDL_64.launch
roslaunch aloam_velodyne kitti_helper.launch
To further facilitate the building process, we add docker in our code. Docker environment is like a sandbox, thus makes our code environment-independent. To run with docker, first make sure ros and docker are installed on your machine. Then add your account to docker
group by sudo usermod -aG docker $YOUR_USER_NAME
. Relaunch the terminal or logout and re-login if you get Permission denied
error, type:
cd ~/catkin_ws/src/A-LOAM/docker
make build
The build process may take a while depends on your machine. After that, run ./run.sh 16
or ./run.sh 64
to launch A-LOAM, then you should be able to see the result.
Thanks for LOAM(J. Zhang and S. Singh. LOAM: Lidar Odometry and Mapping in Real-time) and LOAM_NOTED.
补全jacobian.cpp 中的Basalt和VINS-MONO的求导方式,需要注意的是我们对VINS-MONO的求导方式稍微有些不同,我们对旋转施加的是左扰动,而VINS-MONO 实施的是右扰动
* 实验的输出结果
Pt_homogeneous:
-0.449721 -0.354484 0.819812 0.1095
d_uv_dp:
1.21979 0 0.669137
0 1.21979 0.527433
d_uv_d_rel:
0.133567 0 0.0732705 -0.237198 1.30093 0.432396
0 0.133567 0.057754 -1.18697 0.237198 -0.548566
Basalt
jaco_h:
0.108058 0.0785089 0.0732705 -0.889287 0.976457 0.26524
-0.0785089 0.108058 0.057754 -1.05323 -0.479054 -0.535411
jaco_t:
-0.108058 -0.0785089 -0.0732705 0.956562 -0.913049 -0.432396
0.0785089 -0.108058 -0.057754 1.0997 0.505784 0.548566
VINS-MONO
jaco_h:
0.108058 0.0785089 0.0732705 -0.889287 0.976457 0.26524
-0.0785089 0.108058 0.057754 -1.05323 -0.479054 -0.535411
jaco_t:
-0.108058 -0.0785089 -0.0732705 0.956562 -0.913049 -0.432396
0.0785089 -0.108058 -0.057754 1.0997 0.505784 0.548566
将VINS-MONO projection_factor.cpp 3D点对绝对位姿的导数jaco_i,jaco_j修改为Basalt的求导方式,也就是3D点先对相对对位姿求导,然后相对位姿对绝对位姿求导
* 实验要求,修改后的VINS-MONO 可以正常运行