27 hasEncodersInfo(false),
28 encoderLeftTicks(0), encoderRightTicks(0),
30 velocityLocal(.0, .0, .0)
52 out << encoderLeftTicks << encoderRightTicks;
78 in >> hasEncodersInfo;
79 if (hasEncodersInfo ||
version < 2)
80 in >> encoderLeftTicks >> encoderRightTicks;
86 velocityLocal.vx = vx;
87 velocityLocal.vy = .0;
88 velocityLocal.omega =
w;
98 hasEncodersInfo =
false;
99 encoderLeftTicks = encoderRightTicks = 0;
100 hasVelocities =
false;
114 o << std::endl <<
"Odometry reading: " << odometry << std::endl;
119 o <<
format(
" Encoder info: deltaL=%i deltaR=%i\n", encoderLeftTicks, encoderRightTicks );
121 else o <<
"Encoder info: Not available!\n";
125 o <<
format(
"Velocity info: %s\n", velocityLocal.asString().c_str());
127 else o <<
"Velocity info: Not available!\n";
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.
GLubyte GLubyte GLubyte GLubyte w
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#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.
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...
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...
Declares a class that represents any robot's observation.
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...
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
An observation of the current (cumulative) odometry for a wheeled robot.
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...