Go to the documentation of this file.
24 : minSensorDistance(0),
26 sensorConeApperture(
DEG2RAD(20)),
35 out << minSensorDistance << maxSensorDistance << sensorConeApperture;
39 out << sensedData[i].sensorID <<
CPose3D(sensedData[i].sensorPose)
40 << sensedData[i].sensedDistance;
41 out << sensorLabel << timestamp;
57 in >> minSensorDistance >> maxSensorDistance >> sensorConeApperture;
62 for (i = 0; i <
n; i++)
65 in >> sensedData[i].sensorID;
67 sensedData[i].sensorID = i;
69 in >> aux >> sensedData[i].sensedDistance;
70 sensedData[i].sensorPose = aux.
asTPose();
94 if (!sensedData.empty())
95 out_sensorPose =
CPose3D(sensedData[0].sensorPose);
97 out_sensorPose =
CPose3D(0, 0, 0);
105 for (
auto& sd : sensedData) sd.sensorPose = newSensorPose.
asTPose();
113 o <<
"minSensorDistance = " << minSensorDistance <<
" m" << endl;
114 o <<
"maxSensorDistance = " << maxSensorDistance <<
" m" << endl;
115 o <<
"sensorConeApperture = " <<
RAD2DEG(sensorConeApperture) <<
" deg"
119 o <<
" SENSOR_ID RANGE (m) SENSOR POSE (on the robot)" << endl;
120 o <<
"-------------------------------------------------------" << endl;
121 for (
size_t q = 0;
q < sensedData.size();
q++)
123 o <<
format(
" %7u", (
unsigned int)sensedData[
q].sensorID);
124 o <<
format(
" %4.03f ", sensedData[
q].sensedDistance);
125 o << sensedData[
q].sensorPose << endl;
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
GLdouble GLdouble GLdouble GLdouble q
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
double RAD2DEG(const double x)
Radians to degrees.
This namespace contains representation of robot actions and observations.
Virtual base class for "archives": classes abstracting I/O streams.
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
mrpt::math::TPose3D asTPose() const
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
Declares a class derived from "CObservation" that encapsules a single range measurement,...
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Declares a class that represents any robot's observation.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
unsigned __int32 uint32_t
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
double DEG2RAD(const double x)
Degrees to radians.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |