56 if (
this == &o)
return *
this;
128 in.ReadBufferFixEndianness( &tempTimeStamp, 1);
159 CObservationPtr newObs = *it;
160 newObs.make_unique();
242 const size_t &idx)
const
246 size_t foundCount = 0;
248 if ( !
os::_strcmpi( (*it)->sensorLabel.c_str(), label.c_str() ) )
249 if (foundCount++ == idx)
252 return CObservationPtr();
283 if ( !
os::_strcmpi( (*it)->sensorLabel.c_str(), label.c_str() ) )
309 throw std::runtime_error(
"[CSensoryFrame::buildAuxPointsMap] ERROR: This function needs linking against mrpt-maps.\n");
321 anyone|= (*it)->insertObservationInto(theMap, robotPose);
#define IS_CLASS(ptrObj, class_name)
Evaluates to true if the given pointer to an object (derived from mrpt::utils::CSerializable) is of t...
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
Declares a virtual base class for all metric maps storage classes.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
virtual ~CSensoryFrame()
Destructor.
void insert(const CObservationPtr &obs)
Inserts a new observation to the list: The pointer to the objects is copied, thus DO NOT delete the p...
void eraseByLabel(const std::string &label)
Removes all the observations that match a given sensorLabel.
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 p...
const_iterator end() const
Returns a constant iterator to the end of the list of observations: this is an example of usage:
void eraseByIndex(const size_t &idx)
Removes the i'th observation in the list (0=first).
void swap(CSensoryFrame &sf)
Efficiently swaps the contents of two objects.
std::deque< CObservationPtr >::iterator iterator
You can use CSensoryFrame::begin to get a iterator to the first element.
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
void operator+=(const CSensoryFrame &sf)
You can use "sf1+=sf2;" to add observations in sf2 to sf1.
CSensoryFrame()
Default constructor.
bool insertObservationsInto(mrpt::maps::CMetricMap *theMap, const mrpt::poses::CPose3D *robotPose=NULL) const
Insert all the observations in this SF into a metric map or any kind (see mrpt::maps::CMetricMap).
const_iterator begin() const
Returns a constant iterator to the first observation: this is an example of usage:
std::deque< CObservationPtr > m_observations
The set of observations taken at the same time instant.
CSensoryFrame & operator=(const CSensoryFrame &o)
Copy.
void clear()
Clear all current observations.
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
void internal_buildAuxPointsMap(const void *options=NULL) const
Internal method, used from buildAuxPointsMap()
void moveFrom(CSensoryFrame &sf)
Copies all the observation from another object, then erase them from the origin object (this method i...
iterator erase(const iterator &it)
Removes the given observation in the list, and return an iterator to the next element (or this->end()...
std::deque< CObservationPtr >::const_iterator const_iterator
You can use CSensoryFrame::begin to get a iterator to the first element.
size_t size() const
Returns the number of observations in the list.
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).
CObservationPtr getObservationByIndex(const size_t &idx) const
Returns the i'th observation in the list (0=first).
mrpt::maps::CMetricMapPtr m_cachedMap
A points map, build only under demand by the methods getAuxPointsMap() and buildAuxPointsMap().
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
The virtual base class which provides a unified interface for all persistent objects in MRPT.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
GLsizei const GLchar ** string
int BASE_IMPEXP _strcmpi(const char *str1, const char *str2) MRPT_NO_THROWS
An OS-independent version of strcmpi.
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
This namespace contains representation of robot actions and observations.
void OBS_IMPEXP(* ptr_internal_build_points_map_from_scan2D)(const mrpt::obs::CObservation2DRangeScan &obs, mrpt::maps::CMetricMapPtr &out_map, const void *insertOps)
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values,...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned __int32 uint32_t