tf2
master
tf2 maintains the relationship between coordinate frames in a tree structure buffered in time, and lets the user transform points, vectors, etc between any two coordinate frames at any desired point in time.
|
Go to the documentation of this file.
30 #ifndef TF2__TIME_CACHE_H_
31 #define TF2__TIME_CACHE_H_
147 inline uint8_t findClosest(
151 inline void interpolate(
186 #endif // TF2__TIME_CACHE_H_
virtual P_TimeAndFrameID getLatestTimeAndParent()
Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no...
static const int MIN_INTERPOLATION_DISTANCE
Number of nano-seconds to not interpolate below.
Definition: time_cache.h:107
virtual CompactFrameID getParent(TimePoint time, std::string *error_str)
Retrieve the parent at a specific time.
virtual ~TimeCacheInterface()=default
virtual bool getData(tf2::TimePoint time, tf2::TransformStorage &data_out, std::string *error_str=0)=0
Access data from the cache returns false if data unavailable (should be thrown as lookup exception)
virtual unsigned int getListLength()=0
Debugging information methods.
virtual bool insertData(const tf2::TransformStorage &new_data)
Insert data into the cache.
std::pair< TimePoint, CompactFrameID > P_TimeAndFrameID
Definition: buffer_core.h:56
virtual void clearList()
Clear the list of stored values.
virtual bool insertData(const TransformStorage &new_data)
Insert data into the cache.
A class to keep a sorted linked list in time This builds and maintains a list of timestamped data....
Definition: time_cache.h:102
virtual TimePoint getOldestTimestamp()
Get the oldest timestamp cached.
uint32_t CompactFrameID
Definition: transform_storage.h:40
virtual tf2::TimePoint getLatestTimestamp()=0
Get the latest timestamp cached.
virtual tf2::CompactFrameID getParent(tf2::TimePoint time, std::string *error_str)
Retrieve the parent at a specific time.
static const unsigned int MAX_LENGTH_LINKED_LIST
Maximum length of linked list, to make sure not to be able to use unlimited memory.
Definition: time_cache.h:111
virtual bool getData(tf2::TimePoint time, tf2::TransformStorage &data_out, std::string *error_str=0)
Virtual methods.
virtual P_TimeAndFrameID getLatestTimeAndParent()
Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no...
Definition: time_cache.h:158
virtual void clearList()=0
Clear the list of stored values.
virtual bool getData(TimePoint time, TransformStorage &data_out, std::string *error_str=0)
Virtual methods.
constexpr tf2::Duration TIMECACHE_DEFAULT_MAX_STORAGE_TIME
default value of 10 seconds storage
Definition: time_cache.h:96
virtual CompactFrameID getParent(tf2::TimePoint time, std::string *error_str)=0
Retrieve the parent at a specific time.
Definition: time_cache.h:47
virtual TimePoint getLatestTimestamp()
Get the latest timestamp cached.
virtual TimePoint getOldestTimestamp()
Get the oldest timestamp cached.
virtual TimePoint getLatestTimestamp()
Get the latest timestamp cached.
virtual bool insertData(const tf2::TransformStorage &new_data)=0
Insert data into the cache.
virtual void clearList()
Clear the list of stored values.
virtual tf2::TimePoint getOldestTimestamp()=0
Get the oldest timestamp cached.
Definition: buffer_core.h:53
TimeCache(tf2::Duration max_storage_time=TIMECACHE_DEFAULT_MAX_STORAGE_TIME)
#define TF2_PUBLIC
Definition: visibility_control.h:57
virtual unsigned int getListLength()
Debugging information methods.
virtual P_TimeAndFrameID getLatestTimeAndParent()=0
Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no...
virtual unsigned int getListLength()
Debugging information methods.