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?