27 minSensorDistance ( 0 ),
28 maxSensorDistance ( 5 ),
29 sensorConeApperture (
DEG2RAD(20) ),
46 out << minSensorDistance << maxSensorDistance << sensorConeApperture;
48 n = sensedData.size();
51 out << sensedData[i].sensorID <<
CPose3D(sensedData[i].sensorPose) << sensedData[i].sensedDistance;
73 in >> minSensorDistance >> maxSensorDistance >> sensorConeApperture;
81 in >> sensedData[i].sensorID;
82 else sensedData[i].sensorID = i;
84 in >> aux >> sensedData[i].sensedDistance;
85 sensedData[i].sensorPose = aux;
90 else sensorLabel =
"";
108 if (!sensedData.empty())
109 out_sensorPose =
CPose3D(sensedData[0].sensorPose);
110 else out_sensorPose =
CPose3D(0,0,0);
118 size_t i,
n = sensedData.size();
121 sensedData[i].sensorPose=newSensorPose;
130 o <<
"minSensorDistance = " << minSensorDistance <<
" m" << endl;
131 o <<
"maxSensorDistance = " << maxSensorDistance <<
" m" << endl;
132 o <<
"sensorConeApperture = " <<
RAD2DEG(sensorConeApperture) <<
" deg" << endl;
135 o <<
" SENSOR_ID RANGE (m) SENSOR POSE (on the robot)" << endl;
136 o <<
"-------------------------------------------------------" << endl;
137 for (
size_t q=0;
q<sensedData.size();
q++)
139 o <<
format(
" %7u",(
unsigned int)sensedData[
q].sensorID );
140 o <<
format(
" %4.03f ",sensedData[
q].sensedDistance);
141 o << sensedData[
q].sensorPose << endl;
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
Declares a class derived from "CObservation" that encapsules a single range measurement, and associated parameters.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
GLdouble GLdouble GLdouble GLdouble q
IMPLEMENTS_SERIALIZABLE(CLogFileRecord_FullEval, CHolonomicLogFileRecord, mrpt::nav) IMPLEMENTS_SERIALIZABLE(CHolonomicFullEval
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This namespace contains representation of robot actions and observations.
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents any robot's observation.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
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...