Main MRPT website > C++ reference for MRPT 1.5.9
obs/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  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationBearingRange , CObservation, OBS_IMPEXP)
21 
22  /** This observation represents a number of range-bearing value pairs, each one for a detected landmark, which optionally can have identification IDs.
23  * This class can manage sensors that detect landmarks in a 2D plane (e.g. a 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 sensors, the pitch must be always set to 0.
25  * See CObservationBearingRange::validCovariances for the instructions to fill the uncertainty covariances.
26  * \sa CObservation
27  * \ingroup mrpt_obs_grp
28  */
30  {
31  // This must be added to any CSerializable derived class:
33 
34  public:
35  /** Default constructor.
36  */
38 
39  float minSensorDistance, maxSensorDistance; //! Information about the sensor: Ranges, in meters (0: there is no limits)
40  float fieldOfView_yaw; //!< Information about the sensor: The "field-of-view" of the sensor, in radians (for yaw ).
41  float fieldOfView_pitch; //!< Information about the sensor: The "field-of-view" of the sensor, in radians (for pitch ).
42 
43  /** The position of the sensor on the robot.
44  */
46 
47  /** Each one of the measurements:
48  */
50  {
51  /** The sensed landmark distance, in meters. */
52  float range;
53 
54  /** The sensed landmark direction, in radians, measured as the yaw (azimuth) and pitch (negative elevation).
55  * Set pitch to zero for 2D sensors.
56  * See mrpt::poses::CPose3D for a definition of the 3D angles.
57  */
58  float yaw,pitch;
59 
60  /** The ID of the sensed beacon, or INVALID_LANDMARK_ID (-1) if the sensor does not identify the landmark. */
62 
63  /** The covariance matrix of the landmark, with variable indices [0,1,2] being [range,yaw,pitch]. */
65  };
66 
67  typedef std::vector<TMeasurement> TMeasurementList;
68 
69  /** The list of observed ranges: */
71 
72  /** True: The individual 3x3 covariance matrices must be taken into account, false (default): All the measurements have identical, diagonal 3x3 covariance matrices given by the values sensor_std_range,sensor_std_yaw,sensor_std_pitch.
73  */
75 
76  /** Taken into account only if validCovariances=false: the standard deviation of the sensor noise model for range,yaw and pitch (in meters and radians).
77  * If validCovariances=true, these 3 values are ignored and the individual 3x3 covariance matrices contain the actual uncertainties for each of the detected landmarks.
78  */
79  float sensor_std_range,sensor_std_yaw,sensor_std_pitch;
80 
81  /** Prints out the contents of the object.
82  */
83  void debugPrintOut();
84 
85  // See base class docs
86  void getSensorPose( mrpt::poses::CPose3D &out_sensorPose ) const MRPT_OVERRIDE { out_sensorPose = sensorLocationOnRobot; }
87  void setSensorPose( const mrpt::poses::CPose3D &newSensorPose ) MRPT_OVERRIDE { sensorLocationOnRobot = newSensorPose; }
88  void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;
89 
90  }; // End of class def.
91  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CObservationBearingRange , CObservation, OBS_IMPEXP)
92 
93 
94  } // End of namespace
95 } // End of namespace
96 
97 #endif
float fieldOfView_yaw
Information about the sensor: Ranges, in meters (0: there is no limits)
float range
The sensed landmark distance, in meters.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
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...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
float fieldOfView_pitch
Information about the sensor: The "field-of-view" of the sensor, in radians (for pitch )...
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
mrpt::poses::CPose3D sensorLocationOnRobot
The position of the sensor on the robot.
__int32 int32_t
Definition: rptypes.h:48
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:72
Declares a class that represents any robot&#39;s observation.
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...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
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.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020