2019-12-11 09:33:46 +01:00
|
|
|
function [WTr] = computeReferencePose(Dy, Ry, Rz, Dh, Dn)
|
2019-12-06 12:03:16 +01:00
|
|
|
% computeReferencePose - Compute the homogeneous transformation matrix corresponding to the wanted pose of the sample
|
|
|
|
%
|
2019-12-11 09:33:46 +01:00
|
|
|
% Syntax: [WTr] = computeReferencePose(Dy, Ry, Rz, Dh, Dn)
|
2019-12-06 12:03:16 +01:00
|
|
|
%
|
|
|
|
% Inputs:
|
2019-12-11 09:33:46 +01:00
|
|
|
% - Dy - Reference of the Translation Stage [m]
|
|
|
|
% - Ry - Reference of the Tilt Stage [rad]
|
|
|
|
% - Rz - Reference of the Spindle [rad]
|
|
|
|
% - Dh - Reference of the Micro Hexapod (Pitch, Roll, Yaw angles) [m, m, m, rad, rad, rad]
|
|
|
|
% - Dn - Reference of the Nano Hexapod [m, m, m, rad, rad, rad]
|
2019-12-06 12:03:16 +01:00
|
|
|
%
|
|
|
|
% Outputs:
|
|
|
|
% - WTr -
|
|
|
|
|
|
|
|
%% Translation Stage
|
|
|
|
Rty = [1 0 0 0;
|
|
|
|
0 1 0 Dy;
|
|
|
|
0 0 1 0;
|
|
|
|
0 0 0 1];
|
|
|
|
|
|
|
|
%% Tilt Stage - Pure rotating aligned with Ob
|
|
|
|
Rry = [ cos(Ry) 0 sin(Ry) 0;
|
|
|
|
0 1 0 0;
|
|
|
|
-sin(Ry) 0 cos(Ry) 0;
|
|
|
|
0 0 0 1];
|
|
|
|
|
|
|
|
%% Spindle - Rotation along the Z axis
|
|
|
|
Rrz = [cos(Rz) -sin(Rz) 0 0 ;
|
|
|
|
sin(Rz) cos(Rz) 0 0 ;
|
|
|
|
0 0 1 0 ;
|
|
|
|
0 0 0 1 ];
|
|
|
|
|
|
|
|
|
|
|
|
%% Micro-Hexapod
|
|
|
|
Rhx = [1 0 0;
|
|
|
|
0 cos(Dh(4)) -sin(Dh(4));
|
|
|
|
0 sin(Dh(4)) cos(Dh(4))];
|
|
|
|
|
|
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