colthoid fitting using trajectory();

2 次查看(过去 30 天)
Lukas
Lukas 2018-6-7
I am trying to generate reference trajecotries for a vehicle dynmaics controller.
I am using the trajcectory function to generate a path for my vehicle (with a constant velocity) and then i use the record function to generate samples for my vehicle velocities.
The problem I have is if I extract the angular velocity (or the angle) of my vehicle from the recordings, both samples have really high slopes (curvature) at the times where my vehicle passes the waypoints.
From my understanding of clothoids this should not happen, because they are used to avoid peaks in the time derivative of the angular acceleration while driving along a path with constant velocity.
I have attached a code sample to demo my problem.
Im am not sure if I am using these functions in the right way, or if they might not work as expected, so my questions are:
A) Am I placing the waypoints in a manner that prevents the trajectory function from fitting them smoothly?
B) Is the record feature not able to generate smooth samples?
C) Am I misunderstanding how clothoids work?

回答(1 个)

Greg Dionne
Greg Dionne 2018-6-26
编辑:Greg Dionne 2018-6-26
The trajectory generator uses a fast discrete solver to obtain a G2-continuous path, so some discontinuities (usu < 1 degree/meter) at the control points may be expected. Do you need greater fidelity than this?
In a pinch you can add additional control points in the expected direction of motion to control the curvature at the endpoints. See the tutorial on creating actor and vehicle paths for an example of how to do that in the "Defining Paths" section.

类别

Help CenterFile Exchange 中查找有关 Automated Driving Toolbox 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by