#include <Mapper.h>
Protected Member Functions | |
kt_bool | HasMovedEnough (LocalizedRangeScan *pScan, LocalizedRangeScan *pLastScan) const |
void | InitializeParameters () |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Member Functions | |
Mapper (const Mapper &) | |
const Mapper & | operator= (const Mapper &) |
Friends | |
class | boost::serialization::access |
class | MapperGraph |
class | ScanMatcher |
karto::Mapper::Mapper | ( | ) |
Default constructor
Definition at line 2085 of file Mapper.cpp.
karto::Mapper::Mapper | ( | const std::string & | rName | ) |
Constructor a mapper with a name
rName | mapper name |
Default constructor
Definition at line 2100 of file Mapper.cpp.
|
virtual |
Destructor
Definition at line 2115 of file Mapper.cpp.
|
private |
Restrict the copy constructor
void karto::Mapper::AddListener | ( | MapperListener * | pListener | ) |
Add a listener to mapper
pListener | Adds a listener |
pListener |
Definition at line 3243 of file Mapper.cpp.
void karto::Mapper::AddScanToLocalizationBuffer | ( | LocalizedRangeScan * | pScan, |
Vertex< LocalizedRangeScan > * | scan_vertex | ||
) |
Definition at line 2974 of file Mapper.cpp.
void karto::Mapper::ClearLocalizationBuffer | ( | ) |
Definition at line 3003 of file Mapper.cpp.
void karto::Mapper::FireBeginLoopClosure | ( | const std::string & | rInfo | ) | const |
Fire a message before loop closure to listeners
rInfo |
Definition at line 3295 of file Mapper.cpp.
void karto::Mapper::FireDebug | ( | const std::string & | rInfo | ) | const |
void karto::Mapper::FireEndLoopClosure | ( | const std::string & | rInfo | ) | const |
Fire a message after loop closure to listeners
rInfo |
Definition at line 3308 of file Mapper.cpp.
void karto::Mapper::FireInfo | ( | const std::string & | rInfo | ) | const |
void karto::Mapper::FireLoopClosureCheck | ( | const std::string & | rInfo | ) | const |
Fire a message upon checking for loop closure to listeners
rInfo |
Definition at line 3282 of file Mapper.cpp.
|
virtual |
Returns all processed scans added to the mapper. NOTE: The returned scans have their corrected pose updated.
Gets all the processed scans
Definition at line 3227 of file Mapper.cpp.
|
virtual |
|
virtual |
|
inline |
double karto::Mapper::getParamAngleVariancePenalty | ( | ) |
Definition at line 2449 of file Mapper.cpp.
double karto::Mapper::getParamCoarseAngleResolution | ( | ) |
Definition at line 2464 of file Mapper.cpp.
double karto::Mapper::getParamCoarseSearchAngleOffset | ( | ) |
Definition at line 2459 of file Mapper.cpp.
double karto::Mapper::getParamCorrelationSearchSpaceDimension | ( | ) |
Definition at line 2410 of file Mapper.cpp.
double karto::Mapper::getParamCorrelationSearchSpaceResolution | ( | ) |
Definition at line 2415 of file Mapper.cpp.
double karto::Mapper::getParamCorrelationSearchSpaceSmearDeviation | ( | ) |
Definition at line 2420 of file Mapper.cpp.
double karto::Mapper::getParamDistanceVariancePenalty | ( | ) |
Definition at line 2444 of file Mapper.cpp.
bool karto::Mapper::getParamDoLoopClosing | ( | ) |
Definition at line 2383 of file Mapper.cpp.
double karto::Mapper::getParamFineSearchAngleOffset | ( | ) |
Definition at line 2454 of file Mapper.cpp.
double karto::Mapper::getParamLinkMatchMinimumResponseFine | ( | ) |
Definition at line 2368 of file Mapper.cpp.
double karto::Mapper::getParamLinkScanMaximumDistance | ( | ) |
Definition at line 2373 of file Mapper.cpp.
double karto::Mapper::getParamLoopMatchMaximumVarianceCoarse | ( | ) |
Definition at line 2393 of file Mapper.cpp.
int karto::Mapper::getParamLoopMatchMinimumChainSize | ( | ) |
Definition at line 2388 of file Mapper.cpp.
double karto::Mapper::getParamLoopMatchMinimumResponseCoarse | ( | ) |
Definition at line 2398 of file Mapper.cpp.
double karto::Mapper::getParamLoopMatchMinimumResponseFine | ( | ) |
Definition at line 2403 of file Mapper.cpp.
double karto::Mapper::getParamLoopSearchMaximumDistance | ( | ) |
Definition at line 2378 of file Mapper.cpp.
double karto::Mapper::getParamLoopSearchSpaceDimension | ( | ) |
Definition at line 2427 of file Mapper.cpp.
double karto::Mapper::getParamLoopSearchSpaceResolution | ( | ) |
Definition at line 2432 of file Mapper.cpp.
double karto::Mapper::getParamLoopSearchSpaceSmearDeviation | ( | ) |
Definition at line 2437 of file Mapper.cpp.
double karto::Mapper::getParamMinimumAnglePenalty | ( | ) |
Definition at line 2469 of file Mapper.cpp.
double karto::Mapper::getParamMinimumDistancePenalty | ( | ) |
Definition at line 2474 of file Mapper.cpp.
double karto::Mapper::getParamMinimumTimeInterval | ( | ) |
Definition at line 2343 of file Mapper.cpp.
double karto::Mapper::getParamMinimumTravelDistance | ( | ) |
Definition at line 2348 of file Mapper.cpp.
double karto::Mapper::getParamMinimumTravelHeading | ( | ) |
Definition at line 2353 of file Mapper.cpp.
double karto::Mapper::getParamScanBufferMaximumScanDistance | ( | ) |
Definition at line 2363 of file Mapper.cpp.
int karto::Mapper::getParamScanBufferSize | ( | ) |
Definition at line 2358 of file Mapper.cpp.
bool karto::Mapper::getParamUseResponseExpansion | ( | ) |
Definition at line 2479 of file Mapper.cpp.
bool karto::Mapper::getParamUseScanBarycenter | ( | ) |
Definition at line 2338 of file Mapper.cpp.
bool karto::Mapper::getParamUseScanMatching | ( | ) |
Definition at line 2333 of file Mapper.cpp.
ScanSolver * karto::Mapper::getScanSolver | ( | ) |
Gets scan optimizer used by mapper when closing the loop
Definition at line 3326 of file Mapper.cpp.
|
virtual |
Gets the sequential scan matcher
Definition at line 3336 of file Mapper.cpp.
|
protected |
Test if the scan is "sufficiently far" from the last scan added.
pScan | scan to be checked |
pLastScan | last scan added to mapper |
Is the scan sufficiently far from the last scan?
pScan | |
pLastScan |
Definition at line 3188 of file Mapper.cpp.
void karto::Mapper::Initialize | ( | kt_double | rangeThreshold | ) |
Allocate memory needed for mapping
rangeThreshold |
Definition at line 2638 of file Mapper.cpp.
|
protected |
Definition at line 2122 of file Mapper.cpp.
void karto::Mapper::LoadFromFile | ( | const std::string & | filename | ) |
|
virtual |
Process a localized range scan for incorporation into the map. The scan must be identified with a range finder device. Once added to a map, the corrected pose information in the localized scan will be updated to the correct pose as determined by the mapper.
pScan | A localized range scan that has pose information associated directly with the scan data. The pose is that of the range device originating the scan. Note that the mapper will set corrected pose information in the scan object. |
Definition at line 2719 of file Mapper.cpp.
kt_bool karto::Mapper::ProcessAgainstNode | ( | LocalizedRangeScan * | pScan, |
const int & | nodeId, | ||
Matrix3 * | covariance = nullptr |
||
) |
Definition at line 3096 of file Mapper.cpp.
kt_bool karto::Mapper::ProcessAgainstNodesNearBy | ( | LocalizedRangeScan * | pScan, |
kt_bool | addScanToLocalizationBuffer = false , |
||
Matrix3 * | covariance = nullptr |
||
) |
Definition at line 2799 of file Mapper.cpp.
kt_bool karto::Mapper::ProcessAtDock | ( | LocalizedRangeScan * | pScan, |
Matrix3 * | covariance = nullptr |
||
) |
Definition at line 3176 of file Mapper.cpp.
kt_bool karto::Mapper::ProcessLocalization | ( | LocalizedRangeScan * | pScan, |
Matrix3 * | covariance = nullptr |
||
) |
Definition at line 2887 of file Mapper.cpp.
void karto::Mapper::RemoveListener | ( | MapperListener * | pListener | ) |
Remove a listener to mapper
pListener | Removes a listener |
pListener |
Definition at line 3252 of file Mapper.cpp.
kt_bool karto::Mapper::RemoveNodeFromGraph | ( | Vertex< LocalizedRangeScan > * | vertex_to_remove | ) |
Definition at line 3030 of file Mapper.cpp.
|
virtual |
Resets the mapper. Deallocate memory allocated in Initialize()
Implements karto::Module.
Definition at line 2689 of file Mapper.cpp.
void karto::Mapper::SaveToFile | ( | const std::string & | filename | ) |
|
inlineprotected |
void karto::Mapper::setParamAngleVariancePenalty | ( | double | d | ) |
Definition at line 2601 of file Mapper.cpp.
void karto::Mapper::setParamCoarseAngleResolution | ( | double | d | ) |
Definition at line 2616 of file Mapper.cpp.
void karto::Mapper::setParamCoarseSearchAngleOffset | ( | double | d | ) |
Definition at line 2611 of file Mapper.cpp.
void karto::Mapper::setParamCorrelationSearchSpaceDimension | ( | double | d | ) |
Definition at line 2562 of file Mapper.cpp.
void karto::Mapper::setParamCorrelationSearchSpaceResolution | ( | double | d | ) |
Definition at line 2567 of file Mapper.cpp.
void karto::Mapper::setParamCorrelationSearchSpaceSmearDeviation | ( | double | d | ) |
Definition at line 2572 of file Mapper.cpp.
void karto::Mapper::setParamDistanceVariancePenalty | ( | double | d | ) |
Definition at line 2596 of file Mapper.cpp.
void karto::Mapper::setParamDoLoopClosing | ( | bool | b | ) |
Definition at line 2536 of file Mapper.cpp.
void karto::Mapper::setParamFineSearchAngleOffset | ( | double | d | ) |
Definition at line 2606 of file Mapper.cpp.
void karto::Mapper::setParamLinkMatchMinimumResponseFine | ( | double | d | ) |
Definition at line 2521 of file Mapper.cpp.
void karto::Mapper::setParamLinkScanMaximumDistance | ( | double | d | ) |
Definition at line 2526 of file Mapper.cpp.
void karto::Mapper::setParamLoopMatchMaximumVarianceCoarse | ( | double | d | ) |
Definition at line 2546 of file Mapper.cpp.
void karto::Mapper::setParamLoopMatchMinimumChainSize | ( | int | i | ) |
Definition at line 2541 of file Mapper.cpp.
void karto::Mapper::setParamLoopMatchMinimumResponseCoarse | ( | double | d | ) |
Definition at line 2551 of file Mapper.cpp.
void karto::Mapper::setParamLoopMatchMinimumResponseFine | ( | double | d | ) |
Definition at line 2556 of file Mapper.cpp.
void karto::Mapper::setParamLoopSearchMaximumDistance | ( | double | d | ) |
Definition at line 2531 of file Mapper.cpp.
void karto::Mapper::setParamLoopSearchSpaceDimension | ( | double | d | ) |
Definition at line 2579 of file Mapper.cpp.
void karto::Mapper::setParamLoopSearchSpaceResolution | ( | double | d | ) |
Definition at line 2584 of file Mapper.cpp.
void karto::Mapper::setParamLoopSearchSpaceSmearDeviation | ( | double | d | ) |
Definition at line 2589 of file Mapper.cpp.
void karto::Mapper::setParamMinimumAnglePenalty | ( | double | d | ) |
Definition at line 2621 of file Mapper.cpp.
void karto::Mapper::setParamMinimumDistancePenalty | ( | double | d | ) |
Definition at line 2626 of file Mapper.cpp.
void karto::Mapper::setParamMinimumTimeInterval | ( | double | d | ) |
Definition at line 2496 of file Mapper.cpp.
void karto::Mapper::setParamMinimumTravelDistance | ( | double | d | ) |
Definition at line 2501 of file Mapper.cpp.
void karto::Mapper::setParamMinimumTravelHeading | ( | double | d | ) |
Definition at line 2506 of file Mapper.cpp.
void karto::Mapper::setParamScanBufferMaximumScanDistance | ( | double | d | ) |
Definition at line 2516 of file Mapper.cpp.
void karto::Mapper::setParamScanBufferSize | ( | int | i | ) |
Definition at line 2511 of file Mapper.cpp.
void karto::Mapper::setParamUseResponseExpansion | ( | bool | b | ) |
Definition at line 2631 of file Mapper.cpp.
void karto::Mapper::setParamUseScanBarycenter | ( | bool | b | ) |
Definition at line 2491 of file Mapper.cpp.
void karto::Mapper::setParamUseScanMatching | ( | bool | b | ) |
Definition at line 2486 of file Mapper.cpp.
void karto::Mapper::SetScanSolver | ( | ScanSolver * | pSolver | ) |
Set scan optimizer used by mapper when closing the loop
pSolver |
Definition at line 3321 of file Mapper.cpp.
|
inline |
|
inline |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
Sets the minimum time between scans. If a new scan's time stamp is longer than MinimumTimeInterval from the previously processed scan, the mapper will use the data from the new scan. Otherwise, it will discard the new scan if it also does not meet the minimum travel distance and heading requirements. For performance reasons, it is generally it is a good idea to only process scans if a reasonable amount of time has passed. This parameter is particularly useful when there is a need to process scans while the robot is stationary. Default value is 3600 (seconds), effectively disabling this parameter.
Sets the minimum travel between scans. If a new scan's position is more than minimumTravelDistance from the previous scan, the mapper will use the data from the new scan. Otherwise, it will discard the new scan if it also does not meet the minimum change in heading requirement. For performance reasons, generally it is a good idea to only process scans if the robot has moved a reasonable amount. Default value is 0.2 (meters).
Sets the minimum heading change between scans. If a new scan's heading is more than minimumTravelHeading from the previous scan, the mapper will use the data from the new scan. Otherwise, it will discard the new scan if it also does not meet the minimum travel distance requirement. For performance reasons, generally it is a good idea to only process scans if the robot has moved a reasonable amount. Default value is 10 degrees.
Scan buffer size is the length of the scan chain stored for scan matching. "scanBufferSize" should be set to approximately "scanBufferMaximumScanDistance" / "minimumTravelDistance". The idea is to get an area approximately 20 meters long for scan matching. For example, if we add scans every minimumTravelDistance == 0.3 meters, then "scanBufferSize" should be 20 / 0.3 = 67.) Default value is 67.
|
protected |
|
protected |
When set to true, the mapper will use a scan matching algorithm. In most real-world situations this should be set to true so that the mapper algorithm can correct for noise and errors in odometry and scan data. In some simulator environments where the simulated scan and odometry data are very accurate, the scan matching algorithm can produce worse results. In those cases set this to false to improve results. Default value is true.