22 std::pair<mrpt::system::TTimeStamp, CObservation::Ptr>;
25 std::multimap<mrpt::system::TTimeStamp, CObservation::Ptr>;
71 using TListObjects = std::vector<mrpt::serialization::CSerializable::Ptr>;
166 const std::string& fileName,
bool non_obs_objects_are_legal =
false);
187 void remove(
size_t index);
193 void remove(
size_t first_index,
size_t last_index);
277 else if ((*m_it)->GetRuntimeClass()->derivedFrom(
335 else if ((*m_it)->GetRuntimeClass()->derivedFrom(
363 size_t guess_start_position = 0)
const;
404 size_t& rawlogEntry);
418 size_t& rawlogEntry)
const;
virtual ~const_iterator()
This class implements a config file-like interface over a memory-stored string list.
bool operator==(const iterator &o)
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...
TListObjects m_seqOfActObs
The list where the objects really are in.
const_iterator end() const
std::vector< mrpt::serialization::CSerializable::Ptr > TListObjects
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...
static std::string detectImagesDirectory(const std::string &rawlogFilename)
Tries to auto-detect the external-images directory of the given rawlog file.
iterator erase(const iterator &it)
const_iterator & operator++()
A normal iterator, plus the extra method "getType" to determine the type of each entry in the sequenc...
const_iterator & operator--()
const_iterator operator--(int)
A structure that holds runtime class type information.
mrpt::serialization::CSerializable::Ptr operator*()
const_iterator(const TListObjects::const_iterator &it)
void addObservationsMemoryReference(const CSensoryFrame::Ptr &observations)
Add a set of observations to the sequence, using a smart pointer to the object to add...
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...
TListObjects::const_iterator m_it
void addGenericObject(const mrpt::serialization::CSerializable::Ptr &obj)
Generic add for a smart pointer to a CSerializable object:
TEntryType getType() const
CRawlog()
Default constructor.
void addObservations(CSensoryFrame &observations)
Add a set of observations to the sequence; the object is duplicated, so the original one can be free ...
GLsizei GLsizei GLuint * obj
bool operator!=(const const_iterator &o)
Declares a class for storing a collection of robot actions.
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...
bool saveToRawLogFile(const std::string &fileName) const
Saves the contents to a rawlog-file, compatible with RawlogViewer (As the sequence of internal 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...
std::string getCommentText() const
Returns the block of comment text for the rawlog.
std::pair< mrpt::system::TTimeStamp, CObservation::Ptr > TTimeObservationPair
For usage with CRawlog classes.
mrpt::Clock::time_point TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
bool loadFromRawLogFile(const std::string &fileName, bool non_obs_objects_are_legal=false)
Load the contents from a file containing one of these possibilities:
mrpt::serialization::CSerializable::Ptr getAsGeneric(size_t index) const
Returns the i'th element in the sequence, being its class whatever.
#define CLASS_ID(T)
Access to runtime class ID for a defined class name.
std::multimap< mrpt::system::TTimeStamp, CObservation::Ptr > TListTimeAndObservations
For usage with CRawlog classes.
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...
iterator & operator=(const iterator &o)
const_iterator operator++(int)
This class stores a rawlog (robotic datasets) in one of two possible formats:
This namespace contains representation of robot actions and observations.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
void setCommentText(const std::string &t)
Changes the block of comment text for the rawlog.
GLsizei const GLchar ** string
A normal iterator, plus the extra method "getType" to determine the type of each entry in the sequenc...
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...
Declares a class for storing a robot action.
TEntryType getType() const
void addActionsMemoryReference(const CActionCollection::Ptr &action)
Add a set of actions to the sequence, using a smart pointer to the object to add. ...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Virtual base class for "archives": classes abstracting I/O streams.
Declares a class that represents any robot's observation.
TEntryType
The type of each entry in a rawlog.
TListObjects::iterator m_it
bool operator!=(const iterator &o)
The virtual base class which provides a unified interface for all persistent objects in MRPT...
void swap(CRawlog &obj)
Efficiently swap the contents of two existing objects.
void clear()
Clear the sequence of actions/observations.
TEntryType getType(size_t index) const
Returns the type of a given element.
void addAction(CAction &action)
Add an action to the sequence: a collection of just one element is created.
iterator(const TListObjects::iterator &it)
static iterator erase(TListObjects &lst, const iterator &it)
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...
size_t size() const
Returns the number of actions / observations object in the sequence.
void getCommentTextAsConfigFile(mrpt::config::CConfigFileMemory &memCfg) const
Saves the block of comment text for the rawlog into the passed config file object.
const Scalar * const_iterator
virtual ~CRawlog()
Destructor:
CObservationComment m_commentTexts
Comments of the rawlog.
bool operator==(const const_iterator &o)
const mrpt::serialization::CSerializable::Ptr operator*() const
const_iterator begin() const
void addObservationMemoryReference(const CObservation::Ptr &observation)
Add a single observation to the sequence, using a smart pointer to the object to add.