9 #ifndef CMultiMetricMapPDF_H
10 #define CMultiMetricMapPDF_H
63 mrpt::bayes::CParticleFilterData<CRBPFParticleData>::CParticleList>,
65 CRBPFParticleData, CMultiMetricMapPDF,
66 mrpt::bayes::particle_storage_mode::POINTER>
121 std::ostream& out)
const override;
165 const TPredictionParams* predictionOptions =
nullptr);
217 void getPath(
size_t i, std::deque<math::TPose3D>& out_path)
const;
256 const size_t i,
bool& pose_is_valid)
const override;
275 const size_t particleIndexForMap,
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
This template class declares the array of particles and its internal data, managing some memory-relat...
CRBPFParticleData CParticleDataContent
This is the type inside the corresponding CParticleData class.
std::deque< CParticleData > CParticleList
Use this type to refer to the list of particles m_particles.
This class allows loading and storing values and vectors of different types from a configuration text...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
This class stores any customizable set of metric maps.
Declares a class that represents a Rao-Blackwellized set of particles for solving the SLAM problem (T...
void saveCurrentPathEstimationToTextFile(const std::string &fil)
A logging utility: saves the current path estimation for each particle in a text file (a row per part...
bool insertObservation(mrpt::obs::CSensoryFrame &sf)
Insert an observation to the map, at each particle's pose and to each particle's metric map.
void prediction_and_update_pfOptimalProposal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) override
Performs the particle filter prediction/update stages for the algorithm "pfOptimalProposal" (if not i...
CMultiMetricMapPDF(const bayes::CParticleFilter::TParticleFilterOptions &opts=bayes::CParticleFilter::TParticleFilterOptions(), const mrpt::maps::TSetOfMetricMapInitializers *mapsInitializers=nullptr, const TPredictionParams *predictionOptions=nullptr)
Constructor.
double getCurrentEntropyOfPaths()
Returns the current entropy of paths, computed as the average entropy of poses along the path,...
void PF_SLAM_implementation_custom_update_particle_with_new_pose(CParticleDataContent *particleData, const mrpt::math::TPose3D &newPose) const override
bool PF_SLAM_implementation_doWeHaveValidObservations(const CParticleList &particles, const mrpt::obs::CSensoryFrame *sf) const override
mrpt::maps::CMultiMetricMapPDF::TPredictionParams options
void getEstimatedPosePDF(mrpt::poses::CPose3DPDFParticles &out_estimation) const
Returns the current estimate of the robot pose, as a particles PDF.
mrpt::maps::CSimpleMap SFs
The SFs and their corresponding pose estimations.
void clear(const mrpt::poses::CPose2D &initialPose)
Clear all elements of the maps, and restore all paths to a single starting pose.
mrpt::math::TPose3D getLastPose(const size_t i, bool &pose_is_valid) const override
Return the last robot pose in the i'th particle; is_valid_pose will be false if there is no such last...
mrpt::maps::CMultiMetricMap averageMap
Internal buffer for the averaged map.
void updateSensoryFrameSequence()
Update the poses estimation of the member "SFs" according to the current path belief.
const CMultiMetricMap * getAveragedMetricMapEstimation()
Returns the weighted averaged map based on the current best estimation.
float newInfoIndex
An index [0,1] measuring how much information an observation aports to the map (Typ.
void prediction_and_update_pfStandardProposal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) override
Performs the particle filter prediction/update stages for the algorithm "pfStandardProposal" (if not ...
void prediction_and_update_pfAuxiliaryPFStandard(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) override
Performs the particle filter prediction/update stages for the algorithm "pfAuxiliaryPFStandard" (if n...
void getEstimatedPosePDFAtTime(size_t timeStep, mrpt::poses::CPose3DPDFParticles &out_estimation) const
Returns the estimate of the robot pose as a particles PDF for the instant of time "timeStep",...
void prediction_and_update_pfAuxiliaryPFOptimal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) override
Performs the particle filter prediction/update stages for the algorithm "pfAuxiliaryPFOptimal" (if no...
void rebuildAverageMap()
Rebuild the "expected" grid map.
const CMultiMetricMap * getCurrentMostLikelyMetricMap() const
Returns a pointer to the current most likely map (associated to the most likely particle)
bool PF_SLAM_implementation_skipRobotMovement() const override
Do not move the particles until the map is populated.
std::vector< uint32_t > SF2robotPath
A mapping between indexes in the SFs to indexes in the robot paths from 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 override
Evaluate the observation likelihood for one particle at a given location.
size_t getNumberOfObservationsInSimplemap() const
Get the number of CSensoryFrame inserted into the internal member SFs.
double getCurrentJointEntropy()
Returns the joint entropy estimation over paths and maps, acording to "Information Gain-based Explora...
void getPath(size_t i, std::deque< math::TPose3D > &out_path) const
Return the path (in absolute coordinate poses) for the i'th particle.
With this struct options are provided to the observation likelihood computation process.
Auxiliary class used in mrpt::maps::CMultiMetricMapPDF.
CMultiMetricMap mapTillNow
std::deque< mrpt::math::TPose3D > robotPath
CRBPFParticleData(const TSetOfMetricMapInitializers *mapsInitializers=nullptr)
This class stores a sequence of <Probabilistic Pose,SensoryFrame> pairs, thus a "metric map" can be t...
size_t size() const
Returns the count of pairs (pose,sensory data)
A set of TMetricMapInitializer structures, passed to the constructor CMultiMetricMap::CMultiMetricMap...
Declares a class for storing a collection of robot actions.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents a Probability Density function (PDF) of a 3D pose.
The virtual base class which provides a unified interface for all persistent objects in MRPT.
The ICP algorithm configuration data.
This class implements a Rao-Blackwelized Particle Filter (RBPF) approach to map building (SLAM).
A set of common data shared by PF implementations for both SLAM and localization.
Option set for KLD algorithm.
GLsizei const GLchar ** string
GLsizei GLsizei GLchar * source
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
The configuration of a particle filter.
A curiously recurring template pattern (CRTP) approach to providing the basic functionality of any CP...
The struct for passing extra simulation parameters to the prediction/update stage when running a part...
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form,...
TPredictionParams()
Default settings method.
float ICPGlobalAlign_MinQuality
[prediction stage][pf optimal proposal only] If useICPGlobalAlign_withGrid=true, this is the minimum ...
COccupancyGridMap2D::TLikelihoodOptions update_gridMapLikelihoodOptions
[update stage] If the likelihood is computed through the occupancy grid map, then this structure is p...
int pfOptimalProposal_mapSelection
[pf optimal proposal only] Only for PF algorithm=2 (Exact "pfOptimalProposal") Select the map on whic...
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string §ion) override
This method load the options from a ".ini"-like file or memory-stored string list.
mrpt::slam::CICP::TConfigParams icp_params
ICP parameters, used only when "PF_algorithm=2" in the particle filter.
mrpt::slam::TKLDParams KLD_params
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).