MRPT  2.0.4
CObservationRFID.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/CPose2D.h>
13 #include <mrpt/poses/CPose3D.h>
15 
16 namespace mrpt::obs
17 {
18 /** This represents one or more RFID tags observed by a receiver.
19  *
20  * \sa CObservation, mrpt::hwdrivers::CImpinjRFID for a software sensor capable
21  * of reading this kind of observations.
22  * \ingroup mrpt_obs_grp
23  */
25 {
27 
28  public:
29  /** Constructor */
31 
32  /** @name The data members
33  * @{ */
34  /** The location of the sensing antenna on the robot coordinate framework */
36 
37  /** Each of the individual readings of a RFID tag */
38  struct TTagReading
39  {
40  TTagReading() = default;
41  /** The power or signal strength as sensed by the RFID receiver (in dBm)
42  */
43  double power{-1000};
44  /** EPC code of the observed tag */
45  std::string epc;
46  /** Port of the antenna that did the reading */
47  std::string antennaPort;
48  };
49 
50  /** The vector of individual tag observations */
51  std::vector<TTagReading> tag_readings;
52 
53  inline uint32_t getNtags() const { return tag_readings.size(); }
54  /** @} */
55 
56  void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const override;
57  /** A general method to change the sensor pose on the robot.
58  * It has no effects in this class
59  * \sa getSensorPose */
60  void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) override;
61  // See base class docs
62  void getDescriptionAsText(std::ostream& o) const override;
63 
64 }; // End of class def.
65 
66 } // namespace mrpt::obs
std::string antennaPort
Port of the antenna that did the reading.
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.
mrpt::poses::CPose3D sensorPoseOnRobot
The location of the sensing antenna on the robot coordinate framework.
std::string epc
EPC code of the observed tag.
This namespace contains representation of robot actions and observations.
double power
The power or signal strength as sensed by the RFID receiver (in dBm)
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
std::vector< TTagReading > tag_readings
The vector of individual tag observations.
Each of the individual readings of a RFID tag.
#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...
This represents one or more RFID tags observed by a receiver.



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