class mola::KeyframeAttachmentBuffer
Overview
Recent observations of one sensor, from which the one closest in time to each new keyframe is taken. Not thread-safe.
#include <KeyframeAttachments.h> class KeyframeAttachmentBuffer { public: // structs struct Entry; struct Options; // construction KeyframeAttachmentBuffer(); KeyframeAttachmentBuffer(const Options& opts); // methods const Options& options() const; void add(const mrpt::obs::CObservation::ConstPtr& obs); mrpt::obs::CObservation::ConstPtr take_closest(const mrpt::Clock::time_point& t); std::size_t size() const; };
Methods
mrpt::obs::CObservation::ConstPtr take_closest(const mrpt::Clock::time_point& t)
The observation closest in time to t within max_age (with attach_once, among those not taken before, and then marked as taken), or nullptr if there is none.