public class SensorLaser extends SuperSensor
| Modifier and Type | Field and Description |
|---|---|
static SensorType |
type |
lastMessage, sensorType| Constructor and Description |
|---|
SensorLaser()
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
ClosestObstacle |
getClosestObstacleCourse()
Devides Laser ranges in half and sums both halves.
|
double |
getClosestObstacleDistance()
Iterates through Laser ranges and returns the min value.
|
double |
getFOV()
FOV is the sensor’s field of view in radians.
|
DriveDirection |
getMostOpenDirection(int backwardsTreshold)
Devides Laser ranges to thirds and sums up each third.
|
double |
getNMidAvg(int numOfRays)
Computes avarage value from set of double values obtained from sector of
Laser ranges from the middle of the list.
|
double |
getNMidAvg(int numOfRays,
int offset)
Computes avarage value from set of double values obtained from sector of
Laser ranges defined by numOfRays(count) and offset.
|
double |
getRangeAt(int index)
LaserRanges is a series of range values in meters.
|
List<Double> |
getRanges()
LaserRanges is a series of range values in meters.
|
int |
getRangesSize()
Returns size of Laser range list.
|
double |
getResolution()
It is the sensor’s resolution in radians.
|
getName, getSensorType, getTime, getType, isReady, updateMessagepublic static final SensorType type
public SensorLaser()
public ClosestObstacle getClosestObstacleCourse()
public double getClosestObstacleDistance()
public DriveDirection getMostOpenDirection(int backwardsTreshold)
backwardsTreshold - If range in front is smaller than this value it
is clear there is wall in front of the robot. Therefore it Returns
Backwards.public double getResolution()
public double getFOV()
public double getRangeAt(int index)
index - public int getRangesSize()
public List<Double> getRanges()
public double getNMidAvg(int numOfRays)
numOfRays - Number of records around the middle one to compute the
avarage distance from.public double getNMidAvg(int numOfRays,
int offset)
numOfRays - Number of records around the middle one to compute the
avarage distance from.offset - Number of rays to skip before computing.Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.