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