Interface RangeFinder

  • All Known Implementing Classes:
    RangeFinderAdapter

    public interface RangeFinder
    Abstraction for a range finder sensor that returns the distance to the nearest object
    Author:
    Lawrie Griffiths
    See Also:
    RangeScanner
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      float getRange()
      Get the range to the nearest object
      float[] getRanges()
      If the sensor is capable, this method returns multiple range values from a single scan.
    • Method Detail

      • getRange

        float getRange()
        Get the range to the nearest object
        Returns:
        the distance to the nearest object
      • getRanges

        float[] getRanges()
        If the sensor is capable, this method returns multiple range values from a single scan. Sensors that can only return a single value should return an array containing a single value.
        Returns:
        an array of ranges, ordered from closest to farthest.