cone_path_planner
Package for reactive raceline algorithms
README
Cone Path Planner Node
Node Purpose
The ConePathPlannerNode is a ROS 2 node implementing the reactive path planning algorithm starting from the work of FaSTTUBe (Formula Student Team TU Berlin), implemented in C++ and using Armadillo library.
Topics
Subscribed Topics
/map(fsae_msgs::msg::ConeArray): Provides the cones data as an array./car_pose(geometry_msgs::msg::Pose): Provides pose estimation.
Published Topics
/raceline(fsae_msgs::msg::PathLimits): Publishes the planned path, left track limits and right track limits.
Functionality
This node performs cone-based path planning using ROS 2, processing the detected cones and the vehicle’s pose it generates the centerline path and track limits. The key steps are:
Cone Sorting: the process of sorting a set of cones into a sequence representing the track direction. Left and right sides are sorted independently from each other and are combined in the final step. It uses a Breadth-first search (BFS) algorithm to explore all configurations, then chosen using cost functions.
Cone Matching: the process of matching the ordered cones, in order to connect them and calculate the center line. It uses the possibility to create virtual cones to connect unmatched cones for a smoother path calculation.
Path Calculation: the final process of creating the raceline. Using the cernterpoints calculated uses a spline to create the path.
Resume of logical structure:
cone_path_planner_node
│
├── cone_sorting
│ ├── calculate_configurations
│ ├── calculate_costs
│ │ └── nearby_cone_search
│ │ └── cost_utils
│ └── combine_traces
│
├── cone_matching
│ └── funtional_cone_matching
│ └── matching_utils
│
└── spline_and_polinomial --> Path calculation
Almost all the .cpp are using utils.cpp (containing the cone types) and arma_conversions.cpp.
Hyperparameters
The node exposes several configurable parameters:
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
Throttle debug/info print messages (ms). |
|
bool |
|
Whether to use cones with unknown color. |
|
int |
|
Maximum number of neighbors, used for creating the Adjacency Matrix. |
|
int |
|
Maximum length of a cones configuration. |
|
float |
|
Maximum distance between cones to be considered neighbors. |
|
float |
|
Maximum distance to the car, used to calculate the first cones near the car. |
|
float |
|
Maximum distance to a neighbor cone, used for filtering in between cones. |
|
float |
|
Directional angle threshold (radians). |
|
float |
|
Absolute angle threshold (radians, 120°). |
|
float |
|
Tolerance for cones on the wrong side, used to check expected side (radians, 10°). |
|
float |
|
Angle threshold used for filtering in between cones (radians, 160°). |
|
float |
|
Minimum allowed track width. |
|
float |
|
Maximum search range for cone matching. |
|
float |
|
Maximum search angle for cone matching. |
|
bool |
|
Enable debug output. |
|
string |
|
Topic for cone data. |
|
string |
|
Topic for car pose. |
|
string |
|
Topic for publishing the planned path and track limits. |
References
FaSSTUBe repository: https://github.com/papalotis/ft-fsd-path-planning/tree/main
Armadillo documentation: https://arma.sourceforge.net/docs.html
ROS 2 documentation: https://docs.ros.org