Go to the documentation of this file.
151 void remove(
size_t first_index,
size_t last_index );
201 inline iterator& operator ++() { m_it++;
return *
this; }
203 inline iterator& operator --() { m_it--;
return *
this; }
208 return etObservation;
210 return etSensoryFrame;
212 return etActionCollection;
232 const mrpt::utils::CSerializablePtr
operator *()
const {
return *m_it; }
242 return etObservation;
244 return etSensoryFrame;
246 return etActionCollection;
269 size_t guess_start_position = 0
289 CActionCollectionPtr &action,
290 CSensoryFramePtr &observations,
291 size_t & rawlogEntry );
307 CActionCollectionPtr &action,
308 CSensoryFramePtr &observations,
309 CObservationPtr &observation,
310 size_t & rawlogEntry );
320 CActionCollectionPtr &action,
321 CSensoryFramePtr &observations,
322 size_t &rawlogEntry )
const;
bool operator==(const CArray< T, N > &x, const CArray< T, N > &y)
void getCommentTextAsConfigFile(mrpt::utils::CConfigFileMemory &memCfg) const
Saves the block of comment text for the rawlog into the passed config file object.
This class stores a rawlog (robotic datasets) in one of two possible formats:
void findObservationsByClassInRange(mrpt::system::TTimeStamp time_start, mrpt::system::TTimeStamp time_end, const mrpt::utils::TRuntimeClassId *class_type, TListTimeAndObservations &out_found, size_t guess_start_position=0) const
Returns the sub-set of observations of a given class whose time-stamp t fulfills time_start <= t < ti...
const Scalar * const_iterator
void swap(CRawlog &obj)
Efficiently swap the contents of two existing objects.
void clear()
Clear the sequence of actions/observations, freeing the memory of all the objects in the list.
This class implements a config file-like interface over a memory-stored string list.
TEntryType getType(size_t index) const
Returns the type of a given element.
TEntryType getType() const
const_iterator begin() const
std::string getCommentText() const
Returns the block of comment text for the rawlog.
virtual ~CRawlog()
Destructor:
CActionCollectionPtr getAsAction(size_t index) const
Returns the i'th element in the sequence, as being actions, where index=0 is the first object.
virtual ~const_iterator()
std::pair< mrpt::system::TTimeStamp, CObservationPtr > TTimeObservationPair
For usage with CRawlog classes.
void addObservationsMemoryReference(const CSensoryFramePtr &observations)
Add a set of observations to the sequence, using a smart pointer to the object to add.
iterator erase(const iterator &it)
std::multimap< mrpt::system::TTimeStamp, CObservationPtr > TListTimeAndObservations
For usage with CRawlog classes.
Declares a class for storing a collection of robot actions.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TEntryType
The type of each entry in a rawlog.
CObservationPtr getAsObservation(size_t index) const
Returns the i'th element in the sequence, as being an observation, where index=0 is the first object.
void clearWithoutDelete()
Clear the sequence of actions/observations, without deleting the objects themselves (USE ONLY IF YOU ...
CObservationComment m_commentTexts
Comments of the rawlog.
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
void remove(size_t first_index, size_t last_index)
Delete the elements stored in the given range of indices (including both the first and last one).
EIGEN_STRONG_INLINE const AdjointReturnType t() const
Transpose.
A normal iterator, plus the extra method "getType" to determine the type of each entry in the sequenc...
void addActions(CActionCollection &action)
Add a set of actions to the sequence; the object is duplicated, so the original one can be free if de...
void getCommentText(std::string &t) const
Returns the block of comment text for the rawlog.
CSensoryFramePtr getAsObservations(size_t index) const
Returns the i'th element in the sequence, as being an action, where index=0 is the first object.
const_iterator(const TListObjects::const_iterator &it)
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
TListObjects m_seqOfActObs
The list where the objects really are in.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
CRawlog()
Default constructor.
static std::string detectImagesDirectory(const std::string &rawlogFilename)
Tries to auto-detect the external-images directory of the given rawlog file.
bool operator!=(const CArray< T, N > &x, const CArray< T, N > &y)
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
A normal iterator, plus the extra method "getType" to determine the type of each entry in the sequenc...
void moveFrom(CRawlog &obj)
Efficiently copy the contents from other existing object, and remove the data from the origin (after ...
const_iterator end() const
bool getActionObservationPair(CActionCollectionPtr &action, CSensoryFramePtr &observations, size_t &rawlogEntry) const
Gets the next consecutive pair action / observation from the rawlog loaded into this object.
iterator(const TListObjects::iterator &it)
std::vector< mrpt::utils::CSerializablePtr > TListObjects
static iterator erase(TListObjects &lst, const iterator &it)
void remove(size_t index)
Delete the action or observation stored in the given index.
void addAction(CAction &action)
Add an action to the sequence: a collection of just one element is created.
The virtual base class which provides a unified interface for all persistent objects in MRPT.
void addObservationMemoryReference(const CObservationPtr &observation)
Add a single observation to the sequence, using a smart pointer to the object to add.
TEntryType getType() const
static bool getActionObservationPairOrObservation(mrpt::utils::CStream &inStream, CActionCollectionPtr &action, CSensoryFramePtr &observations, CObservationPtr &observation, size_t &rawlogEntry)
Reads a consecutive pair action/sensory_frame OR an observation, depending of the rawlog format,...
#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...
mrpt::utils::CSerializablePtr getAsGeneric(size_t index) const
Returns the i'th element in the sequence, being its class whatever.
#define CLASS_ID(class_name)
Access to runtime class ID for a defined class name.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
static bool readActionObservationPair(mrpt::utils::CStream &inStream, CActionCollectionPtr &action, CSensoryFramePtr &observations, size_t &rawlogEntry)
Reads a consecutive pair action / observation from the rawlog opened at some input stream.
std::vector< T1 > operator*(const std::vector< T1 > &a, const std::vector< T2 > &b)
a*b (element-wise multiplication)
Declares a class that represents any robot's observation.
void addObservations(CSensoryFrame &observations)
Add a set of observations to the sequence; the object is duplicated, so the original one can be free ...
void setCommentText(const std::string &t)
Changes the block of comment text for the rawlog.
Declares a class for storing a robot action.
bool loadFromRawLogFile(const std::string &fileName)
Load the contents from a file containing one of these possibilities:
void addActionsMemoryReference(const CActionCollectionPtr &action)
Add a set of actions to the sequence, using a smart pointer to the object to add.
TListObjects::const_iterator m_it
A structure that holds runtime class type information.
bool saveToRawLogFile(const std::string &fileName) const
Saves the contents to a rawlog-file, compatible with RawlogViewer (As the sequence of internal object...
TListObjects::iterator m_it
size_t size() const
Returns the number of actions / observations object in the sequence.
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |