mrhagchwh / autonomous_car_sim_kickstarter_2020

This repository contains all the files and instructions to get your own autonomous car simulator up and running on a Linux machine using Unity, Udacity's car simulator and PyTorch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

autonomous_car_sim_kickstarter_2020

This repository contains all the files and instructions to get your own autonomous car simulator up and running on your Linux machine using Unity, Udacity's car simulator and PyTorch.

Pre-requisites: python3.6+, pip, venv (recommended)

image info

Setup

1. Unity

  • We need a specific version of Unity to run the Udacity simulator (namely 5.5.1.xf1)
  • First, download the .deb file from here
  • The next step is to execute the following command to install necessary dependencies: sudo apt install gconf-service lib32gcc1 lib32stdc++6 libc6-i386 libgconf-2-4 npm libpq5
  • In case of errors, run sudo apt --fix-broken install
  • Now, we can begin installation of Unity. (Note that the path to your .deb file may vary) sudo dpkg -i ~/Downloads/unity-editor_amd64-5.5.1xf1Linux.deb

2. Udacity Car Simulator

  • Download the .zip file for the Linux version, which can be found here
  • After unzipping the file, add executable permissions to the file (Note that path to executable may vary): sudo chmod +x ./beta_simulator_linux/beta_simulator.x86_64
  • Now, you will be able to run the simulator.

3. Clone this repository

  • Now, clone this repository: git clone https://github.com/SiddAjriY2Jaccount/autonomous_car_sim_kickstarter_2020
  • Now we install all the requirements and dependencies to train a model using PyTorch as well as link the model's results to the Simulator: pip install -r requirements.txt
  • Unzip the file prebuilt_selfdriving.tar.gz
  • It will give you the 'data' directory wherein an example training set of images are provided.
  • If you want to gather your own data, then run the Simulator in 'Training Mode' and select 'data' directory to store the recorded images and log file.

At this point, you will be able to run the Simulator in Autonomous mode. Execute the command python drive.py model.h5 to use the pre-trained model provided in this repository. Now, open the Simulator and select Autonomous mode to observe the car traverse the track autonomously.

Training a custom model

  • To train a custom model, you can make changes to the script model_training.py and run the command python model_training.py
  • If GPU is detected, the script will automatically resort to GPU acceleration.

Troubleshooting errors

Raise an issue or drop an email at y2jsiddajri@gmail.com

About

This repository contains all the files and instructions to get your own autonomous car simulator up and running on a Linux machine using Unity, Udacity's car simulator and PyTorch.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%