Skip to content

layssi/Carla_Ray_Rlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carla-Ray-RLib

Reinforcement Learning with Rlib and Carla

Cloud Based Autonomous Driving RL

Setup Carla

Download Carla Binaries

(Option 1) Release 0.9.6:

wget http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/CARLA_0.9.6.tar.gz
Optional: wget http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/Town06_0.9.6.tar.gz
Optional: wget http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/Town07_0.9.6.tar.gz

(Option 2)Latest Build (Warning. Not Tested)

http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/Dev/CARLA_Latest.tar.gz

Setup Carla

To lower Carla GPU usage (This might be already set):

Under your Carla/CARLAUE4/Config, edit DefaultEngine.ini:
r.TextureStreaming=True

(Optional) Mouse Unlock

To prevent the freezing of the mouse (which is very annoying).Under your Carla/CARLAUE4/Config, edit "DefaultInput.ini":
bCaptureMouseOnLaunch=False
DefaultViewportMouseCaptureMode=CaptureDuringMouseDown
bDefaultViewportMouseLock=False
DefaultViewportMouseLockMode=DoNotLock

Setup Environment

Install Environment

Download and install conda: https://www.anaconda.com/distribution/
conda env create --name [enviroment-name] -f=requirements.yml
conda activate [enviroment-name]
conda install -c anaconda tensorflow-gpu

Update Carla path

In "helper" folder, change the location of your Carla path in file "CARLA_PATH.txt". Example: ~/home/Carla_Simulator

Pycharm setup

Start a new pycharm project. Point the project to this directory. Choose an existing anaconda enviroment. Pick the enviroment created in [enviroment-name] It will look like "/anaconda/env/[enviroment-name]/bin/python Open the folder and run "carla_env.py". Also run "a3c_vision.py"

Project Organization

Algorithms: Allow you to setup different RL algorithms and models Core: Has Base Carla Functionality and can be extended or modified experiments: Allows you to setup your experiment. Example, observations and rewards helper: Help functions that are used used by multiple modules Test_code: Couple Carla script to allow you to run and test the core

Cloud Setup

There is an ami available on ec2 with everything setup and no display.
Find "ami-070f500a304414585" and start the machine.
Make sure your security setting have the inbound and outbound ports open.
Update the code to the latest.
Run "source ~/.bashrc" and run "python3 carla_env.py" or "python3 vision_algorithm.py"

ToDO

  1. Setup the AMI to properly run RLIB on the cloud with autoscales
  2. Verify experiment 1 and experiment 2 and verify apex_vision and ppo_custom
  3. Add rollout to export and test inference

About

Carla-Simulator environment compatible with Ray/Rllib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages