Package org.team1126.lib.math
Interface PAPFController.ForceHeuristic
- Enclosing class:
PAPFController
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a heuristic for transforming the force profile of an obstacle.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PAPFController.ForceHeuristicThe default heuristic. -
Method Summary
Modifier and TypeMethodDescriptiondoubleapply(double t) Applies the heuristic to a specified distance within the obstacle's range.
-
Field Details
-
DEFAULT
The default heuristic. Squares the input value.
-
-
Method Details
-
apply
double apply(double t) Applies the heuristic to a specified distance within the obstacle's range.- Parameters:
t- A normalized value[0.0, 1.0]that represents the robot's distance to the obstacle as a percent of the obstacle's range. For repulsive obstacles, this value is1.0when the robot's distance to the obstacle is zero. For attractive obstacles, this value is1.0when the robot is at the edge of the obstacle's range.- Returns:
- The transformed output from the heuristic, within the range
[0.0, 1.0].
-