Remap frames in TF messages according to given rules.
More...
#include <tf_remapper.h>
Remap frames in TF messages according to given rules.
Definition at line 10 of file tf_remapper.h.
tf_remapper_cpp::TfRemapper::TfRemapper |
( |
| ) |
|
Empty constructor with no remappings.
Definition at line 5 of file tf_remapper.cpp.
tf_remapper_cpp::TfRemapper::TfRemapper |
( |
MappingsType |
mappings, |
|
|
bool |
reverse = false |
|
) |
| |
|
explicit |
Create the remapper from a constructed set of mappings.
- Parameters
-
mappings | The mappings to use (keys are old frame names, values are remapped names). |
reverse | If true, switch role of keys and values in the given map. Entries with empty values are omitted. |
- Exceptions
-
Definition at line 9 of file tf_remapper.cpp.
tf_remapper_cpp::TfRemapper::TfRemapper |
( |
const XmlRpc::XmlRpcValue & |
mappingsParam, |
|
|
bool |
reverse = false |
|
) |
| |
|
explicit |
Create the remapper from a XmlRpcValue as read by ros::NodeHandle::getParam().
- Parameters
-
mappingsParam | The XML-RPC-parsed value of the ROS parameter 'mappings'. It is expected to be an array of dicts, each of which contains keys 'old' and 'new'. At least on of them has to have nonempty value. Empty values mark tf frames to be deleted in the given direction. |
reverse | If true, switch role of 'old' and 'new' in the given map. Entries with empty 'new' are omitted. |
- Exceptions
-
Definition at line 25 of file tf_remapper.cpp.
tf_remapper_cpp::TfRemapper::~TfRemapper |
( |
| ) |
|
|
virtual |
void tf_remapper_cpp::TfRemapper::doRemapping |
( |
tf2_msgs::TFMessage & |
message | ) |
const |
Rewrite TF frame names according to the rules given in constructor.
- Parameters
-
message | The original message which is to be modified. |
Definition at line 68 of file tf_remapper.cpp.
tf2_msgs::TFMessage tf_remapper_cpp::TfRemapper::doRemapping |
( |
const tf2_msgs::TFMessage & |
inMessage | ) |
const |
Rewrite TF frame names according to the rules given in constructor.
- Parameters
-
inMessage | The original message. |
- Returns
- A copy of the original message with rewritten TF frame names.
Definition at line 62 of file tf_remapper.cpp.
Get the mappings this remapper uses.
- Returns
- The mappings (keys are old frame names, values are remapped names).
Definition at line 92 of file tf_remapper.cpp.
The mappings (keys are old frame names, values are remapped names).
Definition at line 49 of file tf_remapper.h.
The documentation for this class was generated from the following files: