MRPT  2.0.4
CObservationBeaconRanges.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/obs/CObservation.h>
12 #include <mrpt/poses/CPoint3D.h>
13 #include <mrpt/poses/CPose2D.h>
14 #include <mrpt/poses/CPose3D.h>
16 
17 namespace mrpt::obs
18 {
19 /** Declares a class derived from "CObservation" that represents one (or more)
20  * range measurements to labeled beacons.
21  * \sa CObservation
22  * \ingroup mrpt_obs_grp
23  */
25 {
27 
28  public:
29  /** ctor */
31 
32  /** Info about sensor */
34  /** The "sigma" of the sensor, assuming a zero-mean Gaussian noise model. */
35  float stdError{1e-2f};
36 
37  /** Each one of the measurements */
38  struct TMeasurement
39  {
42 
44  {
45  }
46 
47  /** Position of the sensor on the robot */
49  /** The sensed range itself (in meters). */
50  float sensedDistance{0};
51  /** The ID of the sensed beacon (or INVALID_BEACON_ID if unknown) */
52  int32_t beaconID;
53  };
54 
55  /** The list of observed ranges */
56  std::deque<TMeasurement> sensedData;
57 
58  /** The (X,Y,PHI) pose estimated by the UWB software, for comparison
59  * purposes (Added in streamming version 1) */
61 
62  /** Prints out the contents of the object */
63  void debugPrintOut();
64 
65  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose)
66  const override; // See base class docs.
67  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose)
68  override; // See base class docs.
70  std::ostream& o) const override; // See base class docs
71 
72  /** Easy look-up into the vector sensedData, returns the range for a given
73  * beacon, or 0 if the beacon is not observed */
74  float getSensedRangeByBeaconID(int32_t beaconID);
75 
76 }; // End of class def.
77 
78 } // namespace mrpt::obs
mrpt::poses::CPose2D auxEstimatePose
The (X,Y,PHI) pose estimated by the UWB software, for comparison purposes (Added in streamming versio...
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
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)
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 ...
std::deque< TMeasurement > sensedData
The list of observed ranges.
This namespace contains representation of robot actions and observations.
A class used to store a 3D point.
Definition: CPoint3D.h:31
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.
Definition: CObservation.h:23
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
Definition: CPose2D.h:39
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
mrpt::poses::CPoint3D sensorLocationOnRobot
Position of the sensor on the robot.
void debugPrintOut()
Prints out the contents of the object.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020