Class PathPoint

java.lang.Object
com.pathplanner.lib.path.PathPoint

public class PathPoint extends Object
A point along a pathplanner path
  • Field Details

    • position

      public final Translation2d position
      The position of this point
    • distanceAlongPath

      public double distanceAlongPath
      The distance of this point along the path, in meters
    • maxV

      public double maxV
      The max velocity at this point
    • rotationTarget

      public RotationTarget rotationTarget
      The target rotation at this point
    • constraints

      public PathConstraints constraints
      The constraints applied to this point
    • waypointRelativePos

      public double waypointRelativePos
      The waypoint relative position of this point. Used to determine proper event marker timing
  • Constructor Details

    • PathPoint

      public PathPoint(Translation2d position, RotationTarget rotationTarget, PathConstraints constraints)
      Create a path point
      Parameters:
      position - Position of the point
      rotationTarget - Rotation target at this point
      constraints - The constraints at this point
    • PathPoint

      public PathPoint(Translation2d position, RotationTarget rotationTarget)
      Create a path point
      Parameters:
      position - Position of the point
      rotationTarget - Rotation target at this point
    • PathPoint

      public PathPoint(Translation2d position)
      Create a path point
      Parameters:
      position - Position of the point
  • Method Details

    • flip

      public PathPoint flip()
      Flip this path point to the other side of the field, maintaining a blue alliance origin
      Returns:
      The flipped point
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object