sequenceAngles
Class: simscape.multibody.Rotation
Package: simscape.multibody
Syntax
seq = sequenceAngles(R,axes,sequence)
Description
computes a set of rotation sequence angles to represent the provided rotation,
seq
= sequenceAngles(R
,axes
,sequence
)R
. The rotation sequence angles correspond to three successive elementary
rotations. The sequenceAngles
method computes the angles based on the
specification of the axes
and sequence
.
Input Arguments
R
— Rotation
object of subclass of simscape.multibody.Rotation
class
Rotation, specified as an object of a subclass of the simscape.multibody.Rotation
class.
axes
— Selection of rotation axes
simscape.multibody.FrameSide.Base
| simscape.multibody.FrameSide.Follower
Selection of rotation axes, specified as either the
simscape.multibody.FrameSide.Follower
or
simscape.multibody.FrameSide.Base
member. To compute angles for
intrinsic or extrinsic rotations, use the
simscape.multibody.FrameSide.Follower
or
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
member of simscape.multibody.AxisSequence
class
Sequence of three axes to rotate about, specified as a member of the
simscape.multibody.AxisSequence
class. Use one of the following members:
simscape.multibody.AxisSequence.XYX
simscape.multibody.AxisSequence.XYZ
simscape.multibody.AxisSequence.XZX
simscape.multibody.AxisSequence.XZY
simscape.multibody.AxisSequence.YXY
simscape.multibody.AxisSequence.YXZ
simscape.multibody.AxisSequence.YZX
simscape.multibody.AxisSequence.YZY
simscape.multibody.AxisSequence.ZXY
simscape.multibody.AxisSequence.ZXZ
simscape.multibody.AxisSequence.ZYX
simscape.multibody.AxisSequence.ZYZ
Output Arguments
seq
— rotation sequence angles
simscape.Value
object
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
object 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.
The 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.
Examples
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 simscape.multibody.StandardAxisRotation
class.
Use 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 1.05
rad.
angle = simscape.Value(1.05,"rad");
axis = simscape.multibody.Axis.PosX;
R = simscape.multibody.StandardAxisRotation(angle,axis);
Use the 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
Version History
Introduced in R2023a
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)