Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes
karto::ScanMatcher Class Reference

#include <OpenMapper.h>

List of all members.

Public Member Functions

kt_double CorrelateScan (ScanMatcherGridSet *pScanMatcherGridSet, LocalizedLaserScan *pScan, const Pose2 &rSearchCenter, const Vector2d &rSearchSpaceOffset, const Vector2d &rSearchSpaceResolution, kt_double searchAngleOffset, kt_double searchAngleResolution, kt_bool doPenalize, Pose2 &rMean, Matrix3 &rCovariance, kt_bool doingFineMatch)
CorrelationGridGetCorrelationGrid () const
Grid< kt_double > * GetSearchGrid () const
kt_double MatchScan (LocalizedLaserScan *pScan, const LocalizedLaserScanList &rBaseScans, Pose2 &rMean, Matrix3 &rCovariance, kt_bool doPenalize=true, kt_bool doRefineMatch=true)
virtual ~ScanMatcher ()

Static Public Member Functions

static void ComputeAngularCovariance (ScanMatcherGridSet *pScanMatcherGridSet, const Pose2 &rBestPose, kt_double bestResponse, const Pose2 &rSearchCenter, kt_double searchAngleOffset, kt_double searchAngleResolution, Matrix3 &rCovariance)
static void ComputePositionalCovariance (Grid< kt_double > *pSearchSpaceProbs, const Pose2 &rBestPose, kt_double bestResponse, const Pose2 &rSearchCenter, const Vector2d &rSearchSpaceOffset, const Vector2d &rSearchSpaceResolution, kt_double searchAngleResolution, Matrix3 &rCovariance)
static ScanMatcherCreate (OpenMapper *pOpenMapper, kt_double searchSize, kt_double resolution, kt_double smearDeviation, kt_double rangeThreshold)
static kt_double GetResponse (ScanMatcherGridSet *pScanMatcherGridSet, kt_int32u angleIndex, kt_int32s gridPositionIndex)

Protected Member Functions

 ScanMatcher (OpenMapper *pOpenMapper)

Static Private Member Functions

static void AddScan (CorrelationGrid *pCorrelationGrid, LocalizedLaserScan *pScan, const Vector2d &rViewPoint, kt_bool doSmear=true)
static void AddScanNew (CorrelationGrid *pCorrelationGrid, const Vector2dList &rValidPoints, kt_bool doSmear=true)
static void AddScans (CorrelationGrid *pCorrelationGrid, const LocalizedLaserScanList &rScans, const Vector2d &rViewPoint)
static void AddScansNew (CorrelationGrid *pCorrelationGrid, const LocalizedLaserScanList &rScans, const Vector2d &rViewPoint)
static Vector2dList FindValidPoints (LocalizedLaserScan *pScan, const Vector2d &rViewPoint)

Private Attributes

OpenMapperm_pOpenMapper
SmartPointer< ScanMatcherGridSetm_pScanMatcherGridSet
ScanMatcherGridSetBankm_pScanMatcherGridSetBank

Detailed Description

Scan matcher

Definition at line 1078 of file OpenMapper.h.


Constructor & Destructor Documentation

Destructor

Definition at line 436 of file OpenMapper.cpp.

karto::ScanMatcher::ScanMatcher ( OpenMapper pOpenMapper) [inline, protected]

Default constructor

Definition at line 1216 of file OpenMapper.h.


Member Function Documentation

void karto::ScanMatcher::AddScan ( CorrelationGrid pCorrelationGrid,
LocalizedLaserScan pScan,
const Vector2d rViewPoint,
kt_bool  doSmear = true 
) [static, private]

Marks cells where scans' points hit as being occupied. Can smear points as they are added.

Parameters:
pCorrelationGridcorrelation grid used for scan matching
pScanscan whose points will mark cells in grid as being occupied
viewPointdo not add points that belong to scans "opposite" the view point
doSmearwhether the points will be smeared

Definition at line 1124 of file OpenMapper.cpp.

void karto::ScanMatcher::AddScanNew ( CorrelationGrid pCorrelationGrid,
const Vector2dList rValidPoints,
kt_bool  doSmear = true 
) [static, private]

Definition at line 1157 of file OpenMapper.cpp.

void karto::ScanMatcher::AddScans ( CorrelationGrid pCorrelationGrid,
const LocalizedLaserScanList rScans,
const Vector2d rViewPoint 
) [static, private]

Marks cells where scans' points hit as being occupied

Parameters:
pCorrelationGridcorrelation grid used for scan matching
rScansscans whose points will mark cells in grid as being occupied
viewPointdo not add points that belong to scans "opposite" the view point

Definition at line 1084 of file OpenMapper.cpp.

void karto::ScanMatcher::AddScansNew ( CorrelationGrid pCorrelationGrid,
const LocalizedLaserScanList rScans,
const Vector2d rViewPoint 
) [static, private]

Definition at line 1095 of file OpenMapper.cpp.

void karto::ScanMatcher::ComputeAngularCovariance ( ScanMatcherGridSet pScanMatcherGridSet,
const Pose2 rBestPose,
kt_double  bestResponse,
const Pose2 rSearchCenter,
kt_double  searchAngleOffset,
kt_double  searchAngleResolution,
Matrix3 rCovariance 
) [static]

Computes the angular covariance of the best pose

Parameters:
pScanMatcherGridSetset of grids used for scan matching
rBestPosebest pose
bestResponsebest response
rSearchCentercenter of search space
searchAngleOffsetamount to search in each angular direction
searchAngleResolutionangular resolution of search
rCovarianceoutput parameter covariance

Definition at line 1033 of file OpenMapper.cpp.

void karto::ScanMatcher::ComputePositionalCovariance ( Grid< kt_double > *  pSearchSpaceProbs,
const Pose2 rBestPose,
kt_double  bestResponse,
const Pose2 rSearchCenter,
const Vector2d rSearchSpaceOffset,
const Vector2d rSearchSpaceResolution,
kt_double  searchAngleResolution,
Matrix3 rCovariance 
) [static]

Computes the positional covariance of the best pose

Parameters:
pSearchSpaceProbsprobabilities of poses over search space
rBestPosebest pose
bestResponsebest response
rSearchCentercenter of search space
rSearchSpaceOffsetamount to search in each direction
rSearchSpaceResolutiongrid resolution of search
searchAngleResolutionangular resolution of search
rCovarianceoutput parameter covariance

Definition at line 939 of file OpenMapper.cpp.

kt_double karto::ScanMatcher::CorrelateScan ( ScanMatcherGridSet pScanMatcherGridSet,
LocalizedLaserScan pScan,
const Pose2 rSearchCenter,
const Vector2d rSearchSpaceOffset,
const Vector2d rSearchSpaceResolution,
kt_double  searchAngleOffset,
kt_double  searchAngleResolution,
kt_bool  doPenalize,
Pose2 rMean,
Matrix3 rCovariance,
kt_bool  doingFineMatch 
)

Finds the best pose for the scan centering the search in the correlation grid at the given pose and search in the space by the vector and angular offsets in increments of the given resolutions

Parameters:
pScanMatcherGridSetset of grids used for scan matching
pScanscan to match against correlation grid
rSearchCenterthe center of the search space
rSearchSpaceOffsetsearches poses in the area offset by this vector around search center
rSearchSpaceResolutionhow fine a granularity to search in the search space
searchAngleOffsetsearches poses in the angles offset by this angle around search center
searchAngleResolutionhow fine a granularity to search in the angular search space
doPenalizewhether to penalize matches further from the search center
rMeanoutput parameter of mean (best pose) of match
rCovarianceoutput parameter of covariance of match
doingFineMatchwhether to do a finer search after coarse search
Returns:
strength of response

Definition at line 718 of file OpenMapper.cpp.

ScanMatcher * karto::ScanMatcher::Create ( OpenMapper pOpenMapper,
kt_double  searchSize,
kt_double  resolution,
kt_double  smearDeviation,
kt_double  rangeThreshold 
) [static]

Creates a scan matcher with the given parameters

Parameters:
pOpenMappermapper
searchSizehow much to search in each direction
resolutiongrid resolution
smearDeviationamount to smear when adding scans to grid
rangeThresholdcutoff for range readings
Returns:
scan matcher

Definition at line 441 of file OpenMapper.cpp.

Vector2dList karto::ScanMatcher::FindValidPoints ( LocalizedLaserScan pScan,
const Vector2d rViewPoint 
) [static, private]

Computes which points in a scan are on the same side as the given viewpoint

Parameters:
pScanscan
rViewPointviewpoint
Returns:
points on the same side

Definition at line 1188 of file OpenMapper.cpp.

Gets the correlation grid data (for debugging). NOTE: This only works in single-threaded mode.

Exceptions:
Exceptionif not in single-threaded mode.
Returns:
correlation grid

Definition at line 1287 of file OpenMapper.cpp.

kt_double karto::ScanMatcher::GetResponse ( ScanMatcherGridSet pScanMatcherGridSet,
kt_int32u  angleIndex,
kt_int32s  gridPositionIndex 
) [static]

Gets response at given position for given rotation (only look up valid points)

Parameters:
pScanMatcherGridSetset of grids used for scan matching
angleIndexindex of angle
gridPositionIndexindex of grid position
Returns:
response

Definition at line 1245 of file OpenMapper.cpp.

Gets the search grid data (for debugging). NOTE: This only works in single-threaded mode.

Exceptions:
Exceptionif not in single-threaded mode.
Returns:
search grid

Definition at line 1299 of file OpenMapper.cpp.

kt_double karto::ScanMatcher::MatchScan ( LocalizedLaserScan pScan,
const LocalizedLaserScanList rBaseScans,
Pose2 rMean,
Matrix3 rCovariance,
kt_bool  doPenalize = true,
kt_bool  doRefineMatch = true 
)

Matches given scan against set of scans

Parameters:
pScanscan being scan-matched
rBaseScansset of scans whose points will mark cells in grid as being occupied
rMeanoutput parameter of mean (best pose) of match
rCovarianceoutput parameter of covariance of match
doPenalizewhether to penalize matches further from the search center
doRefineMatchwhether to do finer-grained matching if coarse match is good
Returns:
strength of response

Definition at line 496 of file OpenMapper.cpp.


Member Data Documentation

Definition at line 1224 of file OpenMapper.h.

Definition at line 1226 of file OpenMapper.h.

Definition at line 1227 of file OpenMapper.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Sun Apr 2 2017 03:53:09