Interface IFieldObstacle

All Known Implementing Classes:
CircleFieldObstacle, RectangleFieldObstacle, SquareFieldObstacle

public interface IFieldObstacle
  • Method Summary

    Modifier and Type
    Method
    Description
    What's the radius that we'll attempt to avoid when we need to move away from the obstacle.
    Returns the center of the obstacle to help determine closest obstacle.
    boolean
    Whether the described robot path will collide with this field obstacle or not.
    boolean
    Returns this obstacle can still be moved through, but is slower terrain or more dangerous terrain to move through.
  • Method Details

    • isToughTerrain

      boolean isToughTerrain()
      Returns this obstacle can still be moved through, but is slower terrain or more dangerous terrain to move through.
      Returns:
      Whether the obstacle matches the description above for tough terrain.
    • center

      Translation2d center()
      Returns the center of the obstacle to help determine closest obstacle.
      Returns:
      A translation 2d for where the center of this obstacle
    • avoidanceRadius

      Distance avoidanceRadius()
      What's the radius that we'll attempt to avoid when we need to move away from the obstacle.
      Returns:
      Whether the obstacle matches the description above for tough terrain.
    • doesRobotPathIntersect

      boolean doesRobotPathIntersect(Translation2d start, Translation2d end, Distance robotRadius)
      Whether the described robot path will collide with this field obstacle or not.
      Parameters:
      start - The start of the path.
      end - The end of the path.
      robotRadius - The radius we should use to determine whether the robot can make the path through this obstacle.
      Returns:
      Whether the path will work for this obstacle.