Segmented Trajectory Optimization for Autonomous Parking in Unstructured Environments