Main MRPT website > C++ reference for MRPT 1.5.7
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-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 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  CObservationBeaconRanges( ); //!< ctor
35 
36  float minSensorDistance, maxSensorDistance; //!< Info about sensor
37  float stdError; //!< The "sigma" of the sensor, assuming a zero-mean Gaussian noise model.
38 
39  /** Each one of the measurements */
41  {
42  TMeasurement() : sensorLocationOnRobot(), sensedDistance(0),beaconID(INVALID_BEACON_ID)
43  {}
44 
45  mrpt::poses::CPoint3D sensorLocationOnRobot; //!< Position of the sensor on the robot
46  float sensedDistance; //!< The sensed range itself (in meters).
47  int32_t beaconID; //!< The ID of the sensed beacon (or INVALID_BEACON_ID if unknown)
48  };
49 
50  std::deque<TMeasurement> sensedData; //!< The list of observed ranges
51 
52  mrpt::poses::CPose2D auxEstimatePose; //!< The (X,Y,PHI) pose estimated by the UWB software, for comparison purposes (Added in streamming version 1)
53 
54 
55  void debugPrintOut(); //!< Prints out the contents of the object */
56 
57  void getSensorPose( mrpt::poses::CPose3D &out_sensorPose ) const MRPT_OVERRIDE;// See base class docs.
58  void setSensorPose( const mrpt::poses::CPose3D &newSensorPose ) MRPT_OVERRIDE;// See base class docs.
59  void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;// See base class docs
60 
61  /** Easy look-up into the vector sensedData, returns the range for a given beacon, or 0 if the beacon is not observed */
62  float getSensedRangeByBeaconID(int32_t beaconID);
63 
64  }; // End of class def.
66 
67  } // End of namespace
68 } // End of namespace
69 
70 #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 if unknown)
#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 stdError
The "sigma" of the sensor, assuming a zero-mean Gaussian noise model.
float sensedDistance
The sensed range itself (in meters).
#define INVALID_BEACON_ID
Used for CObservationBeaconRange, CBeacon, etc.
__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 2D pose, including the 2D coordinate point and a heading (phi) angle...
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
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.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019