#include <mrpt/slam/CBeaconMap.h>
Classes | |
struct | TInsertionOptions |
This struct contains data for choosing the method by which new beacons are inserted in the map. More... | |
struct | TLikelihoodOptions |
With this struct options are provided to the likelihood computations. More... | |
Public Member Functions | |
CBeaconMap () | |
Constructor. | |
virtual | ~CBeaconMap () |
Virtual destructor. | |
float | compute3DMatchingRatio (const CMetricMap *otherMap, const CPose3D &otherMapPose, float minDistForCorr=0.10f, float minMahaDistForCorr=2.0f) const |
Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps. | |
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. | |
void | clear () |
Clear the map, erasing all landmarks. | |
size_t | size () const |
Returns the stored landmarks count. | |
bool | insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL) |
Insert the observation information into this map. | |
double | computeObservationLikelihood (const CObservation *obs, const CPose3D &takenFrom) |
Computes the (logarithmic) likelihood that a given observation was taken from a given pose in the world being modeled with this map. | |
void | computeMatchingWith2D (const CMetricMap *otherMap, const CPose2D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const CPose2D &angularDistPivotPoint, TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=NULL, bool onlyKeepTheClosest=false, bool onlyUniqueRobust=false) const |
Computes the matchings between this and another 2D points map. | |
void | computeMatchingWith3DLandmarks (const mrpt::slam::CBeaconMap *otherMap, TMatchingPairList &correspondences, float &correspondencesRatio, std::vector< bool > &otherCorrespondences) const |
Perform a search for correspondences between "this" and another lansmarks map: Firsly, the landmarks' descriptor is used to find correspondences, then inconsistent ones removed by looking at their 3D poses. | |
void | changeCoordinatesReference (const CPose3D &newOrg) |
Changes the reference system of the map to a given 3D pose. | |
void | changeCoordinatesReference (const CPose3D &newOrg, const mrpt::slam::CBeaconMap *otherMap) |
Changes the reference system of the map "otherMap" and save the result in "this" map. | |
bool | isEmpty () const |
Returns true if the map is empty/no observation has been inserted. | |
void | simulateBeaconReadings (const CPose3D &in_robotPose, const CPoint3D &in_sensorLocationOnRobot, CObservationBeaconRanges &out_Observations) const |
Simulates a reading toward each of the beacons in the landmarks map, if any. | |
void | saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const |
This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface). | |
void | saveToTextFile (const std::string &fil) const |
Save a text file with a row per beacon, containing this 11 elements:
| |
void | getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const |
Returns a 3D object representing the map. | |
void | auxParticleFilterCleanUp () |
This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation". | |
const CBeacon * | getBeaconByID (CBeacon::TBeaconID id) const |
Returns a pointer to the beacon with the given ID, or NULL if it does not exist. | |
CBeacon * | getBeaconByID (CBeacon::TBeaconID id) |
Returns a pointer to the beacon with the given ID, or NULL if it does not exist. | |
Public Attributes | |
TSequenceBeacons | m_beacons |
The individual beacons:. | |
mrpt::slam::CBeaconMap::TLikelihoodOptions | likelihoodOptions |
With this struct options are provided to the likelihood computations. | |
mrpt::slam::CBeaconMap::TInsertionOptions | insertionOptions |
This struct contains data for choosing the method by which new beacons are inserted in the map. |
The individual beacons are defined as mrpt::slam::CBeacon objects.
When invoking CBeaconMap::insertObservation(), landmarks will be extracted and fused into the map. The only currently supported observation type is mrpt::slam::CObservationBeaconRanges. See insertionOptions and likelihoodOptions for parameters used when creating and fusing beacon landmarks.
Use "TInsertionOptions::insertAsMonteCarlo" to select between 2 different behaviors:
Refer to the papers: []
Definition at line 69 of file CBeaconMap.h.
mrpt::slam::CBeaconMap::CBeaconMap | ( | ) |
Constructor.
virtual mrpt::slam::CBeaconMap::~CBeaconMap | ( | ) | [virtual] |
Virtual destructor.
void mrpt::slam::CBeaconMap::auxParticleFilterCleanUp | ( | ) | [virtual] |
This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation".
This method should normally do nothing, but in some cases can be used to free auxiliary cached variables.
Implements mrpt::slam::CMetricMap.
void mrpt::slam::CBeaconMap::changeCoordinatesReference | ( | const CPose3D & | newOrg, | |
const mrpt::slam::CBeaconMap * | otherMap | |||
) |
Changes the reference system of the map "otherMap" and save the result in "this" map.
void mrpt::slam::CBeaconMap::changeCoordinatesReference | ( | const CPose3D & | newOrg | ) |
Changes the reference system of the map to a given 3D pose.
void mrpt::slam::CBeaconMap::clear | ( | ) | [virtual] |
float mrpt::slam::CBeaconMap::compute3DMatchingRatio | ( | const CMetricMap * | otherMap, | |
const CPose3D & | otherMapPose, | |||
float | minDistForCorr = 0.10f , |
|||
float | minMahaDistForCorr = 2.0f | |||
) | const [virtual] |
Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps.
This method always return 0 for grid maps.
otherMap | [IN] The other map to compute the matching with. | |
otherMapPose | [IN] The 6D pose of the other map as seen from "this". | |
minDistForCorr | [IN] The minimum distance between 2 non-probabilistic map elements for counting them as a correspondence. | |
minMahaDistForCorr | [IN] The minimum Mahalanobis distance between 2 probabilistic map elements for counting them as a correspondence. |
Implements mrpt::slam::CMetricMap.
void mrpt::slam::CBeaconMap::computeMatchingWith2D | ( | const CMetricMap * | otherMap, | |
const CPose2D & | otherMapPose, | |||
float | maxDistForCorrespondence, | |||
float | maxAngularDistForCorrespondence, | |||
const CPose2D & | angularDistPivotPoint, | |||
TMatchingPairList & | correspondences, | |||
float & | correspondencesRatio, | |||
float * | sumSqrDist = NULL , |
|||
bool | onlyKeepTheClosest = false , |
|||
bool | onlyUniqueRobust = false | |||
) | const [virtual] |
Computes the matchings between this and another 2D points map.
This includes finding:
otherMap | [IN] The other map to compute the matching with. | |
otherMapPose | [IN] The pose of the other map as seen from "this". | |
maxDistForCorrespondence | [IN] Maximum 2D linear distance between two points to be matched. | |
maxAngularDistForCorrespondence | [IN] In radians: The aim is to allow larger distances to more distant correspondences. | |
angularDistPivotPoint | [IN] The point used to calculate distances from in both maps. | |
correspondences | [OUT] The detected matchings pairs. | |
correspondencesRatio | [OUT] The ratio [0,1] of points in otherMap with at least one correspondence. | |
sumSqrDist | [OUT] The sum of all matched points squared distances.If undesired, set to NULL, as default. | |
covariance | [OUT] The resulting matching covariance 3x3 matrix, or NULL if undesired. | |
onlyKeepTheClosest | [IN] If set to true, only the closest correspondence will be returned. If false (default) all are returned. |
Reimplemented from mrpt::slam::CMetricMap.
void mrpt::slam::CBeaconMap::computeMatchingWith3DLandmarks | ( | const mrpt::slam::CBeaconMap * | otherMap, | |
TMatchingPairList & | correspondences, | |||
float & | correspondencesRatio, | |||
std::vector< bool > & | otherCorrespondences | |||
) | const |
Perform a search for correspondences between "this" and another lansmarks map: Firsly, the landmarks' descriptor is used to find correspondences, then inconsistent ones removed by looking at their 3D poses.
otherMap | [IN] The other map. | |
correspondences | [OUT] The matched pairs between maps. | |
correspondencesRatio | [OUT] This is NumberOfMatchings / NumberOfLandmarksInTheAnotherMap | |
otherCorrespondences | [OUT] Will be returned with a vector containing "true" for the indexes of the other map's landmarks with a correspondence. |
double mrpt::slam::CBeaconMap::computeObservationLikelihood | ( | const CObservation * | obs, | |
const CPose3D & | takenFrom | |||
) | [virtual] |
Computes the (logarithmic) likelihood that a given observation was taken from a given pose in the world being modeled with this map.
In the current implementation, this method behaves in a different way according to the nature of the observation's class:
takenFrom | The robot's pose the observation is supposed to be taken from. | |
obs | The observation. |
Implements mrpt::slam::CMetricMap.
void mrpt::slam::CBeaconMap::getAs3DObject | ( | mrpt::opengl::CSetOfObjectsPtr & | outObj | ) | const [virtual] |
CBeacon* mrpt::slam::CBeaconMap::getBeaconByID | ( | CBeacon::TBeaconID | id | ) |
Returns a pointer to the beacon with the given ID, or NULL if it does not exist.
const CBeacon* mrpt::slam::CBeaconMap::getBeaconByID | ( | CBeacon::TBeaconID | id | ) | const |
Returns a pointer to the beacon with the given ID, or NULL if it does not exist.
bool mrpt::slam::CBeaconMap::insertObservation | ( | const CObservation * | obs, | |
const CPose3D * | robotPose = NULL | |||
) | [virtual] |
Insert the observation information into this map.
This method must be implemented in derived classes.
obs | The observation | |
robotPose | The 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use CPose2D(0,0,deg) |
Implements mrpt::slam::CMetricMap.
bool mrpt::slam::CBeaconMap::isEmpty | ( | ) | const [virtual] |
Returns true if the map is empty/no observation has been inserted.
Implements mrpt::slam::CMetricMap.
void mrpt::slam::CBeaconMap::saveMetricMapRepresentationToFile | ( | const std::string & | filNamePrefix | ) | const [virtual] |
This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface).
In the case of this class, these files are generated:
Implements mrpt::slam::CMetricMap.
bool mrpt::slam::CBeaconMap::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.
file | The name of the file to save the script to. | |
style | The MATLAB-like string for the style of the lines (see 'help plot' in MATLAB for posibilities) | |
stdCount | The ellipsoids will be drawn from the center to a given confidence interval in [0,1], e.g. 2 sigmas=0.95 (default is 2std = 0.95 confidence intervals) |
void mrpt::slam::CBeaconMap::saveToTextFile | ( | const std::string & | fil | ) | const |
Save a text file with a row per beacon, containing this 11 elements:
void mrpt::slam::CBeaconMap::simulateBeaconReadings | ( | const CPose3D & | in_robotPose, | |
const CPoint3D & | in_sensorLocationOnRobot, | |||
CObservationBeaconRanges & | out_Observations | |||
) | const |
Simulates a reading toward each of the beacons in the landmarks map, if any.
in_robotPose | This robot pose is used to simulate the ranges to each beacon. | |
in_sensorLocationOnRobot | The 3D position of the sensor on the robot | |
out_Observations | The results will be stored here. NOTICE that the fields "CObservationBeaconRanges::minSensorDistance","CObservationBeaconRanges::maxSensorDistance" and "CObservationBeaconRanges::stdError" MUST BE FILLED OUT before calling this function. An observation will be generated for each beacon in the map, but notice that some of them may be missed if out of the sensor maximum range. |
size_t mrpt::slam::CBeaconMap::size | ( | ) | const |
Returns the stored landmarks count.
This struct contains data for choosing the method by which new beacons are inserted in the map.
With this struct options are provided to the likelihood computations.
Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN: at Sun Aug 2 11:39:56 CDT 2009 |