Difference (last change) (Author, normal page display)
I think we should vectorize both sides of track (inner and outer).|
Then we can have position on the track described by to parameters:
t - from 0 to 1, the position along track with 0 being start, and 1 being finish
s - from 0 to 1, the position across the track with 0 being inner border and 1 being outer border
Then we can recognize turns with this logic:
if for corresponding dt the path of inner border is smaller then outer one, the it is left turn
if for corresponding dt the path of inner border is biger then outer one, the it is right turn
otherwise it is straight line.
The we can produce optimal path (something that takes turns in account) and then try to produce optimal control command to follow that path.
But the problem doesn't seem easy: it is 2-parametric optimization problem since we have to minimize path and maximize velocity in oreder to minimize time.