MIRA
Public Types | Public Member Functions | Public Attributes | List of all members
RangeScan Class Reference

This class represents 2D range scans e.g. More...

#include <robot/RangeScan.h>

Inheritance diagram for RangeScan:
Inheritance graph
[legend]

Public Types

enum  RangeCode {
  Valid = 0, BelowMinimum, AboveMaximum, Invalid,
  Masked, InvalidUser = 1000
}
 Codes used for single scans to signal if they are valid. More...
 

Public Member Functions

std::pair< float, float > getAnglesForOrientation (const Pose3 &mountPosition) const
 Returns pair of adjusted start and delta angle for this scan assuming the scan was taken at the given mount position. More...
 
Constructors and reflect
 RangeScan ()
 
 RangeScan (std::size_t scans)
 Construct a new range scan object with a given number of scans. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 
Constructors and reflect
template<typename Reflector >
void reflectConeAngle (Reflector &r)
 
void reflectConeAngle (PropertySerializer &r)
 

Public Attributes

std::vector< float > range
 The range scans. Values in meter. More...
 
std::vector< uint16 > valid
 Information if a scan is valid. More...
 
std::vector< float > certainty
 Optional certainty values for each scan referenced to the appropriate scan vector element. More...
 
std::vector< float > reflectance
 Optional reflectance values for each scan referenced to the appropriate scan vector element. More...
 
SignedAnglef startAngle
 The starting orientation of the first sensor cone. More...
 
SignedAnglef deltaAngle
 The delta angle between neighboring cones. More...
 
float coneAngle
 The resolution of a single cone. More...
 
float aperture
 The aperture of the sensor in [m]. More...
 
float stdError
 The measuring error of the sensor that delivered this scan. More...
 
float minimumRange
 The minimum range of valid measurements (measurements below this value result in BelowMinimum range code). More...
 
float maximumRange
 The maximum range of valid measurements (measurements above this value result in AboveMaximum range code). More...
 
Duration scanTime
 Duration between first and last measurement. More...
 

Detailed Description

This class represents 2D range scans e.g.

for laser, infrared or ultra-sonic sensors. A laser would have several scans in the scan vector whereas the scan vector of an ultra-sonic sensor would only contain a single scan.

Member Enumeration Documentation

◆ RangeCode

enum RangeCode

Codes used for single scans to signal if they are valid.

Enumerator
Valid 

Scan is valid.

BelowMinimum 

Scan is below the minimum scan range of the sensor.

AboveMaximum 

Scan is above the maximum scan range of the sensor.

Invalid 

Scan is invalid.

Masked 

Scan is masked out and therefore not used.

InvalidUser 

The first range code for device specific codes.

Constructor & Destructor Documentation

◆ RangeScan() [1/2]

RangeScan ( )
inline

◆ RangeScan() [2/2]

RangeScan ( std::size_t  scans)
inline

Construct a new range scan object with a given number of scans.

The vectors range and valid will be initialized with the given size, but the content of this vectors will be undefined! The vectors certainty and reflectance will be initialized with size 0.

Parameters
[in]scansThe number of scans in the range scan.

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ reflectConeAngle() [1/2]

void reflectConeAngle ( Reflector &  r)
inlineinherited

◆ reflectConeAngle() [2/2]

void reflectConeAngle ( PropertySerializer r)
inlineinherited

◆ getAnglesForOrientation()

std::pair<float, float> getAnglesForOrientation ( const Pose3 mountPosition) const
inherited

Returns pair of adjusted start and delta angle for this scan assuming the scan was taken at the given mount position.

This is useful for lasers mounted upside down. start and delta angle are in (-pi,pi) interval.

Exceptions
XInvalidParameterwhen laser is not mounted upright or upside down.

Member Data Documentation

◆ range

std::vector<float> range

The range scans. Values in meter.

◆ valid

std::vector<uint16> valid

Information if a scan is valid.

Each value is referenced to the appropriate scan vector element. The elements should be taken from RangeCode for standard values. Device specific value can be used starting at RangeCode::InvalidUser.

◆ certainty

std::vector<float> certainty

Optional certainty values for each scan referenced to the appropriate scan vector element.

◆ reflectance

std::vector<float> reflectance

Optional reflectance values for each scan referenced to the appropriate scan vector element.

◆ startAngle

SignedAnglef startAngle
inherited

The starting orientation of the first sensor cone.

◆ deltaAngle

SignedAnglef deltaAngle
inherited

The delta angle between neighboring cones.

◆ coneAngle

float coneAngle
inherited

The resolution of a single cone.

◆ aperture

float aperture
inherited

The aperture of the sensor in [m].

◆ stdError

float stdError
inherited

The measuring error of the sensor that delivered this scan.

◆ minimumRange

float minimumRange
inherited

The minimum range of valid measurements (measurements below this value result in BelowMinimum range code).

◆ maximumRange

float maximumRange
inherited

The maximum range of valid measurements (measurements above this value result in AboveMaximum range code).

◆ scanTime

Duration scanTime
inherited

Duration between first and last measurement.

Time between consecutive range measurement = scanTime / number of scans


The documentation for this class was generated from the following file: