Pathfinding
pathplannerlib Index / Pathplannerlib / Pathfinding
Auto-generated documentation for pathplannerlib.pathfinding module.
Pathfinding
Show source in pathfinding.py:8
Signature
Pathfinding.ensureInitialized
Show source in pathfinding.py:20
Ensure that a pathfinding implementation has been chosen. If not, set it to the default.
Signature
Pathfinding.getCurrentPath
Show source in pathfinding.py:37
Get the most recently calculated path
Arguments
constraints
- The path constraints to use when creating the pathgoal_end_state
- The goal end state to use when creating the path
Returns
The PathPlannerPath created from the points calculated by the pathfinder
Signature
@staticmethod
def getCurrentPath(
constraints: PathConstraints, goal_end_state: GoalEndState
) -> PathPlannerPath: ...
Pathfinding.isNewPathAvailable
Show source in pathfinding.py:28
Get if a new path has been calculated since the last time a path was retrieved
Returns
True if a new path is available
Signature
Pathfinding.setDynamicObstacles
Show source in pathfinding.py:66
Set the dynamic obstacles that should be avoided while pathfinding.
Arguments
obs
- A List of Translation2d pairs representing obstacles. Each Translation2d represents opposite corners of a bounding box.current_robot_pos
- The current position of the robot. This is needed to change the start position of the path to properly avoid obstacles
Signature
@staticmethod
def setDynamicObstacles(
obs: List[Tuple[Translation2d, Translation2d]], current_robot_pos: Translation2d
) -> None: ...
Pathfinding.setGoalPosition
Show source in pathfinding.py:57
Set the goal position to pathfind to
Arguments
goal_position
- Goal position on the field. f this is within an obstacle it will be moved to the nearest non-obstacle node.
Signature
Pathfinding.setPathfinder
Show source in pathfinding.py:11
Set the pathfinder that should be used by the path following commands
Arguments
pathfinder
- The pathfinder to use
Signature
Pathfinding.setStartPosition
Show source in pathfinding.py:48
Set the start position to pathfind from
Arguments
start_position
- Start position on the field. If this is within an obstacle it will be moved to the nearest non-obstacle node.