#include <SensorData.h>
Public Member Functions | |
LocalizedRangeScan (const Identifier &rSensorIdentifier, const RangeReadingsList &rReadings) | |
KARTO_DEPRECATED KARTO_FORCEINLINE | LocalizedRangeScan (const Identifier &rSensorIdentifier, std::vector< kt_double > &rRangeReadings) |
Private Member Functions | |
virtual void | ComputePointReadings () |
KARTO_RTTI () | |
LocalizedRangeScan (const LocalizedRangeScan &) | |
const LocalizedRangeScan & | operator= (const LocalizedRangeScan &) |
The LocalizedRangeScan contains range data from a single sweep of a laser range finder sensor in a two-dimensional space and position information. The odometric position is the position reported by the robot when the range data was recorded. The corrected position is the position calculated by the mapper (or some other module)
The following example code creates a LocalizedRangeScan
karto::LaserRangeFinder* pLrf = karto::LaserRangeFinder::CreateLaserRangeFinder(karto::LaserRangeFinder_Sick_LMS100, "/laser0"); RangeReadingsList readings; karto::LocalizedRangeScan* pLocalizedRangeScan = new karto::LocalizedRangeScan(pLrf->GetName(), readings); pLocalizedRangeScan->SetTime(karto::Timestamp().GetUtcTime());
Setting the time is important if any filtering or interpolation is required for the scan
Example of how to to get a human readable time from the scan time.
std::cout << "Scan Date: " << karto::LocalDateTime(karto::DateTime(karto::Timestamp::FromUtcTime(pLocalizedRangeScan->GetTime()))).ToString().ToCString() << std::endl;
The LocalDataTime automatically corrects for timezone.
Definition at line 874 of file SensorData.h.
karto::LocalizedRangeScan::LocalizedRangeScan | ( | const Identifier & | rSensorIdentifier, |
const RangeReadingsList & | rReadings | ||
) |
Range scan from the given range finder with the given readings
rSensorIdentifier | identifier of sensor that generated this scan |
rReadings | list of range readings |
KARTO_DEPRECATED KARTO_FORCEINLINE karto::LocalizedRangeScan::LocalizedRangeScan | ( | const Identifier & | rSensorIdentifier, |
std::vector< kt_double > & | rRangeReadings | ||
) | [inline] |
Range scan from the given range finder with the given readings
rSensorIdentifier | identifier of sensor that generated this scan |
rRangeReadings | vector of range readings |
Definition at line 892 of file SensorData.h.
karto::LocalizedRangeScan::LocalizedRangeScan | ( | const LocalizedRangeScan & | ) | [private] |
void karto::LocalizedRangeScan::ComputePointReadings | ( | ) | [private, virtual] |
Computes point readings based on range readings Only range readings within [minimum range; range threshold] are returned
Implements karto::LocalizedLaserScan.
Definition at line 184 of file SensorData.cpp.
karto::LocalizedRangeScan::KARTO_RTTI | ( | ) | [private] |
Reimplemented from karto::LocalizedLaserScan.
const LocalizedRangeScan& karto::LocalizedRangeScan::operator= | ( | const LocalizedRangeScan & | ) | [private] |