axang
Description
Examples
Convert SE(3) Transformation to Axis-Angle Rotation
Create SE(3) transformation with no translation but with a rotation defined by an axis-angle rotation. Define the axis-rotation with vector of [0.5 0.25 0.5]
to be the axis and a pi/2
rotation about that axis.
axa1 = [0.5 0.25 0.5 pi/2];
T = se3(axa1,"axang");
Get the axis-angle rotation from the transformation.
axa2 = axang(T)
axa2 = 1×4
0.6667 0.3333 0.6667 1.5708
Convert SO(3) Rotation to Axis-Angle Rotation
Create SO(3) transformation with a rotation defined by an axis-angle rotation. Define the axis-rotation with vector of [0.5 0.25 0.5]
to be the axis and a pi/2
rotation about that axis.
axa1 = [0.5 0.25 0.5 pi/2];
R = so3(axa1,"axang");
Get the axis-angle rotation from the transformation. Note that the vector of the axis-angle rotation has a different magnitude from the axis-angle rotation specified to the transformation but the defined axis and rotation are the same.
axa2 = axang(R)
axa2 = 1×4
0.6667 0.3333 0.6667 1.5708
Input Arguments
transformation
— Transformation
se3
object | N-element array of se3
objects
Transformation, specified as an se3
object or as an
N-element array of se3
objects.
N is the total number of transformations.
rotation
— Rotation
so3
object | N-element array of so3
objects
Rotation, specified as an so3
object or as an
N-element array of so3
objects.
N is the total number of rotations.
Output Arguments
angles
— Axis-angle rotation angles
N-by-4 matrix
Axis-angle rotation angles, specified as an N-by-4 matrix of N axis-angle rotations. The first three elements of every row specify the rotation axes, and the last element defines the rotation angle, in radians.
Version History
Introduced in R2023a
Abrir ejemplo
Tiene una versión modificada de este ejemplo. ¿Desea abrir este ejemplo con sus modificaciones?
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
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)