38 const uint32_t Ntags = tag_readings.size();
43 for (
uint32_t i = 0; i < Ntags; i++) out << tag_readings[i].power;
44 for (
uint32_t i = 0; i < Ntags; i++) out << tag_readings[i].epc;
45 for (
uint32_t i = 0; i < Ntags; i++) out << tag_readings[i].antennaPort;
49 out << sensorPoseOnRobot;
72 Ntags = atoi(ntags.c_str());
81 tag_readings.resize(Ntags);
82 for (
uint32_t i = 0; i < Ntags; i++) in >> tag_readings[i].power;
83 for (
uint32_t i = 0; i < Ntags; i++) in >> tag_readings[i].epc;
85 in >> tag_readings[i].antennaPort;
98 in >> sensorPoseOnRobot;
110 out_sensorPose = sensorPoseOnRobot;
115 sensorPoseOnRobot = newSensorPose;
122 std::cout <<
"Number of RFID tags sensed: " << tag_readings.size()
126 for (
size_t i = 0; i < tag_readings.size(); i++)
129 std::cout <<
"#" << i <<
": Power=" << rfid.
power 131 <<
" | EPC=" << rfid.
epc << std::endl;
std::string antennaPort
Port of the antenna that did the reading.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
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)
GLsizei const GLchar ** string
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents any robot's observation.
Each of the individual readings of a RFID tag.
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.
unsigned __int32 uint32_t
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const override
Introduces a pure virtual method responsible for writing to a CStream.