Giter Site home page Giter Site logo

pathtrackingbicycle's Introduction

PathTrackingBicycle

Implementation of path tracking with a linear/non-linear bicycle model. We use the PID and standley controllers to control the longitudinal and lateral movements, respectively. We use the key idea of ref.[1], while replacing the vehicle dynamics in Carla simulator with linear/non-linear bicycle models.

Bicycle Models

We use the kinematic and dynamic bicycle models as mentioned in ref.6.

output_example
Fig.1 Kinematic Bicycle Model

  • Linear Bicycle Model.

output_example

  • Non-linear bicycle model.

output_example

The control inputs are [throttle, steering].

Controllers

  • PID controller.

Given the current speed v(t) we minimize the error term e = v_desired − v_current using a PID controller for the throttle value. The range for the throttle values is [-1, 1]. The formula is

output_example

Where KP, KI and KD are proportional, integral and derivative parameters, respectively.

  • Stanley Controller.

For lateral control, we adapt the standley control(To learn more about the Stanley Control, check out ref.5). There are two error metrics: the distance to centerline d(t) and the relative angle ψ(t). The control law to calculate the steering angle δ_{SC}(t) at the current vehicle speed v(t) is given by

output_example

where k is a gain parameter.

Experiments

We test vehicle models with PID and standley controllers.

output_example
Fig.2 Speed tracking of linear vehicle model

output_example
Fig.3 Path tracking of linear vehicle model

The testing results on non-linear bicycle models.

output_example
Fig.4 Speed tracking of non-linear vehicle model

output_example
Fig.5 Path tracking of non-linear vehicle model

Here we enlarge the throttle by 5 times for better visualization.

ToDO Lists:

  • For better tracking accuracy, we use the linearly interpolation between waypoints. While We can also use better methods like spline interpolation, for example. [see ref.2]
  • To better improvement, we can use seperate longitudinal and lateral bicycle model. In our non-linear bicycle model, we simply consider Fx as the driving force, while this is not how it is done in a real vehicle (engine -> torque converter -> transmission -> wheel). For better performance, please go to ref.3 and ref.4.
  • Refine the performance.
  • For better tracking performance, we can also try control methods, like MPC. [see ref.7]

Reference:

  1. Self Driving Cars Longitudinal and Lateral Control Design

  2. Path tracking simulation with Stanley steering control and PID speed control.

  3. Model predictive control for autonomous driving of a truck

  4. Longitudinal Vehicle Model Implementation

  5. Snider, J. M., "Automatic Steering Methods for Autonomous Automobile Path Tracking", Robotics Institute, Carnegie Mellon University, Pittsburg (February 2009).

  6. [Kong, Jason, et al. "Kinematic and dynamic vehicle models for autonomous driving control design." 2015 IEEE Intelligent Vehicles Symposium (IV). IEEE, 2015.] (https://borrelli.me.berkeley.edu/pdfpub/IV_KinematicMPC_jason.pdf)

  7. model_predictive_speed_and_steer_control

pathtrackingbicycle's People

Contributors

dongchen06 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.