tr2eul

tr2eul converts SO(3) or SE(3) matrix to Euler angles

Syntax

Description

Brief description of the function goes here. This is Peter's Corke function and this page is just to show how out publishFS works.

This function is part of The Spatial Math Toolbox for MATLAB (SMTB).

example

euler =tr2eul(RR) Example of use of RR with all the default options.

example

euler =tr2eul(RR, Name, Value) Example of choice of Euler angle.

Examples

expand all

  • Example of use of RR with all the default options.
  • RR=randn(3,3)
    euler = tr2eul(RR);

  • Example of choice of Euler angle.
  • RR=randn(3,3)
    opt=struct;
    opt.flip=true;
    euler = tr2eul(RR,'opt',opt);

    Input Arguments

    expand all

    RR — Homogeneous transformation or rotation matrix. Matrix or 3D array.

    Matrix of size 3-by-3 or 3D array of size 3-by-3-k which represents the input homogeneous transformation.

    Data Types: single| double

    Name-Value Pair Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example: 'opt',opt=struct; opt.flip=false;

    opt —type of angle and quadrant choice.structure.

    The structure contains the following fields:

    Value Description
    deg

    boolean which specifies whether to compute angles in degrees or. radians. If it is set to false (default) the angles are in radians.

    flip

    boolean which specifies how to choose first Euler angle. If it is set to false (default) quadrant 2 is chosen.

    Example: 'opt',opt=struct; opt.flip=false;

    Data Types: struct

    Output Arguments

    expand all

    euler —ZYZ Euler angles. Row vector or matrix

    if size(RR,3) of input argument RR is 1, EUL is a row vector of length 3 containing the ZYZ Euler angles (1x3) corresponding to the rotational part of a homogeneous transform T (4x4).

    The 3 angles EUL=[PHI,THETA,PSI] correspond to sequential rotations about the Z, Y and Z axes respectively. If size(RR,3)>1, that is if R represents a sequence, each row of EUL corresponds to a step of the sequence.

    More About

    expand all

    Additional Details

    - There is a singularity for the case where THETA=0 in which case PHI is arbitrarily set to zero and PSI is the sum (PHI+PSI).

    - Translation component is ignored.

    This file is part of The Spatial Math Toolbox for MATLAB (SMTB).

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    https://github.com/petercorke/spatial-math

    References

    ZZZZ (2019). THIS IS THE PLACE TO PUT THE REFERENCES

    See Also

    |

    This page has been automatically generated by our routine publishFS