Package org.team1126.lib.math
Class PAPFController.LateralObstacle
java.lang.Object
org.team1126.lib.math.PAPFController.Obstacle
org.team1126.lib.math.PAPFController.LateralObstacle
- Enclosing class:
PAPFController
An infinite line that pushes parallel to the Y axis, to
constrain left/right field-relative movement.
-
Constructor Summary
ConstructorsConstructorDescriptionLateralObstacle(double y, double strength, double range) Creates a lateral obstacle.LateralObstacle(double y, double strength, double range, PAPFController.ForceHeuristic heuristic) Creates a lateral obstacle. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyForce(double x, double y, org.team1126.lib.math.PAPFController.NetForce netForce) Applies the force generated by the obstacle to the provided accumulator, based on the robot's current position and goal.Methods inherited from class org.team1126.lib.math.PAPFController.Obstacle
getForceMagnitude
-
Constructor Details
-
LateralObstacle
public LateralObstacle(double y, double strength, double range) Creates a lateral obstacle.- Parameters:
y- The Y coordinate of the line.strength- The strength of the obstacle's force. Positive values represent a repulsive potential (pushes away), negative values represent an attractive potential (pulls towards).range- The range of the obstacle's potential, in meters.
-
LateralObstacle
public LateralObstacle(double y, double strength, double range, PAPFController.ForceHeuristic heuristic) Creates a lateral obstacle.- Parameters:
y- The Y coordinate of the line.strength- The strength of the obstacle's force. Positive values represent a repulsive potential (pushes away), negative values represent an attractive potential (pulls towards).range- The range of the obstacle's potential, in meters.heuristic- A heuristic for transforming the obstacle's force profile.
-
-
Method Details
-
applyForce
public void applyForce(double x, double y, org.team1126.lib.math.PAPFController.NetForce netForce) Description copied from class:PAPFController.ObstacleApplies the force generated by the obstacle to the provided accumulator, based on the robot's current position and goal.- Specified by:
applyForcein classPAPFController.Obstacle- Parameters:
x- The robot's current X position on the field.y- The robot's current Y position on the field.netForce- The force accumulator to apply the force to.
-