MRPT logo

mrpt::slam::CObservation2DRangeScan Class Reference

Declares a class derived from "CObservation" that encapsules a 2D range scan measurement (typically from a laser scanner). More...

#include <mrpt/slam/CObservation2DRangeScan.h>

Inheritance diagram for mrpt::slam::CObservation2DRangeScan:

mrpt::slam::CObservation mrpt::utils::CSerializable

List of all members.

Classes

class  CAuxMapWrapper

Public Member Functions

 CObservation2DRangeScan ()
 Default constructor.
 ~CObservation2DRangeScan ()
 Destructor.
const CPointsMapgetAuxPointsMap () const
 Auxiliary members used to speed up some algorithms: it will be NULL normally.
const CPointsMapbuildAuxPointsMap (CPointsMap::TInsertionOptions *options=NULL) const
 Returns an auxiliary points map built from the scan; it is actually build at the first call to this method, and only once.
bool isPlanarScan (const double &tolerance=0) const
 Return true if the laser scanner has an absolute value of "pitch" and "roll" less or equal to the given tolerance (in rads, default=0) (with the normal vector either upwards or downwards).
float likelihoodWith (const CObservation *anotherObs, const CPosePDF *anotherObsPose=NULL) const
 Implements the virtual method in charge of finding the likelihood between this and another observation, probably only of the same derived class.
void getSensorPose (CPose3D &out_sensorPose) const
 A general method to retrieve the sensor pose on the robot.
void setSensorPose (const CPose3D &newSensorPose)
 A general method to change the sensor pose on the robot.
void truncateByDistanceAndAngle (float min_distance, float max_angle, float min_height=0, float max_height=0, float h=0)
 A general method to truncate the scan by defining a minimum valid distance and a maximum valid angle as well as minimun and maximum heights (NOTE: the laser z-coordinate must be provided).
void filterByExclusionAreas (const std::vector< mrpt::math::CPolygon > &areas)
 Mark as invalid sensed points that fall within any of a set of "exclusion areas", given in coordinates relative to the vehicle (taking into account "sensorPose").
void filterByExclusionAngles (const std::vector< std::pair< double, double > > &angles)
 Mark as invalid the ranges in any of a given set of "forbiden angle ranges", given as pairs<min_angle,max_angle>.

Public Attributes

vector_float scan
 The range values of the scan, in meters.
std::vector< char > validRange
 It's false (=0) on no reflected rays, referenced to elements in "scan" (Added in the streamming version #1 of the class).
float aperture
 The aperture of the range finder, in radians (typically M_PI = 180 degrees).
bool rightToLeft
 The scanning direction.
float maxRange
 The maximum range allowed by the device, in meters (e.g.
CPose3D sensorPose
 The 6D pose of the sensor on the robot.
float stdError
 The "sigma" error of the device in meters, used while inserting the scan in an occupancy grid.
float beamAperture
 The aperture of each beam, in radians, used to insert "thick" rays in the occupancy grid.
double deltaPitch
 If the laser gathers data by sweeping in the pitch/elevation angle, this holds the increment in "pitch" (=-"elevation") between the beginning and the end of the scan (the sensorPose member stands for the pose at the beginning of the scan).

Protected Attributes

CAuxMapWrapper m_auxMap


Detailed Description

Declares a class derived from "CObservation" that encapsules a 2D range scan measurement (typically from a laser scanner).

This is prepared for accepting 180deg,360deg or any other aperture scan, as well as resolutions of 0.5deg,0.25deg or any other.

See also:
CObservation

Definition at line 54 of file CObservation2DRangeScan.h.


Constructor & Destructor Documentation

mrpt::slam::CObservation2DRangeScan::CObservation2DRangeScan (  ) 

Default constructor.

mrpt::slam::CObservation2DRangeScan::~CObservation2DRangeScan (  ) 

Destructor.


Member Function Documentation

const CPointsMap* mrpt::slam::CObservation2DRangeScan::buildAuxPointsMap ( CPointsMap::TInsertionOptions options = NULL  )  const

Returns an auxiliary points map built from the scan; it is actually build at the first call to this method, and only once.

Parameters:
options Can be NULL to use default point maps' insertion options, or a valid pointer to override some params.
See also:
auxPointsMap

void mrpt::slam::CObservation2DRangeScan::filterByExclusionAngles ( const std::vector< std::pair< double, double > > &  angles  ) 

Mark as invalid the ranges in any of a given set of "forbiden angle ranges", given as pairs<min_angle,max_angle>.

See also:
C2DRangeFinderAbstract::loadExclusionAreas

void mrpt::slam::CObservation2DRangeScan::filterByExclusionAreas ( const std::vector< mrpt::math::CPolygon > &  areas  ) 

Mark as invalid sensed points that fall within any of a set of "exclusion areas", given in coordinates relative to the vehicle (taking into account "sensorPose").

See also:
C2DRangeFinderAbstract::loadExclusionAreas

const CPointsMap* mrpt::slam::CObservation2DRangeScan::getAuxPointsMap (  )  const [inline]

Auxiliary members used to speed up some algorithms: it will be NULL normally.

See also:
buildAuxPointsMap

Definition at line 132 of file CObservation2DRangeScan.h.

References mrpt::slam::CObservation2DRangeScan::CAuxMapWrapper::get().

void mrpt::slam::CObservation2DRangeScan::getSensorPose ( CPose3D out_sensorPose  )  const [inline, virtual]

A general method to retrieve the sensor pose on the robot.

Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases.

See also:
setSensorPose

Implements mrpt::slam::CObservation.

Definition at line 160 of file CObservation2DRangeScan.h.

bool mrpt::slam::CObservation2DRangeScan::isPlanarScan ( const double &  tolerance = 0  )  const

Return true if the laser scanner has an absolute value of "pitch" and "roll" less or equal to the given tolerance (in rads, default=0) (with the normal vector either upwards or downwards).

float mrpt::slam::CObservation2DRangeScan::likelihoodWith ( const CObservation anotherObs,
const CPosePDF anotherObsPose = NULL 
) const [virtual]

Implements the virtual method in charge of finding the likelihood between this and another observation, probably only of the same derived class.

The operator may be asymmetric.

Parameters:
anotherObs The other observation to compute likelihood with.
anotherObsPose If known, the belief about the robot pose when the other observation was taken can be supplied here, or NULL if it is unknown.
Returns:
Returns a likelihood measurement, in the range [0,1].
Exceptions:
std::exception On any error, as another observation being of an invalid class.

Implements mrpt::slam::CObservation.

void mrpt::slam::CObservation2DRangeScan::setSensorPose ( const CPose3D newSensorPose  )  [inline, virtual]

A general method to change the sensor pose on the robot.

Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.

See also:
getSensorPose

Implements mrpt::slam::CObservation.

Definition at line 167 of file CObservation2DRangeScan.h.

void mrpt::slam::CObservation2DRangeScan::truncateByDistanceAndAngle ( float  min_distance,
float  max_angle,
float  min_height = 0,
float  max_height = 0,
float  h = 0 
)

A general method to truncate the scan by defining a minimum valid distance and a maximum valid angle as well as minimun and maximum heights (NOTE: the laser z-coordinate must be provided).


Member Data Documentation

The aperture of the range finder, in radians (typically M_PI = 180 degrees).

Definition at line 102 of file CObservation2DRangeScan.h.

Referenced by mrpt::opengl::CAngularObservationMesh::FTrace2D< T >::operator()(), and mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().

The aperture of each beam, in radians, used to insert "thick" rays in the occupancy grid.

(Added in the streamming version #4 of the class)

Definition at line 123 of file CObservation2DRangeScan.h.

If the laser gathers data by sweeping in the pitch/elevation angle, this holds the increment in "pitch" (=-"elevation") between the beginning and the end of the scan (the sensorPose member stands for the pose at the beginning of the scan).

Definition at line 127 of file CObservation2DRangeScan.h.

Referenced by mrpt::opengl::CAngularObservationMesh::FTrace2D< T >::operator()(), and mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().

Definition at line 80 of file CObservation2DRangeScan.h.

The maximum range allowed by the device, in meters (e.g.

80m, 50m,...)

Definition at line 110 of file CObservation2DRangeScan.h.

Referenced by mrpt::opengl::CAngularObservationMesh::FTrace2D< T >::operator()(), and mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().

The "sigma" error of the device in meters, used while inserting the scan in an occupancy grid.

Definition at line 118 of file CObservation2DRangeScan.h.

It's false (=0) on no reflected rays, referenced to elements in "scan" (Added in the streamming version #1 of the class).

Definition at line 98 of file CObservation2DRangeScan.h.

Referenced by mrpt::opengl::CAngularObservationMesh::FTrace2D< T >::operator()(), and mrpt::opengl::CAngularObservationMesh::trace1DSetOfRays().




Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 23:10:56 EDT 2009