File Exchange

image thumbnail

Vehicle Path Tracking Using Stanley Controller

version 1.0 (2.68 MB) by MathWorks Student Competitions Team
The submission contains a model to show the implementation of the Stanley controller on a vehicle moving in a scene.

18 Downloads

Updated 19 Mar 2021

From GitHub

View license on GitHub

The submission contains a model to show the implementation of the Stanley controller on a vehicle moving in a scene. The steps below describe the workflow:

-Generating waypoints
-Smoothing vehicle reference position and orientation
-Generating velocity profile
-Implementing Stanley controller
-Visualizing vehicle final path in 2D, Bird's-Eye Scope, and a 3D simulation environment.

Cite As

MathWorks Student Competitions Team (2021). Vehicle Path Tracking Using Stanley Controller (https://github.com/mathworks/vehicle-stanley-controller/releases/tag/v1.0), GitHub. Retrieved .

Comments and Ratings (5)

Hello Ziyue Zhang,
Thanks for reaching out. There are a few blocks and functions in the model that are not available in the R2018b. Hence, I would suggest using the latest version. However, you can go through the following documentation: https://www.mathworks.com/help/driving/ug/lateral-control-tutorial.html. The model presented in this will work in the 2018b version.

ziyue zhang

sorry, I cannot open with R2018b, wondering if there's a model with lower version?

Hi Arbaaz,
Thanks for your comment. Can you please drop us an email at racinglounge@mathworks.com? We will share the R2020a version model via email.

Arbaaz Shaikh

Incompatible with R2020a version

We have uploaded the model to track the trajectory in a US Highway scene. Please let us know what other trajectories you are interested in. If you facing any issues tracking a different trajectory please reach to us at racinglounge@mathworks.com.

Also, note that by default the model runs with the Unreal scene. If you are only interested in the 2D visualization, please disable the "Display 3D simulation window" tab in the Simulation 3D Scene Configuration block or uncomment the "Simulation 3D Vehicle with Ground Following" and "Simulation 3D Scene Configuration" blocks.

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!