Giter VIP home page Giter VIP logo

trajectoryplanning's Introduction

Trajectory Planning

The goal of this project is to train a neural network for driving a car in the Udacity self-driving simulator and help it keep on the road.

List of contents

Prerequisites

  • Python 3
  • Tensorflow
  • OpenCV

What is in each file?

DataProc

  • Contains the code to load and process the data from the simulator.

Model

  • Functions to make the convolutional and fully connected layers.
  • A network function which defines the neural network architecture.

Train

  • This is the main file that is used to train the model and save it.

Training the model

The data file created by the Udacity simulator should be saved in the same directory as the python files, as in the repo. All the images should be saved in the images folder. The data file should contain either the relative or absolute paths to the images. The command to be used to train the model is as follows python3 Train.py --datafile <path_to_datafile> --save_dir <dir_to_save_tf_model> --summary_dir <dir_to_save_tf_summary> Some optional arguments with the default values in the parenthesis-

  • --num_epochs the number of epochs (200)
  • --minibatch_size size of the minibatch to be used (128)
  • --log_file path to an existing or new file - a log of training is written in this file (log.txt).

Testing the model

No traffic

Download the Udacity simulator Version 2 and make the file executable:

sudo chmod +x beta_simulator.x86_64

Run the simulator, choose the Jungle track and Autonomous Mode.
Run the pre-trained model:

python3 test_h5.py model.h5

Dynamic traffic

Download the Term 3 simulator from the latest release and make the file executable:

sudo chmod +x term3_sim.x86_64

Install dependencies:

cd test
sh install-ubuntu.sh

The testing code is present in main.cpp
From the main directory, follow these commands to compile the code:

cd test/build
cmake .. && make

Start the Udacity simulator by running term3_sim.x86_64 Run the testing code from inside the build folder:

./path_planning

Further Work

  • Switch to a better simulator, with traffic and realistic conditions.
  • Use Reinforcement Learning instead of Supervised Learning.

trajectoryplanning's People

Contributors

cseas avatar jhasuman avatar piyushgoel997 avatar vighnesh-balaji avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.