-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Linus Weigand edited this page May 10, 2025
·
1 revision
Welcome to the Reeds-Shepp Path Planning Library for Rust! This library provides functionalities to calculate the shortest path between two configurations (pose: x, y, orientation) for a car-like vehicle. The vehicle is assumed to have a fixed turning radius and can move forwards and backwards.
- Optimal Path Calculation: Finds the shortest path using a set of predefined path primitives.
-
Core Data Structures: Defines
Pose,Steeringdirection,Gear(forward/backward), andPathElementto construct paths. -
Path Transformations: Includes functions to
timeflip(reverse gear) andreflect(reverse steering) paths, crucial for exploring the complete Reeds-Shepp solution space. - Coordinate System Utilities: Provides helper functions for angle normalization, coordinate transformations (Cartesian to Polar, change of basis), and degree-to-radian conversion.
The library is primarily organized into:
-
lib.rs(this file): Contains the main logic for path generation, data structures likeSteering,Gear,PathElement, and the core functionsget_optimal_pathandget_all_paths. -
utils.rs: Contains utility functions and thePosestruct, including geometric calculations and coordinate transformations.
- Given a
startandendpose, theget_optimal_pathfunction is called. - This function internally calls
get_all_pathsto generate a comprehensive list of possible paths. -
get_all_pathsfirst transforms the problem into a canonical frame where thestartpose is at the origin(0,0)with0orientation. - It then iterates through a predefined set of 12 base path generating functions (
path1topath12). Each of these functions computes a specific sequence of maneuvers (e.g., Turn-Straight-Turn). - For each base path, four variations are generated using
timeflipandreflectoperations to cover all possible Reeds-Shepp path families. - The resulting paths are filtered (removing zero-length segments) and cleaned.
- Finally,
get_optimal_pathselects the path with the minimum total length from all generated valid paths.