機械臂的DH參數,正運動學求解,Jacob矩陣(含Matlab代碼)


機械臂的DH參數,正運動學求解,Jacob矩陣

前期准備

Matlab 機器人工具箱Robotic Toolbox下載及安裝教程         

參考教程:https://www.bilibili.com/read/cv6438321/

 

Matlab Robotic Toolbox工具箱學習筆記

參考鏈接:

https://blog.csdn.net/weixin_28949185/article/details/88376108

https://blog.csdn.net/qq_27838307/article/details/80715277

 

正逆運動學與工作空間

參考鏈接:https://zhuanlan.zhihu.com/p/341567280

 

D-H參數和正運動學MATLAB代碼:

clear;
clc;
 L1 = Link('d', 0, 'a', 0, 'alpha', -pi/2);%定義連桿
 L2 = Link('d', 1, 'a', 0, 'alpha', pi/2);
 L3 = Link('theta', 0, 'a', 0, 'alpha', 0);
 L4 = Link('d', 0, 'a', 0, 'alpha', -pi/2);
 L5 = Link('d', 0, 'a', 0, 'alpha', pi/2);
 L6 = Link('d', 1, 'a', 0, 'alpha', 0);
 bot = SerialLink([L1 L2 L3 L4 L5 L6]);%連接連桿
 bot.display();%顯示D-H參數表
 forward_kinematics=bot.fkine([-0.2 0.1 10 0.1 1 2])%前向運動學

 

在世界坐標系的雅克比矩陣MATLAB代碼:

 1 %求解Stanford arm在世界坐標系描述的雅克比矩陣
 2 clear;
 3 clc;
 4 clear L
 5 %             th    d       a    alpha
 6 L(1) = Link([ 0     0       0   -pi/2     0]);%定義連桿
 7 L(2) = Link([ 0     1       0    pi/2     0]);
 8 L(3) = Link([ 0     0       0    0        1]);
 9 L(4) = Link([ 0     0       0   -pi/2     0]);
10 L(5) = Link([ 0     0       0    pi/2     0]);
11 L(6) = Link([ 0     1       0    0        0]);
12 bot = SerialLink(L, 'name', 'Stanford arm');%連接連桿
13 syms theta1 theta2 d3 theta4 theta5 theta6;
14 J0=vpa(bot.jacob0([theta1 theta2 d3 theta4 theta5 theta6]),4)

 

 1 %求平面二自由度機器人在世界坐標系描述的雅克比矩陣
 2 clear;
 3 clc;
 4 clear L
 5 L(1) = Link('d',0,'a','a1','alpha',0,'sym');%定義連桿
 6 L(2) = Link('d',0,'a','a2','alpha',0,'sym');
 7 bot = SerialLink(L, 'name', 'Planar 2-dof robot');%連接連桿
 8 syms theta1 theta2;
 9 J0=bot.jacob0([theta1 theta2]);
10 
11 J0=simplify(J0)

 

參考鏈接:https://blog.csdn.net/weixin_28949185/article/details/88376108

 

MATLAB仿真,可以在命令行窗口輸入:

simulink

roblocks


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM