On this page

FrameTransformer QML Type

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

Import Statement: import QtRos2.Transforms
Inherits:

Entity

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 is the receive side of QtRos2.Transforms. Place it as a child of a Node; it subscribes to /tf and /tf_static and maintains a tf2_ros::Buffer behind the scenes. Ask it for the transform between any two connected frames with lookupTransform — the multi-hop path, the time history, and the interpolation are handled for you.

FrameTransformer { id: tf }
// ... later, e.g. to place the laser in the map frame:
property var t: tf.canTransform("map", "laser_frame")
                    ? tf.lookupTransform("map", "laser_frame") : null

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.