A Class which provides coordinate transforms between any two frames in a system.
More...
|
| BufferCore (tf2::Duration cache_time_=BUFFER_CORE_DEFAULT_CACHE_TIME) |
|
virtual | ~BufferCore (void) |
|
void | clear () override |
| Clear all data. More...
|
|
bool | setTransform (const geometry_msgs::msg::TransformStamped &transform, const std::string &authority, bool is_static=false) |
| Add transform information to the tf data structure. More...
|
|
geometry_msgs::msg::TransformStamped | lookupTransform (const std::string &target_frame, const std::string &source_frame, const TimePoint &time) const override |
| Get the transform between two frames by frame ID. More...
|
|
geometry_msgs::msg::TransformStamped | lookupTransform (const std::string &target_frame, const TimePoint &target_time, const std::string &source_frame, const TimePoint &source_time, const std::string &fixed_frame) const override |
| Get the transform between two frames by frame ID assuming fixed frame. More...
|
|
bool | canTransform (const std::string &target_frame, const std::string &source_frame, const TimePoint &time, std::string *error_msg=NULL) const override |
| Lookup the twist of the tracking_frame with respect to the observation frame in the reference_frame using the reference point. More...
|
|
bool | canTransform (const std::string &target_frame, const TimePoint &target_time, const std::string &source_frame, const TimePoint &source_time, const std::string &fixed_frame, std::string *error_msg=NULL) const override |
| Test if a transform is possible. More...
|
|
std::vector< std::string > | getAllFrameNames () const override |
| Get all frames that exist in the system. More...
|
|
std::string | allFramesAsYAML (TimePoint current_time) const |
| A way to see what frames have been cached in yaml format Useful for debugging tools. More...
|
|
std::string | allFramesAsYAML () const |
|
std::string | allFramesAsString () const |
| A way to see what frames have been cached Useful for debugging. More...
|
|
TransformableCallbackHandle | addTransformableCallback (const TransformableCallback &cb) |
| Internal use only. More...
|
|
void | removeTransformableCallback (TransformableCallbackHandle handle) |
| Internal use only. More...
|
|
TransformableRequestHandle | addTransformableRequest (TransformableCallbackHandle handle, const std::string &target_frame, const std::string &source_frame, TimePoint time) |
| Internal use only. More...
|
|
void | cancelTransformableRequest (TransformableRequestHandle handle) |
| Internal use only. More...
|
|
void | setUsingDedicatedThread (bool value) |
|
bool | isUsingDedicatedThread () const |
|
bool | _frameExists (const std::string &frame_id_str) const |
| Check if a frame exists in the tree. More...
|
|
bool | _getParent (const std::string &frame_id, TimePoint time, std::string &parent) const |
| Fill the parent of a frame. More...
|
|
void | _getFrameStrings (std::vector< std::string > &ids) const |
| A way to get a std::vector of available frame ids. More...
|
|
CompactFrameID | _lookupFrameNumber (const std::string &frameid_str) const |
|
CompactFrameID | _lookupOrInsertFrameNumber (const std::string &frameid_str) |
|
tf2::TF2Error | _getLatestCommonTime (CompactFrameID target_frame, CompactFrameID source_frame, TimePoint &time, std::string *error_string) const |
|
CompactFrameID | _validateFrameId (const char *function_name_arg, const std::string &frame_id) const |
|
tf2::Duration | getCacheLength () |
| Get the duration over which this transformer will cache. More...
|
|
std::string | _allFramesAsDot (TimePoint current_time) const |
| Backwards compatabilityA way to see what frames have been cached Useful for debugging. More...
|
|
std::string | _allFramesAsDot () const |
|
void | _chainAsVector (const std::string &target_frame, TimePoint target_time, const std::string &source_frame, TimePoint source_time, const std::string &fixed_frame, std::vector< std::string > &output) const |
| Backwards compatabilityA way to see what frames are in a chain Useful for debugging. More...
|
|
virtual | ~BufferCoreInterface ()=default |
|
A Class which provides coordinate transforms between any two frames in a system.
This class provides a simple interface to allow recording and lookup of relationships between arbitrary frames of the system.
libTF assumes that there is a tree of coordinate frame transforms which define the relationship between all coordinate frames. For example your typical robot would have a transform from global to real world. And then from base to hand, and from base to head. But Base to Hand really is composed of base to shoulder to elbow to wrist to hand. libTF is designed to take care of all the intermediate steps for you.
Internal Representation libTF will store frames with the parameters necessary for generating the transform into that frame from it's parent and a reference to the parent frame. Frames are designated using an std::string 0 is a frame without a parent (the top of a tree) The positions of frames over time must be pushed in.
All function calls which pass frame ids can potentially throw the exception tf::LookupException
Lookup the twist of the tracking_frame with respect to the observation frame in the reference_frame using the reference point.
- Parameters
-
tracking_frame | The frame to track |
observation_frame | The frame from which to measure the twist |
reference_frame | The reference frame in which to express the twist |
reference_point | The reference point with which to express the twist |
reference_point_frame | The frame_id in which the reference point is expressed |
time | The time at which to get the velocity |
duration | The period over which to average |
- Returns
- twist The twist output
This will compute the average velocity on the interval (time - duration/2, time+duration/2). If that is too close to the most recent reading, in which case it will shift the interval up to duration/2 to prevent extrapolation.
Possible exceptions tf2::LookupException, tf2::ConnectivityException, tf2::ExtrapolationException, tf2::InvalidArgumentException
New in geometry 1.1
lookup the twist of the tracking frame with respect to the observational frame
This is a simplified version of lookupTwist with it assumed that the reference point is the origin of the tracking frame, and the reference frame is the observation frame.
Possible exceptions tf2::LookupException, tf2::ConnectivityException, tf2::ExtrapolationException, tf2::InvalidArgumentException
New in geometry 1.1
Test if a transform is possible
- Parameters
-
target_frame | The frame into which to transform |
source_frame | The frame from which to transform |
time | The time at which to transform |
error_msg | A pointer to a string which will be filled with why the transform failed, if not NULL |
- Returns
- True if the transform is possible, false otherwise
Implements tf2::BufferCoreInterface.