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 +
222 Atrans_draw * sin(Apitch1_draw) * cos(Ayaw1_draw) +
226 Atrans_draw * sin(Apitch1_draw) * sin(Ayaw1_draw) +
230 Atrans_draw * cos(Apitch1_draw) +
235 Ayaw1_draw + Ayaw2_draw +
239 Apitch1_draw + Apitch2_draw +
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
CParticleList m_particles
The array of particles.
Declares a class for storing a robot action.
Represents a probabilistic 3D (6D) movement.
mrpt::poses::CPose3DPDFGaussian poseChange
The 3D pose change probabilistic estimation.
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...
struct mrpt::obs::CActionRobotMovement3D::TMotionModelOptions motionModelConfiguration
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.
TEstimationMethod
A list of posible ways for estimating the content of a CActionRobotMovement3D object.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
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.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
double pitch() const
Get the PITCH angle (in radians)
double roll() const
Get the ROLL angle (in radians)
double yaw() const
Get the YAW angle (in radians)
void copyFrom(const CPose3DPDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations)
std::shared_ptr< CPose3DPDF > Ptr
Declares a class that represents a Probability Density function (PDF) of a 3D pose.
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.
double x() const
Common members of all points & poses classes.
double norm() const
Returns the euclidean norm of vector: .
double drawGaussian1D_normalized()
Generate a normalized (mean=0, std=1) normally distributed sample.
Virtual base class for "archives": classes abstracting I/O streams.
void WriteAs(const TYPE_FROM_ACTUAL &value)
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
This namespace contains representation of robot actions and observations.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
A namespace of pseudo-random numbers generators of diferent distributions.
CRandomGenerator & getRandomGenerator()
A static instance of a CRandomGenerator class, for use in single-thread applications.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
double DEG2RAD(const double x)
Degrees to radians.
unsigned __int32 uint32_t
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
float additional_std_XYZ
An additional noise added to the 6DOF model (std.
float additional_std_angle
uint32_t nParticlesCount
Options for the 6DOFModel model which generates a CPosePDFParticles object an then create from that C...
The parameter to be passed to "computeFromOdometry".
TDrawSampleMotionModel modelSelection
The model to be used.
struct mrpt::obs::CActionRobotMovement3D::TMotionModelOptions::TOptions_6DOFModel mm6DOFModel
TMotionModelOptions()
Default values loader.