Interface PAPFController.GoalHeuristic

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.

@FunctionalInterface public static interface PAPFController.GoalHeuristic
Represents a heuristic for calculating the strength of the attractive force generated by the goal location.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The default heuristic.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    apply(double d)
    Applies the heuristic to a specified distance from the goal location, returning an arbitrary strength value.
  • Field Details

    • DEFAULT

      static final PAPFController.GoalHeuristic DEFAULT
      The default heuristic. Returns a static base strength of 1.0 in addition to an increasing strength of 2.0 / distance to have greater influence on the robot as it approaches the goal location.
  • Method Details

    • apply

      double apply(double d)
      Applies the heuristic to a specified distance from the goal location, returning an arbitrary strength value.
      Parameters:
      d - The robot's current distance from the goal location, in meters. This value will always be positive and non-zero.
      Returns:
      A strength value, relative to the strength specified for obstacles.