52 #ifndef __LIBS_TF_TIME_CACHE_H_ 53 #define __LIBS_TF_TIME_CACHE_H_ 56 #include <tf/transform_storage.h> 69 typedef std::pair<fawkes::Time, CompactFrameID> P_TimeAndFrameID;
71 class TimeCacheInterface;
72 typedef std::shared_ptr<TimeCacheInterface> TimeCacheInterfacePtr;
82 std::string* error_str = 0) = 0;
93 virtual const L_TransformStorage &
get_storage()
const = 0;
103 static const int MIN_INTERPOLATION_DISTANCE = 5;
105 static const unsigned int MAX_LENGTH_LINKED_LIST = 1000000;
107 static const int64_t DEFAULT_MAX_STORAGE_TIME = 1ULL * 1000000000LL;
109 TimeCache(
float max_storage_time = DEFAULT_MAX_STORAGE_TIME);
113 std::string* error_str = 0);
119 virtual const L_TransformStorage &
get_storage()
const;
127 L_TransformStorage storage_;
129 float max_storage_time_;
149 std::string* error_str = 0);
159 virtual const L_TransformStorage &
get_storage()
const;
164 L_TransformStorage storage_as_list_;
Interface for transform time caches.
virtual unsigned int get_list_length() const =0
Debugging information methods.
Fawkes library namespace.
A class for handling time.
virtual CompactFrameID get_parent(fawkes::Time time, std::string *error_str)=0
Get parent frame number.
std::list< TransformStorage > L_TransformStorage
List of stored transforms.
Time based transform cache.
virtual const L_TransformStorage & get_storage() const =0
Get storage list.
virtual P_TimeAndFrameID get_latest_time_and_parent()=0
Get latest time and parent frame number.
virtual fawkes::Time get_latest_timestamp() const =0
Get latest timestamp from cache.
virtual bool insert_data(const TransformStorage &new_data)=0
Insert data.
Transform cache for static transforms.
virtual fawkes::Time get_oldest_timestamp() const =0
Get oldest timestamp from cache.
virtual void clear_list()=0
Clear storage.
virtual TimeCacheInterfacePtr clone(const fawkes::Time &look_back_until=fawkes::Time(0, 0)) const =0
Create a copy of this time cache.
virtual L_TransformStorage get_storage_copy() const =0
Get copy of storage elements.
virtual bool get_data(fawkes::Time time, TransformStorage &data_out, std::string *error_str=0)=0
Get data.