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 {
22  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationBeaconRanges, CObservation, OBS_IMPEXP )
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
mrpt::poses::CPose2D auxEstimatePose
The (X,Y,PHI) pose estimated by the UWB software, for comparison purposes (Added in streamming versio...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Declares a class derived from "CObservation" that represents one (or more) range measurements to labe...
int32_t beaconID
The ID of the sensed beacon (or INVALID_BEACON_ID)
#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...
std::deque< TMeasurement > sensedData
The list of observed ranges:
A class used to store a 3D point.
Definition: CPoint3D.h:32
float sensedDistance
The sensed range itself (in meters).
#define INVALID_BEACON_ID
Used for CObservationBeaconRange.
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 2D pose.
Definition: CPose2D.h:36
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.
mrpt::poses::CPoint3D sensorLocationOnRobot
The position of the sensor on the robot.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)



Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN: at Mon Aug 15 11:50:21 UTC 2016