Compute equivalent rotation sequence angles
seq = sequenceAngles(R,axes,sequence)
computes a set of rotation sequence angles to represent the provided rotation,
seq = sequenceAngles(
R. The rotation sequence angles correspond to three successive elementary
sequenceAngles method computes the angles based on the
specification of the
R — Rotation
object of subclass of
Rotation, specified as an object of a subclass of the
axes — Selection of rotation axes
Selection of rotation axes, specified as either the
simscape.multibody.FrameSide.Base member. To compute angles for
intrinsic or extrinsic rotations, use the
simscape.multibody.FrameSide.Base member, respectively. For more
information about the intrinsic or extrinsic rotations, see Rotation Sequence Measurements.
sequence — Sequence of three axes to rotate about
Sequence of three axes to rotate about, specified as a member of the
simscape.multibody.AxisSequence class. Use one of the following members:
seq — rotation sequence angles
Rotation sequence angles, specified as a
simscape.Value object that represents a 3-by-1 column vector. Each element of
the array is an angle.
The unit of the angles depends on which rotation subclass is used to create the
R. If the subclass, such as the
simscape.multibody.StandardAxisRotation class, has an angular input argument,
the unit of the rotation sequence angles matches with the angular unit specified in the
subclass. If the subclass, such as the
simscape.multibody.RotationMatrixRotation class, does not have an angular
input argument, the rotation sequence angles are in degrees.
sequenceAngles method and the Sequence
parameter of the Transform Sensor block work similarly
when computing rotation sequence angles. For more information about the computed angles
and how the
sequenceAngles method deals with locking issues, such the
gimbal lock problem, see Rotation Sequence Measurements.
To learn about attributes of methods, see Method Attributes.
Compute Rotation Sequence Angles for a Rotation Object
This example shows how to compute equivalent rotation sequence angles for a rotation object constructed by the
StandardAxisRotation class to construct a rotation object
R that represents a rotation about the x-axis of the base frame. The rotation angle is
angle = simscape.Value(1.05,"rad"); axis = simscape.multibody.Axis.PosX; R = simscape.multibody.StandardAxisRotation(angle,axis);
sequenceAngles method to compute the rotation sequence angles of the object
R. Specify the base frame as the reference fame and X-Y-Z as the rotation sequence.
axes = simscape.multibody.FrameSide.Base; sequence = simscape.multibody.AxisSequence.XYZ; seq = sequenceAngles(R,axes,sequence)
seq = 1.0500 0 0 : rad
Introduced in R2023a