29 rawOdometryIncrementReading(),
30 estimationMethod(emOdometry),
31 motionModelConfiguration(),
32 hasVelocities(6, false),
35 velocities.assign(.0);
44 out << hasVelocities << velocities;
63 in >> hasVelocities >> velocities;
80 estimationMethod = emOdometry;
81 rawOdometryIncrementReading = odometryIncrement;
82 motionModelConfiguration = options;
85 computeFromOdometry_model6DOF(odometryIncrement, options);
92 : modelSelection(mm6DOF), mm6DOFModel()
121 mrpt::make_aligned_shared<CPose3DPDFParticles>();
176 float Ayaw1 = (odometryIncrement.
y() != 0 || odometryIncrement.
x() != 0)
177 ? atan2(odometryIncrement.
y(), odometryIncrement.
x())
180 float Atrans = odometryIncrement.
norm();
182 float Apitch1 = (odometryIncrement.
y() != 0 || odometryIncrement.
x() != 0 ||
183 odometryIncrement.z() != 0)
184 ? atan2(odometryIncrement.z(), odometryIncrement.
norm())
187 float Aroll = odometryIncrement.
roll();
188 float Apitch2 = odometryIncrement.
pitch();
189 float Ayaw2 = odometryIncrement.
yaw();
208 float Aroll_draw = Aroll +
221 aux->m_particles[i].d.x =
222 Atrans_draw * sin(Apitch1_draw) * cos(Ayaw1_draw) +
225 aux->m_particles[i].d.y =
226 Atrans_draw * sin(Apitch1_draw) * sin(Ayaw1_draw) +
229 aux->m_particles[i].d.z =
230 Atrans_draw * cos(Apitch1_draw) +
235 Ayaw1_draw + Ayaw2_draw +
239 Apitch1_draw + Apitch2_draw +
247 aux->m_particles[i].d.yaw = new_yaw;
248 aux->m_particles[i].d.pitch = new_pitch;
249 aux->m_particles[i].d.roll = new_roll;
A namespace of pseudo-random numbers generators 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.
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.
double DEG2RAD(const double x)
Degrees to radians.
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)
void WriteAs(const TYPE_FROM_ACTUAL &value)
struct mrpt::obs::CActionRobotMovement3D::TMotionModelOptions motionModelConfiguration
float additional_std_XYZ
An additional noise added to the 6DOF model (std.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
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...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
The parameter to be passed to "computeFromOdometry".
Represents a probabilistic 3D (6D) movement.
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: .
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
TEstimationMethod
A list of posible ways for estimating the content of a CActionRobotMovement3D object.
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)
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.
Virtual base class for "archives": classes abstracting I/O streams.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
void resetDeterministic(const mrpt::math::TPose3D &location, size_t particlesCount=0)
Reset the PDF to a single point: All m_particles will be set exactly to the supplied pose...
unsigned __int32 uint32_t
CRandomGenerator & getRandomGenerator()
A static instance of a CRandomGenerator class, for use in single-thread applications.
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
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.