Skip to main content

Module model_predictive_trajectory_generator

Module model_predictive_trajectory_generator 

Source
Expand description

Model Predictive Trajectory Generator

Generates smooth trajectories using numerical optimization (Newton’s method) to connect an initial state to a target state. The trajectory is parameterized by arc length s, mid-point curvature km, and final curvature kf. A quadratic curvature profile interpolated from (k0, km, kf) is integrated via a bicycle kinematic model to produce the path. The Jacobian is computed numerically and used to iteratively refine the parameters until the terminal state error falls below a threshold.

Reference: https://github.com/AtsushiSakai/PythonRobotics/tree/master/PathPlanning/ModelPredictiveTrajectoryGenerator

Structs§

LookupEntry
A single entry in the lookup table: (x, y, yaw, s, km, kf).
MptgConfig
Parameters for the trajectory generator.
MptgResult
Result of a successful trajectory optimization.
TargetState
A 2-D pose used as the optimization target.

Functions§

generate_lookup_table
Generate a lookup table of pre-computed trajectory parameters.
optimize_trajectory
Run the trajectory optimization.
search_nearest_in_lookup_table
Search the lookup table for the entry closest (in Euclidean + yaw sense) to the query (tx, ty, tyaw).