Home

Awesome

RSLO

[Paper]

The code of paper Robust Self-supervised LiDAR Odometry via Representative Structure Discovery and 3D Inherent Error Modeling accepted by IEEE Robotics and Automation Letters (RA-L), 2021.

<p align="center"> <img src="demo/output.gif" alt="animated" /> </p> <!-- ![demo_vid](demo/output.gif) -->

Framework

The self-supervised two-frame odometry network contains three main modules including the Geometric Unit Feature Encoding module, Geometric Unit Transformation Estimation module and the Ego-motion voting module.

<!-- ![image info](./demo/framework.png) --> <p align="center"> <img src="./demo/framework.png" alt="alt text" width="450"/> </p>

Estimated Trajectories and Point Covariance Estimations

The comparison (on estimated trajectories) of our method with other competitive baselines (left). The visualization of our estimated point covariances (right).

<!-- <figure class="image"> --> <!-- <p align="center"> --> <center class="half"> <img src="./demo/traj+pointcov.png" height=230 > </center>

Installation

As the dependencies is complex, a dockerfile has been provide. You need to install docker and nvidia-docker2 first and then set up the docker image and start up a container with the following commands:

cd RSLO
sudo docker build -t rslo .    
sudo docker run  -it  --runtime=nvidia --ipc=host  --volume="HOST_VOLUME_YOU_WANT_TO_MAP:DOCKER_VOLUME"  -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1  rslo bash

Data Preparation

You need to download the KITTI odometry dataset and unzip them into the below directory structures.

./kitti/dataset
|──sequences
|    ├── 00/           
|    |   ├── calib.txt	
|    │   ├── velodyne/	
|    |   |	├── 000000.bin
|    |   |	├── 000001.bin
|    |   |	└── ...
|    ├── 01/ 
|    |   ...
|    └── 21/
└──poses
    |──00.txt
    |──01.txt
    |    ...
    └──10.txt

Then, create hdf5 data with

python script create_hdf5.py ./kitti/dataset ./kitti/dataset/all.h5

Test with the Pretrained Models

The trained models on the KITTI dataset have been uploaded to the OneDrive. You can download them and put them into the directory "weights" for testing.

export PYTHONPATH="$PROJECT_ROOT_PATH:$PYTHONPATH"
export PYTHONPATH="$PROJECT_ROOT_PATH/rslo:$PYTHONPATH"
python -u  $PROJECT_ROOT_PATH/evaluate.py multi_proc_eval \
        --config_path $PROJECT_ROOT_PATH/config/kitti_eval_ours.prototxt \
        --model_dir ./outputs/ \
        --use_dist True \
        --gpus_per_node 1 \
        --use_apex True \
        --world_size 1 \
        --dist_port 20000 \
        --pretrained_path $PROJECT_ROOT_PATH/weights/ours.tckpt \
        --refine False \

Note that you need to specify the PROJECT_ROOT_PATH, i.e. the absolute directory of the project folder "RSLO" and modify the path to the created data, i.e. all.h5, in the configuration file kitti_eval_ours.prototxt before running the above commands. A bash script "script/eval_ours.sh" is provided for reference.

Training from Scratch

A basic training script demo is shown as below. You can increase the GPU number, i.e. the variable "GPUs", according to your available resources. Generally, larger batch sizes produce stabler training procedures and better final performances.

export PYTHONPATH="$PROJECT_ROOT_PATH:$PYTHONPATH"
export PYTHONPATH="$PROJECT_ROOT_PATH/rslo:$PYTHONPATH"
GPUs=1 # the number of gpus you use 
python -u  $PROJECT_ROOT_PATH/train_hdf5.py multi_proc_train \
        --config_path $PROJECT_ROOT_PATH/config/kitti_train_ours.prototxt \
        --model_dir ./outputs/ \
        --use_dist True \
        --gpus_per_node $GPUs \
        --use_apex True \
        --world_size $GPUs \
        --dist_port 20000 \
        --refine False \

<!-- Please see [training](./doc/train.md) for more details. -->

Acknowledgments

We thank for the open-sourced codebases spconv and second

Citation

To cite our paper

@article{xu2022robust,
  title={Robust Self-supervised LiDAR Odometry via Representative Structure Discovery and 3D Inherent Error Modeling},
  author={Xu, Yan and Lin, Junyi and Shi, Jianping and Zhang, Guofeng and Wang, Xiaogang and Li, Hongsheng},
  journal={IEEE Robotics and Automation Letters},
  year={2021},
  publisher={IEEE}
}
@inproceedings{xu2020selfvoxelo,
  title     = {SelfVoxeLO: Self-supervised LiDAR Odometry with Voxel-based Deep Neural Networks},
  author    = {Yan Xu and Zhaoyang Huang and Kwan{-}Yee Lin and Xinge Zhu and Jianping Shi and Hujun Bao and Guofeng Zhang and Hongsheng Li},
  booktitle = {4th Conference on Robot Learning, CoRL 2020, 16-18 November 2020, Virtual Event / Cambridge, MA, {USA}},
  volume    = {155},
  pages     = {115--125},
  publisher = {{PMLR}},
  year      = {2020},
}

TODO List and ETA