how to do coordinate transformation around a fixed axis using robotics toolbox or spatial math toolbox?
17 views (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
Askic V
on 8 Nov 2022
Edited: Askic V
on 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]
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/
More Answers (0)
See Also
Categories
Find more on Robotics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!