MRPT  1.9.9
CObservationBearingRange.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-2019, 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>
14 
15 namespace mrpt::obs
16 {
17 /** This observation represents a number of range-bearing value pairs, each one
18  * for a detected landmark, which optionally can have identification IDs.
19  * This class can manage sensors that detect landmarks in a 2D plane (e.g. a
20  * laser scanner) or in the 3D space (e.g. a camera). There are
21  * two direction angles: yaw (azimuth) and pitch (negative elevation). For 2D
22  * sensors, the pitch must be always set to 0.
23  * See CObservationBearingRange::validCovariances for the instructions to fill
24  * the uncertainty covariances.
25  * \sa CObservation
26  * \ingroup mrpt_obs_grp
27  */
29 {
31 
32  public:
33  /** Default constructor.
34  */
36 
37  float minSensorDistance{0}, maxSensorDistance{0}; //! Information about the
38  //! sensor: Ranges, in meters
39  //! (0: there is no limits)
40  /** Information about the sensor: The "field-of-view" of the sensor, in
41  * radians (for yaw ). */
43  /** Information about the sensor: The "field-of-view" of the sensor, in
44  * radians (for pitch ). */
46 
47  /** The position of the sensor on the robot.
48  */
50 
51  /** Each one of the measurements:
52  */
53  struct TMeasurement
54  {
55  /** The sensed landmark distance, in meters. */
56  float range;
57 
58  /** The sensed landmark direction, in radians, measured as the yaw
59  * (azimuth) and pitch (negative elevation).
60  * Set pitch to zero for 2D sensors.
61  * See mrpt::poses::CPose3D for a definition of the 3D angles.
62  */
63  float yaw, pitch;
64 
65  /** The ID of the sensed beacon, or INVALID_LANDMARK_ID (-1) if the
66  * sensor does not identify the landmark. */
68 
69  /** The covariance matrix of the landmark, with variable indices [0,1,2]
70  * being [range,yaw,pitch]. */
72  };
73 
74  using TMeasurementList = std::vector<TMeasurement>;
75 
76  /** The list of observed ranges: */
78 
79  /** True: The individual 3x3 covariance matrices must be taken into account,
80  * false (default): All the measurements have identical, diagonal 3x3
81  * covariance matrices given by the values
82  * sensor_std_range,sensor_std_yaw,sensor_std_pitch.
83  */
84  bool validCovariances{false};
85 
86  /** Taken into account only if validCovariances=false: the standard
87  * deviation of the sensor noise model for range,yaw and pitch (in meters
88  * and radians).
89  * If validCovariances=true, these 3 values are ignored and the individual
90  * 3x3 covariance matrices contain the actual uncertainties for each of the
91  * detected landmarks.
92  */
94 
95  /** Prints out the contents of the object.
96  */
97  void debugPrintOut();
98 
99  // See base class docs
100  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override
101  {
102  out_sensorPose = sensorLocationOnRobot;
103  }
104  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override
105  {
106  sensorLocationOnRobot = newSensorPose;
107  }
108  void getDescriptionAsText(std::ostream& o) const override;
109 
110 }; // End of class def.
111 
112 } // namespace mrpt::obs
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:49
#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:84
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: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019