Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: Pedrazzini
  • License: agpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 13.2 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed 10 months ago
Metadata Files
Readme License Citation

README.md

Autonomous Car Navigation Using PPO

license

This work was inspired by this project: "DRL-Nav: Autonomous UAV Navigation via Deep Reinforcement Learning Using PPO". Here the steering action is continuous and the car is trained to navigate through an AirSim environment: AirSimNH, which can be downloaded here

This repository contains an implementation of Proximal Policy Optimization (PPO) for autonomous navigation in a neighborhood environment with a car. The goal is to make the car learn to drive in its environment while avoiding collisions.

Contents

Overview:

In this project are present all the files necessary to make the PPO algorithm work in three main mode: sampling the action from a Normal distribution, a Beta distribution and a Flexible Beta distribution. Explainability is possible through GradCAM method.

Inputs:

images from the front camera of the car

Actions:

continuous domain, steering action between [-1,1]

Model structure:


Environment setup to run the codes

1. Clone the repository

git clone https://github.com/Pedrazzini/AutonomousDriveEP.git

2. From Anaconda command prompt, create a new conda environment

I recommend you to use Anaconda or Miniconda to create a virtual environment.

conda create -n drl_nav python==3.8

3. Install required libraries

Inside the main directory of the repo

conda activate drl_nav pip install -r requirements.txt

4. (Optional) Install Pytorch for GPU

You must have a CUDA supported NVIDIA GPU.

Details for installation - [Install Pytorch with the compatible CUDA version](https://pytorch.org/get-started/locally/) For this project, I used CUDA 11.0 and the following conda installation command to install Pytorch: ``` conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch ```

4. Edit settings.json

Content of the settings.json should be as below:

The setting.json file is located at Documents\AirSim folder.

json { "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/main/docs/settings.md", "SettingsVersion": 1.2, "LocalHostIp": "127.0.0.1", "SimMode": "Car", "ClockSpeed": 1, "ViewMode": "Fpv", "Vehicles": { "car0": { "VehicleType": "PhysXCar", "X": 0.0, "Y": 0.0, "Z": 0.0, "Yaw": 0.0 } }, "CameraDefaults": { "CaptureSettings": [ { "ImageType": 0, "Width": 50, "Height": 50, "FOV_Degrees": 120 }, { "ImageType": 2, "Width": 50, "Height": 50, "FOV_Degrees": 120 } ] } }

How to run the training?

Make sure you followed the instructions above to setup the environment.

1. Download the training environment

Go to the releases and download AirSimNH.zip. After downloading completed, extract it and follow the instruction on this page.

3. Now, you can open up environment's executable file and start the training

So, inside the repository python train.py

Inference on the final trained model:

Demo

Citation

Proximal Policy Optimization Algorithms by John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov.

Author

License

This project is licensed under the GNU Affero General Public License.

A u t o n o m o u s D r i v e E P

Owner

  • Name: Ernesto Pedrazzini
  • Login: Pedrazzini
  • Kind: user

Hi, I solve problems.

GitHub Events

Total
  • Push event: 20
  • Create event: 2
Last Year
  • Push event: 20
  • Create event: 2

Dependencies

requirements.txt pypi
  • Markdown ==3.3.4
  • Pillow ==8.3.2
  • PyYAML ==5.4.1
  • Werkzeug ==2.0.2
  • absl-py ==0.14.1
  • airsim ==1.6.0
  • cachetools ==4.2.4
  • certifi ==2021.5.30
  • charset-normalizer ==2.0.6
  • cloudpickle ==2.0.0
  • cycler ==0.10.0
  • google-auth ==1.35.0
  • google-auth-oauthlib ==0.4.6
  • grpcio ==1.41.0
  • gym ==0.21.0
  • idna ==3.2
  • kiwisolver ==1.3.2
  • matplotlib ==3.4.3
  • msgpack-python ==0.5.6
  • msgpack-rpc-python ==0.4.1
  • numpy ==1.21.2
  • oauthlib ==3.1.1
  • opencv-contrib-python ==4.5.3.56
  • pandas ==1.3.3
  • protobuf ==3.18.1
  • pyasn1 ==0.4.8
  • pyasn1-modules ==0.2.8
  • pyparsing ==2.4.7
  • python-dateutil ==2.8.2
  • pytz ==2021.3
  • requests ==2.26.0
  • requests-oauthlib ==1.3.0
  • rsa ==4.7.2
  • six ==1.16.0
  • stable-baselines3 ==1.2.0
  • tensorboard ==2.6.0
  • tensorboard-data-server ==0.6.1
  • tensorboard-plugin-wit ==1.8.0
  • torch ==1.9.1
  • tornado ==4.5.3
  • typing-extensions ==3.10.0.2
  • urllib3 ==1.26.7
  • wincertstore ==0.2