Main Content

updateTransform

Update frame transform relative to its parent

Description

updateTransform(frames,parentframe,childframe,position,orientation,timestamp) updates the relative transforms between child frames and their parents with a given position and orientation at the specified time stamps. The position and orientation are given in the parent reference frame.

updateTransform(frames,parentframe,childframe,tform,timestamp) updates the relative transforms between child frames and their parents with a given 4-by-4 homogenous transform, tform.

Input Arguments

collapse all

Transform tree defining the child-parent frame relationship at given timestamps, specified as a transformTree object.

Parent frame names specified as a string scalar, character vector, string array, or cell array of character vectors. Transformations specified in tform or position and orientation are relative to the parent frame. Each element of parentframe corresponds to the same element in childframe.

Data Types: char | string | cell

Child frame names specified as a string scalar, character vector, string array, or cell array of character vectors. The function attaches the child frame to the parent frame. Transformations specified in tform or position and orientation are relative to the parent frame. Each element of parentframe corresponds to the same element in childframe.

Data Types: char | string | cell

Relative position of child frame to parent, specified as a three-element [x y z] vector. Specify the relative orientation in orientation.

Relative orientation of child frame to parent, specified as a three-element [x y z] vector. Specify the relative position in position.

Relative transform of child frame to parent, specified as a 4-by-4 homogenous transformation matrix.

Time for querying the frames, specified as a scalar or vector of scalars in seconds. If the specified time is not specified in the transform tree, frames, the function performs interpolation using a constant velocity assumption for linear motion, and spherical linear interpolation (SLERP) for angular motion. For timestamps specified after the last timestamp, the most recent (largest timestamp) transformation is returned.

Introduced in R2020b