The GetFrameMotion command generates expressions for the translational or rotational motion of any moving frame in the system, in terms of the defined coordinates and speeds. The general form of this command is:
> MB := A:-GetMultibody():
where the vector describes the motion of the end_frame relative to the start_frame (the default is the inertial frame), resolved in components along the ref_frame (default is the inertial frame).
The vector_type string may take one of the following values:
• "r" - translational position vector
• "v" - translational velocity vector
• "vdot" - translational acceleration vector
• "R" - rotation transformation matrix (gives orientation of end_frame relative to start_frame; the ref_frame string must be omitted when this 3x3 matrix is requested)
• "w" - angular velocity vector
• "wdot" - angular acceleration vector
Finally, the ListNumSubs list is used to enter numeric values for parameters that appear in the motion expressions in symbolic form. To determine which system parameters have not been assigned numerical values, use the GetParams command. The ListNumSubs list takes the general form [pd_1=value_1, pd_2=value_2, ...], where pd_i is the i_th parameter or driver and value_i is the numeric parameter value or driving function of time.
A few examples will help to clarify these concepts.
gives the three global X, Y, Z components of the translational velocity of the CoM frame relative to the inertial frame.
gives the three global X, Y, Z components of the translational acceleration of the CoM frame relative to the Base frame.
> Params:= [L1=1, L2=0.5]:
gives the angular velocity of the CoM frame relative to the Base frame, resolved into x, y, and z components along the Ref frame. Numerical values for L1 and L2 are stored in the Params list, and substituted into the symbolic expressions.
gives the 3x3 rotation matrix transformation from the Base frame to the CoM frame. A complete description of rotation matrices is given in the section Building System Models / Bodies and Frames.