MRPT  1.9.9
CObservationBearingRange.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 CObservationBearingRange_H
10 #define CObservationBearingRange_H
11 
13 #include <mrpt/obs/CObservation.h>
14 #include <mrpt/poses/CPose3D.h>
15 
16 namespace mrpt::obs
17 {
18 /** This observation represents a number of range-bearing value pairs, each one
19  * for a detected landmark, which optionally can have identification IDs.
20  * This class can manage sensors that detect landmarks in a 2D plane (e.g. a
21  * laser scanner) or in the 3D space (e.g. a camera). There are
22  * two direction angles: yaw (azimuth) and pitch (negative elevation). For 2D
23  * sensors, the pitch must be always set to 0.
24  * See CObservationBearingRange::validCovariances for the instructions to fill
25  * the uncertainty covariances.
26  * \sa CObservation
27  * \ingroup mrpt_obs_grp
28  */
30 {
32 
33  public:
34  /** Default constructor.
35  */
37 
38  float minSensorDistance, maxSensorDistance; //! Information about the
39  //! sensor: Ranges, in meters
40  //! (0: there is no limits)
41  /** Information about the sensor: The "field-of-view" of the sensor, in
42  * radians (for yaw ). */
44  /** Information about the sensor: The "field-of-view" of the sensor, in
45  * radians (for pitch ). */
47 
48  /** The position of the sensor on the robot.
49  */
51 
52  /** Each one of the measurements:
53  */
54  struct TMeasurement
55  {
56  /** The sensed landmark distance, in meters. */
57  float range;
58 
59  /** The sensed landmark direction, in radians, measured as the yaw
60  * (azimuth) and pitch (negative elevation).
61  * Set pitch to zero for 2D sensors.
62  * See mrpt::poses::CPose3D for a definition of the 3D angles.
63  */
64  float yaw, pitch;
65 
66  /** The ID of the sensed beacon, or INVALID_LANDMARK_ID (-1) if the
67  * sensor does not identify the landmark. */
69 
70  /** The covariance matrix of the landmark, with variable indices [0,1,2]
71  * being [range,yaw,pitch]. */
73  };
74 
75  using TMeasurementList = std::vector<TMeasurement>;
76 
77  /** The list of observed ranges: */
79 
80  /** True: The individual 3x3 covariance matrices must be taken into account,
81  * false (default): All the measurements have identical, diagonal 3x3
82  * covariance matrices given by the values
83  * sensor_std_range,sensor_std_yaw,sensor_std_pitch.
84  */
86 
87  /** Taken into account only if validCovariances=false: the standard
88  * deviation of the sensor noise model for range,yaw and pitch (in meters
89  * and radians).
90  * If validCovariances=true, these 3 values are ignored and the individual
91  * 3x3 covariance matrices contain the actual uncertainties for each of the
92  * detected landmarks.
93  */
95 
96  /** Prints out the contents of the object.
97  */
98  void debugPrintOut();
99 
100  // See base class docs
101  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
102  {
103  out_sensorPose = sensorLocationOnRobot;
104  }
105  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
106  {
107  sensorLocationOnRobot = newSensorPose;
108  }
109  void getDescriptionAsText(std::ostream& o) const override;
110 
111 }; // End of class def.
112 
113 }
114 #endif
115 
116 
float fieldOfView_yaw
Information about the.
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
float range
The sensed landmark distance, in meters.
float yaw
The sensed landmark direction, in radians, measured as the yaw (azimuth) and pitch (negative elevatio...
int32_t landmarkID
The ID of the sensed beacon, or INVALID_LANDMARK_ID (-1) if the sensor does not identify the landmark...
std::vector< TMeasurement > TMeasurementList
float fieldOfView_pitch
Information about the sensor: The "field-of-view" of the sensor, in radians (for pitch )...
This namespace contains representation of robot actions and observations.
mrpt::poses::CPose3D sensorLocationOnRobot
The position of the sensor on the robot.
__int32 int32_t
Definition: rptypes.h:46
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
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
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
This observation represents a number of range-bearing value pairs, each one for a detected landmark...
bool validCovariances
True: The individual 3x3 covariance matrices must be taken into account, false (default): All the mea...
void debugPrintOut()
Prints out the contents of the object.
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 sensor_std_range
Taken into account only if validCovariances=false: the standard deviation of the sensor noise model f...
TMeasurementList sensedData
The list of observed ranges:
mrpt::math::CMatrixDouble33 covariance
The covariance matrix of the landmark, with variable indices [0,1,2] being [range,yaw,pitch].



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