How do I obtain a cubic relation of the spatial coordinates 'x' and 'y' of a simulated vehicle in the Automated Driving Toolbox using curvature, curvature derivative, heading angle, and lateral offset?

2 views (last 30 days)
I am using the Automated Driving Toolbox, and I have data on the following four parameters: curvature, curvature derivative, lateral offset, and heading angle. How do I use this data to produce a cubic relationship between the spatial coordinates 'x' and 'y' of the vehicle?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 26 Apr 2023
Step 1 
Use the function "clothoidLaneBoundary" in order to get a clothoid curve whose rate of change of curvature varies linearly with distance. The function accepts curvature, curvature derivative, heading angle, and lateral offset. Please refer to the documentation below for more information about the function:
Step 2 
After generating the clothoid curve, obtain the coordinates x and y using the function "computeBoundaryModel". Please refer to the example described in the link below for more details regarding Steps 1 and 2.
Step 3 
Feed the obtained x and y to the function "findCubicLaneBoundaries" in order to compute the coefficients of the cubic equation. Please refer to the link below for more details and note that with this function the coefficient "A" refers to the coefficient of the cubic term, not the constant term.

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!