Learning Trajectories for Visual-Inertial System Calibration via Model-based Heuristic Deep Reinforcement Learning
This repo contains the code for our CoRL 2020 paper.
Developed by
Yunke Ao and
Le Chen
from Autonomous Systems Lab (ASL) at ETH Zurich.
In this work we present a novel approach to obtain favorable trajectories for visual-inertial system calibration, using model-based deep reinforcement learning. Our key contribution is to model the calibration process as a Markov decision process and then use model-based deep reinforcement learning with particle swarm optimization to establish a sequence of calibration trajectories to be performed by a robot arm.
Our code is tested on Ubuntu 18.04 LTS (Bionic Beaver) and ROS Melodic Morenia.
- Install required dependencies:
sudo apt-get install ros-melodic-moveit
sudo apt install ros-melodic-libfranka ros-melodic-franka-ros
sudo apt-get install ros-melodic-moveit-visual-tools
sudo apt-get install build-essential bc curl ca-certificates fakeroot gnupg2 libssl-dev lsb-release libelf-dev bison flex
pip install opencv-python
pip install opencv-contrib-python
pip install --upgrade tensorflow
sudo apt-get install python-setuptools python-rosinstall ipython libeigen3-dev libboost-all-dev doxygen libopencv-dev ros-melodic-vision-opencv ros-melodic-image-transport-plugins ros-melodic-cmake-modules software-properties-common software-properties-common libpoco-dev python-matplotlib python-scipy python-git python-pip ipython libtbb-dev libblas-dev liblapack-dev python-catkin-tools libv4l-dev
sudo pip install python-igraph --upgrade
sudo apt-get install build-essential libgtk-3-dev
pip3 install pyyaml
pip3 install rospkg
pip3 install matplotlib
pip3 install pyswarm
- Clone the repository and catkin build:
cd ~/catkin_ws/src
git clone https://github.com/clthegoat/Learn-to-Calibrate.git
cd ../
catkin build
source ~/catkin_ws/devel/setup.bash
-
Please change the file saving directory in franka_cal_sim/config/config.yaml before training or testing!
-
If you want to train an agent for camera intrinsic calibration, please set "if_calibrate_intrinsic" to be "true" in src/franka_cal_sim/config/config.yaml.
-
If you want to train an agent for camera-IMU extrinsic calibration, please set "if_calibrate_intrinsic" to be "false" in src/franka_cal_sim/config/config.yaml.
- In terminal 1: start simulation
roslaunch franka_cal_sim cam_int_respawn.launch
- In terminal 2: start training
cd src/franka_cal_sim/python/
python3 MB_PSO_grd_RL_algo_cam.py
- After training, you may want to test the agent:
cd src/franka_cal_sim/python/
python3 RL_algo_test_cam.py
- In terminal 1: start simulation
roslaunch franka_cal_sim cam_imu_respawn.launch
- In terminal 2: start training
cd src/franka_cal_sim/python/
python3 MB_PSO_grd_RL_algo.py
- After training, you may want to test the agent:
cd src/franka_cal_sim/python/
python3 RL_algo_test.py
Please cite the following paper when using our code for your research:
@inproceedings{chen2020learning,
title={Learning Trajectories for Visual-Inertial System Calibration via Model-based Heuristic Deep Reinforcement Learning},
author={Chen, Le and Ao, Yunke and Tschopp, Florian and Cramariuc, Andrei and Breyer, Michel and Chung, Jen Jen and Siegwart, Roland and Cadena, Cesar},
booktitle={Proceedings of the 4th Conference on Robot Learning (CoRL)},
year={2020},
month-{November}
}
Our code is based on the following repositories: