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;
#define CLASS_ID(class_name)
Access to runtime class ID for a defined class name.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#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...
Declares a class for storing a collection of robot actions.
Declares a class for storing a robot action.
Declares a class that represents any robot's observation.
A normal iterator, plus the extra method "getType" to determine the type of each entry in the sequenc...
TListObjects::const_iterator m_it
TEntryType getType() const
virtual ~const_iterator()
const_iterator(const TListObjects::const_iterator &it)
A normal iterator, plus the extra method "getType" to determine the type of each entry in the sequenc...
TListObjects::iterator m_it
TEntryType getType() const
iterator(const TListObjects::iterator &it)
static iterator erase(TListObjects &lst, const iterator &it)
This class stores a rawlog (robotic datasets) in one of two possible formats:
void clearWithoutDelete()
Clear the sequence of actions/observations, without deleting the objects themselves (USE ONLY IF YOU ...
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 swap(CRawlog &obj)
Efficiently swap the contents of two existing objects.
const_iterator begin() const
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.
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...
void addActionsMemoryReference(const CActionCollectionPtr &action)
Add a set of actions to the sequence, using a smart pointer to the object to add.
void addObservationMemoryReference(const CObservationPtr &observation)
Add a single observation to the sequence, using a smart pointer to the object to add.
bool getActionObservationPair(CActionCollectionPtr &action, CSensoryFramePtr &observations, size_t &rawlogEntry) const
Gets the next consecutive pair action / observation from the rawlog loaded into this object.
TEntryType getType(size_t index) const
Returns the type of a given element.
mrpt::utils::CSerializablePtr getAsGeneric(size_t index) const
Returns the i'th element in the sequence, being its class whatever.
void getCommentTextAsConfigFile(mrpt::utils::CConfigFileMemory &memCfg) const
Saves the block of comment text for the rawlog into the passed config file object.
bool saveToRawLogFile(const std::string &fileName) const
Saves the contents to a rawlog-file, compatible with RawlogViewer (As the sequence of internal object...
CRawlog()
Default constructor.
CActionCollectionPtr getAsAction(size_t index) const
Returns the i'th element in the sequence, as being actions, where index=0 is the first object.
void addObservations(CSensoryFrame &observations)
Add a set of observations to the sequence; the object is duplicated, so the original one can be free ...
std::string getCommentText() const
Returns the block of comment text for the rawlog.
void setCommentText(const std::string &t)
Changes the block of comment text for the rawlog.
void getCommentText(std::string &t) const
Returns the block of comment text for the rawlog.
TListObjects m_seqOfActObs
The list where the objects really are in.
virtual ~CRawlog()
Destructor:
void addObservationsMemoryReference(const CSensoryFramePtr &observations)
Add a set of observations to the sequence, using a smart pointer to the object to add.
void addAction(CAction &action)
Add an action to the sequence: a collection of just one element is created.
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).
void remove(size_t index)
Delete the action or observation stored in the given index.
TEntryType
The type of each entry in a rawlog.
void clear()
Clear the sequence of actions/observations, freeing the memory of all the objects in the list.
const_iterator end() const
std::vector< mrpt::utils::CSerializablePtr > TListObjects
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.
static std::string detectImagesDirectory(const std::string &rawlogFilename)
Tries to auto-detect the external-images directory of the given rawlog file.
size_t size() const
Returns the number of actions / observations object in the sequence.
CObservationComment m_commentTexts
Comments of the rawlog.
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,...
bool loadFromRawLogFile(const std::string &fileName)
Load the contents from a file containing one of these possibilities:
iterator erase(const iterator &it)
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.
void moveFrom(CRawlog &obj)
Efficiently copy the contents from other existing object, and remove the data from the origin (after ...
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
This class implements a config file-like interface over a memory-stored string list.
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...
const Scalar * const_iterator
EIGEN_STRONG_INLINE const AdjointReturnType t() const
Transpose.
std::vector< T1 > operator*(const std::vector< T1 > &a, const std::vector< T2 > &b)
a*b (element-wise multiplication)
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
bool operator!=(const CArray< T, N > &x, const CArray< T, N > &y)
bool operator==(const CArray< T, N > &x, const CArray< T, N > &y)
std::multimap< mrpt::system::TTimeStamp, CObservationPtr > TListTimeAndObservations
For usage with CRawlog classes.
std::pair< mrpt::system::TTimeStamp, CObservationPtr > TTimeObservationPair
For usage with CRawlog classes.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A structure that holds runtime class type information.