CARLA is an open-source simulator for autonomous driving research.
In this article, we will introduce imitation learning training for CARLA.
Imitation Learning for Autonomous Driving in CARLA
The following repository has codes and a trained model for executing the driving benchmark (CoRL-2017 benchmark) in CARLA.
There is a link from this repository to the data set (24GB), but training code is not included.
Here, we combine the following repositories with the above data set to build a training environment for imitation learning.
Setup Training Environment for Imitation Learning
- Ubuntu 16.04 or later
- NVIDIA Docker 2
- NVIDIA Driver >= 390
With the following command, clone the
$ cd $ git clone https://github.com/mvpcom/carlaILTrainer
Download the linked data set (24GB) from here (https://github.com/carla-simulator/imitation-learning#dataset), and expand it with the following command.
$ cd ~/carlaILTrainer $ tar xf ~/Downloads/CORL2017ImitationLearningData.tar.gz
data_06790.h5 where an error occurs.
Creating Docker Image
perfectEnv.yml to create a Docker image.
Although details of Dockerfile are omitted, it is based on
nvidia/cuda:8.0-cudnn6-runtime-ubuntu16.04 in order to operate
Also, after installing
miniconda, execute the following command.
# Dockerfile /path/to/conda env create -f perfectEnv.yml
Use the following command to create a Docker image.
$ docker build -t carla_ilt .
Imitation Learning Training for CARLA
docker run --runtime=nvidia --rm -it -v /home/$USER/carlaILTrainer:/workspace carla_ilt
Imitation Learning Training
# source activate carlaSimPy2 # python train.py
The trained model is saved in the
After moving the trained model to the
imitation-learning directory, we tried
python run_CIL.py, but an error occurs as written here (https://github.com/mvpcom/carlaILTrainer/issues/6).
In this article, we introduced imitation learning training for CARLA.