|
1 | 1 | # Spatial-Temporal-LiDAR-camera-Calibration |
2 | 2 | Spatial-Temporal-LiDAR-camera-Calibration |
3 | 3 | # Performance on KITTI Odometry |
4 | | -* ```rotation units```: degree |
5 | | -* ```translation units```: cm |
| 4 | +* `rotation units`: degree |
| 5 | +* `translation units`: cm |
6 | 6 |
|
7 | 7 |
|
8 | | -|Sequence| X| Y | Z | roll | pitch | yaw | |
| 8 | +|Sequence| Roll | Pitch | Yaw| tX| tY| tZ| |
9 | 9 | |---|---|---|---|---|---|---| |
10 | | -|00|0.49|1.33|-0.52|-0.049|-0.225|-0.155| |
11 | | -|02|-2.80|-1.63|1.18|-0.01|-0.246|-0.159| |
12 | | -|03|-3.25|3.23|1.21|-0.083|-0.096|-0.087| |
13 | | -|04|1.22|0.89|2.83|0.011|-0.088|0.074| |
14 | | -|05|-0.94|-0.52|1.27|0.190|-0.128|-0.181| |
| 10 | +|00|-0.12|-0.22|-0.07|2.93|1.59|0.18| |
| 11 | +|02|-0.01|-0.25|-0.16|-2.80|1.63|1.18| |
| 12 | +|03|-0.08|-0.10|-0.09|-3.25|3.23|1.22| |
| 13 | +|00|0.01|-0.09|0.05|1.03|-0.19|1.10| |
| 14 | +|05|0.01|-0.19|-0.15|1.95|1.56|-0.54| |
| 15 | +|07|-0.05|-0.00|-0.20|1.07|2.07|0.14| |
15 | 16 |
|
16 | 17 | # Tested Environment |
17 | 18 | |C++|CMake|g++|python|System| |
18 | 19 | |---|---|---|---|---| |
19 | | -|C++ 17| CMake 3.25| 9.4.0| 3.8| Ubuntu 20.04| |
| 20 | +|C++ 17| CMake 3.25| 9.4.0| 3.8| Ubuntu 20.00| |
20 | 21 |
|
21 | 22 | More recent version would be OK. |
22 | 23 | # Dependencies |
23 | 24 | * [Eigen 3](http://eigen.tuxfamily.org/) (`libeigen3-dev`) |
24 | | -* [Ceres-Solver](http://ceres-solver.org/) |
25 | 25 | * [OpenMP](https://github.com/llvm-mirror/openmp) (`libomp-dev`) |
26 | 26 | * [OpenCV 4.x](http://opencv.org/) |
27 | 27 | * [Pangolin](https://github.com/stevenlovegrove/Pangolin) (visual tools for ORB_SLAM2) |
28 | | -* [g2o 2023](https://github.com/RainerKuemmerle/g2o/releases/tag/20230223_git) (`-DG2O_USE_OPENMP=ON`, NO support for earlier version) |
29 | | -* [Open3D](https://github.com/isl-org/Open3D) (built for C++) |
| 28 | +* [g2o 2023](https://github.com/RainerKuemmerle/g2o/releases/tag/20230223_git) (`-DG2O_USE_OPENMP=ON`) |
| 29 | +* [Open3D](https://github.com/isl-org/Open3D) (Point Cloud IO, ICP) |
| 30 | +* [Nomad](https://github.com/bbopt/nomad) (Global Optimization Algorithm) |
30 | 31 | # Install |
31 | 32 | * Copy [Thirdparty](https://github.com/UZ-SLAMLab/ORB_SLAM3/tree/master/Thirdparty) and [Vocabulary](https://github.com/UZ-SLAMLab/ORB_SLAM3/tree/master/Vocabulary) directories to [src/orb_slam/](./src/orb_slam/) <details> |
32 | 33 | <summary>Troubleshooting</summary> |
33 | 34 | Note that the implementation of ORB_SLAM2 in our repo is different from the original one, so DO NOT copy the whole ORB_SLAM2 repo to replace our directory</details> |
34 | 35 | * Build and Compile: `cd build && cmake .. -Wno-dev && make -j` <details> |
35 | 36 | <summary>TroubleShooting</summary> |
36 | | - If you have installed g2o through ROS (if you have ROS packages like `base_local_planner`/`teb_local_planner`/`mpc_local_planner`), please exclude it from LD_LIBRARY_PATH environment variable, or `source config/settings.sh`. </details> |
37 | | -* For performance, build/rebuild g2o with CMake flag `-DG2O_USE_OPENMP=ON`. See [here](https://github.com/RainerKuemmerle/g2o/issues/689#issuecomment-1565658030). |
| 37 | + If you have installed g2o through ROS (if you have ROS packages like `base_local_planner`/`teb_local_planner`/`mpc_local_planner`), please exclude it from LD_LIBRARY_PATH environment variable, or `source config/settings.sh`. </details> |
| 38 | + |
38 | 39 | ## Step 1: Estimate Camera and Lidar Poses |
39 | 40 | ### orb_slam |
40 | | -an example command for KITTI 04 Sequence: |
| 41 | +An example command for KITTI 00 Sequence: |
41 | 42 | ``` |
42 | | -./orb_store ../data/04/ ../config/orb_ori/KITTI04-12.yaml ../data/Vocabulary/ORBvoc.txt ../KITTI-04/slam_res/Twc.txt ../KITTI-04/KeyFrames/ ../KITTI-04/Map.yml 1.5 |
| 43 | +./orb_store ../data/00/ ../config/orb_ori/KITTI00-02.yaml ../data/Vocabulary/ORBvoc.txt ../KITTI-00/slam_res/Twc.txt ../KITTI-00/KeyFrames/ ../KITTI-00/Map.yml 1.5 |
43 | 44 | ``` |
44 | | -* `../data/04/`: sequence directory of KITTI Sequence 04 |
45 | | -* `../config/orb_ori/KITTI04-12.yaml`: yaml file for ORB_SLAM |
| 45 | +* `../data/00/`: sequence directory of KITTI Sequence 00 |
| 46 | +* `../config/orb_ori/KITTI00-02.yaml`: yaml file for ORB_SLAM |
46 | 47 | * `../data/Vocabulary/ORBvoc.txt`: DBoW2 Vocabulary txt file for ORB_SLAM |
47 | | -* `../KITTI-04/slam_res/Twc.txt`: KeyFrame poses saved by ORB_SLAM, in KITTI format |
48 | | -* ```../KITTI-04/KeyFrames/```: KeyFrame information saved by ORB_SLAM, can be restored during runtime |
49 | | -* ```../KITTI-04/Map.yml```: Map saved by ORB_SLAM, can be restored during runtime |
50 | | -* ```1.5```: Slow Rate of ORB_SLAM2. Duration between Frames: computation + wait_time >= 1.5 * real timestamp |
| 48 | +* `../KITTI-00/slam_res/Twc.txt`: KeyFrame poses saved by ORB_SLAM, in KITTI format |
| 49 | +* `../KITTI-00/KeyFrames/`: KeyFrame information saved by ORB_SLAM, can be restored during runtime |
| 50 | +* `../KITTI-00/Map.yml`: Map saved by ORB_SLAM, can be restored during runtime |
| 51 | +* `1.5`: Slow Rate of ORB_SLAM2. Duration between Frames: computation + wait_time >= 1.5 * real timestamp |
| 52 | + |
51 | 53 | ### F-LOAM |
52 | | -an example command for KITTI 04 Sequence: |
| 54 | +an example command for KITTI 00 Sequence: |
53 | 55 | ``` |
54 | | -./floam_run ../data/04/velodyne/ ../KITTI-04/slam_res/floam_raw_04.txt |
| 56 | +./floam_run ../data/00/velodyne/ ../KITTI-00/slam_res/floam_raw_00.txt |
55 | 57 | ``` |
56 | | -* ```../data/04/velodyne/```: directory containing the Lidar PointClouds, whose filenames must be sorted by timestamp. |
57 | | -* ```../KITTI-04/slam_res/floam_raw_04.txt```: Lidar Poses Estimated by F-LOAM. |
| 58 | +* `../data/00/velodyne/`: directory containing the Lidar PointClouds, whose filenames must be sorted by timestamp. |
| 59 | +* `../KITTI-00/slam_res/floam_raw_00.txt`: Lidar Poses Estimated by F-LOAM. |
58 | 60 | <details><summary>Note</summary>Note that the number of Lidar Poses is not equal to Camera poses because ORB_SLAM only saved KeyFrame Poses. However, the File Id (FrameId) of these KeyFrames are saved to 'FrameId.yml' in the same directory of 'Map.yml'</details> |
59 | 61 |
|
60 | 62 | ### F-LOAM Backend Optimization |
61 | | -an example command for KITTI 04 Sequence: |
| 63 | +An example command for KITTI 00 Sequence: |
62 | 64 | ``` |
63 | | - ./floam_backend ../config/loam/backend.yml ../KITTI-04/slam_res/floam_raw_08.txt ../data/04/velodyne/ |
| 65 | + ./floam_backend ../config/loam/backend.yml ../KITTI-00/slam_res/floam_raw_00.txt ../data/00/velodyne/ |
64 | 66 | ``` |
65 | | - * ```../config/loam/backend.yml```: config file of backend optimzation |
66 | | - * ```../KITTI-04/slam_res/floam_raw_08.txt```: Lidar poses estimated by F-LOAM |
67 | | - * ```../data/04/velodyne/```: directory containing the Lidar PointClouds, whose filenames must be sorted by timestamp. |
| 67 | + * `../config/loam/backend.yml`: config file of backend optimzation |
| 68 | + * `../KITTI-00/slam_res/floam_raw_00.txt`: Lidar poses estimated by F-LOAM |
| 69 | + * `../data/00/velodyne/`: directory containing the Lidar PointClouds, whose filenames must be sorted by timestamp. |
| 70 | + |
| 71 | +### Expected Results |
| 72 | +* `../KITTI-00/KeyFrames`: KeyFrame directory includes information of KeyFrames |
| 73 | +* `../KITTI-00/Map.yml`: Visual Map built by ORB_SLAM |
| 74 | +* `../KITTI-00/FrameId.yml`: Yaml file that contains Frame indicces of KeyFrames (will saved in the same directory of "Map.yml" |
| 75 | +* `../KITTI-00/slam_res/Twc.txt`: KeyFrame Poses estimated by ORB_SLAM |
| 76 | +* `../KITTI-00/slam_res/floam_raw_00.txt`: Lidar Poses estimated by F-LOAM (the number of itmes in this file is not equal to that in `Twc.txt`) |
| 77 | +* `../KITTI-00/slam_res/floam_isam_00.txt`: Lidar Poses Optimized by iSAM ((the number of itmes in this file is not equal to that in `Twc.txt` but equal to `floam_raw_00.txt`) |
| 78 | + |
| 79 | +## Hand-eye Calibration with Regularization |
| 80 | +An example command for KITTI 00 Sequence: |
| 81 | +``` |
| 82 | + ./he_calib ../config/calib/00/he_calib.yml |
| 83 | +``` |
| 84 | +* A file with 13 entries will be saved to `../KITTI/calib_res/he_rb_calib_00.txt`. |
| 85 | +* The calibration result of the orindary hand-eye calibration is also saved for checking: `../KITTI/calib_res/he_calib_00.txt`. |
| 86 | +## Global optimization |
| 87 | +`Nomad` library must be correctly **installed** before this step. |
| 88 | + |
| 89 | +An example command for KITTI 00 Sequence: |
| 90 | +``` |
| 91 | + ./iba_global ../config/calib/00/iba_calib_global.yml |
| 92 | +``` |
| 93 | +The final calibration result will be saved to `../KITTI-00/calib_res/iba_global_pl_00.txt` |
| 94 | +Two parameters in `../config/calib/00/iba_calib_global.yml` are used to create variants for ablation experiments: |
| 95 | +```yaml |
| 96 | +runtime: |
| 97 | + err_weight: [1.0, 1.0] |
| 98 | + use_plane: true |
| 99 | +``` |
| 100 | +* set `use_plane` to `true` and `err_weight` to `[1.0,1.0]` to apply `CBA+CA (PT+PL)` method in Table 1 of our paper (proposed). |
| 101 | +* set `use_plane` to `false` and `err_weight` to `[1.0,1.0]` to apply `CBA+CA (PT)` method in Table 1 of our paper. |
| 102 | +* set `use_plane` to `false` and `err_weight` to `[1.0,0.0]` to apply `CBA` method in Table 1 of our paper. |
| 103 | + |
| 104 | +Remember to set |
| 105 | +```yaml |
| 106 | +io: |
| 107 | + ResFile: calib_res/iba_global_baonly_00.txt |
| 108 | +``` |
| 109 | +for different methods, or the prior files will be overwritten. |
| 110 | + |
| 111 | +## What arguments should change for other sequences</summary> |
| 112 | +* `../data/00/` -> `../data/xx/` for the `orb_store` program; |
| 113 | +* `../config/orb_ori/KITTI00-02.yaml` -> `../config/orb_ori/KITTIxx-xx.yaml`; |
| 114 | +* `KITTI-00` -> `KITTI-xx` for all aurgments; |
| 115 | +* "../data/00/velodyne/" -> "../data/xx/velodyne/"; |
| 116 | +* "floam_raw_00.txt" -> "floam_raw_xx.txt"; |
| 117 | +* "floam_isam_00.txt" -> "floam_isam_xx.txt"; |
0 commit comments