Git Product home page Git Product logo

carnd-pid-control-project's Introduction

CarND-Controls-PID

Self-Driving Car Engineer Nanodegree Program


Dependencies

There's an experimental patch for windows in this PR

Basic Build Instructions

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

Tips for setting up your environment can be found here

Implementation

  1. First, I used PID::Init() function to initialize the Kp, Ki, Kd coefficients.
  2. Then, I calculated the error by PID::UpdateError function for each cte input.
  3. Finally, I calculate the steering_angle by PID::GetSteerValue function and return to the simulator.

Reflection

P, I, D components effects description

P: P coefficient controls the vehicle to drive to the road center. For examples, it controls the turning angle of the vehicle while the vehicle is turning. When P coefficient is large, it can be turning quickly in curved road, However, in the straight road, it leads the vehicle oscillates faster. D: In order to reduce the vehicle oscillates, D coefficient is introduced. D coefficient can be effectively reduce the vehicle oscillates. I: Besides, if the vehicle has systemcatic bias, we need use the I coefficient. I coefficient can be used to reduce impact of the vehicle systemcatic bias. But it also should not be too large, it will leads the vehicle oscillates too.

How to choose hyperparameters (P, I, D coefficients)

I have chosen the P, I, D coefficients by manual tuning. First, I used the classroom PID project params as beginning: 0.2, 0.004, 3.0. Then, I started the program, but I found the car is oscillates seriously. In the expriments, I find the P coefficients cannot be reduce, it will lead to the car cannot pass the curved road, so I decrease the I coefficient to 0.005. Finally, in order to make the car more stable, I increase the D coefficient to 5.0.

carnd-pid-control-project's People

Contributors

baumanab avatar citlaligm avatar davidobando avatar domluna avatar htuennermann avatar mvirgo avatar swwelch 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.