MRPT  2.0.3
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
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:152
mrpt::obs::CObservationRFID::CObservationRFID
CObservationRFID()
Constructor.
Definition: CObservationRFID.cpp:23
mrpt::obs::CObservationRFID::getNtags
uint32_t getNtags() const
Definition: CObservationRFID.h:53
mrpt::obs::CObservationRFID::TTagReading::antennaPort
std::string antennaPort
Port of the antenna that did the reading.
Definition: CObservationRFID.h:47
mrpt::obs::CObservationRFID::tag_readings
std::vector< TTagReading > tag_readings
The vector of individual tag observations.
Definition: CObservationRFID.h:51
mrpt::obs::CObservationRFID::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
Definition: CObservationRFID.cpp:99
CPose2D.h
mrpt::obs
This namespace contains representation of robot actions and observations.
Definition: CParticleFilter.h:17
mrpt::obs::CObservationRFID::getDescriptionAsText
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Definition: CObservationRFID.cpp:104
mrpt::obs::CObservationRFID::sensorPoseOnRobot
mrpt::poses::CPose3D sensorPoseOnRobot
The location of the sensing antenna on the robot coordinate framework.
Definition: CObservationRFID.h:35
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
CPose3D.h
mrpt::obs::CObservationRFID::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
Definition: CObservationRFID.cpp:94
CObservation.h
mrpt::obs::CObservationRFID
This represents one or more RFID tags observed by a receiver.
Definition: CObservationRFID.h:24
mrpt::obs::CObservationRFID::TTagReading::TTagReading
TTagReading()=default
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
mrpt::obs::CObservationRFID::TTagReading
Each of the individual readings of a RFID tag.
Definition: CObservationRFID.h:38
mrpt::obs::CObservationRFID::TTagReading::power
double power
The power or signal strength as sensed by the RFID receiver (in dBm)
Definition: CObservationRFID.h:43
CSerializable.h
mrpt::obs::CObservationRFID::TTagReading::epc
std::string epc
EPC code of the observed tag.
Definition: CObservationRFID.h:45



Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Fri May 29 13:06:46 UTC 2020