Syntax
[R,P,A_T_B]=RPofTrelT(TA,TB)
Input Parameter
Output Parameter
R : | | Rotation angles (euler) XYZ |
P : | | Distance |
A_T_B : | | Frame B relative to Frame A |
Examples
rotm2axang(rot(a))
SG=SGbending(SGofCPLzdelaunayGrid(PL,4,2,2,2),40);
Copyright 2018-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function calculates the relative transformation between two frames, TA and TB, and provides the rotation angles, distance, and the relative frame.
Input Parameters
- TA: Frame A, a 4x4 transformation matrix representing the pose of frame A.
- TB: Frame B, a 4x4 transformation matrix representing the pose of frame B.
Output Results
- R: Rotation angles in Euler format (XYZ) derived from the relative transformation matrix.
- P: Distance vector, representing the translation part of the relative transformation matrix.
- A_T_B: Frame B relative to Frame A, calculated as the inverse of TA multiplied by TB.
Algorithm Steps
- Calculate the relative transformation matrix
A_T_B
by computing the inverse of TA
and multiplying it by TB
(i.e., A_T_B = TA\TB
).
- Extract the translation vector
P
from the last column of the first three rows of A_T_B
.
- Compute the rotation angles
R
using the rotm2eul
function on the top-left 3x3 submatrix of A_T_B
, specifying the 'XYZ' order for Euler angles.
- If no output arguments are specified, visualize the frames using
SGfigure
and tplot
functions, and display the axis-angle representation of the rotation.
Algorithm explaination created using ChatGPT on 2025-08-18 23:27. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21