Class CMultiMetricMapPDF
Defined in File CMultiMetricMapPDF.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Types
public mrpt::serialization::CSerializablepublic mrpt::bayes::CParticleFilterData< CRBPFParticleData >public mrpt::bayes::CParticleFilterDataImpl< CMultiMetricMapPDF, mrpt::bayes::CParticleFilterData< CRBPFParticleData >::CParticleList >public mrpt::slam::PF_implementation< CRBPFParticleData, CMultiMetricMapPDF, mrpt::bayes::particle_storage_mode::POINTER >(Template Class PF_implementation)
Class Documentation
-
class CMultiMetricMapPDF : public mrpt::serialization::CSerializable, public mrpt::bayes::CParticleFilterData<CRBPFParticleData>, public mrpt::bayes::CParticleFilterDataImpl<CMultiMetricMapPDF, mrpt::bayes::CParticleFilterData<CRBPFParticleData>::CParticleList>, public mrpt::slam::PF_implementation<CRBPFParticleData, CMultiMetricMapPDF, mrpt::bayes::particle_storage_mode::POINTER>
Declares a class that represents a Rao-Blackwellized set of particles for solving the SLAM problem (This class is the base of RBPF-SLAM applications). This class is used internally by the map building algorithm in “mrpt::slam::CMetricMapBuilderRBPF”
See also
Virtual methods that the PF_implementations assume exist.
-
virtual mrpt::math::TPose3D getLastPose(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 pose.
- Throws:
std::exception – on out-of-range particle index
-
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
-
virtual bool PF_SLAM_implementation_skipRobotMovement() const override
Make a specialization if needed, eg. in the first step in SLAM.
-
virtual double PF_SLAM_computeObservationLikelihoodForParticle(const mrpt::bayes::CParticleFilter::TParticleFilterOptions &PF_options, 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
Public Functions
-
CMultiMetricMapPDF() = default
Constructor
-
CMultiMetricMapPDF(const bayes::CParticleFilter::TParticleFilterOptions &opts, const mrpt::maps::TSetOfMetricMapInitializers &mapsInitializers, const TPredictionParams &predictionOptions)
-
void clear(const mrpt::poses::CPose2D &initialPose)
Clear all elements of the maps, and restore all paths to a single starting pose
-
void clear(const mrpt::poses::CPose3D &initialPose)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
void clear(const mrpt::maps::CSimpleMap &prevMap, const mrpt::poses::CPose3D ¤tPose)
Resets the map by loading an already-mapped map for past poses. Current robot pose should be normally set to the last keyframe in the simplemap.
-
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”, from 0 to N-1.
See also
-
void getEstimatedPosePDF(mrpt::poses::CPose3DPDFParticles &out_estimation) const
Returns the current estimate of the robot pose, as a particles PDF.
See also
-
const CMultiMetricMap *getAveragedMetricMapEstimation()
Returns the weighted averaged map based on the current best estimation. If you need a persistent copy of this object, please use “CSerializable::duplicate” and use the copy.
See also
Almost 100% sure you would prefer the best current map, given by getCurrentMostLikelyMetricMap()
-
const CMultiMetricMap *getCurrentMostLikelyMetricMap() const
Returns a pointer to the current most likely map (associated to the most likely particle)
-
inline size_t getNumberOfObservationsInSimplemap() const
Get the number of CSensoryFrame inserted into the internal member SFs
-
bool insertObservation(mrpt::obs::CSensoryFrame &sf)
Insert an observation to the map, at each particle’s pose and to each particle’s metric map.
- Parameters:
sf – The SF to be inserted
- Returns:
true if any may was updated, false otherwise
-
void getPath(size_t i, std::deque<math::TPose3D> &out_path) const
Return the path (in absolute coordinate poses) for the i’th particle.
- Throws:
On – index out of bounds
-
double getCurrentEntropyOfPaths()
Returns the current entropy of paths, computed as the average entropy of poses along the path, where entropy of each pose estimation is computed as the entropy of the gaussian approximation covariance.
-
double getCurrentJointEntropy()
Returns the joint entropy estimation over paths and maps, according to “Information Gain-based Exploration Using” by C. Stachniss, G. Grissetti and W.Burgard.
-
void updateSensoryFrameSequence()
Update the poses estimation of the member “SFs” according to the current path belief.
-
void saveCurrentPathEstimationToTextFile(const std::string &fil)
A logging utility: saves the current path estimation for each particle in a text file (a row per particle, each 3-column-entry is a set [x,y,phi], respectively).
Public Members
-
mrpt::maps::CMultiMetricMapPDF::TPredictionParams options
Protected Functions
-
void prediction_and_update_pfStandardProposal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) override
-
void prediction_and_update_pfOptimalProposal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) override
-
void prediction_and_update_pfAuxiliaryPFOptimal(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) override
-
void prediction_and_update_pfAuxiliaryPFStandard(const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &PF_options) override
Friends
- friend class mrpt::slam::CMetricMapBuilderRBPF
-
struct TPredictionParams : public mrpt::config::CLoadableOptions
The struct for passing extra simulation parameters to the prediction/update stage when running a particle filter.
See also
prediction_and_update
Public Functions
-
TPredictionParams() = default
Default settings method
-
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string §ion) override
-
void dumpToTextStream(std::ostream &out) const override
Public Members
-
int pfOptimalProposal_mapSelection = {0}
[pf optimal proposal only] Only for PF algorithm=2 (Exact “pfOptimalProposal”) Select the map on which to calculate the optimal proposal distribution. Values: 0: Gridmap -> Uses Scan matching-based approximation (based on Stachniss’ work) 1: Landmarks -> Uses matching to approximate optimal 2: Beacons -> Used for exact optimal proposal in RO-SLAM 3: Pointsmap -> Uses Scan matching-based approximation with a map of points (based on Stachniss’ work) Default = 0
-
float ICPGlobalAlign_MinQuality = {0.70f}
[prediction stage][pf optimal proposal only] If useICPGlobalAlign_withGrid=true, this is the minimum quality ratio [0,1] of the alignment such as it will be accepted. Otherwise, raw odometry is used for those bad cases (default=0.7).
-
mrpt::slam::TKLDParams KLD_params
-
mrpt::slam::CICP::TConfigParams icp_params
ICP parameters, used only when “PF_algorithm=2” in the particle filter.
-
TPredictionParams() = default
-
virtual mrpt::math::TPose3D getLastPose(size_t i, bool &pose_is_valid) const override