#include <Mapper.h>
The Mapper class
Definition at line 1233 of file Mapper.h.
karto::Mapper::Mapper | ( | ) |
Default constructor
Definition at line 1573 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 1587 of file Mapper.cpp.
karto::Mapper::~Mapper | ( | ) | [virtual] |
Destructor
Definition at line 1601 of file Mapper.cpp.
karto::Mapper::Mapper | ( | const Mapper & | ) | [private] |
Restrict the copy constructor
void karto::Mapper::AddListener | ( | MapperListener * | pListener | ) |
Add a listener to mapper
pListener | Adds a listener | |
pListener |
Definition at line 1937 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 1989 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 2002 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 1976 of file Mapper.cpp.
const LocalizedRangeScanVector karto::Mapper::GetAllProcessedScans | ( | ) | const [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 1921 of file Mapper.cpp.
MapperGraph * karto::Mapper::GetGraph | ( | ) | const [virtual] |
ScanMatcher * karto::Mapper::GetLoopScanMatcher | ( | ) | const [virtual] |
MapperSensorManager* karto::Mapper::GetMapperSensorManager | ( | ) | const [inline] |
ScanMatcher * karto::Mapper::GetSequentialScanMatcher | ( | ) | const [virtual] |
Gets the sequential scan matcher
Definition at line 2025 of file Mapper.cpp.
kt_bool karto::Mapper::HasMovedEnough | ( | LocalizedRangeScan * | pScan, | |
LocalizedRangeScan * | pLastScan | |||
) | const [private] |
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 1889 of file Mapper.cpp.
void karto::Mapper::Initialize | ( | kt_double | rangeThreshold | ) |
Allocate memory needed for mapping
rangeThreshold |
Definition at line 1777 of file Mapper.cpp.
void karto::Mapper::InitializeParameters | ( | ) | [private] |
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.
Default value is true.
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.
Scan buffer maximum scan distance is the maximum distance between the first and last scans in the scan chain stored for matching. Default value is 20.0.
Scans are linked only if the correlation response value is greater than this value. Default value is 0.4
Maximum distance between linked scans. Scans that are farther apart will not be linked regardless of the correlation response value. Default value is 6.0 meters.
Scans less than this distance from the current position will be considered for a match in loop closure. Default value is 4.0 meters.
When the loop closure detection finds a candidate it must be part of a large set of linked scans. If the chain of scans is less than this value we do not attempt to close the loop. Default value is 10.
The co-variance values for a possible loop closure have to be less than this value to consider a viable solution. This applies to the coarse search. Default value is 0.16.
If response is larger then this, then initiate loop closure search at the coarse resolution. Default value is 0.7.
If response is larger then this, then initiate loop closure search at the fine resolution. Default value is 0.7.
The size of the search grid used by the matcher. Default value is 0.3 meters which tells the matcher to use a 30cm x 30cm grid.
The resolution (size of a grid cell) of the correlation grid. Default value is 0.01 meters.
The point readings are smeared by this value in X and Y to create a smoother response. Default value is 0.03 meters.
The size of the search grid used by the matcher. Default value is 0.3 meters which tells the matcher to use a 30cm x 30cm grid.
The resolution (size of a grid cell) of the correlation grid. Default value is 0.01 meters.
The point readings are smeared by this value in X and Y to create a smoother response. Default value is 0.03 meters.
Definition at line 1608 of file Mapper.cpp.
Restrict the assignment operator
Reimplemented from karto::Module.
Definition at line 1807 of file Mapper.cpp.
kt_bool karto::Mapper::Process | ( | LocalizedRangeScan * | pScan | ) | [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 1812 of file Mapper.cpp.
void karto::Mapper::RemoveListener | ( | MapperListener * | pListener | ) |
Remove a listener to mapper
pListener | Removes a listener | |
pListener |
Definition at line 1946 of file Mapper.cpp.
void karto::Mapper::Reset | ( | ) | [virtual] |
Resets the mapper. Deallocate memory allocated in Initialize()
Implements karto::Module.
Definition at line 1793 of file Mapper.cpp.
void karto::Mapper::SetScanSolver | ( | ScanSolver * | pSolver | ) |
Set scan optimizer used by mapper when closing the loop
pSolver |
Definition at line 2015 of file Mapper.cpp.
kt_bool karto::Mapper::TryCloseLoop | ( | LocalizedRangeScan * | pScan, | |
const Name & | rSensorName | |||
) | [inline] |
friend class MapperGraph [friend] |
friend class ScanMatcher [friend] |
kt_bool karto::Mapper::m_Initialized [private] |
std::vector<MapperListener*> karto::Mapper::m_Listeners [private] |
Parameter<kt_double>* karto::Mapper::m_pAngleVariancePenalty [private] |
MapperGraph* karto::Mapper::m_pGraph [private] |
Parameter<kt_double>* karto::Mapper::m_pMinimumAnglePenalty [private] |
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).
Parameter<kt_double>* karto::Mapper::m_pMinimumTravelHeading [private] |
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.
Parameter<kt_int32u>* karto::Mapper::m_pScanBufferSize [private] |
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.
ScanSolver* karto::Mapper::m_pScanOptimizer [private] |
Parameter<kt_bool>* karto::Mapper::m_pUseResponseExpansion [private] |
Parameter<kt_bool>* karto::Mapper::m_pUseScanBarycenter [private] |
Parameter<kt_bool>* karto::Mapper::m_pUseScanMatching [private] |
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.