Go to the documentation of this file.
24 std::pair<mrpt::system::TTimeStamp, CObservation::Ptr>;
27 std::multimap<mrpt::system::TTimeStamp, CObservation::Ptr>;
73 using TListObjects = std::vector<mrpt::serialization::CSerializable::Ptr>;
168 const std::string& fileName,
bool non_obs_objects_are_legal =
false);
195 void remove(
size_t first_index,
size_t last_index);
279 else if ((*m_it)->GetRuntimeClass()->derivedFrom(
337 else if ((*m_it)->GetRuntimeClass()->derivedFrom(
365 size_t guess_start_position = 0)
const;
406 size_t& rawlogEntry);
420 size_t& rawlogEntry)
const;
std::string getCommentText() const
Returns the block of comment text for the rawlog.
std::shared_ptr< CObservation > Ptr
This class stores a rawlog (robotic datasets) in one of two possible formats:
const mrpt::serialization::CSerializable::Ptr operator*() const
static bool getActionObservationPairOrObservation(mrpt::serialization::CArchive &inStream, CActionCollection::Ptr &action, CSensoryFrame::Ptr &observations, CObservation::Ptr &observation, size_t &rawlogEntry)
Reads a consecutive pair action/sensory_frame OR an observation, depending of the rawlog format,...
const Scalar * const_iterator
A structure that holds runtime class type information.
std::shared_ptr< CSerializable > Ptr
std::shared_ptr< CSensoryFrame > Ptr
bool operator!=(const iterator &o)
TEntryType getType(size_t index) const
Returns the type of a given element.
std::multimap< mrpt::system::TTimeStamp, CObservation::Ptr > TListTimeAndObservations
For usage with CRawlog classes.
static bool readActionObservationPair(mrpt::serialization::CArchive &inStream, CActionCollection::Ptr &action, CSensoryFrame::Ptr &observations, size_t &rawlogEntry)
Reads a consecutive pair action / observation from the rawlog opened at some input stream.
void addAction(CAction &action)
Add an action to the sequence: a collection of just one element is created.
TEntryType getType() const
void swap(CRawlog &obj)
Efficiently swap the contents of two existing objects.
const_iterator begin() const
void findObservationsByClassInRange(mrpt::system::TTimeStamp time_start, mrpt::system::TTimeStamp time_end, const mrpt::rtti::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...
GLsizei GLsizei GLuint * obj
virtual ~const_iterator()
iterator erase(const iterator &it)
void getCommentTextAsConfigFile(mrpt::config::CConfigFileMemory &memCfg) const
Saves the block of comment text for the rawlog into the passed config file object.
CRawlog()
Default constructor.
mrpt::serialization::CSerializable::Ptr operator*()
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.
void addActionsMemoryReference(const CActionCollection::Ptr &action)
Add a set of actions to the sequence, using a smart pointer to the object to add.
virtual ~CRawlog()
Destructor:
static std::string detectImagesDirectory(const std::string &rawlogFilename)
Tries to auto-detect the external-images directory of the given rawlog file.
CObservationComment m_commentTexts
Comments of the rawlog.
Virtual base class for "archives": classes abstracting I/O streams.
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
A normal iterator, plus the extra method "getType" to determine the type of each entry in the sequenc...
const_iterator operator--(int)
std::pair< mrpt::system::TTimeStamp, CObservation::Ptr > TTimeObservationPair
For usage with CRawlog classes.
CSensoryFrame::Ptr 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.
bool loadFromRawLogFile(const std::string &fileName, bool non_obs_objects_are_legal=false)
Load the contents from a file containing one of these possibilities:
void clear()
Clear the sequence of actions/observations.
bool saveToRawLogFile(const std::string &fileName) const
Saves the contents to a rawlog-file, compatible with RawlogViewer (As the sequence of internal object...
bool operator!=(const const_iterator &o)
const_iterator operator++(int)
bool operator==(const const_iterator &o)
size_t size() const
Returns the number of actions / observations object in the sequence.
bool getActionObservationPair(CActionCollection::Ptr &action, CSensoryFrame::Ptr &observations, size_t &rawlogEntry) const
Gets the next consecutive pair action / observation from the rawlog loaded into this object.
CActionCollection::Ptr getAsAction(size_t index) const
Returns the i'th element in the sequence, as being actions, where index=0 is the first object.
void addObservationMemoryReference(const CObservation::Ptr &observation)
Add a single observation to the sequence, using a smart pointer to the object to add.
A normal iterator, plus the extra method "getType" to determine the type of each entry in the sequenc...
The virtual base class which provides a unified interface for all persistent objects in MRPT.
std::vector< mrpt::serialization::CSerializable::Ptr > TListObjects
mrpt::serialization::CSerializable::Ptr getAsGeneric(size_t index) const
Returns the i'th element in the sequence, being its class whatever.
const_iterator end() const
iterator(const TListObjects::iterator &it)
static iterator erase(TListObjects &lst, const iterator &it)
TEntryType getType() const
#define CLASS_ID(T)
Access to runtime class ID for a defined class name.
void addObservations(CSensoryFrame &observations)
Add a set of observations to the sequence; the object is duplicated, so the original one can be free ...
const_iterator & operator--()
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Declares a class that represents any robot's observation.
const_iterator & operator++()
GLsizei const GLchar ** string
Declares a class for storing a robot action.
void addObservationsMemoryReference(const CSensoryFrame::Ptr &observations)
Add a set of observations to the sequence, using a smart pointer to the object to add.
This class implements a config file-like interface over a memory-stored string list.
CObservation::Ptr 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 addGenericObject(const mrpt::serialization::CSerializable::Ptr &obj)
Generic add for a smart pointer to a CSerializable object:
std::shared_ptr< CActionCollection > Ptr
TListObjects::const_iterator m_it
bool operator==(const iterator &o)
iterator & operator=(const iterator &o)
void setCommentText(const std::string &t)
Changes the block of comment text for the rawlog.
void addActions(CActionCollection &action)
Add a set of actions to the sequence; the object is duplicated, so the original one can be freed if d...
void remove(size_t index)
Delete the action or observation stored in the given index.
TListObjects::iterator m_it
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |