31 rawOdometryIncrementReading(),
32 estimationMethod(emOdometry),
33 motionModelConfiguration(),
34 hasVelocities(6, false),
37 velocities.assign(.0);
57 out << hasVelocities << velocities;
81 in >> hasVelocities >> velocities;
98 estimationMethod = emOdometry;
99 rawOdometryIncrementReading = odometryIncrement;
100 motionModelConfiguration = options;
103 computeFromOdometry_model6DOF(odometryIncrement, options);
110 : modelSelection(mm6DOF), mm6DOFModel()
136 static CPose3D nullPose(0, 0, 0, 0, 0, 0);
139 mrpt::make_aligned_shared<CPose3DPDFParticles>();
194 float Ayaw1 = (odometryIncrement.
y() != 0 || odometryIncrement.
x() != 0)
195 ? atan2(odometryIncrement.
y(), odometryIncrement.
x())
198 float Atrans = odometryIncrement.
norm();
200 float Apitch1 = (odometryIncrement.
y() != 0 || odometryIncrement.
x() != 0 ||
201 odometryIncrement.z() != 0)
202 ? atan2(odometryIncrement.z(), odometryIncrement.
norm())
205 float Aroll = odometryIncrement.
roll();
206 float Apitch2 = odometryIncrement.
pitch();
207 float Ayaw2 = odometryIncrement.
yaw();
216 float Apitch1_draw = Apitch1 +
225 float Aroll_draw = Aroll +
228 float Apitch2_draw = Apitch2 +
237 aux->m_particles[i].d->x(
238 Atrans_draw * sin(Apitch1_draw) * cos(Ayaw1_draw) +
241 aux->m_particles[i].d->y(
242 Atrans_draw * sin(Apitch1_draw) * sin(Ayaw1_draw) +
245 aux->m_particles[i].d->z(
246 Atrans_draw * cos(Apitch1_draw) +
251 Ayaw1_draw + Ayaw2_draw +
255 Apitch1_draw + Apitch2_draw +
263 aux->m_particles[i].d->setYawPitchRoll(new_yaw, new_pitch, new_roll);
264 aux->m_particles[i].d->normalizeAngles();
A namespace of pseudo-random numbers genrators of diferent distributions.
struct mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel mm6DOFModel
double x() const
Common members of all points & poses classes.
mrpt::poses::CPose3DPDFGaussian poseChange
The 3D pose change probabilistic estimation.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void copyFrom(const CPose3DPDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations) ...
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
void computeFromOdometry_model6DOF(const mrpt::poses::CPose3D &odometryIncrement, const TMotionModelOptions &o)
Computes the PDF of the pose increment from an odometry reading, using the motion model for 6 DOF...
double pitch() const
Get the PITCH angle (in radians)
double yaw() const
Get the YAW angle (in radians)
struct mrpt::obs::CActionRobotMovement3D::TMotionModelOptions motionModelConfiguration
float additional_std_XYZ
An additional noise added to the 6DOF model (std.
void computeFromOdometry(const mrpt::poses::CPose3D &odometryIncrement, const TMotionModelOptions &options)
Computes the PDF of the pose increment from an odometry reading and according to the given motion mod...
The parameter to be passed to "computeFromOdometry".
Represents a probabilistic 3D (6D) movement.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
uint32_t nParticlesCount
Options for the 6DOFModel model which generates a CPosePDFParticles object an then create from that C...
double norm() const
Returns the euclidean norm of vector: .
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
TEstimationMethod
A list of posible ways for estimating the content of a CActionRobotMovement3D object.
std::shared_ptr< CPose3DPDF > Ptr
This namespace contains representation of robot actions and observations.
float additional_std_angle
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
double roll() const
Get the ROLL angle (in radians)
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const override
Introduces a pure virtual method responsible for writing to a CStream.
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
Declares a class for storing a robot action.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TMotionModelOptions()
Default values loader.
TDrawSampleMotionModel modelSelection
The model to be used.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void resetDeterministic(const CPose3D &location, size_t particlesCount=0)
Reset the PDF to a single point: All m_particles will be set exactly to the supplied pose...
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...
unsigned __int32 uint32_t
CRandomGenerator & getRandomGenerator()
A static instance of a CRandomGenerator class, for use in single-thread applications.
Declares a class that represents a Probability Density function (PDF) of a 3D pose.
double drawGaussian1D_normalized()
Generate a normalized (mean=0, std=1) normally distributed sample.