Main MRPT website > C++ reference for MRPT 1.4.0
obs/CObservationBeaconRanges.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 CObservationBeaconRanges_H
10 #define CObservationBeaconRanges_H
11 
13 #include <mrpt/obs/CObservation.h>
14 #include <mrpt/poses/CPoint3D.h>
15 #include <mrpt/poses/CPose2D.h>
16 #include <mrpt/poses/CPose3D.h>
17 
18 namespace mrpt
19 {
20 namespace obs
21 {
23 
24  /** Declares a class derived from "CObservation" that represents one (or more) range measurements to labeled beacons.
25  * \sa CObservation
26  * \ingroup mrpt_obs_grp
27  */
29  {
30  // This must be added to any CSerializable derived class:
32 
33  public:
34  /** Default constructor.
35  */
37 
38  /** Information about the sensor:
39  */
40  float minSensorDistance, maxSensorDistance;
41 
42  /** The "sigma" of the sensor, assuming a zero-mean Gaussian noise model.
43  */
44  float stdError;
45 
46  /** Each one of the measurements:
47  */
49  {
50  TMeasurement() : sensorLocationOnRobot(), sensedDistance(0),beaconID(INVALID_BEACON_ID)
51  {}
52 
53  /** The position of the sensor on the robot.
54  */
56 
57  /** The sensed range itself (in meters).
58  */
60 
61  /** The ID of the sensed beacon (or INVALID_BEACON_ID)
62  */
63  int32_t beaconID;
64  };
65 
66  /** The list of observed ranges:
67  */
68  std::deque<TMeasurement> sensedData;
69 
70  /** The (X,Y,PHI) pose estimated by the UWB software, for comparison purposes (Added in streamming version 1) */
72 
73  /** Prints out the contents of the object.
74  */
75  void debugPrintOut();
76 
77  void getSensorPose( mrpt::poses::CPose3D &out_sensorPose ) const MRPT_OVERRIDE;// See base class docs.
78  void setSensorPose( const mrpt::poses::CPose3D &newSensorPose ) MRPT_OVERRIDE;// See base class docs.
79  void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;// See base class docs
80 
81  /** Easy look-up into the vector sensedData, returns the range for a given beacon, or 0 if the beacon is not observed.
82  */
83  float getSensedRangeByBeaconID(int32_t beaconID);
84 
85  }; // End of class def.
87 
88 
89  } // End of namespace
90 } // End of namespace
91 
92 #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...
Declares a class derived from "CObservation" that represents one (or more) range measurements to labe...
float stdError
The "sigma" of the sensor, assuming a zero-mean Gaussian noise model.
float getSensedRangeByBeaconID(int32_t beaconID)
Easy look-up into the vector sensedData, returns the range for a given beacon, or 0 if the beacon is ...
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
mrpt::poses::CPose2D auxEstimatePose
The (X,Y,PHI) pose estimated by the UWB software, for comparison purposes (Added in streamming versio...
void debugPrintOut()
Prints out the contents of the object.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
CObservationBeaconRanges()
Default constructor.
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...
std::deque< TMeasurement > sensedData
The list of observed ranges:
Declares a class that represents any robot's observation.
A class used to store a 3D point.
Definition: CPoint3D.h:33
A class used to store a 2D pose.
Definition: CPose2D.h:37
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:73
#define INVALID_BEACON_ID
Used for CObservationBeaconRange.
#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::poses::CPoint3D sensorLocationOnRobot
The position of the sensor on the robot.
int32_t beaconID
The ID of the sensed beacon (or INVALID_BEACON_ID)
float sensedDistance
The sensed range itself (in meters).



Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Sat Jan 30 21:34:41 UTC 2021