9 #ifndef CLandmarksMap_H
10 #define CLandmarksMap_H
28 class CObservationBeaconRanges;
70 virtual
void internal_clear();
79 virtual
bool internal_insertObservation( const
CObservation *obs, const
CPose3D *robotPose = NULL );
115 TCustomSequenceLandmarks();
118 inline iterator
begin() {
return m_landmarks.begin(); };
119 inline iterator
end() {
return m_landmarks.end(); };
121 inline size_t size()
const {
return m_landmarks.size(); };
124 inline const_iterator
begin()
const {
return m_landmarks.begin(); };
125 inline const_iterator
end()
const {
return m_landmarks.end(); };
131 const CLandmark*
get(
unsigned int indx)
const;
132 void isToBeModified(
unsigned int indx);
133 void hasBeenModified(
unsigned int indx);
134 void hasBeenModifiedAll();
135 void erase(
unsigned int indx);
145 const CLandmark* getByBeaconID(
unsigned int ID )
const;
149 float getLargestDistanceFromOrigin()
const;
165 static std::map<std::pair<mrpt::slam::CLandmark::TLandmarkID, mrpt::slam::CLandmark::TLandmarkID>,
double>
_mEDD;
173 float compute3DMatchingRatio(
174 const CMetricMap *otherMap,
176 float maxDistForCorr = 0.10f,
177 float maxMahaDistForCorr = 2.0f
191 void loadFromConfigFile(
193 const std::string §ion);
197 void dumpToTextStream(
CStream &out)
const;
285 void loadFromConfigFile(
287 const std::string §ion);
291 void dumpToTextStream(
CStream &out)
const;
414 bool saveToMATLABScript2D(
416 const char *style=
"b",
417 float stdCount = 2.0f );
426 bool saveToMATLABScript3D(
428 const char *style=
"b",
429 float confInterval = 0.95f )
const ;
447 void loadSiftFeaturesFromImageObservation(
458 void loadSiftFeaturesFromStereoImageObservation(
469 void loadOccupancyFeaturesFrom2DRangeScan(
471 const CPose3D *robotPose = NULL,
472 unsigned int downSampleFactor = 1);
491 void computeMatchingWith2D(
492 const CMetricMap *otherMap,
494 float maxDistForCorrespondence,
495 float maxAngularDistForCorrespondence,
496 const CPose2D &angularDistPivotPoint,
498 float &correspondencesRatio,
499 float *sumSqrDist = NULL,
500 bool onlyKeepTheClosest =
false,
501 bool onlyUniqueRobust =
false )
const;
510 void computeMatchingWith3DLandmarks(
513 float &correspondencesRatio,
514 std::vector<bool> &otherCorrespondences)
const;
518 void changeCoordinatesReference(
const CPose3D &newOrg );
529 void fuseWith(
CLandmarksMap &other,
bool justInsertAllOfThem =
false );
534 double computeLikelihood_SIFT_LandmarkMap(
CLandmarksMap *map,
536 std::vector<bool> *otherCorrespondences = NULL);
540 bool isEmpty()
const;
548 void simulateBeaconReadings(
550 const CPoint3D &in_sensorLocationOnRobot,
569 void simulateRangeBearingReadings(
571 const CPose3D &sensorLocationOnRobot,
573 bool sensorDetectsIDs =
true,
574 const float stdRange = 0.01f,
575 const float stdYaw =
DEG2RAD(0.1f),
576 const float stdPitch =
DEG2RAD(0.1f),
578 const double spurious_count_mean = 0,
579 const double spurious_count_std = 0
588 void saveMetricMapRepresentationToFile(
589 const std::string &filNamePrefix )
const;
594 void getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &outObj )
const;
599 virtual void auxParticleFilterCleanUp();
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
A class for storing a map of 3D probabilistic landmarks.
double longitude
Longitud del Origen del GPS (en grados)
TSequenceLandmarks m_landmarks
The actual list:
int SIFTs_numberOfKLTKeypoints
Number of points to extract in the image.
CDynamicGrid< vector_int > * getGrid()
void saveToTextFile(const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=mrpt::math::MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string()) const
Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classe...
float beaconMaxRange
Maximun reliable beacon range value (default=20)
double latitude
Latitud del Origen del GPS (en grados)
float m_largestDistanceFromOrigin
Auxiliary variables used in "getLargestDistanceFromOrigin".
unsigned int minTimesSeen
Required number of times of a landmark to be seen not to be removed, in "ellapsedTime" seconds...
static bool _maxIDUpdated
This observation represents a number of range-bearing value pairs, each one for a detected landmark...
unsigned int SIFTLikelihoodMethod
[For SIFT landmarks only] Method to compute the likelihood (Default = 0 (Our method)) 0: Our method -...
float alphaRatio
The ratio between gaussian and uniform distribution (default=1).
float SIFTs_stdXY
[For SIFT landmarks only] The standard deviation (in pixels) for the SIFTs detector (This is used for...
bool m_largestDistanceFromOriginIsUpdated
Auxiliary variables used in "getLargestDistanceFromOrigin".
const_iterator end() const
unsigned int SIFTMatching3DMethod
[For SIFT landmarks only] Method to compute 3D matching (Default = 0 (Our method)) 0: Our method -> E...
EIGEN_STRONG_INLINE void push_back(Scalar val)
Insert an element at the end of the container (for 1D vectors/arrays)
const_iterator begin() const
int SIFTs_decimation
Considers 1 out of "SIFTs_decimation" visual landmarks in the observation during the likelihood compu...
const Scalar * const_iterator
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map...
bool insert_SIFTs_from_stereo_images
If set to true (default), the insertion of a CObservationStereoImages in the map will insert SIFT 3D ...
With this struct options are provided to the likelihood computations.
With this struct options are provided to the observation insertion process.
bool insert_Landmarks_from_range_scans
If set to true (default), inserting a CObservation2DRangeScan in the map will generate landmarks for ...
This class allows loading and storing values and vectors of different types from a configuration text...
TSequenceLandmarks::iterator iterator
unsigned int min_sat
Número mínimo de satelites para tener en cuenta los datos.
std::vector< CLandmark > TSequenceLandmarks
Internal use.
float SIFTsLoadEllipsoidWidth
[For SIFT landmarks only] The width (in meters, standard deviation) of the ellipsoid in the axis perp...
Declares a virtual base class for all metric maps storage classes.
bool PLOT_IMAGES
Indicates if the images (as well as the SIFT detected features) should be shown in a window...
This struct store de GPS longitude, latitude (in degrees ) and altitude (in meters) for the first GPS...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
float SIFTs_stereo_maxDepth
Maximum depth of 3D landmarks when loading a landmarks map from a stereo image observation.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
std::vector< size_t > vector_size_t
Scale Invariant Feature Transform [LOWE'04].
double altitude
Altitud del Origen del GPS (en metros)
Declares a class that represents any robot's observation.
int64_t TLandmarkID
The type for the IDs of landmarks.
The list of landmarks: the wrapper class is just for maintaining the KD-Tree representation.
static std::map< std::pair< mrpt::slam::CLandmark::TLandmarkID, mrpt::slam::CLandmark::TLandmarkID >, double > _mEDD
Map of the Euclidean Distance between the descriptors of two SIFT-based landmarks.
float beaconRangesStd
The standard deviation used for Beacon ranges likelihood (default=0.08).
The class for storing "landmarks" (visual or laser-scan-extracted features,...)
A class used to store a 3D point.
float SiftLikelihoodThreshold
[For SIFT landmarks only] The minimum likelihood value of a match to set as correspondence (Default=0...
Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
bool insert_SIFTs_from_monocular_images
If set to true (default), the insertion of a CObservationImage in the map will insert SIFT 3D feature...
float SiftEDDThreshold
[For SIFT landmarks only] The minimum Euclidean Descriptor Distance value of a match to set as corres...
double SIFTs_sigma_descriptor_dist
Observation class for either a pair of left+right or left+disparity images from a stereo camera...
CDynamicGrid< vector_int > m_grid
A grid-map with the set of landmarks falling into each cell.
double SIFTs_sigma_euclidean_dist
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
float GPS_sigma
A constant "sigma" for GPS localization data (in meters)
float SiftCorrRatioThreshold
[For SIFT landmarks only] The ratio between the best and second best descriptor distances to set as c...
This struct stores extra results from invoking insertObservation.
float SIFTs_epipolar_TH
Maximum distance (in pixels) from a point to a certain epipolar line to be considered a potential mat...
float SIFTsLoadDistanceOfTheMean
[For SIFT landmarks only] The distance (in meters) of the mean value of landmarks, for the initial position PDF (Default = 3m)
size_t size(const MATRIXLIKE &m, int dim)
A class used to store a 2D pose.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
A RGB color - floats in the range [0,1].
Declares a class derived from "CObservation" that represents one (or more) range measurements to labe...
unsigned int rangeScan2D_decimation
The number of rays from a 2D range scan will be decimated by this factor (default = 1...
With this struct options are provided to the fusion process.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map...
float SIFTnullCorrespondenceDistance
static mrpt::slam::CLandmark::TLandmarkID _mapMaxID
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
float ellapsedTime
See "minTimesSeen".