HBA is developed to resolve the issue that the divergence within the point cloud map cannot be fully eliminated after pose graph optimization (PGO). Though PGO is time-efficient, it does not directly optimize the mapping consistency. LiDAR bundle adjustment (BA) could mitigate this issue; however, it is too time-consuming on large-scale maps. HBA proposes a hierarchical structure to divide the huge LidAR BA problem into multiple smaller BA problems and use the PGO to smoothly update the entire LiDAR poses. HBA could achieve similar accuracy compared with the original BA method but with much less computation time.
Our paper has been publised on IEEE RA-L and the corresponding video could be watched on Bilibili or YouTuBe. If you find our work useful in your research, please consider citing:
@ARTICLE{10024300,
author={Liu, Xiyuan and Liu, Zheng and Kong, Fanze and Zhang, Fu},
journal={IEEE Robotics and Automation Letters},
title={Large-Scale LiDAR Consistent Mapping Using Hierarchical LiDAR Bundle Adjustment},
year={2023},
volume={8},
number={3},
pages={1523-1530},
doi={10.1109/LRA.2023.3238902}}
Our code is tested under Ubuntu 20.04 with ROS Noetic and Ubuntu 18.04 with ROS Melodic, PCL 1.10.0, Eigen 3.3.7, and GTSAM 4.1.1.
To test on your own data, please prepare the file structure as follows: a folder named pcd
containing point clouds and a pose.json
file containing the initial poses of each LiDAR scan. Noted the format of the pose is tx ty tz qw qx qy qz
.
.
├── pcd
│ ├── 0.pcd
│ └── 1.pcd
└── pose.json
total_layer_num
: number of layers used in HBA. Default value is3
.pcd_name_fill_num
: number of prefix zeros in pcd file name (e.g., if pcd starts with00000.pcd
, please fill in5
). Default value is0
.thread_num
: number of threads used in cpu parallel computation. Default value is16
.
downsample_size
: leaf size used for point cloud downsampling of each LiDAR scan. Default value is0.1
.voxel_size
: initial voxel size used in LiDAR BA. Default value is4.0
.eigen_ratio
: threshold used to determine whether this voxel contains valid plane feature. Larger value means less strict threshold. Default value is0.1
.reject_ratio
: threshold used to reject the largest certain amount of voxels (residuals) used in optimization. Default value is0.05
.
WIN_SIZE
: window size used in local BA. Default value is10
.GAP
: stride size between the start of each two adjacent windows. Default value is5
.layer_limit
: the maximum number of voxel recut times in LiDAR BA. Default value is2
.
Remark: in the global_ba
function, we use a slightly larger eigen_ratio=0.2
parameter than that in local BA, which usually leads to a faster convergence. However, you could adjust them in cut_voxel
function from the hba.cpp
file. Smaller voxel size and eigen ratio parameters usually lead to a better accuracy but a longer computation time.
The zipped pcd files and their initial poses of our self-collected park and the public KITTI 07 dataset have been uploaded to OneDrive. You could download them and directly run the code with the parameters provided.
Remark: hba.launch
only optimizes the LiDAR poses but does not visualize the point cloud map and visualize.launch
is used to view the point cloud map. One more thing, when you launch the hba.launch
, when the launch completes, it only optimizes the poses once. So if you are not satisfied with the result, you could execute the launch again.
MARSIM is a lightweight point-realistic simulator for LiDAR-based UAVs, to which HBA has contributed more than ten real-world point cloud maps with centimeter-level of precision.
In the development of HBA, we stand on the state-of-the-art work: BALM2.
The source code is released under GPLv2 license.
We are still working on improving the performance and reliability of our codes. For any technical issues, please contact us via email xliuaa@connect.hku.hk. For commercial use, please contact Dr. Fu Zhang fuzhang@hku.hk.