23 typedef std::pair<mrpt::system::TTimeStamp, CObservation::Ptr>
26 typedef std::multimap<mrpt::system::TTimeStamp, CObservation::Ptr>
168 const std::string& fileName,
bool non_obs_objects_are_legal =
false);
189 void remove(
size_t index);
195 void remove(
size_t first_index,
size_t last_index);
280 (*m_it)->GetRuntimeClass()->derivedFrom(
339 (*m_it)->GetRuntimeClass()->derivedFrom(
367 size_t guess_start_position = 0)
const;
414 size_t& rawlogEntry);
428 size_t& rawlogEntry)
const;
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
virtual ~const_iterator()
bool operator==(const iterator &o)
TListObjects m_seqOfActObs
The list where the objects really are in.
const_iterator end() const
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.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
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)
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...
std::vector< mrpt::utils::CSerializable::Ptr > TListObjects
TListObjects::const_iterator m_it
const Scalar * const_iterator
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.
const mrpt::utils::CSerializable::Ptr operator*() const
void addGenericObject(const mrpt::utils::CSerializable::Ptr &obj)
Generic add for a smart pointer to a CSerializable object:
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...
This class implements a config file-like interface over a memory-stored string list.
std::string getCommentText() const
Returns the block of comment text for the rawlog.
bool loadFromRawLogFile(const std::string &fileName, bool non_obs_objects_are_legal=false)
Load the contents from a file containing one of these possibilities:
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
mrpt::utils::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.
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 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...
iterator & operator=(const iterator &o)
const_iterator operator++(int)
static bool getActionObservationPairOrObservation(mrpt::utils::CStream &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...
This class stores a rawlog (robotic datasets) in one of two possible formats:
std::multimap< mrpt::system::TTimeStamp, CObservation::Ptr > TListTimeAndObservations
For usage with CRawlog classes.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
std::shared_ptr< CSensoryFrame > Ptr
void moveFrom(CRawlog &obj)
Efficiently copy the contents from other existing object, and remove the data from the origin (after ...
void setCommentText(const std::string &t)
Changes the block of comment text for the rawlog.
std::shared_ptr< CObservation > Ptr
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...
std::shared_ptr< CSerializable > Ptr
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. ...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::shared_ptr< CActionCollection > Ptr
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)
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.
A structure that holds runtime class type information.
iterator(const TListObjects::iterator &it)
static iterator erase(TListObjects &lst, const iterator &it)
size_t size() const
Returns the number of actions / observations object in the sequence.
mrpt::utils::CSerializable::Ptr operator*()
virtual ~CRawlog()
Destructor:
CObservationComment m_commentTexts
Comments of the rawlog.
bool operator==(const const_iterator &o)
static bool readActionObservationPair(mrpt::utils::CStream &inStream, CActionCollection::Ptr &action, CSensoryFrame::Ptr &observations, size_t &rawlogEntry)
Reads a consecutive pair action / observation from the rawlog opened at some input stream...
std::pair< mrpt::system::TTimeStamp, CObservation::Ptr > TTimeObservationPair
For usage with CRawlog classes.
void getCommentTextAsConfigFile(mrpt::utils::CConfigFileMemory &memCfg) const
Saves the block of comment text for the rawlog into the passed config file object.
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.