tf2 rolling
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.
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
tf2::TimeCache Class Reference

A class to keep a sorted linked list in time (newest first, oldest last). This builds and maintains a list of timestamped data. And provides lookup functions to get data out as a function of time. More...

#include <time_cache.hpp>

Inheritance diagram for tf2::TimeCache:
Inheritance graph
[legend]
Collaboration diagram for tf2::TimeCache:
Collaboration graph
[legend]

Public Member Functions

 TimeCache (tf2::Duration max_storage_time=TIMECACHE_DEFAULT_MAX_STORAGE_TIME)
 
virtual bool getData (tf2::TimePoint time, tf2::TransformStorage &data_out, std::string *error_str=0, TF2Error *error_code=0)
 Virtual methods.
 
virtual bool insertData (const tf2::TransformStorage &new_data)
 Insert data into the cache.
 
virtual void clearList ()
 Clear the list of stored values.
 
virtual tf2::CompactFrameID getParent (tf2::TimePoint time, std::string *error_str=0, TF2Error *error_code=0)
 Retrieve the parent at a specific time.
 
virtual P_TimeAndFrameID getLatestTimeAndParent ()
 Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no data.
 
virtual unsigned int getListLength ()
 Debugging information methods.
 
virtual TimePoint getLatestTimestamp ()
 Get the latest timestamp cached.
 
virtual TimePoint getOldestTimestamp ()
 Get the oldest timestamp cached.
 
- Public Member Functions inherited from tf2::TimeCacheInterface
virtual ~TimeCacheInterface ()=default
 

Protected Member Functions

const std::list< TransformStorage > & getAllItems () const
 

Detailed Description

A class to keep a sorted linked list in time (newest first, oldest last). This builds and maintains a list of timestamped data. And provides lookup functions to get data out as a function of time.

Constructor & Destructor Documentation

◆ TimeCache()

tf2::TimeCache::TimeCache ( tf2::Duration  max_storage_time = TIMECACHE_DEFAULT_MAX_STORAGE_TIME)
explicit

Member Function Documentation

◆ getData()

virtual bool tf2::TimeCache::getData ( tf2::TimePoint  time,
tf2::TransformStorage data_out,
std::string *  error_str = 0,
TF2Error error_code = 0 
)
virtual

Virtual methods.

Implements tf2::TimeCacheInterface.

◆ insertData()

virtual bool tf2::TimeCache::insertData ( const tf2::TransformStorage new_data)
virtual

Insert data into the cache.

Implements tf2::TimeCacheInterface.

◆ clearList()

virtual void tf2::TimeCache::clearList ( )
virtual

Clear the list of stored values.

Implements tf2::TimeCacheInterface.

◆ getParent()

virtual tf2::CompactFrameID tf2::TimeCache::getParent ( tf2::TimePoint  time,
std::string *  error_str = 0,
TF2Error error_code = 0 
)
virtual

Retrieve the parent at a specific time.

Implements tf2::TimeCacheInterface.

◆ getLatestTimeAndParent()

virtual P_TimeAndFrameID tf2::TimeCache::getLatestTimeAndParent ( )
virtual

Get the latest time stored in this cache, and the parent associated with it. Returns parent = 0 if no data.

Implements tf2::TimeCacheInterface.

◆ getListLength()

virtual unsigned int tf2::TimeCache::getListLength ( )
virtual

Debugging information methods.

Implements tf2::TimeCacheInterface.

◆ getLatestTimestamp()

virtual TimePoint tf2::TimeCache::getLatestTimestamp ( )
virtual

Get the latest timestamp cached.

Implements tf2::TimeCacheInterface.

◆ getOldestTimestamp()

virtual TimePoint tf2::TimeCache::getOldestTimestamp ( )
virtual

Get the oldest timestamp cached.

Implements tf2::TimeCacheInterface.

◆ getAllItems()

const std::list< TransformStorage > & tf2::TimeCache::getAllItems ( ) const
protected

The documentation for this class was generated from the following file: