CARLA is an open-source simulator for autonomous driving research.
In this article, we will introduce reinforcement learning for autonomous driving in CARLA.
By using reinforcement learning at CARLA, autonomous driving like the following video can be done.
CARLA (Car Learning to Act) is an open-source simulator based on Unreal Engine 4 for autonomous driving research.
Reinforcement Learning for Autonomous Driving in CARLA
The following repository has codes and a trained model for executing the CoRL-2017 driving benchmark.
The training code is not included in this repository.
Setup CARLA Server
In the following article, you can use the CARLA server prepared on Ubuntu 16.04 LTS as it is.
With the following command, clone the reinforcement-learning repository.
$ cd $ git clone https://github.com/carla-simulator/reinforcement-learning
Setup Python Virtual Environment
Using Miniconda, create a virtual environment carla_rl of Python 3.6 with the following command.
$ conda create -n carla_rl python=3.6 chainer=1.24.0 cached-property=1.4.2 pillow=5.1.0 opencv=3.3.1 h5py=2.7.1
Execution of the CoRL-2017 Benchmark
In the first terminal, run the following command to start the CARLA server.
$ cd ~/carla-0.8.2 $ ./CarlaUE4.sh /Game/Maps/Town01 -carla-server -benchmark -fps=10 -windowed -ResX=640 -ResY=480
In another terminal, to start the Python client, execute the following command.
$ export PYTHONPATH=~/carla-0.8.2/PythonClient/:$PYTHONPATH $ source activate carla_rl $ cd ~/reinforcement-learning $ python run_RL.py --corl-2017
In this article, we introduced reinforcement learning for autonomous driving in CARLA.