Filter löschen
Filter löschen

how to do coordinate transformation around a fixed axis using robotics toolbox or spatial math toolbox?

8 Ansichten (letzte 30 Tage)
Dear friends,
If the initial frame {s} rotate around a screw axis S which is defined by rotaion unit axis omega=(0.7,0.0,0.7) , a vector q=(1,1,0.5) and a screw pitch h=1. the initial frame {s} rotate around the screw axis S, what the new frame looks like?
Your help would be highly appreciated.

Akzeptierte Antwort

Askic V
Askic V am 8 Nov. 2022
Bearbeitet: Askic V am 8 Nov. 2022
Hello Daniel,
I suggest you to look in the book "Modern Robotics" by K. Lynch and F. Park, which is available online for free.
However, I have use anothe online source which I find very good to understand:
In my opinion, you need to find the homogeneous transformation matrix T. This is a transformation matrix between two frames.
I have written the following Matlab code:
% Source:
% https://www.mecharithm.com/screws-a-geometric-description-of-twists-in-robotics/
w = [sqrt(2)/2, 0, sqrt(2)/2]';
q = [1, 1, 0.5]';
h = 1;
% Screw S = [omega; velocity]
Vs = [w; cross(-w,q) + h*w];
% Skew matrix omega
sk_w = [0 -w(3) w(2); w(3) 0 -w(1); -w(2) w(1) 0];
% norm of w is 1
theta = norm(w);
% using the Rodrigues’ formula
% we can find the rotational part of the transformation matrix
R = eye(3) + sin(theta)*sk_w + (1-cos(theta))*sk_w*sk_w;
% velocity = last three elements in Screw vector
v = Vs(4:6);
% Rodrigues formula for G
G = (eye(3)*theta + (1-cos(theta))*sk_w + (theta-sin(theta))*sk_w^2)*v;
T = [R G; 0, 0, 0, 1]
T = 4×4
0.7702 -0.5950 0.2298 1.4170 0.5950 0.5403 -0.5950 0.1622 0.2298 0.5950 0.7702 -0.0028 0 0 0 1.0000
So, when you have this transformation matrix T, you can now express the configuration (position and orientation) of a frame relative to a fixed (reference) frame.
https://www.mecharithm.com/homogenous-transformation-matrices-configurations-in-robotics/
  2 Kommentare
Daniel Niu
Daniel Niu am 8 Nov. 2022
Dear Askic,
how to include the rotate angle, for example 265 degree in the code?
I see the theta is 1 in your code. And I don't quite understand how to get the Skew matrix omega, for
I didn't find the formula in Lynch's book
thank you!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Coordinate Transformations finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by