37 void CMetricMap::loadFromProbabilisticPosesAndObservations(
42 const size_t n = sfSeq.
size();
48 for (
size_t i = 0; i <
n; i++)
50 sfSeq.
get(i, posePDF, sf);
51 ASSERTMSG_(posePDF,
"Input map has an empty `CPose3DPDF` ptr");
52 ASSERTMSG_(sf,
"Input map has an empty `CSensoryFrame` ptr");
55 posePDF->getMean(robotPose);
57 sf->insertObservationsInto(
67 double CMetricMap::computeObservationsLikelihood(
72 lik += computeObservationLikelihood(it->get(), takenFrom);
77 double CMetricMap::computeObservationLikelihood(
80 return computeObservationLikelihood(obs,
CPose3D(takenFrom));
86 bool CMetricMap::canComputeObservationsLikelihood(
const CSensoryFrame& sf)
const 91 can = can || canComputeObservationLikelihood(it->get());
95 bool CMetricMap::insertObservation(
98 if (!genericMapParams.enableObservationInsertion)
return false;
100 bool done = internal_insertObservation(obs, robotPose);
103 OnPostSuccesfulInsertObs(obs);
109 bool CMetricMap::insertObservationPtr(
117 return insertObservation(obs.get(), robotPose);
121 bool CMetricMap::canComputeObservationLikelihood(
124 return canComputeObservationLikelihood(obs.get());
127 void CMetricMap::determineMatching2D(
142 void CMetricMap::determineMatching3D(
157 float CMetricMap::compute3DMatchingRatio(
170 float CMetricMap::squareDistanceToClosestCorrespondence(
171 float x0,
float y0)
const 180 bool CMetricMap::canComputeObservationLikelihood(
183 if (genericMapParams.enableObservationLikelihood)
184 return internal_canComputeObservationLikelihood(obs);
189 double CMetricMap::computeObservationLikelihood(
192 if (genericMapParams.enableObservationLikelihood)
193 return internal_computeObservationLikelihood(obs, takenFrom);
Parameters for CMetricMap::compute3DMatchingRatio()
#define THROW_EXCEPTION(msg)
This class stores a sequence of <Probabilistic Pose,SensoryFrame> pairs, thus a "metric map" can be t...
const_iterator begin() const
Returns a constant iterator to the first observation: this is an example of usage: ...
This base provides a set of functions for maths stuff.
std::deque< CObservation::Ptr >::const_iterator const_iterator
You can use CSensoryFrame::begin to get a iterator to the first element.
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...
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
size_t size() const
Returns the count of pairs (pose,sensory data)
void get(size_t index, mrpt::poses::CPose3DPDF::Ptr &out_posePDF, mrpt::obs::CSensoryFrame::Ptr &out_SF) const
Access to the i'th pair, first one is index '0'.
Event emitted by a metric up upon a succesful call to insertObservation()
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
Event emitted by a metric up upon call of clear()
Declares a virtual base class for all metric maps storage classes.
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 any robot's observation.
const_iterator end() const
Returns a constant iterator to the end of the list of observations: this is an example of usage: ...
Parameters for the determination of matchings between point clouds, etc.
Functions for estimating the optimal transformation between two frames of references given measuremen...
GLenum const GLfloat * params
void clear()
Clear the contents of this container.
#define IMPLEMENTS_VIRTUAL_SERIALIZABLE( class_name, base_class_name, NameSpace)
This must be inserted as implementation of some required members for virtual CSerializable classes: ...
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.