Main MRPT website > C++ reference for MRPT 1.9.9
CObservationRange.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CObservationRange_H
10 #define CObservationRange_H
11 
13 #include <mrpt/obs/CObservation.h>
14 #include <mrpt/poses/CPose3D.h>
15 #include <mrpt/poses/CPose2D.h>
16 
17 namespace mrpt
18 {
19 namespace obs
20 {
21 /** Declares a class derived from "CObservation" that
22  encapsules a single range measurement, and associated parameters. This
23  can be used
24  * for example to store measurements from infrared proximity sensors (IR) or
25  ultrasonic sensors (sonars).
26  *
27  * \sa CObservation
28  * \ingroup mrpt_obs_grp
29  */
31 {
33 
34  public:
35  /** Default constructor.
36  */
38 
39  /** The data members
40  */
43  /** Cone aperture of each ultrasonic beam, in radians. */
45 
46  struct TMeasurement
47  {
49  /** Some kind of sensor ID which identifies it on the bus (if
50  * applicable, 0 otherwise)
51  */
53 
54  /** The 6D position of the sensor on the robot.
55  */
57 
58  /** The measured range, in meters (or a value of 0 if there was no
59  * detected echo).
60  */
62  };
63 
64  typedef std::deque<TMeasurement> TMeasurementList;
67 
68  /** All the measurements */
70 
71  iterator begin() { return sensedData.begin(); }
72  iterator end() { return sensedData.end(); }
73  const_iterator begin() const { return sensedData.begin(); }
74  const_iterator end() const { return sensedData.end(); }
75  // See base class docs
76  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override;
77  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override;
78  void getDescriptionAsText(std::ostream& o) const override;
79 
80 }; // End of class def.
81 } // End of namespace
82 } // End of namespace
83 #endif
const_iterator begin() const
Declares a class derived from "CObservation" that encapsules a single range measurement, and associated parameters.
unsigned __int16 uint16_t
Definition: rptypes.h:44
const_iterator end() const
float minSensorDistance
The data members.
float sensorConeApperture
Cone aperture of each ultrasonic beam, in radians.
Scalar * iterator
Definition: eigen_plugins.h:26
const Scalar * const_iterator
Definition: eigen_plugins.h:27
CObservationRange()
Default constructor.
std::deque< TMeasurement > TMeasurementList
std::deque< TMeasurement >::const_iterator const_iterator
float sensedDistance
The measured range, in meters (or a value of 0 if there was no detected echo).
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
uint16_t sensorID
Some kind of sensor ID which identifies it on the bus (if applicable, 0 otherwise) ...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:41
math::TPose3D sensorPose
The 6D position of the sensor on the robot.
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
std::deque< TMeasurement >::iterator iterator
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
TMeasurementList sensedData
All the measurements.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019