30 out << hasVelocities << velocities;
49 in >> hasVelocities >> velocities;
66 estimationMethod = emOdometry;
67 rawOdometryIncrementReading = odometryIncrement;
68 motionModelConfiguration = options;
71 computeFromOdometry_model6DOF(odometryIncrement, options);
86 std::make_shared<CPose3DPDFParticles>();
148 float Ayaw1 = (odometryIncrement.
y() != 0 || odometryIncrement.
x() != 0)
149 ? atan2(odometryIncrement.
y(), odometryIncrement.
x())
152 float Atrans = odometryIncrement.
norm();
154 float Apitch1 = (odometryIncrement.
y() != 0 || odometryIncrement.
x() != 0 ||
155 odometryIncrement.z() != 0)
156 ? atan2(odometryIncrement.z(), odometryIncrement.
norm())
159 float Aroll = odometryIncrement.
roll();
160 float Apitch2 = odometryIncrement.
pitch();
161 float Ayaw2 = odometryIncrement.
yaw();
163 const auto stdxyz = motionModelConfiguration.mm6DOFModel.additional_std_XYZ;
169 auto& ith_part = aux->m_particles[i].d;
172 rnd.drawGaussian1D_normalized();
175 rnd.drawGaussian1D_normalized();
179 rnd.drawGaussian1D_normalized();
182 rnd.drawGaussian1D_normalized();
183 float Apitch2_draw = Apitch2 + (o.
mm6DOFModel.
a8 * Apitch2) *
184 rnd.drawGaussian1D_normalized();
187 rnd.drawGaussian1D_normalized();
190 ith_part.x = Atrans_draw * cos(Apitch1_draw) * cos(Ayaw1_draw) +
191 stdxyz * rnd.drawGaussian1D_normalized();
192 ith_part.y = Atrans_draw * cos(Apitch1_draw) * sin(Ayaw1_draw) +
193 stdxyz * rnd.drawGaussian1D_normalized();
194 ith_part.z = -Atrans_draw * sin(Apitch1_draw) +
195 stdxyz * rnd.drawGaussian1D_normalized();
198 Ayaw1_draw + Ayaw2_draw +
199 motionModelConfiguration.mm6DOFModel.additional_std_angle *
200 rnd.drawGaussian1D_normalized();
202 Apitch1_draw + Apitch2_draw +
203 motionModelConfiguration.mm6DOFModel.additional_std_angle *
204 rnd.drawGaussian1D_normalized();
207 motionModelConfiguration.mm6DOFModel.additional_std_angle *
208 rnd.drawGaussian1D_normalized();
211 poseChange.copyFrom(*poseChangeTemp);
A namespace of pseudo-random numbers generators of diferent distributions.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to 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)
void WriteAs(const TYPE_FROM_ACTUAL &value)
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...
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.
double x() const
Common members of all points & poses classes.
double norm() const
Returns the euclidean norm of vector: .
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.
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...
TOptions_6DOFModel mm6DOFModel
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.