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-2018, 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::obs
18 {
19 /** Declares a class derived from "CObservation" that
20  encapsules a single range measurement, and associated parameters. This
21  can be used
22  * for example to store measurements from infrared proximity sensors (IR) or
23  ultrasonic sensors (sonars).
24  *
25  * \sa CObservation
26  * \ingroup mrpt_obs_grp
27  */
29 {
31 
32  public:
33  /** Default constructor.
34  */
36 
37  /** The data members
38  */
41  /** Cone aperture of each ultrasonic beam, in radians. */
43 
44  struct TMeasurement
45  {
47  /** Some kind of sensor ID which identifies it on the bus (if
48  * applicable, 0 otherwise)
49  */
51 
52  /** The 6D position of the sensor on the robot.
53  */
55 
56  /** The measured range, in meters (or a value of 0 if there was no
57  * detected echo).
58  */
60  };
61 
62  using TMeasurementList = std::deque<TMeasurement>;
65 
66  /** All the measurements */
68 
69  iterator begin() { return sensedData.begin(); }
70  iterator end() { return sensedData.end(); }
71  const_iterator begin() const { return sensedData.begin(); }
72  const_iterator end() const { return sensedData.end(); }
73  // See base class docs
74  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override;
75  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override;
76  void getDescriptionAsText(std::ostream& o) const override;
77 
78 }; // End of class def.
79 }
80 #endif
81 
82 
const_iterator begin() const
Scalar * iterator
Definition: eigen_plugins.h:26
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.
std::deque< TMeasurement >::const_iterator const_iterator
std::deque< TMeasurement > TMeasurementList
CObservationRange()
Default constructor.
float sensedDistance
The measured range, in meters (or a value of 0 if there was no detected echo).
This namespace contains representation of robot actions and observations.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::deque< TMeasurement >::iterator iterator
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:86
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
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...
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
const Scalar * const_iterator
Definition: eigen_plugins.h:27
TMeasurementList sensedData
All the measurements.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020