Class Scanner2DModel


  • public class Scanner2DModel
    extends SensorModel
    The Scanner2DModel encapsulate the basic model of a
    2 dimensional range scanning device such as SICK or Hokyuo laser
    range scanners.

    The model supports any range scanner that measures distance in
    an arc around the origin of the sensor. The scanner scans in the z-x plane
    with z-axis being the 0 angle measurement.

    TODO: enable the selection of internal format, either pointcloud (large) or
    range-array (compact).
    • Constructor Detail

      • Scanner2DModel

        public Scanner2DModel​(long cPtr,
                              boolean cMemoryOwn)
      • Scanner2DModel

        public Scanner2DModel​(java.lang.String name,
                              double angularRangeInRad,
                              int maxDataPoints,
                              FramePtr frame)
        constructor
        Parameters:
        name - [in] name of scanner sensor
        angularRangeInRad - [in] angular range in rad, with middle scan
        point pointin along z-axis
        maxDataPoints - [in] the number of scan points
        frame - [in] the sensor frame
    • Method Detail

      • getScan

        public PointCloud getScan​(State state)
        get handle to point cloud data in state.
        Parameters:
        state - [in] the state with point cloud data
      • setScan

        public void setScan​(PointCloud data,
                            State state)
        set point cloud data in state
        Parameters:
        data - [in] point cloud data to set
        state - [in] state in which to set the point cloud
      • getAngularRange

        public pair_d_d getAngularRange()
        Returns the min and max angular range of the scanner, where
        the angles represent the beginning and end of scanning in the z-x plane.
        Hence, angles represent rotation of z-axis around the y-axis. Normally range would
        be something like -170 to 170 degree for a Hokyo or Sick scanner

        Returns:
        Angular range in radians
      • getMeasurementCount

        public long getMeasurementCount()
        Returns the number of scan points
      • getDistanceRange

        public pair_d_d getDistanceRange()
        get the min an max range in meters that is scannable by the 2D scanner
        Returns:
        range in meters
      • setDistanceRange

        public void setDistanceRange​(pair_d_d range)
        set distance range
        Parameters:
        range -
      • setDistanceRange

        public void setDistanceRange​(double min,
                                     double max)
        set distance range
        Parameters:
        min - documentation missing !
        max - documentation missing !