Code Monkey home page Code Monkey logo

longitudinal-and-lateral-controller-on-carla's Introduction

Longitudinal-and-Lateral-Controller-on-Carla

Implementation of a Longitudinal and Lateral controller (2D) of an autonomous vehicle on Carla Simulator

In this file: https://github.com/diegoavillegasg/Longitudinal-and-Lateral-Controller-on-Carla/blob/master/controller2d.py you will find, inside the method: update_controls, a PID controller implementation for the longitudinal control and the lateral control of a vehicle that should follow a serie of a waypoints including the velocity at each waypoint.

For the lateral control we have followed the Stanley method. Explained in section 2.3 here: https://www.ri.cmu.edu/pub_files/2009/2/Automatic_Steering_Methods_for_Autonomous_Automobile_Path_Tracking.pdf

In other words, these two controllers are the result like a human driver performs while driving: to brake, move forward, turn the steering wheel, ... etc.

The inputs are:

  • the current position in 2d coordinates (X and Y, [m]),
  • the current velocity (V [m/s]),
  • the current yaw pose angle (YAW [rad]),
  • the list of waypoints (X [m], Y[m], V[m/s]).

Whilst the output are, (note that are the same that a human driver would give to control a car):

  • the engine throttle (a decimal value from 0 to 1),
  • the steering angle (a value from -1.22 rad to 1.22 rad),
  • the brake (a decimal value from 0 to 1).

alt text

alt text

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.