transformTree
Description
The transformTree
object contains an organized tree structure for
coordinate frames and their relative transformations over time. The object stores the relative
transformations between children frames and their parents. You can specify a timestamped
transform for frames and query the relative transformations between different frames in the
tree. The object interpolates intermediate timestamps using a constant velocity assumption for
linear motion, and spherical linear interpolation (SLERP) for angular motion. Otherwise, the
relative transformations are kept constant past the range of the timestamps specified. Times
prior to the first timestamp return NaN
.
Use the updateTransform
function to add timestamps to the tree by defining the
parent-to-child relationships. Query specific transformations at given timestamps using
getTransform
and display the frame relationships using show
.
Creation
Syntax
Description
creates a
transformation tree data structure with a single frame, frames
= transformTree"root"
, with
the maximum number of frames and timestamped transforms per frame, set to 10.
specifies the name of the root frame as a string or character vector.frames
= transformTree(baseName
)
additionally sets the MaxNumFrames property, which defines the max number of named frames in the
object.frames
= transformTree(baseName
,numFrames)
additionally sets the MaxNumTransforms property, which defines the max number of timestamped
transforms per frame name. frames
= transformTree(baseName
,numFrames,numTransforms)
additionally specifies the timestamp of the initial frames
= transformTree(baseName
,numFrames,numTransforms,rootTime)baseName
frame
as a scalar time in seconds.
Properties
Object Functions
getGraph | Graph object representing tree structure |
getTransform | Get relative transform between frames |
info | List all frame names and stored timestamps |
removeTransform | Remove frame transform relative to its parent |
show | Show transform tree |
updateTransform | Update frame transform relative to its parent |
Examples
Version History
Introduced in R2020b