9 #ifndef CLandmarksMap_H 10 #define CLandmarksMap_H 66 bool internal_insertObservation( const
mrpt::obs::CObservation *obs, const
mrpt::poses::CPose3D *robotPose = NULL )
MRPT_OVERRIDE;
82 double internal_computeObservationLikelihood( const
mrpt::obs::CObservation *obs, const
mrpt::poses::CPose3D &takenFrom )
MRPT_OVERRIDE;
85 static
mrpt::utils::TColorf COLOR_LANDMARKS_IN_3DSCENES;
122 inline size_t size()
const {
return m_landmarks.size(); };
132 const CLandmark*
get(
unsigned int indx)
const;
133 void isToBeModified(
unsigned int indx);
134 void hasBeenModified(
unsigned int indx);
135 void hasBeenModifiedAll();
136 void erase(
unsigned int indx);
146 const CLandmark* getByBeaconID(
unsigned int ID )
const;
150 float getLargestDistanceFromOrigin()
const;
166 static std::map<std::pair<mrpt::maps::CLandmark::TLandmarkID, mrpt::maps::CLandmark::TLandmarkID>,
double>
_mEDD;
371 bool saveToMATLABScript2D(
373 const char *style=
"b",
374 float stdCount = 2.0f );
383 bool saveToMATLABScript3D(
385 const char *style=
"b",
386 float confInterval = 0.95f )
const ;
404 void loadSiftFeaturesFromImageObservation(
415 void loadSiftFeaturesFromStereoImageObservation(
426 void loadOccupancyFeaturesFrom2DRangeScan(
429 unsigned int downSampleFactor = 1);
432 void computeMatchingWith2D(
435 float maxDistForCorrespondence,
436 float maxAngularDistForCorrespondence,
439 float &correspondencesRatio,
440 float *sumSqrDist = NULL,
441 bool onlyKeepTheClosest =
false,
442 bool onlyUniqueRobust =
false )
const;
451 void computeMatchingWith3DLandmarks(
454 float &correspondencesRatio,
455 std::vector<bool> &otherCorrespondences)
const;
470 void fuseWith(
CLandmarksMap &other,
bool justInsertAllOfThem =
false );
475 double computeLikelihood_SIFT_LandmarkMap(
478 std::vector<bool> *otherCorrespondences = NULL);
490 void simulateBeaconReadings(
491 const
mrpt::poses::CPose3D &in_robotPose,
492 const
mrpt::poses::CPoint3D &in_sensorLocationOnRobot,
493 mrpt::obs::CObservationBeaconRanges &out_Observations ) const;
511 void simulateRangeBearingReadings(
512 const
mrpt::poses::CPose3D &robotPose,
513 const
mrpt::poses::CPose3D &sensorLocationOnRobot,
514 mrpt::obs::CObservationBearingRange &observations,
515 bool sensorDetectsIDs = true,
516 const
float stdRange = 0.01f,
520 const
double spurious_count_mean = 0,
521 const
double spurious_count_std = 0
530 void saveMetricMapRepresentationToFile(const
std::
string &filNamePrefix) const
MRPT_OVERRIDE;
mrpt::utils::CDynamicGrid< vector_int > * getGrid()
Parameters for CMetricMap::compute3DMatchingRatio()
float SiftEDDThreshold
[For SIFT landmarks only] The minimum Euclidean Descriptor Distance value of a match to set as corres...
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_stereo_images
If set to true (default), the insertion of a CObservationStereoImages in the map will insert SIFT 3D ...
#define MAP_DEFINITION_END(_CLASS_NAME_, _LINKAGE_)
unsigned int SIFTLikelihoodMethod
[For SIFT landmarks only] Method to compute the likelihood (Default = 0 (Our method)) 0: Our method -...
static bool _maxIDUpdated
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
float beaconRangesStd
The standard deviation used for Beacon ranges likelihood (default=0.08) [meters]. ...
float SIFTs_stereo_maxDepth
Maximum depth of 3D landmarks when loading a landmarks map from a stereo image observation.
With this struct options are provided to the observation insertion process.
bool m_largestDistanceFromOriginIsUpdated
Auxiliary variables used in "getLargestDistanceFromOrigin".
std::pair< mrpt::math::TPoint3D, unsigned int > TPairIdBeacon
float extRobotPoseStd
The standard deviation used for external robot poses likelihood (default=0.05) [meters].
EIGEN_STRONG_INLINE void push_back(Scalar val)
Insert an element at the end of the container (for 1D vectors/arrays)
float m_largestDistanceFromOrigin
Auxiliary variables used in "getLargestDistanceFromOrigin".
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...
internal::TSequenceLandmarks::iterator iterator
const Scalar * const_iterator
const_iterator begin() const
const_iterator end() const
This struct store de GPS longitude, latitude (in degrees ) and altitude (in meters) for the first GPS...
int64_t TLandmarkID
The type for the IDs of landmarks.
void clear()
Clear the contents of this container.
The list of landmarks: the wrapper class is just for maintaining the KD-Tree representation.
With this struct options are provided to the likelihood computations.
This class allows loading and storing values and vectors of different types from a configuration text...
bool beaconRangesUseObservationStd
(Default: false) If true, beaconRangesStd is ignored and each individual CObservationBeaconRanges::st...
static mrpt::maps::CLandmark::TLandmarkID _mapMaxID
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 SIFTsLoadDistanceOfTheMean
[For SIFT landmarks only] The distance (in meters) of the mean value of landmarks, for the initial position PDF (Default = 3m)
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
int SIFTs_numberOfKLTKeypoints
Number of points to extract in the image.
#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...
int SIFTs_decimation
Considers 1 out of "SIFTs_decimation" visual landmarks in the observation during the likelihood compu...
A class for storing a map of 3D probabilistic landmarks.
internal::TSequenceLandmarks m_landmarks
The actual list.
float SIFTs_stdXY
[For SIFT landmarks only] The standard deviation (in pixels) for the SIFTs detector (This is used for...
Scale Invariant Feature Transform [LOWE'04].
Observation class for either a pair of left+right or left+disparity images from a stereo camera...
float SIFTnullCorrespondenceDistance
mrpt::maps::CLandmarksMap CLandmarksMap
Backward compatible typedef.
GLsizei const GLchar ** string
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map...
unsigned int minTimesSeen
Required number of times of a landmark to be seen not to be removed, in "ellapsedTime" seconds...
static std::map< std::pair< mrpt::maps::CLandmark::TLandmarkID, mrpt::maps::CLandmark::TLandmarkID >, double > _mEDD
Map of the Euclidean Distance between the descriptors of two SIFT-based landmarks.
unsigned int rangeScan2D_decimation
The number of rays from a 2D range scan will be decimated by this factor (default = 1...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
The class for storing "landmarks" (visual or laser-scan-extracted features,...)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
float ellapsedTime
See "minTimesSeen".
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...
bool PLOT_IMAGES
Indicates if the images (as well as the SIFT detected features) should be shown in a window...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
float SIFTsLoadEllipsoidWidth
[For SIFT landmarks only] The width (in meters, standard deviation) of the ellipsoid in the axis perp...
GLsizei GLsizei GLchar * source
std::vector< size_t > vector_size_t
bool insert_Landmarks_from_range_scans
If set to true (default), inserting a CObservation2DRangeScan in the map will generate landmarks for ...
internal::TSequenceLandmarks::const_iterator const_iterator
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 SiftLikelihoodThreshold
[For SIFT landmarks only] The minimum likelihood value of a match to set as correspondence (Default=0...
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
GLenum const GLfloat * params
float SiftCorrRatioThreshold
[For SIFT landmarks only] The ratio between the best and second best descriptor distances to set as c...
double SIFTs_sigma_euclidean_dist
#define MAP_DEFINITION_START(_CLASS_NAME_, _LINKAGE_)
Add a MAP_DEFINITION_START() ...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
unsigned int min_sat
Minimum number of sats to take into account the data.
mrpt::utils::CDynamicGrid< vector_int > m_grid
A grid-map with the set of landmarks falling into each cell.
float GPS_sigma
A constant "sigma" for GPS localization data (in meters)
double SIFTs_sigma_descriptor_dist
With this struct options are provided to the fusion process.
std::vector< CLandmark > TSequenceLandmarks
unsigned int SIFTMatching3DMethod
[For SIFT landmarks only] Method to compute 3D matching (Default = 0 (Our method)) 0: Our method -> E...