代码拉取完成,页面将自动刷新
function MAT=screw2mat(SC,a)
% SCREW2MAT maps twist SC and parameter a to matrix representation by means of exponential mapping.
% -SC is a 6X1 column vector
% -a is screw parameter
% -MAT is the exponential mapping of screw SC
sSC = size(SC);
if sSC == [1 6], SC = SC'; sSC = size(SC); end
% wrong format
if sSC(1) ~= 6
error('screw2mat:wrongsize %d rows in the SC array. It should be 6.',sSC(1));
end
rot=SC(1:3);
trans=SC(4:6);
%angular anti-symmetric matrix
A=sym(zeros(3,3));
A(1,2)=-rot(3);
A(1,3)=rot(2);
A(2,3)=-rot(1);
A(2,1)=-A(1,2);
A(3,1)=-A(1,3);
A(3,2)=-A(2,3);
A2=A*A;
%Rodrigues formula
eA=sym(eye(3))+sin(a)*A+(1-cos(a))*A2;
B=cross(rot,trans);
C=(sym(eye(3))-eA)*B;
D=a*rot*rot'*trans;
V=C+D;
MAT = sym(eye(4));
MAT(1:3,1:3)=eA;
MAT(1:3,4)=V;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。