28 #ifndef CLandmarksMap_H
29 #define CLandmarksMap_H
47 class CObservationBeaconRanges;
89 virtual
void internal_clear();
98 virtual
bool internal_insertObservation( const
CObservation *obs, const
CPose3D *robotPose = NULL );
102 static mrpt::utils::
TColorf COLOR_LANDMARKS_IN_3DSCENES;
134 TCustomSequenceLandmarks();
137 inline iterator
begin() {
return m_landmarks.begin(); };
138 inline iterator
end() {
return m_landmarks.end(); };
140 inline size_t size()
const {
return m_landmarks.size(); };
143 inline const_iterator
begin()
const {
return m_landmarks.begin(); };
144 inline const_iterator
end()
const {
return m_landmarks.end(); };
150 const CLandmark*
get(
unsigned int indx)
const;
151 void isToBeModified(
unsigned int indx);
152 void hasBeenModified(
unsigned int indx);
153 void hasBeenModifiedAll();
154 void erase(
unsigned int indx);
164 const CLandmark* getByBeaconID(
unsigned int ID )
const;
168 float getLargestDistanceFromOrigin()
const;
184 static std::map<std::pair<mrpt::slam::CLandmark::TLandmarkID, mrpt::slam::CLandmark::TLandmarkID>,
double>
_mEDD;
201 float compute3DMatchingRatio(
202 const CMetricMap *otherMap,
204 float minDistForCorr = 0.10f,
205 float minMahaDistForCorr = 2.0f
219 void loadFromConfigFile(
221 const std::string §ion);
225 void dumpToTextStream(
CStream &out)
const;
313 void loadFromConfigFile(
315 const std::string §ion);
319 void dumpToTextStream(
CStream &out)
const;
442 bool saveToMATLABScript2D(
444 const char *style=
"b",
445 float stdCount = 2.0f );
454 bool saveToMATLABScript3D(
456 const char *style=
"b",
457 float confInterval = 0.95f )
const ;
475 void loadSiftFeaturesFromImageObservation(
486 void loadSiftFeaturesFromStereoImageObservation(
497 void loadOccupancyFeaturesFrom2DRangeScan(
499 const CPose3D *robotPose = NULL,
500 unsigned int downSampleFactor = 1);
518 void computeMatchingWith2D(
519 const CMetricMap *otherMap,
521 float maxDistForCorrespondence,
522 float maxAngularDistForCorrespondence,
523 const CPose2D &angularDistPivotPoint,
525 float &correspondencesRatio,
526 float *sumSqrDist = NULL,
527 bool onlyKeepTheClosest =
false,
528 bool onlyUniqueRobust =
false )
const;
537 void computeMatchingWith3DLandmarks(
540 float &correspondencesRatio,
541 std::vector<bool> &otherCorrespondences)
const;
545 void changeCoordinatesReference(
const CPose3D &newOrg );
556 void fuseWith(
CLandmarksMap &other,
bool justInsertAllOfThem =
false );
561 double computeLikelihood_SIFT_LandmarkMap(
CLandmarksMap *map,
563 std::vector<bool> *otherCorrespondences = NULL);
567 bool isEmpty()
const;
575 void simulateBeaconReadings(
577 const CPoint3D &in_sensorLocationOnRobot,
596 void simulateRangeBearingReadings(
598 const CPose3D &sensorLocationOnRobot,
600 bool sensorDetectsIDs =
true,
601 const float stdRange = 0.01f,
602 const float stdYaw =
DEG2RAD(0.1f),
603 const float stdPitch =
DEG2RAD(0.1f),
605 const double spurious_count_mean = 0,
606 const double spurious_count_std = 0
615 void saveMetricMapRepresentationToFile(
616 const std::string &filNamePrefix )
const;
626 virtual void auxParticleFilterCleanUp();