On this page

FrameTransformer QML Type

Looks up coordinate-frame transforms from the TF tree. More...

Import Statement: import QtRos2.Transforms
Inherits:

NodeChild

Status: Experimental Extension

Methods

  • bool canTransform(string targetFrame, string sourceFrame)
  • transformStamped lookupTransform(string targetFrame, string sourceFrame)
  • pointStamped transform(pointStamped in, string targetFrame)
  • poseStamped transform(poseStamped in, string targetFrame)
  • vector3Stamped transform(vector3Stamped in, string targetFrame)

Detailed Description

FrameTransformer gives imperative access to the TF tree of the Node it belongs to: ask it for the transform between any two connected frames with lookupTransform, or re-express stamped data in another frame with transform. The multi-hop path, the time history, and the interpolation are handled for you.

Each Node keeps a single TF buffer, fed from its tf and tf_static topics (which resolve under the node's namespace), and creates it the first time something asks for a transform. Any number of FrameTransformer and FrameNode items on the same Node share that buffer, so declaring another one costs nothing.

Node {
    nodeName: "my_qt_node"
    FrameTransformer { id: tf }
}
// ... later, e.g. to express a clicked point in the map frame:
const p = tf.transform(clickedPoint, "map")

To place Qt Quick 3D nodes at TF frames, use FrameNode instead: it binds a node to a frame without any code.

Bindings that call lookupTransform re-evaluate on transformsChanged, which fires whenever new transforms arrive.

See also TransformBroadcaster and StaticTransformBroadcaster.

Method Documentation

bool canTransform(string targetFrame, string sourceFrame)

Returns true if the latest sourceFrame to targetFrame transform is currently resolvable from the TF tree.

transformStamped lookupTransform(string targetFrame, string sourceFrame)

Returns the latest transform that expresses data in sourceFrame in the targetFrame. On failure (frames not connected yet, or not connected to a Node) returns a default-constructed value with an empty childFrameId and logs a warning; call canTransform first if you need to branch.

pointStamped transform(pointStamped in, string targetFrame)

Re-expresses the stamped point in into targetFrame, using the transform valid at in.header.stamp.

poseStamped transform(poseStamped in, string targetFrame)

Re-expresses the stamped pose in into targetFrame, using the transform valid at in.header.stamp.

vector3Stamped transform(vector3Stamped in, string targetFrame)

Re-expresses the stamped vector in into targetFrame, using the transform valid at in.header.stamp.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.