50 CPose3DPDFPtr posePDF;
52 const size_t n = sfSeq.
size();
58 for (
size_t i=0;i<
n;i++)
60 sfSeq.
get(i,posePDF, sf);
63 posePDF->getMean(robotPose);
65 sf->insertObservationsInto(
75 double CMetricMap::computeObservationsLikelihood(
81 lik += computeObservationLikelihood( it->pointer(), takenFrom );
88 return computeObservationLikelihood(obs,
CPose3D(takenFrom));
94 bool CMetricMap::canComputeObservationsLikelihood(
const CSensoryFrame &sf )
const 98 can = can || canComputeObservationLikelihood( it->pointer() );
102 bool CMetricMap::insertObservation(
106 if (!genericMapParams.enableObservationInsertion)
109 bool done = internal_insertObservation(obs,robotPose);
112 OnPostSuccesfulInsertObs(obs);
118 bool CMetricMap::insertObservationPtr(
119 const CObservationPtr &obs,
123 if (!obs.present()) {
THROW_EXCEPTION(
"Trying to pass a null pointer."); }
124 return insertObservation(obs.pointer(),robotPose);
128 bool CMetricMap::canComputeObservationLikelihood(
const CObservationPtr &obs )
const {
129 return canComputeObservationLikelihood(obs.pointer());
132 void CMetricMap::determineMatching2D(
150 void CMetricMap::determineMatching3D(
178 float CMetricMap::squareDistanceToClosestCorrespondence(
191 if (genericMapParams.enableObservationLikelihood)
192 return internal_canComputeObservationLikelihood(obs);
198 if (genericMapParams.enableObservationLikelihood)
199 return internal_computeObservationLikelihood(obs,takenFrom);
Parameters for CMetricMap::compute3DMatchingRatio()
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
This class stores a sequence of <Probabilistic Pose,SensoryFrame> pairs, thus a "metric map" can be t...
The virtual base class which provides a unified interface for all persistent objects in MRPT...
#define THROW_EXCEPTION(msg)
void clear()
Clear the contents of this container.
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: ...
This base provides a set of functions for maths stuff.
#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)
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...
size_t size() const
Returns the count of pairs (pose,sensory data)
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()
void get(size_t index, mrpt::poses::CPose3DPDFPtr &out_posePDF, mrpt::obs::CSensoryFramePtr &out_SF) const
Access to the i'th pair, first one is index '0'.
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.
GLenum const GLfloat * params