Giter Site home page Giter Site logo

carnd-pid-control's Introduction

CarND-Controls-PID

Self-Driving Car Engineer Nanodegree Program


Objective

This project is to use PID controllers to control the steering angle and the throttle for driving a car in a game simulator. The simulator provides cross-track error (CTE) via websocket. The PID (proportional-integral-differential) controllers give steering and throttle commands to drive the car reliably around the simulator track.

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./pid.

Parameters of PID controller

Description of PID values in PID control

  • P (proportional) accounts for present values of the error.
  • I (integral) accounts for all past values of the error.
  • D (differential) accounts for possible future trends of the error, based on its current rate of change.

PID parameters used for steering angles:

  • P = 0.195138, -7.286e-13,
  • I = value: -7.286e-13
  • D = value: 2.9994

Parameter tuning

I have implemented 2 algorithms:

  • Gradient Descent with Backpropagation
  • Twiddle

Thoughts and improvents

  • Tuning with Twiddle takes more time so it was implemented limited number of iterations. Reset every epoch_size iterations. Than need some improvement, probably any way to avoid it.
  • SG implementation depends on initial parameters so with poor choice the car often goes out of the road. So reset function was implemented and requires some improvement.
  • Only steering controller was implemented. Next step will speed contoller.

Result

Result video:
Video

carnd-pid-control's People

Contributors

timout avatar

Watchers

James Cloos 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.