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