rohanNkhaire / RL_SB3_carla

Deep Reinforcement Learning in CARLA simulator
9 stars 2 forks source link

Reinforcement Learning with Carla simulator

Objective

This repo trains a Deep Reinforcement Learning agent in Carla for a vehicle to autonomusly follow a path using semantic segmentation sensor as the input.

Dependencies

This repo is tested on Carla 0.9.15

You can install the dependencies by running the following script.

pip3 install -r requirements.txt

Arguments

python3 train.py --host --port --town --total_timesteps --reload_model --fps --config --num_checkpoints --no_render

Configuration file

The configuration is located in config.py. It contains the following parameters:

Usage

# Clone the repo
git clone https://github.com/rohanNkhaire/RL_SB3_carla.git

# Go inside the repo
cd RL_SB3_carla

# Run the training script
# The default --host arg is IP of a different Host
python3 train.py

Run an experiment

# Run Carla on your system
./CarlaUE4.sh -RenderOffScreen

# Run the training and Carla on one host
python3 train.py --host "localhost"

Note

This repo was tested on two host machines :-

The --host argument is set to a different IP by default. Change this to localhost to run everything on your system.

The inspiration of the code was taken from this repo. Check it out.