Go to the documentation of this file.
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(); };
166 static std::map<std::pair<mrpt::maps::CLandmark::TLandmarkID, mrpt::maps::CLandmark::TLandmarkID>,
double>
_mEDD;
368 const char *style=
"b",
369 float stdCount = 2.0f );
380 const char *style=
"b",
381 float confInterval = 0.95f )
const ;
424 unsigned int downSampleFactor = 1);
430 float maxDistForCorrespondence,
431 float maxAngularDistForCorrespondence,
434 float &correspondencesRatio,
435 float *sumSqrDist = NULL,
436 bool onlyKeepTheClosest =
false,
437 bool onlyUniqueRobust =
false )
const;
449 float &correspondencesRatio,
450 std::vector<bool> &otherCorrespondences)
const;
473 std::vector<bool> *otherCorrespondences = NULL);
485 void simulateBeaconReadings(
486 const
mrpt::poses::CPose3D &in_robotPose,
487 const
mrpt::poses::CPoint3D &in_sensorLocationOnRobot,
488 mrpt::obs::CObservationBeaconRanges &out_Observations ) const;
506 void simulateRangeBearingReadings(
507 const
mrpt::poses::CPose3D &robotPose,
508 const
mrpt::poses::CPose3D &sensorLocationOnRobot,
509 mrpt::obs::CObservationBearingRange &observations,
510 bool sensorDetectsIDs = true,
511 const
float stdRange = 0.01f,
515 const
double spurious_count_mean = 0,
516 const
double spurious_count_std = 0
525 void saveMetricMapRepresentationToFile(const std::
string &filNamePrefix) const
MRPT_OVERRIDE;
void push_back(const CLandmark &lm)
The object is copied, thus the original copy passed as a parameter can be released.
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 ellapsedTime
See "minTimesSeen".
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ion) MRPT_OVERRIDE
This method load the options from a ".ini"-like file or memory-stored string list.
float SiftLikelihoodThreshold
[For SIFT landmarks only] The minimum likelihood value of a match to set as correspondence (Default=0...
float SIFTsLoadEllipsoidWidth
[For SIFT landmarks only] The width (in meters, standard deviation) of the ellipsoid in the axis perp...
static bool _maxIDUpdated
float SiftEDDThreshold
[For SIFT landmarks only] The minimum Euclidean Descriptor Distance value of a match to set as corres...
bool m_largestDistanceFromOriginIsUpdated
Auxiliary variables used in "getLargestDistanceFromOrigin".
const Scalar * const_iterator
internal::TSequenceLandmarks::iterator iterator
void fuseWith(CLandmarksMap &other, bool justInsertAllOfThem=false)
Fuses the contents of another map with this one, updating "this" object with the result.
void computeMatchingWith3DLandmarks(const mrpt::maps::CLandmarksMap *otherMap, mrpt::utils::TMatchingPairList &correspondences, float &correspondencesRatio, std::vector< bool > &otherCorrespondences) const
Perform a search for correspondences between "this" and another lansmarks map: In this class,...
#define MAP_DEFINITION_END(_CLASS_NAME_, _LINKAGE_)
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
void dumpToTextStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
This method should clearly display all the contents of the structure in textual form,...
bool insert_SIFTs_from_stereo_images
If set to true (default), the insertion of a CObservationStereoImages in the map will insert SIFT 3D ...
float SIFTnullCorrespondenceDistance
mrpt::utils::CDynamicGrid< vector_int > * getGrid()
const CLandmark * get(unsigned int indx) const
bool saveToMATLABScript2D(std::string file, const char *style="b", float stdCount=2.0f)
Save to a MATLAB script which displays 2D error ellipses for the map (top-view, projection on the XY ...
float compute3DMatchingRatio(const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, const TMatchingRatioParams ¶ms) const MRPT_OVERRIDE
Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map,...
TCustomSequenceLandmarks()
Default constructor.
const_iterator end() const
float SIFTsLoadDistanceOfTheMean
[For SIFT landmarks only] The distance (in meters) of the mean value of landmarks,...
float GPS_sigma
A constant "sigma" for GPS localization data (in meters)
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ion) MRPT_OVERRIDE
This method load the options from a ".ini"-like file or memory-stored string list.
With this struct options are provided to the observation insertion process.
Parameters for CMetricMap::compute3DMatchingRatio()
double computeLikelihood_SIFT_LandmarkMap(CLandmarksMap *map, mrpt::utils::TMatchingPairList *correspondences=NULL, std::vector< bool > *otherCorrespondences=NULL)
Returns the (logarithmic) likelihood of a set of landmarks "map" given "this" map.
double SIFTs_sigma_euclidean_dist
void computeMatchingWith2D(const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const mrpt::poses::CPose2D &angularDistPivotPoint, mrpt::utils::TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=NULL, bool onlyKeepTheClosest=false, bool onlyUniqueRobust=false) const
mrpt::maps::CLandmark::TLandmarkID getMapMaxID()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned int SIFTLikelihoodMethod
[For SIFT landmarks only] Method to compute the likelihood (Default = 0 (Our method)) 0: Our method -...
float SiftCorrRatioThreshold
[For SIFT landmarks only] The ratio between the best and second best descriptor distances to set as c...
bool saveToTextFile(std::string file)
Save to a text file.
double SIFTs_sigma_descriptor_dist
unsigned int rangeScan2D_decimation
The number of rays from a 2D range scan will be decimated by this factor (default = 1,...
unsigned int SIFTMatching3DMethod
[For SIFT landmarks only] Method to compute 3D matching (Default = 0 (Our method)) 0: Our method -> E...
float m_largestDistanceFromOrigin
Auxiliary variables used in "getLargestDistanceFromOrigin".
void internal_clear() MRPT_OVERRIDE
Internal method called by clear()
internal::TSequenceLandmarks m_landmarks
The actual list.
This struct store de GPS longitude, latitude (in degrees ) and altitude (in meters) for the first GPS...
const CLandmark * getByBeaconID(unsigned int ID) const
Returns the landmark with a given beacon ID, or NULL if not found.
const_iterator begin() const
void erase(unsigned int indx)
CLandmark * get(unsigned int indx)
int SIFTs_numberOfKLTKeypoints
Number of points to extract in the image.
void isToBeModified(unsigned int indx)
With this struct options are provided to the fusion process.
bool insert_Landmarks_from_range_scans
If set to true (default), inserting a CObservation2DRangeScan in the map will generate landmarks for ...
Declares a virtual base class for all metric maps storage classes.
#define MAP_DEFINITION_START(_CLASS_NAME_, _LINKAGE_)
Add a MAP_DEFINITION_START() ...
bool isEmpty() const MRPT_OVERRIDE
Returns true if the map is empty/no observation has been inserted.
void hasBeenModified(unsigned int indx)
The class for storing "landmarks" (visual or laser-scan-extracted features,...)
This struct stores extra results from invoking insertObservation.
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.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
int64_t TLandmarkID
The type for the IDs of landmarks.
static mrpt::maps::CLandmark::TLandmarkID _mapMaxID
This class allows loading and storing values and vectors of different types from a configuration text...
int SIFTs_decimation
Considers 1 out of "SIFTs_decimation" visual landmarks in the observation during the likelihood compu...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
A class used to store a 2D pose.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
@ featSIFT
Scale Invariant Feature Transform [LOWE'04].
void loadOccupancyFeaturesFrom2DRangeScan(const mrpt::obs::CObservation2DRangeScan &obs, const mrpt::poses::CPose3D *robotPose=NULL, unsigned int downSampleFactor=1)
Loads into this landmarks-map a set of occupancy features according to a 2D range scan (Previous cont...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
TFuseOptions()
Initialization.
void loadSiftFeaturesFromStereoImageObservation(const mrpt::obs::CObservationStereoImages &obs, mrpt::maps::CLandmark::TLandmarkID fID, const mrpt::vision::CFeatureExtraction::TOptions &feat_options=mrpt::vision::CFeatureExtraction::TOptions(mrpt::vision::featSIFT))
Loads into this landmarks map the SIFT features extracted from an observation consisting of a pair of...
void changeCoordinatesReference(const mrpt::poses::CPose3D &newOrg, const mrpt::maps::CLandmarksMap *otherMap)
Changes the reference system of the map "otherMap" and save the result in "this" map.
CLandmarksMap()
Constructor.
float SIFTs_stdXY
[For SIFT landmarks only] The standard deviation (in pixels) for the SIFTs detector (This is used for...
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map.
const CLandmark * getByID(CLandmark::TLandmarkID ID) const
Returns the landmark with a given landmrk ID, or NULL if not found.
bool beaconRangesUseObservationStd
(Default: false) If true, beaconRangesStd is ignored and each individual CObservationBeaconRanges::st...
#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::pair< mrpt::math::TPoint3D, unsigned int > TPairIdBeacon
std::vector< CLandmark > TSequenceLandmarks
The list of landmarks: the wrapper class is just for maintaining the KD-Tree representation.
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map.
bool saveToMATLABScript3D(std::string file, const char *style="b", float confInterval=0.95f) const
Save to a MATLAB script which displays 3D error ellipses for the map.
internal::TSequenceLandmarks::const_iterator const_iterator
void changeCoordinatesReference(const mrpt::poses::CPose3D &newOrg)
Changes the reference system of the map to a given 3D pose.
float getLargestDistanceFromOrigin() const
This method returns the largest distance from the origin to any of the points, such as a sphere cente...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
float beaconRangesStd
The standard deviation used for Beacon ranges likelihood (default=0.08) [meters].
unsigned int min_sat
Minimum number of sats to take into account the data.
void hasBeenModifiedAll()
mrpt::utils::CDynamicGrid< vector_int > m_grid
A grid-map with the set of landmarks falling into each cell.
With this struct options are provided to the likelihood computations.
TInsertionOptions()
Initilization of default parameters.
void loadSiftFeaturesFromImageObservation(const mrpt::obs::CObservationImage &obs, const mrpt::vision::CFeatureExtraction::TOptions &feat_options=mrpt::vision::CFeatureExtraction::TOptions(mrpt::vision::featSIFT))
Loads into this landmarks map the SIFT features extracted from an image observation (Previous content...
A class for storing a map of 3D probabilistic landmarks.
double computeLikelihood_RSLC_2007(const CLandmarksMap *s, const mrpt::poses::CPose2D &sensorPose)
Computes the (logarithmic) likelihood function for a sensed observation "o" according to "this" map.
float SIFTs_stereo_maxDepth
Maximum depth of 3D landmarks when loading a landmarks map from a stereo image observation.
std::vector< size_t > vector_size_t
void dumpToTextStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
This method should clearly display all the contents of the structure in textual form,...
size_t size() const
Returns the stored landmarks count.
Declares a class derived from "CObservation" that encapsules an image from a camera,...
float SIFTs_epipolar_TH
Maximum distance (in pixels) from a point to a certain epipolar line to be considered a potential mat...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
virtual ~CLandmarksMap()
Virtual destructor.
Observation class for either a pair of left+right or left+disparity images from a stereo camera.
unsigned int minTimesSeen
Required number of times of a landmark to be seen not to be removed, in "ellapsedTime" seconds.
bool PLOT_IMAGES
Indicates if the images (as well as the SIFT detected features) should be shown in a window.
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |