Main Content

Find optimal trajectory along reference path

The `trajectoryOptimalFrenet`

object is a path planner which
samples and evaluates local trajectories based on a reference path. The planner generates a
set of terminal states based on the reference path and other parameters in the object. The
planner then connects the state to each terminal state using 4^{th }or
5^{th} order polynomials. To choose an optimal path, sampled
trajectories are evaluated for kinematic feasibility, collision, and cost.

`trajectoryOptimalFrenet(`

creates a `refPath`

,`validator`

)`trajectoryOptimalFrenet`

object with reference path,
`refPath`

, in the form of an *n*-by-2 array of
`[`

waypoints and a state validator,
*x*
*y*]`validator`

, specified as a `validatorOccupancyMap`

object.

sets additional properties using one or more name-value pairs in any order.`planner`

= trajectoryOptimalFrenet(___,`Name,Value`

)

`cart2frenet` | Convert Cartesian states to Frenet states |

`copy` | Create deep copy of object |

`frenet2cart` | Convert Frenet states to Cartesian states |

`plan` | Plan optimal trajectory |

`show` | Visualize trajectories |

Self-intersections in the reference path can lead to unexpected behavior.

The planner does not support reverse driving.

Initial orientation for planning should be within

`-pi/2`

and`pi/2`

to the reference path.Limit the number of TerminalStates for real-time applications since computational complexity grows with it.

[1] Werling, Moritz, Julius Ziegler,
Sören Kammel, and Sebastian Thrun. "Optimal Trajectory Generation for Dynamic Street Scenarios
in a Frenet Frame." *2010 IEEE International Conference on Robotics and
Automation*. 2010, pp. 987–993.