Main MRPT website > C++ reference
MRPT logo
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-2014, 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/slam/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 slam
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)
71  */
73 
74 
75  /** Prints out the contents of the object.
76  */
77  void debugPrintOut();
78 
79  /** A general method to retrieve the sensor pose on the robot.
80  * Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases.
81  * \sa setSensorPose
82  */
83  void getSensorPose( CPose3D &out_sensorPose ) const;
84 
85 
86  /** A general method to change the sensor pose on the robot.
87  * Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.
88  * \sa getSensorPose
89  */
90  void setSensorPose( const CPose3D &newSensorPose );
91 
92  /** Easy look-up into the vector sensedData, returns the range for a given beacon, or 0 if the beacon is not observed.
93  */
94  float getSensedRangeByBeaconID(int32_t beaconID);
95 
96  }; // End of class def.
97 
98 
99  } // End of namespace
100 } // End of namespace
101 
102 #endif
CPose2D auxEstimatePose
The (X,Y,PHI) pose estimated by the UWB software, for comparison purposes (Added in streamming versio...
std::deque< TMeasurement > sensedData
The list of observed ranges:
CPoint3D sensorLocationOnRobot
The position of the sensor on the robot.
float minSensorDistance
Information about the sensor:
#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...
float sensedDistance
The sensed range itself (in meters).
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:61
float stdError
The "sigma" of the sensor, assuming a zero-mean Gaussian noise model.
A class used to store a 3D point.
Definition: CPoint3D.h:33
#define INVALID_BEACON_ID
Used for CObservationBeaconRange.
Definition: CObservation.h:46
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:35
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:71
int32_t beaconID
The ID of the sensed beacon (or INVALID_BEACON_ID)
Declares a class derived from "CObservation" that represents one (or more) range measurements to labe...



Page generated by Doxygen 1.8.14 for MRPT 1.1.0 SVN: at lun oct 28 00:54:49 CET 2019 Hosted on:
SourceForge.net Logo