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-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
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  using TMeasurementList = std::vector<TMeasurement>;
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
mrpt::obs::CObservationBearingRange::TMeasurement
Each one of the measurements:
Definition: CObservationBearingRange.h:56
mrpt::obs::CObservationBearingRange::sensor_std_yaw
float sensor_std_yaw
Definition: CObservationBearingRange.h:96
mrpt::obs::CObservationBearingRange::CObservationBearingRange
CObservationBearingRange()
Default constructor.
Definition: CObservationBearingRange.cpp:29
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::obs::CObservationBearingRange::TMeasurement::pitch
float pitch
Definition: CObservationBearingRange.h:66
mrpt::obs::CObservationBearingRange::sensedData
TMeasurementList sensedData
The list of observed ranges:
Definition: CObservationBearingRange.h:80
mrpt::obs::CObservationBearingRange::validCovariances
bool validCovariances
True: The individual 3x3 covariance matrices must be taken into account, false (default): All the mea...
Definition: CObservationBearingRange.h:87
mrpt::obs::CObservationBearingRange::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
Definition: CObservationBearingRange.h:103
mrpt::obs::CObservationBearingRange::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
Definition: CObservationBearingRange.h:107
mrpt::obs::CObservationBearingRange::TMeasurement::yaw
float yaw
The sensed landmark direction, in radians, measured as the yaw (azimuth) and pitch (negative elevatio...
Definition: CObservationBearingRange.h:66
mrpt::obs::CObservationBearingRange::TMeasurement::landmarkID
int32_t landmarkID
The ID of the sensed beacon, or INVALID_LANDMARK_ID (-1) if the sensor does not identify the landmark...
Definition: CObservationBearingRange.h:70
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::obs::CObservationBearingRange::TMeasurement::covariance
mrpt::math::CMatrixDouble33 covariance
The covariance matrix of the landmark, with variable indices [0,1,2] being [range,...
Definition: CObservationBearingRange.h:74
mrpt::obs::CObservationBearingRange::maxSensorDistance
float maxSensorDistance
Definition: CObservationBearingRange.h:40
mrpt::obs::CObservationBearingRange
This observation represents a number of range-bearing value pairs, each one for a detected landmark,...
Definition: CObservationBearingRange.h:31
mrpt::obs::CObservationBearingRange::sensorLocationOnRobot
mrpt::poses::CPose3D sensorLocationOnRobot
The position of the sensor on the robot.
Definition: CObservationBearingRange.h:52
mrpt::obs::CObservationBearingRange::debugPrintOut
void debugPrintOut()
Prints out the contents of the object.
Definition: CObservationBearingRange.cpp:158
mrpt::math::CMatrixFixedNumeric< double, 3, 3 >
CPose3D.h
int32_t
__int32 int32_t
Definition: rptypes.h:46
mrpt::obs::CObservationBearingRange::fieldOfView_pitch
float fieldOfView_pitch
Information about the sensor: The "field-of-view" of the sensor, in radians (for pitch ).
Definition: CObservationBearingRange.h:48
mrpt::obs::CObservationBearingRange::sensor_std_pitch
float sensor_std_pitch
Definition: CObservationBearingRange.h:96
mrpt::obs::CObservationBearingRange::sensor_std_range
float sensor_std_range
Taken into account only if validCovariances=false: the standard deviation of the sensor noise model f...
Definition: CObservationBearingRange.h:96
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::CObservationBearingRange::fieldOfView_yaw
float fieldOfView_yaw
Information about the.
Definition: CObservationBearingRange.h:45
mrpt::obs::CObservationBearingRange::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: CObservationBearingRange.cpp:180
mrpt::obs::CObservationBearingRange::minSensorDistance
float minSensorDistance
Definition: CObservationBearingRange.h:40
mrpt::obs::CObservationBearingRange::TMeasurement::range
float range
The sensed landmark distance, in meters.
Definition: CObservationBearingRange.h:59
CSerializable.h
mrpt::obs::CObservationBearingRange::TMeasurementList
std::vector< TMeasurement > TMeasurementList
Definition: CObservationBearingRange.h:77



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