20 #ifndef __OpenKarto_SensorData_h__ 21 #define __OpenKarto_SensorData_h__ 116 m_UniqueId = uniqueId;
143 return m_SensorIdentifier;
152 m_SensorIdentifier = rSensorIdentifier;
159 void AddCustomItem(CustomItem* pCustomItem);
165 const CustomItemList& GetCustomItems()
const;
247 return m_RangeReadings;
256 m_RangeReadings = rRangeReadings;
320 return m_OdometricPose;
329 m_OdometricPose = rPose;
382 return m_OdometricPose;
391 m_OdometricPose = rOdometricPose;
404 return m_CorrectedPose;
413 m_CorrectedPose = rPose;
432 m_GpsReading = rGpsReading;
433 m_IsGpsReadingValid =
true;
442 return m_IsGpsReadingValid;
452 if (m_pGpsEstimationManager != NULL)
454 return m_pGpsEstimationManager->GetGpsEstimate(
this);
458 return m_GpsEstimate;
468 if (m_pGpsEstimationManager != NULL)
470 m_pGpsEstimationManager->SetGpsEstimate(
this, rGpsEstimate);
474 m_GpsEstimate = rGpsEstimate;
475 m_IsGpsEstimateValid =
true;
485 if (m_pGpsEstimationManager != NULL)
487 return m_pGpsEstimationManager->IsGpsEstimateValid(
this);
491 return m_IsGpsEstimateValid;
501 m_pGpsEstimationManager = pGpsEstimationManager;
604 return m_BarycenterPose;
620 return useBarycenter ? GetBarycenterPose() : GetSensorPose();
629 return GetSensorAt(GetCorrectedPose());
638 Pose2 deviceOffsetPose2 = GetLaserRangeFinder()->GetOffsetPose();
641 kt_double angleoffset = atan2(deviceOffsetPose2.
GetY(), deviceOffsetPose2.
GetX());
643 Pose2 worldSensorOffset =
Pose2(offsetLength * cos(correctedHeading + angleoffset - offsetHeading),
644 offsetLength * sin(correctedHeading + angleoffset - offsetHeading),
647 SetCorrectedPose(rSensorPose - worldSensorOffset);
674 return m_BoundingBox;
690 return m_RangeReadings;
699 return m_RangeReadings.Size();
718 virtual void ComputePointReadings() = 0;
726 return m_FilteredPointReadings;
735 return m_UnfilteredPointReadings;
817 return m_LocalAngles;
832 virtual void ComputePointReadings();
895 m_RangeReadings.Resize(static_cast<kt_int32u>(rRangeReadings.size()));
896 if (rRangeReadings.size() > 0)
898 memcpy(&(m_RangeReadings[0]), &(rRangeReadings[0]),
sizeof(
kt_double) * rRangeReadings.size());
915 virtual void ComputePointReadings();
931 #endif // __OpenKarto_SensorData_h__
BoundingBox2 m_BoundingBox
void SetOdometricPose(const Pose2 &rOdometricPose)
kt_int32s GetStateId() const
kt_double GetHeading() const
void SetUniqueId(kt_int32u uniqueId)
SensorDataPrivate * m_pSensorDataPrivate
List< kt_double > DoubleList
gps::PointGps GetGpsReading() const
virtual void SetCorrectedPose(const Pose2 &rCorrectedPose)
void SetOdometricPose(const Pose2 &rPose)
const BoundingBox2 & GetBoundingBox() const
Vector2dList m_LocalPointReadings
const DoubleList & GetLocalAngles() const
SmartPointer< LocalizedObject > LocalizedObjectPtr
kt_int64s GetTime() const
RangeReadingsList m_RangeReadings
virtual const Vector2dList & GetFilteredPointReadings() const
kt_bool m_IsGpsEstimateValid
void SetGpsEstimate(const gps::PointGps &rGpsEstimate)
void SetStateId(kt_int32s stateId)
void SetRangeReadings(const RangeReadingsList &rRangeReadings)
Identifier m_SensorIdentifier
Pose2 GetSensorAt(const Pose2 &rPose) const
void SetGpsEstimationManager(AbstractGpsEstimationManager *pGpsEstimationManager)
Pose2 GetSensorPose() const
const RangeReadingsList & GetRangeReadings() const
gps::PointGps GetGpsEstimate() const
kt_bool IsGpsEstimateValid() const
void SetSensorIdentifier(const Identifier &rSensorIdentifier)
Identifier m_SensorIdentifier
void SetSensorPose(const Pose2 &rSensorPose)
#define KARTO_FORCEINLINE
const Pose2 & GetBarycenterPose() const
SmartPointer< LocalizedLaserScan > LocalizedLaserScanPtr
RangeReadingsList m_RangeReadings
const Identifier & GetSensorIdentifier() const
const Pose2 & GetOdometricPose() const
Vector2dList m_UnfilteredPointReadings
kt_int32s GetUniqueId() const
const RangeReadingsList & GetRangeReadings() const
kt_bool m_IsGpsReadingValid
void SetGpsReading(const gps::PointGps &rGpsReading)
DrivePose(const Identifier &rSensorIdentifier)
KARTO_TYPE(Grid< kt_int8u >)
const Vector2d & GetPosition() const
Sensor * GetSensorByName(const Identifier &rName)
gps::PointGps m_GpsEstimate
virtual void SetCorrectedPose(const Pose2 &rPose)
static SensorRegistry * GetInstance()
kt_bool IsGpsReadingValid() const
Vector2dList m_FilteredPointReadings
LaserRangeFinder * GetLaserRangeFinder() const
kt_double NormalizeAngle(kt_double angle)
void SetTime(kt_int64s time)
signed long long kt_int64s
AbstractGpsEstimationManager * m_pGpsEstimationManager
const Pose2 & GetOdometricPose() const
kt_size_t GetNumberOfRangeReadings() const
KARTO_DEPRECATED KARTO_FORCEINLINE LocalizedRangeScan(const Identifier &rSensorIdentifier, std::vector< kt_double > &rRangeReadings)
virtual const Vector2dList & GetUnfilteredPointReadings() const
List< kt_double > RangeReadingsList
const Pose2 & GetCorrectedPose() const
List< LocalizedObjectPtr > LocalizedObjectList
Pose2 GetReferencePose(kt_bool useBarycenter) const
List< LocalizedLaserScanPtr > LocalizedLaserScanList
LaserRangeFinder * GetLaserRangeFinder() const
gps::PointGps m_GpsReading