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-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
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  using TMeasurementList = std::deque<TMeasurement>;
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
const Scalar * const_iterator
Definition: eigen_plugins.h:27
uint16_t
unsigned __int16 uint16_t
Definition: rptypes.h:44
mrpt::obs::CObservationRange::begin
iterator begin()
Definition: CObservationRange.h:71
mrpt::obs::CObservationRange::iterator
std::deque< TMeasurement >::iterator iterator
Definition: CObservationRange.h:66
mrpt::obs::CObservationRange::const_iterator
std::deque< TMeasurement >::const_iterator const_iterator
Definition: CObservationRange.h:65
mrpt::obs::CObservationRange::TMeasurement
Definition: CObservationRange.h:46
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
CPose2D.h
mrpt::obs::CObservationRange::TMeasurement::sensedDistance
float sensedDistance
The measured range, in meters (or a value of 0 if there was no detected echo).
Definition: CObservationRange.h:61
mrpt::obs::CObservationRange::TMeasurementList
std::deque< TMeasurement > TMeasurementList
Definition: CObservationRange.h:64
mrpt::obs::CObservationRange::sensedData
TMeasurementList sensedData
All the measurements.
Definition: CObservationRange.h:69
mrpt::obs::CObservationRange::TMeasurement::sensorID
uint16_t sensorID
Some kind of sensor ID which identifies it on the bus (if applicable, 0 otherwise)
Definition: CObservationRange.h:52
mrpt::obs::CObservationRange::sensorConeApperture
float sensorConeApperture
Cone aperture of each ultrasonic beam, in radians.
Definition: CObservationRange.h:44
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::obs::CObservationRange::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
Definition: CObservationRange.cpp:103
mrpt::obs::CObservationRange::CObservationRange
CObservationRange()
Default constructor.
Definition: CObservationRange.cpp:23
mrpt::math::TPose3D
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
Definition: lightweight_geom_data.h:603
mrpt::obs::CObservationRange::end
const_iterator end() const
Definition: CObservationRange.h:74
mrpt::obs::CObservationRange::minSensorDistance
float minSensorDistance
The data members.
Definition: CObservationRange.h:41
mrpt::obs::CObservationRange::TMeasurement::sensorPose
math::TPose3D sensorPose
The 6D position of the sensor on the robot.
Definition: CObservationRange.h:56
CPose3D.h
mrpt::obs::CObservationRange
Declares a class derived from "CObservation" that encapsules a single range measurement,...
Definition: CObservationRange.h:30
mrpt::obs::CObservationRange::maxSensorDistance
float maxSensorDistance
Definition: CObservationRange.h:42
mrpt::obs::CObservationRange::begin
const_iterator begin() const
Definition: CObservationRange.h:73
mrpt::obs::CObservationRange::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: CObservationRange.cpp:108
CObservation.h
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:102
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
mrpt::obs::CObservationRange::TMeasurement::TMeasurement
TMeasurement()
Definition: CObservationRange.h:48
mrpt::obs::CObservationRange::end
iterator end()
Definition: CObservationRange.h:72
iterator
Scalar * iterator
Definition: eigen_plugins.h:26
CSerializable.h
mrpt::obs::CObservationRange::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
Definition: CObservationRange.cpp:92



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST