LocalADStarAK

class LocalADStarAK : Pathfinder

A class that implements the Pathfinder interface using the LocalADStar algorithm. This class is responsible for calculating paths for a robot to follow on a field, taking into account dynamic obstacles and other constraints.

Usage in FRC: This class is used in FRC (FIRST Robotics Competition) to navigate the robot autonomously on the field. It calculates the optimal path from a start position to a goal position while avoiding obstacles. The path is updated dynamically based on the current state of the field and the robot's position.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun getCurrentPath(constraints: PathConstraints, goalEndState: GoalEndState): PathPlannerPath?

Get the most recently calculated path. This method retrieves the current path based on the provided constraints and goal end state.

Link copied to clipboard
open override fun isNewPathAvailable(): Boolean

Get if a new path has been calculated since the last time a path was retrieved. This method checks if a new path is available and logs the current state.

Link copied to clipboard
open override fun setDynamicObstacles(obs: MutableList<Pair<Translation2d?, Translation2d?>?>?, currentRobotPos: Translation2d?)

Set the dynamic obstacles that should be avoided while pathfinding. This method updates the list of obstacles that the pathfinding algorithm should avoid.

Link copied to clipboard
open override fun setGoalPosition(goalPosition: Translation2d?)

Set the goal position to pathfind to. This method sets the target position for the pathfinding algorithm.

Link copied to clipboard
open override fun setStartPosition(startPosition: Translation2d?)

Set the start position to pathfind from. This method sets the initial position for the pathfinding algorithm.