Package xbot.common.subsystems.pose
Interface IFieldObstacle
- All Known Implementing Classes:
CircleFieldObstacle,RectangleFieldObstacle,SquareFieldObstacle
public interface IFieldObstacle
-
Method Summary
Modifier and TypeMethodDescriptionWhat's the radius that we'll attempt to avoid when we need to move away from the obstacle.center()Returns the center of the obstacle to help determine closest obstacle.booleandoesRobotPathIntersect(Translation2d start, Translation2d end, Distance robotRadius) Whether the described robot path will collide with this field obstacle or not.booleanReturns 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
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.
-