Class CircleFieldObstacle

java.lang.Object
xbot.common.subsystems.pose.CircleFieldObstacle
All Implemented Interfaces:
IFieldObstacle

public class CircleFieldObstacle extends Object implements IFieldObstacle
  • Constructor Summary

    Constructors
    Constructor
    Description
    CircleFieldObstacle(org.wpilib.math.geometry.Translation2d center, org.wpilib.units.measure.Distance radius, boolean isToughTerrain)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.wpilib.units.measure.Distance
    What's the radius that we'll attempt to avoid when we need to move away from the obstacle.
    org.wpilib.math.geometry.Translation2d
    Returns the center of the obstacle to help determine closest obstacle.
    boolean
    doesRobotPathIntersect(org.wpilib.math.geometry.Translation2d start, org.wpilib.math.geometry.Translation2d end, org.wpilib.units.measure.Distance robotRadius)
    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.
    org.wpilib.units.measure.Distance
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CircleFieldObstacle

      public CircleFieldObstacle(org.wpilib.math.geometry.Translation2d center, org.wpilib.units.measure.Distance radius, boolean isToughTerrain)
  • Method Details

    • isToughTerrain

      public boolean isToughTerrain()
      Description copied from interface: IFieldObstacle
      Returns this obstacle can still be moved through, but is slower terrain or more dangerous terrain to move through.
      Specified by:
      isToughTerrain in interface IFieldObstacle
      Returns:
      Whether the obstacle matches the description above for tough terrain.
    • center

      public org.wpilib.math.geometry.Translation2d center()
      Description copied from interface: IFieldObstacle
      Returns the center of the obstacle to help determine closest obstacle.
      Specified by:
      center in interface IFieldObstacle
      Returns:
      A translation 2d for where the center of this obstacle
    • radius

      public org.wpilib.units.measure.Distance radius()
    • avoidanceRadius

      public org.wpilib.units.measure.Distance avoidanceRadius()
      Description copied from interface: IFieldObstacle
      What's the radius that we'll attempt to avoid when we need to move away from the obstacle.
      Specified by:
      avoidanceRadius in interface IFieldObstacle
      Returns:
      Whether the obstacle matches the description above for tough terrain.
    • doesRobotPathIntersect

      public boolean doesRobotPathIntersect(org.wpilib.math.geometry.Translation2d start, org.wpilib.math.geometry.Translation2d end, org.wpilib.units.measure.Distance robotRadius)
      Description copied from interface: IFieldObstacle
      Whether the described robot path will collide with this field obstacle or not.
      Specified by:
      doesRobotPathIntersect in interface IFieldObstacle
      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.