#include <tf_tree.hpp>
|
| TfTree () |
| Construct a object setting TF_ROOT as root.
|
|
void | emplace (const TfFrame &frame) |
| Add a new tf frame to the tree.
|
|
const std::unordered_map< std::string, TfFrame > & | get_frames () const |
| Return map of all frames.
|
|
std::optional< TfFrame > | get_frame (const std::string &id) const |
| Get the TfFrame object.
|
|
std::optional< TfFrame > | get_parent (const std::string &id) const |
| Get the parent TfFrame object.
|
|
bool | contains (const std::string &id) const |
| Whether to the specified frame ID is contained as a node of tree.
|
|
bool | contains (const TfFrame &frame) const |
| Whether to the specified frame is contained in the tree checking both key and value.
|
|
std::string | entity_path (const TfFrame &frame) const |
| Return entity path of the specified frame. The entity path will be in the format "/<Parent0>/<Parent1>/.../<FrameID>" , where "<Parent0>" represents the deepest parent frame.
|
|
bool | can_link_to (const TfFrame &frame, const std::string &id) const |
| Check whether the input frame is linked to the input id .
|
|
◆ TfTree()
awviz_common::TfTree::TfTree |
( |
| ) |
|
|
inline |
Construct a object setting TF_ROOT
as root.
◆ can_link_to()
bool awviz_common::TfTree::can_link_to |
( |
const TfFrame & |
frame, |
|
|
const std::string & |
id |
|
) |
| const |
|
inline |
Check whether the input frame is linked to the input id
.
- Parameters
-
- Returns
- Return true if the input frame can link to
id
.
◆ contains() [1/2]
bool awviz_common::TfTree::contains |
( |
const std::string & |
id | ) |
const |
|
inline |
Whether to the specified frame ID is contained as a node of tree.
- Parameters
-
- Returns
- Returns true, if the frame is contained.
◆ contains() [2/2]
bool awviz_common::TfTree::contains |
( |
const TfFrame & |
frame | ) |
const |
|
inline |
Whether to the specified frame is contained in the tree checking both key and value.
- Parameters
-
- Returns
- true Return true if the tree contains the ID of
frame
as a key, and then if its value is equivalent to frame
.
◆ emplace()
void awviz_common::TfTree::emplace |
( |
const TfFrame & |
frame | ) |
|
|
inline |
Add a new tf frame to the tree.
- Parameters
-
frame | A new tf frame. If it has been already registered, skip adding. |
◆ entity_path()
std::string awviz_common::TfTree::entity_path |
( |
const TfFrame & |
frame | ) |
const |
|
inline |
Return entity path of the specified frame. The entity path will be in the format "/<Parent0>/<Parent1>/.../<FrameID>"
, where "<Parent0>"
represents the deepest parent frame.
- Parameters
-
- Returns
- Entity path of the frame.
◆ get_frame()
std::optional< TfFrame > awviz_common::TfTree::get_frame |
( |
const std::string & |
id | ) |
const |
|
inline |
Get the TfFrame
object.
- Parameters
-
- Returns
- Corresponding
TfFrame
object. If there is no target TfFrame
, returns nullptr
.
◆ get_frames()
const std::unordered_map< std::string, TfFrame > & awviz_common::TfTree::get_frames |
( |
| ) |
const |
|
inline |
Return map of all frames.
- Returns
- Shared pointer of all frames.
◆ get_parent()
std::optional< TfFrame > awviz_common::TfTree::get_parent |
( |
const std::string & |
id | ) |
const |
|
inline |
Get the parent TfFrame
object.
- Parameters
-
- Returns
- Parent
TfFrame
object. If there is no parent, returns nullptr
.
The documentation for this class was generated from the following file:
- awviz_common/include/awviz_common/transformation/tf_tree.hpp