pub fn optimize_path(
path: &Path2D,
grid_map: &GridMap,
max_iterations: usize,
) -> Path2DExpand description
Full pipeline: shortcutting + waypoint relaxation.
- Greedy LOS shortcutting (removes redundant waypoints)
- Iterative waypoint perturbation (moves each interior waypoint to minimize total path length while maintaining LOS constraints)
- Final shortcutting pass (removes any waypoints made redundant by relaxation)