GithubHelp home page GithubHelp logo

sichitong / path_follower Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unicamp-e-racing/path_follower

0.0 1.0 1.0 569 KB

Basic vehicle path following simulator with steering and acceleration control.

Python 100.00%

path_follower's Introduction

Path Following Demonstration

Description

Basic vehicle path following simulator with steering and acceleration control. The goal of this project is to control the steering of a simple vehicle to follow a given path. Another goal of the project is to control the vehicle's speed, accelerating or braking based on the radius of curvature of the given path.

Software Organization

Systems

The file systems.py contains the simulator's system objects.

Kinematic Vehicle Body

Single-track kinematic vehicle body model (or bicycle model) object. Stores the vehicle's states (x,y and yaw positions) and inputs (steering angle and acceleration).

vehicle_model

Simulator

The simulator system object is responsible for solving the vehicle model's equations for a small timestep. Therefore, simulating the vehicle's state consists of iterating trough the simulator's simulation step function. Also keeps track of timestamps and total runtime.

Controllers

The file controllers.py contains the simulator's controller functions. These controllers were designed by our team with the help of professor José C. Geromel. Both controllers receive the current vehicle state and also the position and speed targets and output the controlled variable (steering angle and acceleration).

runTrack

The file runTrack.py simulates the steering and acceleration control of the vehicle through a complete, randomly generated, race track. The first goal of this script is to control the vehicle's steering angle, so that it passes near every middle point of the race track. The second goal is to maximize the vehicle's speed based on the radius of the track. At every track point, the radius of curvature is calculated using this formula:

radius_formula

Then, we use the centripetal acceleration formula and the calculated radius to calculate the speed that reaches a predefined maximum lateral acceleration. Therefore, the speed of the vehicle will be increased or decreased based on the radius of the path.

Results

path inputs

Other Files

trackGenerator

Generates a random race track defined by yellow and blue cones, just like in the FSAE DV Trackdrive event!

plots

Contains the simulator's plotting functions

constants

Contains the simulator's constant parameter values

path_follower's People

Contributors

lucasbarretto avatar

Watchers

 avatar

Forkers

yangkang411

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.