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 atransformTreeobject.

Parent frame names specified as a string scalar, character vector, string array, or cell array of character vectors. Transformations specified intformorpositionandorientationare relative to the parent frame. Each element ofparentframecorresponds to the same element inchildframe.

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 intformorpositionandorientationare relative to the parent frame. Each element ofparentframecorresponds to the same element inchildframe.

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 inorientation.

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

相对变换的子帧到父,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