MRPT  2.0.4
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
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
float reflectivityLevel
The read reflectivity level, in the range [0,1] (0=black, 1=white).
Declares a class derived from "CObservation" that encapsules a single short-range reflectivity measur...
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
float sensorStdNoise
1-sigma of the sensor Gaussian noise (in the same normalized units than reflectivityLevel) ...
mrpt::poses::CPose3D sensorPose
The pose of this sensor in robot&#39;s local coordinates.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
This namespace contains representation of robot actions and observations.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
int16_t channel
The channel for this observation.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020