52 #ifndef _LIBS_TF_TIME_CACHE_H_
53 #define _LIBS_TF_TIME_CACHE_H_
55 #include <tf/transform_storage.h>
65 typedef std::pair<fawkes::Time, CompactFrameID> P_TimeAndFrameID;
67 class TimeCacheInterface;
68 typedef std::shared_ptr<TimeCacheInterface> TimeCacheInterfacePtr;
76 virtual TimeCacheInterfacePtr
126 float max_storage_time_;
131 std::string * error_str);
A class for handling time.
Transform cache for static transforms.
virtual bool get_data(fawkes::Time time, TransformStorage &data_out, std::string *error_str=0)
Get data.
virtual void clear_list()
Clear storage.
virtual bool insert_data(const TransformStorage &new_data)
Insert data.
virtual unsigned int get_list_length() const
Debugging information methods.
virtual P_TimeAndFrameID get_latest_time_and_parent()
Get latest time and parent frame number.
virtual ~StaticCache()
Destructor .
StaticCache()
Constructor.
virtual L_TransformStorage get_storage_copy() const
Get copy of storage elements.
virtual const L_TransformStorage & get_storage() const
Get storage list.
virtual TimeCacheInterfacePtr clone(const fawkes::Time &look_back_until=fawkes::Time(0, 0)) const
Create a copy of this time cache.
virtual fawkes::Time get_latest_timestamp() const
Get latest timestamp from cache.
virtual CompactFrameID get_parent(fawkes::Time time, std::string *error_str)
Get parent frame number.
virtual fawkes::Time get_oldest_timestamp() const
Get oldest timestamp from cache.
Interface for transform time caches.
virtual const L_TransformStorage & get_storage() const =0
Get storage list.
virtual CompactFrameID get_parent(fawkes::Time time, std::string *error_str)=0
Get parent frame number.
virtual fawkes::Time get_latest_timestamp() const =0
Get latest timestamp from cache.
virtual TimeCacheInterfacePtr clone(const fawkes::Time &look_back_until=fawkes::Time(0, 0)) const =0
Create a copy of this time cache.
virtual fawkes::Time get_oldest_timestamp() const =0
Get oldest timestamp from cache.
virtual void clear_list()=0
Clear storage.
virtual bool insert_data(const TransformStorage &new_data)=0
Insert data.
virtual P_TimeAndFrameID get_latest_time_and_parent()=0
Get latest time and parent frame number.
virtual unsigned int get_list_length() const =0
Debugging information methods.
virtual bool get_data(fawkes::Time time, TransformStorage &data_out, std::string *error_str=0)=0
Get data.
std::list< TransformStorage > L_TransformStorage
List of stored transforms.
virtual L_TransformStorage get_storage_copy() const =0
Get copy of storage elements.
Time based transform cache.
virtual TimeCacheInterfacePtr clone(const fawkes::Time &look_back_until=fawkes::Time(0, 0)) const
Create a copy of this time cache.
static const unsigned int MAX_LENGTH_LINKED_LIST
Maximum length of linked list, to make sure not to be able to use unlimited memory.
virtual unsigned int get_list_length() const
Debugging information methods.
virtual CompactFrameID get_parent(fawkes::Time time, std::string *error_str)
Get parent frame number.
virtual fawkes::Time get_oldest_timestamp() const
Get oldest timestamp from cache.
virtual fawkes::Time get_latest_timestamp() const
Get latest timestamp from cache.
virtual L_TransformStorage get_storage_copy() const
Get copy of storage elements.
TimeCache(float max_storage_time=DEFAULT_MAX_STORAGE_TIME)
Constructor.
static const int MIN_INTERPOLATION_DISTANCE
Number of nano-seconds to not interpolate below.
virtual ~TimeCache()
Destructor.
static const int64_t DEFAULT_MAX_STORAGE_TIME
default value of 10 seconds storage
virtual bool insert_data(const TransformStorage &new_data)
Insert data.
virtual P_TimeAndFrameID get_latest_time_and_parent()
Get latest time and parent frame number.
virtual void clear_list()
Clear storage.
virtual const L_TransformStorage & get_storage() const
Get storage list.
virtual bool get_data(fawkes::Time time, TransformStorage &data_out, std::string *error_str=0)
Get data.
Fawkes library namespace.