36 MetaEnum::Register<LaserRangeFinderType>(
"LaserRangeFinderType")
68 , m_NumberOfRangeReadings(0)
81 const MetaEnum& rMetaEnum = karto::GetMetaEnumByType<karto::LaserRangeFinderType>();
89 LaserRangeFinder::~LaserRangeFinder()
110 point.
SetX(scanPosition.
GetX() + ratio * (point.
GetX() - scanPosition.
GetX()));
111 point.
SetY(scanPosition.
GetY() + ratio * (point.
GetY() - scanPosition.
GetY()));
114 if (pCoordinateConverter != NULL)
121 pointReadings.
Add(point);
124 return pointReadings;
134 Log(
LOG_INFORMATION,
"Info: clipped range threshold to be within minimum and maximum range!");
157 errorMessage.
Append(
"Invalid resolution for Sick LMS100: ");
179 errorMessage.
Append(
"Invalid resolution for Sick LMS291: ");
186 throw Exception(
"Can't set angular resolution, please create a LaserRangeFinder of type Custom");
200 throw Exception(
"LaserRangeFinder::Validate() - MinimumRange must be less than MaximumRange. Please set MinimumRange and MaximumRange to valid values.");
void Append(const String &rString)
virtual kt_size_t Size() const
kt_double Distance(const Vector2 &rOther) const
kt_int32u GetNumberOfRangeReadings() const
virtual const T & GetValue() const
Sensor(const Identifier &rName)
LaserRangeFinder(const Identifier &rName)
void SetRangeThreshold(kt_double rangeThreshold)
static LaserRangeFinder * CreateLaserRangeFinder(LaserRangeFinderType type, const Identifier &rName)
const Vector2dList GetPointReadings(LocalizedLaserScan *pLocalizedLaserScan, CoordinateConverter *pCoordinateConverter, kt_bool ignoreThresholdPoints=true, kt_bool flipY=false) const
kt_int32u m_NumberOfRangeReadings
Parameter< kt_double > * m_pMinimumAngle
void RegisterSensor(Sensor *pSensor)
virtual void Add(const T &rValue)
Parameter< Pose2 > * m_pOffsetPose
Pose2 GetSensorPose() const
void SetOffsetPose(const Pose2 &rPose)
Parameter< kt_double > * m_pAngularResolution
void UnregisterSensor(Sensor *pSensor)
virtual void SetValue(const T &rValue)
void SetAngularResolution(kt_double angularResolution)
void Log(LogLevel level, const karto::String &rMessage)
static String ToString(const char *value)
Parameter< kt_double > * m_pRangeThreshold
Vector2i WorldToGrid(const Vector2d &rWorld, kt_bool flipY=false) const
Parameter< kt_double > * m_pMinimumRange
const String & ToString() const
const String & ToString() const
Parameter< kt_double > * m_pMaximumRange
const Vector2d & GetPosition() const
const T & Clip(const T &n, const T &minValue, const T &maxValue)
void DefineEnumValue(const String &rName, kt_int64s value)
static SensorRegistry * GetInstance()
kt_double DegreesToRadians(kt_double degrees)
kt_bool InRange(const T &value, const T &a, const T &b)
Parameter< kt_double > * m_pMaximumAngle
kt_bool DoubleEqual(kt_double a, kt_double b)
signed long long kt_int64s
ParameterSet * GetParameterSet()
KARTO_EXPORT void RegisterLaserRangeFinderType()
kt_size_t GetNumberOfRangeReadings() const
kt_double GetMinimumRange() const
kt_double GetRangeThreshold() const
kt_double GetMaximumRange() const
const Vector2dList & GetPointReadings(kt_bool wantFiltered=false) const