dhmatrix.m

来自「The Robotics Toolbox provides many fun」· M 代码 · 共 20 行

M
20
字号
%% Author: epokh
%% Website: www.epokh.org/drupy
%% This software is under GPL

function [Mdh]=DHmatrix(theta,d,a,alpha)
%%output: DH matrix
%%input: DH parameters:
%%theta: rotation along x(n) axis
%%d: traslation along z(n) axis
%%a: translation along x(n+1) axis
%%alpha: rotation along x(n+1) axis
%%all angles expressed in degrees

Mdh=[cosd(theta) -sind(theta)*cosd(alpha) sind(theta)*sind(alpha) a*cosd(theta);
     sind(theta) cosd(theta)*cosd(alpha)  -cosd(theta)*sind(alpha) a*sind(theta);
     0,sind(alpha),cosd(alpha),d;
     0,0,0,1];


end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?