Clear Filters
Clear Filters

How to find current vehicle position and angle?

16 views (last 30 days)
Emir
Emir on 1 Mar 2022
Answered: Vidip on 23 Jan 2024
Hello everyone. I am trying to find the positions of the vehicle with following example;
In this example, XY positions are calculated by "Vehicle Body 3-DOF Lateral" block.
  1. What is the relationship between waypoints and current vehicle position? Waypoints can be set by "Driving Scenario Designer" app. Is it also possible to calculate current XY positions of the vehicle via this app?
  2. Is it also possible to calculate heading angle of the vehicle via this app?
Thanks in advance.

Answers (1)

Vidip
Vidip on 23 Jan 2024
The example you're referring to demonstrates how to design a lane keeping assist system using MATLAB and Simulink with the Automated Driving Toolbox. In the context of this simulation, waypoints are a series of points that define the desired path for the vehicle to follow, they are typically used for path planning and can be set manually or generated automatically based on road geometry and current vehicle position is the real-time position of the vehicle in the XY plane as it moves along the path.
You can create a driving scenario with road networks, and then define vehicle trajectories using waypoints. These waypoints dictate where the vehicle should go throughout the simulation but cannot calculate the current XY position and heading angle or yaw angle directly from the app.
To calculate the current XY positions and heading angle during a simulation, you would typically export the scenario from the Driving Scenario Designer app to a Simulink model. The model would include blocks that represent the vehicle's sensors and dynamics, and these blocks can be used to calculate the vehicle's position and orientation as the simulation runs.
For further information, refer to the documentation links below:

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!