EulerAxis Class¶
The EulerAxis class represents attitude using axis-angle representation (Euler's rotation theorem).
EulerAxis ¶
EulerAxis(axis: ndarray, angle: float, angle_format: AngleFormat)
Represents a rotation using Euler axis-angle representation.
The Euler axis-angle representation describes a rotation as a single rotation about a specified axis by a given angle. This is also known as the axis-angle or rotation vector representation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
axis | ndarray | 3-element unit vector specifying rotation axis | required |
angle | float | Rotation angle in radians or degrees | required |
angle_format | AngleFormat | Units of input angle (RADIANS or DEGREES) | required |
Example
Initialize instance.
axis property ¶
axis: ndarray
Get the rotation axis as a numpy array.
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 3-element unit vector specifying rotation axis |
from_euler_angle builtin ¶
from_euler_angle(e: EulerAngle) -> EulerAxis
Create an Euler axis from Euler angles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e | EulerAngle | Euler angle representation | required |
Returns:
| Name | Type | Description |
|---|---|---|
EulerAxis | EulerAxis | Equivalent Euler axis |
from_euler_axis builtin ¶
from_quaternion builtin ¶
from_quaternion(q: Quaternion) -> EulerAxis
Create an Euler axis from a quaternion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q | Quaternion | Source quaternion | required |
Returns:
| Name | Type | Description |
|---|---|---|
EulerAxis | EulerAxis | Equivalent Euler axis |
from_rotation_matrix builtin ¶
from_rotation_matrix(r: RotationMatrix) -> EulerAxis
Create an Euler axis from a rotation matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r | RotationMatrix | Rotation matrix | required |
Returns:
| Name | Type | Description |
|---|---|---|
EulerAxis | EulerAxis | Equivalent Euler axis |
from_values builtin ¶
Create an Euler axis from individual axis components and angle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x | float | X component of rotation axis | required |
y | float | Y component of rotation axis | required |
z | float | Z component of rotation axis | required |
angle | float | Rotation angle in radians or degrees | required |
angle_format | AngleFormat | Units of input angle (RADIANS or DEGREES) | required |
Returns:
| Name | Type | Description |
|---|---|---|
EulerAxis | EulerAxis | New Euler axis instance |
from_vector builtin ¶
from_vector(v: ndarray, angle_format: AngleFormat, vector_first: bool) -> EulerAxis
Create an Euler axis from a numpy array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v | ndarray | 4-element array containing axis and angle | required |
angle_format | AngleFormat | Units of angle (RADIANS or DEGREES) | required |
vector_first | bool | If True, array is [x, y, z, angle], else [angle, x, y, z] | required |
Returns:
| Name | Type | Description |
|---|---|---|
EulerAxis | EulerAxis | New Euler axis instance |
to_euler_angle method descriptor ¶
to_euler_angle(order: str) -> EulerAngle
Convert to Euler angle representation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order | str | Desired rotation sequence (e.g., "XYZ", "ZYX") | required |
Returns:
| Name | Type | Description |
|---|---|---|
EulerAngle | EulerAngle | Equivalent Euler angles |
to_quaternion method descriptor ¶
to_quaternion() -> Quaternion
to_rotation_matrix method descriptor ¶
to_rotation_matrix() -> RotationMatrix
Convert to rotation matrix representation.
Returns:
| Name | Type | Description |
|---|---|---|
RotationMatrix | RotationMatrix | Equivalent rotation matrix |
to_vector method descriptor ¶
to_vector(angle_format: AngleFormat, vector_first: bool) -> ndarray
Convert Euler axis to a numpy array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angle_format | AngleFormat | Units for output angle (RADIANS or DEGREES) | required |
vector_first | bool | If True, returns [x, y, z, angle], else [angle, x, y, z] | required |
Returns:
| Type | Description |
|---|---|
ndarray | numpy.ndarray: 4-element array containing axis and angle |