40 const TPose3D *newPoseToBeInserted)
43 if (newPoseToBeInserted)
76 CMonteCarloLocalization3D::CMonteCarloLocalization3D(
size_t M ) :
79 this->setLoggerName(
"CMonteCarloLocalization3D");
122 PF_SLAM_implementation_pfStandardProposal<mrpt::slam::detail::TPoseBin3D>(actions, sf, PF_options,
options.
KLD_params);
146 PF_SLAM_implementation_pfAuxiliaryPFStandard<mrpt::slam::detail::TPoseBin3D>(actions, sf, PF_options,
options.
KLD_params);
171 PF_SLAM_implementation_pfAuxiliaryPFOptimal<mrpt::slam::detail::TPoseBin3D>(actions, sf, PF_options,
options.
KLD_params);
182 const size_t particleIndexForMap,
196 ret += map->computeObservationLikelihood( it->pointer(),
x );
207 *particleData =
CPose3D( newPose );
212 CParticleList &old_particles,
213 const vector<TPose3D> &newParticles,
214 const vector<double> &newParticlesWeight,
215 const vector<size_t> &newParticlesDerivedFromIdx )
const 218 ASSERT_(
size_t(newParticlesWeight.size())==newParticles.size())
228 const size_t N = newParticles.size();
229 old_particles.resize(N);
230 for (
size_t i=0;i<N;i++)
232 old_particles[i].log_w = newParticlesWeight[i];
233 old_particles[i].d.reset(
new CPose3D(newParticles[i]));
double x() const
Common members of all points & poses classes.
void prediction_and_update_pfAuxiliaryPFStandard(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
Update the m_particles, predicting the posterior of robot pose and map after a movement command...
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
double roll
Roll coordinate (rotation angle over X coordinate).
The namespace for Bayesian filtering algorithm: different particle filters and Kalman filter algorith...
#define THROW_EXCEPTION(msg)
This file contains the implementations of the template members declared in mrpt::slam::PF_implementat...
double pitch() const
Get the PITCH angle (in radians)
double yaw() const
Get the YAW angle (in radians)
Option set for KLD algorithm.
mrpt::math::TPose3D getLastPose(const size_t i, bool &pose_is_valid) const MRPT_OVERRIDE
Return the last robot pose in the i'th particle; pose_is_valid will be false if particle is a path an...
void prediction_and_update_pfStandardProposal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
Update the m_particles, predicting the posterior of robot pose and map after a movement command...
mrpt::maps::TMetricMapList metricMaps
[update stage] Alternative way (if metricMap==NULL): A metric map is supplied for each particle: Ther...
double yaw
Yaw coordinate (rotation angle over Z axis).
mrpt::maps::CMetricMap * metricMap
[update stage] Must be set to a metric map used to estimate the likelihood of observations ...
virtual ~CMonteCarloLocalization3D()
Destructor.
Declares a class for storing a collection of robot actions.
std::deque< CObservationPtr >::const_iterator const_iterator
You can use CSensoryFrame::begin to get a iterator to the first element.
const_iterator begin() const
Returns a constant iterator to the first observation: this is an example of usage: ...
double PF_SLAM_computeObservationLikelihoodForParticle(const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const size_t particleIndexForMap, const mrpt::obs::CSensoryFrame &observation, const mrpt::poses::CPose3D &x) const
Evaluate the observation likelihood for one particle at a given location.
TMonteCarloLocalizationParams options
MCL parameters.
CParticleList m_particles
The array of particles.
This base provides a set of functions for maths stuff.
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
This namespace contains representation of robot actions and observations.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
double KLD_binSize_XY
Parameters for the KLD adaptive sample size algorithm (see Dieter Fox's papers), which is used only i...
void prediction_and_update_pfAuxiliaryPFOptimal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options)
Update the m_particles, predicting the posterior of robot pose and map after a movement command...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
double roll() const
Get the ROLL angle (in radians)
double pitch
Pitch coordinate (rotation angle over Y axis).
Auxiliary structure used in KLD-sampling in particle filters.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
Declares a virtual base class for all metric maps storage classes.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
The configuration of a particle filter.
void PF_SLAM_implementation_replaceByNewParticleSet(CParticleList &old_particles, const std::vector< mrpt::math::TPose3D > &newParticles, const std::vector< double > &newParticlesWeight, const std::vector< size_t > &newParticlesDerivedFromIdx) const
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
int round(const T value)
Returns the closer integer (int) to x.
void PF_SLAM_implementation_custom_update_particle_with_new_pose(CParticleDataContent *particleData, const mrpt::math::TPose3D &newPose) const
const_iterator end() const
Returns a constant iterator to the end of the list of observations: this is an example of usage: ...
Declares a class that represents a Probability Density function (PDF) of a 3D pose.
TKLDParams KLD_params
Parameters for dynamic sample size, KLD method.
void KLF_loadBinFromParticle(mrpt::slam::detail::TPoseBin3D &outBin, const TKLDParams &opts, const CMonteCarloLocalization3D::CParticleDataContent *currentParticleValue, const TPose3D *newPoseToBeInserted)
Fills out a "TPoseBin3D" variable, given a path hypotesis and (if not set to NULL) a new pose appende...