Main Content

frameVariables

List all kinematic variables associated with frame pairs

Description

frameVariables(ks) lists the kinematic variables currently defined in the KinematicsSolver object ks to capture the transforms between frame pairs. The frame pairs are specified when creating the variables. They can be from anywhere in the model and often comprise frames not directly connected by joints.

MATLAB outputs a table with the frame variables in rows. Each row gives the ID of a variable, the base frame against which its transform is defined, the follower frame which the transform describes, and the unit for its numerical value.

KinematicsSolver objects start without frame variables. The table is initially empty and it remains so until populated with variables created from frame pairs. Use the addFrameVariables object function to create those variables. Use removeFrameVariables to drop variables no longer relevant for analysis, and clearFrameVariables to drop all frame variables in one call.

The same pair of frames can give rise different variables. These are generally bundled into a group specific to the pair. Groups are sorted by name, with variables in each group being ranked by transform type and component. The variables are correspondingly named groupName.transformType.transformComponent.

The group name is the string given to the addFrameVariables object function at the time the variables were created. The transform type is either translation or rotation. The transform component is x, y, or z. A group named Hand with the translation components between frames would have for its frame variables Hand.Translation.X, Hand.Translation.Y, and Hand.Translation.Z.

Frame variables can be assigned as targets, guesses, and outputs during analysis. As targets, they help to specify the multibody configuration for which to solve the unknown variables. As guesses, they serve to bias the solver toward one of equally plausible solutions—for example, to ensure that the elbow of a humanoid robot does not hyperextend. As outputs, they add to the list of unknowns to determine.

Input Arguments

collapse all

A KinematicsSolver object is the representation of a Simscape Multibody model used for kinematic analysis.

Example: ks = simscape.multibody.KinematicsSolver('sm_double_pendulum')

Data Types: KinematicsSolver object

Introduced in R2019a