Go to the documentation of this file.
40 const TPose3D* newPoseToBeInserted)
43 if (newPoseToBeInserted)
78 CMonteCarloLocalization3D::CMonteCarloLocalization3D(
size_t M)
85 const size_t i,
bool& is_valid_pose)
const
112 PF_SLAM_implementation_pfStandardProposal<mrpt::slam::detail::TPoseBin3D>(
163 PF_SLAM_implementation_pfAuxiliaryPFOptimal<mrpt::slam::detail::TPoseBin3D>(
175 const size_t particleIndexForMap,
const CSensoryFrame& observation,
188 it != observation.
end(); ++it)
201 *particleData = newPose;
205 CParticleList& old_particles,
const vector<TPose3D>& newParticles,
206 const vector<double>& newParticlesWeight,
207 [[maybe_unused]]
const vector<size_t>& newParticlesDerivedFromIdx)
const
209 ASSERT_(
size_t(newParticlesWeight.size()) == newParticles.size());
219 const size_t N = newParticles.size();
220 old_particles.resize(N);
221 for (
size_t i = 0; i < N; i++)
223 old_particles[i].log_w = newParticlesWeight[i];
224 old_particles[i].d = newParticles[i];
void PF_SLAM_implementation_pfAuxiliaryPFStandard(const mrpt::obs::CActionCollection *actions, const mrpt::obs::CSensoryFrame *sf, const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, const TKLDParams &KLD_options)
A generic implementation of the PF method "prediction_and_update_pfAuxiliaryPFStandard" (Auxiliary pa...
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.
const_iterator end() const
Returns a constant iterator to the end of the list of observations: this is an example of usage:
mrpt::maps::TMetricMapList metricMaps
[update stage] Alternative way (if metricMap==nullptr): A metric map is supplied for each particle: T...
Option set for KLD algorithm.
double computeObservationLikelihood(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom)
Computes the log-likelihood of a given observation given an arbitrary robot 3D pose.
mrpt::math::TPose3D getLastPose(const size_t i, bool &is_valid_pose) const override
Return the robot pose for the i'th particle.
Declares a class for storing a collection of robot actions.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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
#define THROW_EXCEPTION(msg)
#define ASSERT_(f)
Defines an assertion mechanism.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
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...
Declares a virtual base class for all metric maps storage classes.
const_iterator begin() const
Returns a constant iterator to the first observation: this is an example of usage:
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.
int round(const T value)
Returns the closer integer (int) to x.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
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 nullptr) a new pose appe...
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
Auxiliary structure used in KLD-sampling in particle filters.
Declares a class that represents a Probability Density function (PDF) of a 3D pose.
std::deque< CObservation::Ptr >::const_iterator const_iterator
You can use CSensoryFrame::begin to get a iterator to the first element.
double pitch
Pitch coordinate (rotation angle over Y axis).
CParticleList m_particles
The array of particles.
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.
double yaw
Yaw coordinate (rotation angle over Z axis).
double roll
Roll coordinate (rotation angle over X coordinate).
void PF_SLAM_implementation_custom_update_particle_with_new_pose(CParticleDataContent *particleData, const mrpt::math::TPose3D &newPose) const
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.
The namespace for Bayesian filtering algorithm: different particle filters and Kalman filter algorith...
This base provides a set of functions for maths stuff.
TMonteCarloLocalizationParams options
MCL parameters.
mrpt::maps::CMetricMap * metricMap
[update stage] Must be set to a metric map used to estimate the likelihood of observations
void setLoggerName(const std::string &name)
Set the name of the COutputLogger instance.
The configuration of a particle filter.
double KLD_binSize_XY
Parameters for the KLD adaptive sample size algorithm (see Dieter Fox's papers), which is used only i...
TKLDParams KLD_params
Parameters for dynamic sample size, KLD method.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |