rostf
Receive, send, and apply ROS transformations
Description
Calling the rostf
function creates a ROS
TransformationTree
object, which allows you to access the tf
coordinate transformations that are shared on the ROS network. You can receive
transformations and apply them to different entities. You can also send transformations
and share them with the rest of the ROS network.
ROS uses the tf transform library to keep track of the relationship between multiple coordinate frames. The relative transformations between these coordinate frames are maintained in a tree structure. Querying this tree lets you transform entities like poses and points between any two coordinate frames. To access available frames, use the syntax:
tfTree.AvailableFrames
Use the ros.TransformationTree
syntax when connecting to a specific
ROS node, otherwise use rostf
to create the transformation
tree.
Note
In a future release, ROS Toolbox will use message structures instead of objects for ROS messages.
To use message structures now, set the "DataFormat"
name-value
argument to "struct"
. For more information, see ROS Message Structures.
Creation
Syntax
Description
creates a ROS
tfTree
= rostfTransformationTree
object.
uses message structures instead of objects. For more information, see ROS Message Structures.tfTree
= rostf("DataFormat","struct")
trtree = ros.TransformationTree(
creates a ROS transformation tree object handle that the transformation tree
is attached to. The node
)node
is the node connected to the
ROS network that publishes transformations.
uses message structures instead of objects. For more information, see ROS Message Structures.tfTree
= ros.TransformationTree(node
,"DataFormat","struct")
Properties
Object Functions
waitForTransform | Wait until a transformation is available |
getTransform | Retrieve transformation between two coordinate frames |
transform | Transform message entities into target coordinate frame |
sendTransform | Send transformation to ROS network |
Examples
Limitations
In ROS Noetic, multiple coordinate frames with redundant timestamp cannot be published.