MRPT  2.0.3
CObservationReflectivity.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/obs/CObservation.h>
12 #include <mrpt/poses/CPose3D.h>
13 
14 namespace mrpt::obs
15 {
16 /** Declares a class derived from "CObservation" that encapsules a single
17  * short-range reflectivity measurement.
18  * This can be used for example to store readings from IR sensors (Lego
19  * Mindstorm NXT, etc...).
20  *
21  * \sa mrpt::obs::CReflectivityGridMap2D, CObservation
22  * \ingroup mrpt_obs_grp
23  */
25 {
27 
28  public:
29  /** The read reflectivity level, in the range [0,1] (0=black, 1=white).
30  */
31  float reflectivityLevel{0.5f};
32 
33  /** The channel for this observation. If channel=-1, it can be inserted into
34  * any CReflectivityGridMap2D. Otherwise, it can only be inserted into
35  * reflectivity maps with the same channel. (Default=-1)
36  */
37  int16_t channel{-1};
38 
39  /** The pose of this sensor in robot's local coordinates.
40  */
42 
43  /** 1-sigma of the sensor Gaussian noise (in the same normalized units than
44  * \a reflectivityLevel)
45  */
46  float sensorStdNoise{0.2f};
47 
48  // See base class docs
49  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
50  {
51  out_sensorPose = sensorPose;
52  }
53  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
54  {
55  sensorPose = newSensorPose;
56  }
57  void getDescriptionAsText(std::ostream& o) const override;
58 
59 }; // End of class def.
60 
61 } // namespace mrpt::obs
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:152
mrpt::obs::CObservationReflectivity
Declares a class derived from "CObservation" that encapsules a single short-range reflectivity measur...
Definition: CObservationReflectivity.h:24
mrpt::obs::CObservationReflectivity::getDescriptionAsText
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Definition: CObservationReflectivity.cpp:48
mrpt::obs::CObservationReflectivity::sensorStdNoise
float sensorStdNoise
1-sigma of the sensor Gaussian noise (in the same normalized units than reflectivityLevel)
Definition: CObservationReflectivity.h:46
mrpt::obs::CObservationReflectivity::reflectivityLevel
float reflectivityLevel
The read reflectivity level, in the range [0,1] (0=black, 1=white).
Definition: CObservationReflectivity.h:31
mrpt::obs
This namespace contains representation of robot actions and observations.
Definition: CParticleFilter.h:17
mrpt::obs::CObservationReflectivity::channel
int16_t channel
The channel for this observation.
Definition: CObservationReflectivity.h:37
mrpt::obs::CObservationReflectivity::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
Definition: CObservationReflectivity.h:49
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
CPose3D.h
CObservation.h
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
mrpt::obs::CObservationReflectivity::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
Definition: CObservationReflectivity.h:53
mrpt::obs::CObservationReflectivity::sensorPose
mrpt::poses::CPose3D sensorPose
The pose of this sensor in robot's local coordinates.
Definition: CObservationReflectivity.h:41



Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Fri May 29 13:06:46 UTC 2020