Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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
14#include <mrpt/poses/CPose3D.h>
15
16namespace mrpt
17{
18namespace obs
19{
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. */
61 int32_t landmarkID;
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 */
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.
92
93
94 } // End of namespace
95} // End of namespace
96
97#endif
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#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...
A numeric matrix of compile-time fixed size.
This observation represents a number of range-bearing value pairs, each one for a detected landmark,...
void debugPrintOut()
Prints out the contents of the object.
TMeasurementList sensedData
The list of observed ranges:
void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
CObservationBearingRange()
Default constructor.
float fieldOfView_pitch
Information about the sensor: The "field-of-view" of the sensor, in radians (for pitch ).
bool validCovariances
True: The individual 3x3 covariance matrices must be taken into account, false (default): All the mea...
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
mrpt::poses::CPose3D sensorLocationOnRobot
The position of the sensor on the robot.
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
float fieldOfView_yaw
Information about the sensor: Ranges, in meters (0: there is no limits)
Declares a class that represents any robot's observation.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:73
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition: mrpt_macros.h:28
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::math::CMatrixDouble33 covariance
The covariance matrix of the landmark, with variable indices [0,1,2] being [range,...
float range
The sensed landmark distance, in meters.
int32_t landmarkID
The ID of the sensed beacon, or INVALID_LANDMARK_ID (-1) if the sensor does not identify the landmark...



Page generated by Doxygen 1.9.2 for MRPT 1.4.0 SVN: at Mon Sep 20 00:36:32 UTC 2021