#include <mrpt/slam/CSensoryFrame.h>

Public Types | |
| typedef std::deque < CObservationPtr >::iterator | iterator |
| You can use CSensoryFrame::begin to get a iterator to the first element. | |
| typedef std::deque < CObservationPtr > ::const_iterator | const_iterator |
| You can use CSensoryFrame::begin to get a iterator to the first element. | |
Public Member Functions | |
| CSensoryFrame () | |
| Default constructor. | |
| CSensoryFrame (const CSensoryFrame &) | |
| Copy constructor. | |
| const CPointsMap * | buildAuxPointsMap (CPointsMap::TInsertionOptions *ops=NULL) const |
| Build (only on the first call), and return a simple points map built from the observations in the SF (options can be optionally provided to the map building process). | |
| CSensoryFrame & | operator= (const CSensoryFrame &o) |
| Copy. | |
| virtual | ~CSensoryFrame () |
| Destructor. | |
| void | clear () |
| Clear all current observations. | |
| bool | insertObservationsInto (CMetricMap *theMap, const CPose3D *robotPose=NULL) const |
| Dump all observations in a metric map. | |
| bool | insertObservationsInto (CMetricMapPtr &theMap, const CPose3D *robotPose=NULL) const |
| Dump all observations in a metric map. | |
| float | likelihoodWith (const CSensoryFrame *anotherSF, const CPosePDF *anotherSFPose=NULL) const |
| Returns the average of "likelihoodWith" evaluated between all the observations of this and another sensoryframe. | |
| void | operator+= (const CSensoryFrame &sf) |
| You can use "sf1+=sf2;" to add observations in sf2 to sf1. | |
| void | operator+= (const CObservationPtr &obs) |
| You can use "sf+=obs;" to add the observation "obs" to the "sf1". | |
| void | moveFrom (CSensoryFrame &sf) |
| Copies all the observation from another object, then erase them from the origin object (this method is fast since only pointers are copied); Previous objects in this objects are not deleted. | |
| void | push_back (const CObservationPtr &obs) |
| Inserts a new observation to the list: The pointer to the objects is copied, thus DO NOT delete the passed object, this class will do at destructor or when appropriate. | |
| void | insert (const CObservationPtr &obs) |
| Inserts a new observation to the list: The pointer to the objects is copied, thus DO NOT delete the passed object, this class will do at destructor or when appropriate. | |
| template<typename T > | |
| T::SmartPtr | getObservationByClass (const size_t &ith=0) const |
| Returns the i'th observation of a given class (or of a descendant class), or NULL if there is no such observation in the array. | |
| const_iterator | begin () const |
| Returns a iterator to the first observation: this is an example of usage:. | |
| const_iterator | end () const |
| Returns a iterator to the end of the list of observations: this is an example of usage:. | |
| iterator | begin () |
| Returns a iterator to the first observation: this is an example of usage:. | |
| iterator | end () |
| Returns a iterator to the end of the list of observations: this is an example of usage:. | |
| size_t | size () const |
| Returns the number of observations in the list. | |
| void | eraseByIndex (const size_t &idx) |
| Removes the i'th observation in the list (0=first). | |
| iterator | erase (const iterator &it) |
| Removes the given observation in the list, and return an iterator to the next element (or this->end() if it was the last one). | |
| void | eraseByLabel (const std::string &label) |
| Removes all the observations that match a given sensorLabel. | |
| CObservationPtr | getObservationByIndex (const size_t &idx) const |
| Returns the i'th observation in the list (0=first). | |
| template<typename T > | |
| T | getObservationByIndexAs (const size_t &idx) const |
| Returns the i'th observation in the list (0=first), and as a different smart pointer type:. | |
| CObservationPtr | getObservationBySensorLabel (const std::string &label, const size_t &idx=0) const |
| Returns the i'th observation in the list with the given "sensorLabel" (0=first). | |
| template<typename T > | |
| T | getObservationBySensorLabelAs (const std::string &label, const size_t &idx=0) const |
| Returns the i'th observation in the list with the given "sensorLabel" (0=first), and as a different smart pointer type:. | |
| void | swap (CSensoryFrame &sf) |
| Efficiently swaps the contents of two objects. | |
Protected Attributes | |
| std::deque< CObservationPtr > | m_observations |
| The set of observations taken at the same time instant. | |
Private Attributes | |
| CObservation2DRangeScan::CAuxMapWrapper | m_auxMap |
| Auxiliary points map, built only under request through buildAuxPointsMap. | |
Static Private Attributes | |
| static mrpt::utils::CLASSINIT | _init_CSensorialFrame |
| static mrpt::utils::TRuntimeClassId | classCSensorialFrame |
New observations can be added using:
CObservation *o = new CObservationXXX(...); CSensoryFrame sf; sf.insert(o);
The following methods are equivalent for adding new observations to a "sensory frame": CSensoryFrame::operator += CSensoryFrame::push_back CSensoryFrame::insert
To examine the objects within a sensory frame, the following methods exist: CSensoryFrame::getObservationByClass : Looks for some specific observation class. CSensoryFrame::begin : To iterate over all observations. CSensoryFrame::getObservationByIndex : To query by index.
Notice that observations objects are automatically deleted on Sensorial Frame destruction or clear.
Definition at line 71 of file CSensoryFrame.h.
| typedef std::deque<CObservationPtr>::const_iterator mrpt::slam::CSensoryFrame::const_iterator |
You can use CSensoryFrame::begin to get a iterator to the first element.
Definition at line 195 of file CSensoryFrame.h.
| typedef std::deque<CObservationPtr>::iterator mrpt::slam::CSensoryFrame::iterator |
You can use CSensoryFrame::begin to get a iterator to the first element.
Definition at line 191 of file CSensoryFrame.h.
| mrpt::slam::CSensoryFrame::CSensoryFrame | ( | ) |
Default constructor.
| mrpt::slam::CSensoryFrame::CSensoryFrame | ( | const CSensoryFrame & | ) |
Copy constructor.
| virtual mrpt::slam::CSensoryFrame::~CSensoryFrame | ( | ) | [virtual] |
Destructor.
| iterator mrpt::slam::CSensoryFrame::begin | ( | ) | [inline] |
Returns a iterator to the first observation: this is an example of usage:.
CSensoryFrame sf; ... for (CSensoryFrame::iterator it=sf.begin();it!=sf.end();++it) { (*it)->... // (*it) is a "CObservation*" }
Definition at line 234 of file CSensoryFrame.h.
| const_iterator mrpt::slam::CSensoryFrame::begin | ( | ) | const [inline] |
Returns a iterator to the first observation: this is an example of usage:.
CSensoryFrame sf; ... for (CSensoryFrame::iterator it=sf.begin();it!=sf.end();++it) { (*it)->... // (*it) is a "CObservation*" }
Definition at line 208 of file CSensoryFrame.h.
| const CPointsMap* mrpt::slam::CSensoryFrame::buildAuxPointsMap | ( | CPointsMap::TInsertionOptions * | ops = NULL |
) | const |
Build (only on the first call), and return a simple points map built from the observations in the SF (options can be optionally provided to the map building process).
| void mrpt::slam::CSensoryFrame::clear | ( | ) |
Clear all current observations.
| iterator mrpt::slam::CSensoryFrame::end | ( | ) | [inline] |
Returns a iterator to the end of the list of observations: this is an example of usage:.
CSensoryFrame sf; ... for (CSensoryFrame::iterator it=sf.begin();it!=sf.end();++it) { (*it)->... // (*it) is a "CObservation*" }
Definition at line 247 of file CSensoryFrame.h.
| const_iterator mrpt::slam::CSensoryFrame::end | ( | ) | const [inline] |
Returns a iterator to the end of the list of observations: this is an example of usage:.
CSensoryFrame sf; ... for (CSensoryFrame::iterator it=sf.begin();it!=sf.end();++it) { (*it)->... // (*it) is a "CObservation*" }
Definition at line 221 of file CSensoryFrame.h.
Removes the given observation in the list, and return an iterator to the next element (or this->end() if it was the last one).
| void mrpt::slam::CSensoryFrame::eraseByIndex | ( | const size_t & | idx | ) |
Removes the i'th observation in the list (0=first).
| void mrpt::slam::CSensoryFrame::eraseByLabel | ( | const std::string & | label | ) |
Removes all the observations that match a given sensorLabel.
| T::SmartPtr mrpt::slam::CSensoryFrame::getObservationByClass | ( | const size_t & | ith = 0 |
) | const [inline] |
Returns the i'th observation of a given class (or of a descendant class), or NULL if there is no such observation in the array.
Example:
CObservationImagePtr obs = m_SF->getObservationByClass<CObservationImage>();
Definition at line 176 of file CSensoryFrame.h.
References MRPT_TRY_END, and MRPT_TRY_START.
| CObservationPtr mrpt::slam::CSensoryFrame::getObservationByIndex | ( | const size_t & | idx | ) | const |
| T mrpt::slam::CSensoryFrame::getObservationByIndexAs | ( | const size_t & | idx | ) | const [inline] |
Returns the i'th observation in the list (0=first), and as a different smart pointer type:.
sf.getObservationByIndexAs<CObservationStereoImagesPtr>(i);
Definition at line 278 of file CSensoryFrame.h.
| CObservationPtr mrpt::slam::CSensoryFrame::getObservationBySensorLabel | ( | const std::string & | label, | |
| const size_t & | idx = 0 | |||
| ) | const |
| T mrpt::slam::CSensoryFrame::getObservationBySensorLabelAs | ( | const std::string & | label, | |
| const size_t & | idx = 0 | |||
| ) | const [inline] |
Returns the i'th observation in the list with the given "sensorLabel" (0=first), and as a different smart pointer type:.
sf.getObservationBySensorLabelAs<CObservationStereoImagesPtr>(i);
Definition at line 296 of file CSensoryFrame.h.
| void mrpt::slam::CSensoryFrame::insert | ( | const CObservationPtr & | obs | ) |
Inserts a new observation to the list: The pointer to the objects is copied, thus DO NOT delete the passed object, this class will do at destructor or when appropriate.
| bool mrpt::slam::CSensoryFrame::insertObservationsInto | ( | CMetricMapPtr & | theMap, | |
| const CPose3D * | robotPose = NULL | |||
| ) | const [inline] |
Dump all observations in a metric map.
It calls CObservation::insertObservationInto for all stored observation.
| theMap | The map where this observation is to be inserted: the map will be updated. | |
| robotPose | The pose of the robot base for this observation, relative to the target metric map. Set to NULL (default) to use (0,0,0deg) |
Definition at line 130 of file CSensoryFrame.h.
| bool mrpt::slam::CSensoryFrame::insertObservationsInto | ( | CMetricMap * | theMap, | |
| const CPose3D * | robotPose = NULL | |||
| ) | const |
Dump all observations in a metric map.
It calls CObservation::insertObservationInto for all stored observation.
| theMap | The map where this observation is to be inserted: the map will be updated. | |
| robotPose | The pose of the robot base for this observation, relative to the target metric map. Set to NULL (default) to use (0,0,0deg) |
| float mrpt::slam::CSensoryFrame::likelihoodWith | ( | const CSensoryFrame * | anotherSF, | |
| const CPosePDF * | anotherSFPose = NULL | |||
| ) | const |
Returns the average of "likelihoodWith" evaluated between all the observations of this and another sensoryframe.
| anotherSF | The other observations to compute likelihood with. | |
| anotherSFPose | If known, the belief about the relative robot pose when the other observations were taken can be supplied here, or NULL if it is unknown. |
| std::exception | On any error, as another observation being of an invalid class. |
| void mrpt::slam::CSensoryFrame::moveFrom | ( | CSensoryFrame & | sf | ) |
Copies all the observation from another object, then erase them from the origin object (this method is fast since only pointers are copied); Previous objects in this objects are not deleted.
| void mrpt::slam::CSensoryFrame::operator+= | ( | const CObservationPtr & | obs | ) |
You can use "sf+=obs;" to add the observation "obs" to the "sf1".
Objects are copied, using the smart pointer, thus the original pointer can be safely deleted next.
| void mrpt::slam::CSensoryFrame::operator+= | ( | const CSensoryFrame & | sf | ) |
You can use "sf1+=sf2;" to add observations in sf2 to sf1.
Objects are copied, not referenced, thus the source can be safely deleted next.
| CSensoryFrame& mrpt::slam::CSensoryFrame::operator= | ( | const CSensoryFrame & | o | ) |
Copy.
| void mrpt::slam::CSensoryFrame::push_back | ( | const CObservationPtr & | obs | ) |
Inserts a new observation to the list: The pointer to the objects is copied, thus DO NOT delete the passed object, this class will do at destructor or when appropriate.
| size_t mrpt::slam::CSensoryFrame::size | ( | ) | const |
Returns the number of observations in the list.
| void mrpt::slam::CSensoryFrame::swap | ( | CSensoryFrame & | sf | ) |
Efficiently swaps the contents of two objects.
mrpt::utils::CLASSINIT mrpt::slam::CSensoryFrame::_init_CSensorialFrame [static, private] |
Definition at line 78 of file CSensoryFrame.h.
mrpt::utils::TRuntimeClassId mrpt::slam::CSensoryFrame::classCSensorialFrame [static, private] |
Definition at line 79 of file CSensoryFrame.h.
CObservation2DRangeScan::CAuxMapWrapper mrpt::slam::CSensoryFrame::m_auxMap [mutable, private] |
Auxiliary points map, built only under request through buildAuxPointsMap.
Definition at line 83 of file CSensoryFrame.h.
std::deque<CObservationPtr> mrpt::slam::CSensoryFrame::m_observations [protected] |
The set of observations taken at the same time instant.
See the top of this page for instructions on accessing this.
Definition at line 309 of file CSensoryFrame.h.
| Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:20:53 EDT 2009 |