◆ ensureInitialized()
void Pathfinding::ensureInitialized |
( |
| ) |
|
|
static |
Ensure that a pathfinding implementation has been chosen. If not, set it to the default.
◆ getCurrentPath()
Get the most recently calculated path
- Parameters
-
constraints | The path constraints to use when creating the path |
goalEndState | The goal end state to use when creating the path |
- Returns
- The PathPlannerPath created from the points calculated by the pathfinder
◆ isNewPathAvailable()
static bool pathplanner::Pathfinding::isNewPathAvailable |
( |
| ) |
|
|
inlinestatic |
Get if a new path has been calculated since the last time a path was retrieved
- Returns
- True if a new path is available
◆ setDynamicObstacles()
static void pathplanner::Pathfinding::setDynamicObstacles |
( |
const std::vector< std::pair< frc::Translation2d, frc::Translation2d > > & |
obs, |
|
|
const frc::Translation2d & |
currentRobotPos |
|
) |
| |
|
inlinestatic |
Set the dynamic obstacles that should be avoided while pathfinding.
- Parameters
-
obs | A List of Translation2d pairs representing obstacles. Each Translation2d represents opposite corners of a bounding box. |
currentRobotPos | The current position of the robot. This is needed to change the start position of the path if the robot is now within an obstacle. |
◆ setGoalPosition()
static void pathplanner::Pathfinding::setGoalPosition |
( |
const frc::Translation2d & |
goalPosition | ) |
|
|
inlinestatic |
Set the goal position to pathfind to
- Parameters
-
goalPosition | Goal position on the field. f this is within an obstacle it will be moved to the nearest non-obstacle node. |
◆ setPathfinder()
static void pathplanner::Pathfinding::setPathfinder |
( |
std::unique_ptr< Pathfinder > |
pathfinder | ) |
|
|
inlinestatic |
Set the pathfinder that should be used by the path following commands
- Parameters
-
pathfinder | The pathfinder to use |
◆ setStartPosition()
static void pathplanner::Pathfinding::setStartPosition |
( |
const frc::Translation2d & |
startPosition | ) |
|
|
inlinestatic |
Set the start position to pathfind from
- Parameters
-
startPosition | Start position on the field. If this is within an obstacle it will be moved to the nearest non-obstacle node. |
The documentation for this class was generated from the following files:
- src/main/native/include/pathplanner/lib/pathfinding/Pathfinding.h
- src/main/native/cpp/pathplanner/lib/pathfinding/Pathfinding.cpp