国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

機械臂正向與逆向運動學求解

這篇具有很好參考價值的文章主要介紹了機械臂正向與逆向運動學求解。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

????????機械臂的正運動學求解即建立DH參數(shù)表,然后計算出各變換矩陣以及最終的變換矩陣。逆運動學求解,即求出機械臂各關(guān)節(jié)θ角與px,py,pz的關(guān)系,建立θ角與末端姿態(tài)之間的數(shù)學模型,在這里以IRB6700為例,對IRB6700進行正逆運動學求解和驗證。

目錄

正運動學求解

逆運動學求解

正逆運動學模型的驗證

正運動學驗證

逆運動學驗證

總的Matlab代碼,包含正逆運動學求解和驗證

參考文獻


正運動學求解

??????? 首先使用DH法建立坐標系如下:

機械臂正向與逆向運動學求解

???????? 查閱IRB6700的參數(shù)如下表

連桿i

/mm

/mm 關(guān)節(jié)角范圍/°
1 0 0 780 +170 ——? (-170)
2 320 -90 0 +85 —— (-65)
3 1125 0 0 +70 —— (-180)
4 200 -90 1142.5 +300 —— (-300)
5 0 90 0 +130 —— (-130)
6 0 -90 200 +360 —— (-360)

根據(jù)變換矩陣公式編寫matlab代碼計算得到正運動學的各變換矩陣

上式中的為,為,為

?計算變換矩陣的MATLAB代碼如下

clear;clc
%%
%導入?yún)?shù)
%注,這里的a,afa的下標在實際使用時均需要減去1
syms a afa d theta [1 6]
a = [0 a2 a3 a4 0 0];
afa = [0 -90 0 -90 90 -90];
d = [d1 0 0 d4 0 d6];
theta = [theta1 theta2 theta3 theta4 theta5 theta6];
syms T [4 4 6]
%%
%正運動學模型求解
%計算各變換矩陣及總的變換矩陣
for i = 1:6
   T(:,:,i) =  trans_cal(  afa(i), a(i), d(i), theta(i)*180/pi );
          if(i == 1)
              trans_matrix = T(:,:,i);
          else
              trans_matrix = trans_matrix*T(:,:,i);
          end
end

?用到的funcion函數(shù)如下

function T = trans_cal(afa_ii,a_ii,d_i,theta_i)
%%
%計算變換矩陣函數(shù)T_{i-1,i}
%輸入的參數(shù)為,afa_{i-1},a_{i-1},d_i,theta_i,與DH表達法的參數(shù)表對應(yīng)
%ii 為i-1
%注意,這里輸入的角度,均采用角度制,不采用弧度制

T = [cosd(theta_i)              -sind(theta_i)             0               a_ii
     sind(theta_i)*cosd(afa_ii)  cosd(theta_i)*cosd(afa_ii)  -sind(afa_ii)    -sind(afa_ii)*d_i
    sind(theta_i)*sind(afa_ii)   cosd(theta_i)*sind(afa_ii)  cosd(afa_ii)     cosd(afa_ii)*d_i
     0                         0                         0                1               ];
 
end

?各個變換矩陣存儲在T中,其中即為變換矩陣,存儲在trans_matrix中。

逆運動學求解

設(shè)總的變換矩陣設(shè)為下數(shù):

有等式

根據(jù)上面的正運動學求解可以得到矩陣中的等各元素的值分別為什么

使用matlab的實時計算腳本可以較具體地看到

機械臂正向與逆向運動學求解

?然后通過封閉解法求逆,將上述等式中右邊地變換矩陣乘到左邊,然后觀察等式兩邊矩陣中地元素,使等式兩邊的矩陣中的某個元素相等,不斷分離變量,然后求解得到角

?首先求解,構(gòu)造等式

?機械臂正向與逆向運動學求解

?觀察等式,使等式兩邊矩陣的第三行第四列元素相等

機械臂正向與逆向運動學求解

上述等式只含有一個未知數(shù),一個等式一個未知數(shù),求解過程如下:

注:為了便于計算,均用代替,也用代替,即下列式子中的實際上為,其他的和亦然如此


機械臂正向與逆向運動學求解

?用同樣的方式求解

機械臂正向與逆向運動學求解

?令等式左右兩邊的第一行第四列,和第三行第四列分別相等,求解過程如下

機械臂正向與逆向運動學求解

?機械臂正向與逆向運動學求解

然后是

機械臂正向與逆向運動學求解

?令等式兩邊第一行第四列,第二行第四列相等

求解過程如下:

機械臂正向與逆向運動學求解

?再然后是的求解

機械臂正向與逆向運動學求解

令左右兩邊第三行第三列相等

求解過程如下

機械臂正向與逆向運動學求解

?最后是和的求解

對 構(gòu)造機械臂正向與逆向運動學求解,使等式左右第一行第三列,和第三行第三列相等

對構(gòu)造機械臂正向與逆向運動學求解,使等式左右第三行第一列,和第三行第二列相等

?求解過程如下

機械臂正向與逆向運動學求解

?至此完成了所有角的求解

?再次注名:上述推導過程中,為了便于計算,均用代替,也用代替,即上述式子中的實際上為,其他的和亦然如此

正逆運動學模型的驗證

正運動學驗證

隨機選定一組關(guān)節(jié)角進行驗證,

關(guān)節(jié)角
度數(shù) 22.12 -81.4 21.25 -84 19.14 275.13

使用之前求解的正運動學模型求解得到末端姿態(tài)矩陣如下

機械臂正向與逆向運動學求解

使用RobotStudio軟件導入IRB6700機器人,輸入選擇的角

注意:由連桿參數(shù)可知,RobotStudio軟件中的角度為原角度加上,為原角度減去,所以RobotStudio中輸入的角度應(yīng)如下:

關(guān)節(jié)角
度數(shù) 22.12 8.6 21.25 -84 19.14 95.13

?機械臂正向與逆向運動學求解

得到的TCP末端xyz坐標???????

?機械臂正向與逆向運動學求解

對比RobotStudio軟件中的末端姿態(tài)[x,y,z]值與正解求得的矩陣中末端姿態(tài)左邊[px,py,pz]可得,兩者相等,因此正運動學模型正確。

逆運動學驗證

由上述的正運動學驗證繼續(xù)計算,上述正運動學得到的末端姿態(tài)矩陣如下:

機械臂正向與逆向運動學求解

根據(jù)此末端姿態(tài)矩陣對逆運動學進行求解,可得到八種不同的角組合,使末端姿態(tài)為[1635.672,594.531,1396.902]

求解的matlab代碼較長,共一個主m文件,以及5個function文件,放在本文最后。

求解得到共八種組合的角結(jié)果,根據(jù)IRB6700機器人的各關(guān)節(jié)角工作范圍減去4個不符合的解后,得到四個符合的角組合,然后保持RobotStudio軟件中的角參數(shù)不變,調(diào)整RobotStudio軟件中的軸配置參數(shù),將逆運動學模型求解得到的結(jié)果與RobotStudio軟件中的結(jié)果進行對比如下表

1 2 3 4 5 6
逆解1 -157.88 -41.51 -134.76 -30.62 -39.82 -144.08
逆解2 -157.88 -41.51 -134.76 149.38 39.82 35.92
逆解3 22.12 8.6 21.25 96 -19.14 -84.87
逆解4 22.12 8.6 21.25 -84 19.14 95.13

軸配置

(-2,-1,-2,-7)

-157.88 -41.51 -134.76 -30.62 -39.82 -144.07

軸配置

(-2,1,0,6)

-157.88 -41.51 -134.76 149.38 39.82 35.93

軸配置

(0,1,-1,1)

22.12 8.6 21.25 96.01 -19.14 -84.87

軸配置

(0,-1,1,0)

22.12 8.6 21.25 -84 19.14 95.13

由上表的結(jié)果對比可知,除了計算精度問題導致的,部分結(jié)果小數(shù)點后兩位與RobotStudio存在一個單位的差異外,結(jié)果一致,因為可以驗證逆運動學模型正確。

總的Matlab代碼,包含正逆運動學求解和驗證

clear;clc
%%
%導入?yún)?shù)
%注,這里的a,afa的下標在實際使用時均需要減去1
syms a afa d theta [1 6]
a = [0 a2 a3 a4 0 0];
afa = [0 -90 0 -90 90 -90];
d = [d1 0 0 d4 0 d6];
theta = [theta1 theta2 theta3 theta4 theta5 theta6];
syms T [4 4 6]
%%
%正運動學模型求解
%計算各變換矩陣及總的變換矩陣
for i = 1:6
   T(:,:,i) =  trans_cal(  afa(i), a(i), d(i), theta(i)*180/pi );
          if(i == 1)
              trans_matrix = T(:,:,i);
          else
              trans_matrix = trans_matrix*T(:,:,i);
          end
end


%%
%逆運動學計算求解
syms r [3 3]
syms PX_X PY_Y PZ_Z
T_60 = [r1_1 r1_2 r1_3 PX_X;
        r2_1 r2_2 r2_3 PY_Y;
        r3_1 r3_2 r3_3 PZ_Z;
        0    0    0    1];
    
left_1 = simplify( inv( T(:,:,2) ) * inv( T(:,:,1) ) * T_60 * inv( T(:,:,6) ) );
right_1 = simplify( T(:,:,3)*T(:,:,4)*T(:,:,5) );


left_2 =  simplify( inv( T(:,:,1) )* T_60 * inv( T(:,:,6) ) );
right_2 = simplify( T(:,:,2)*T(:,:,3)*T(:,:,4)*T(:,:,5) );

left_3 =  simplify( inv(   T(:,:,1)*T(:,:,2)   ) * T_60 * inv( T(:,:,6) ) );
right_3 = simplify( T(:,:,3)*T(:,:,4)*T(:,:,5) );

left_4 =  simplify(  inv(   T(:,:,1)*T(:,:,2)*T(:,:,3)*T(:,:,4)*T(:,:,5)   ) * T_60 );
right_4 = simplify(  T(:,:,6)  );

left_5 =  simplify(  inv(   T(:,:,1)*T(:,:,2)*T(:,:,3)*T(:,:,4) ) * T_60 );
right_5 = simplify(  T(:,:,5)*T(:,:,6)  );

left_6 =  simplify(  inv(   T(:,:,1)*T(:,:,2)*T(:,:,3)*T(:,:,4)*T(:,:,5)   ) * T_60 );
right_6 = simplify(  T(:,:,6)  );


%%
%逆運動學驗算

%末端姿態(tài)
T_ni = [-0.5    0   0.866   1635.672;
        0       1   0       594.531;
        -0.866  0   -0.5    1396.902;
        0       0   0       1];
    
    
r1_1 = T_ni(1,1);r1_2 = T_ni(1,2);r1_3 = T_ni(1,3);PX_X   = T_ni(1,4);
r2_1 = T_ni(2,1);r2_2 = T_ni(2,2);r2_3 = T_ni(2,3);PY_Y   = T_ni(2,4);
r3_1 = T_ni(3,1);r3_2 = T_ni(3,2);r3_3 = T_ni(3,3);PZ_Z   = T_ni(3,4);

syms a d [1 6]
d1 = 780;d4 = 1142.5;d6 = 200;
a2 = 320;a3 = 1125  ;a4 = 200; 

syms A B C D E F [1 6]

%theta1的解
theta1_1 = ( atan2(0,1) - atan2( d6*r2_3-PY_Y , PX_X-d6*r1_3 ) )*180/pi %22.1230
theta1_2 = ( -atan2(0,-1) - atan2( d6*r2_3-PY_Y , PX_X-d6*r1_3 ) )*180/pi %-157.8770



%theta2的解
[theta2_1 , theta2_2] = theta2_calculate(theta1_1)  %theta1為22.123°時
[theta2_3 , theta2_4] = theta2_calculate(theta1_2)  %theta1為-157.8770°時


%theta3的解
theta3_11_21    =   theta3_calculate(theta1_1,theta2_1)  %theta1為22.123°theta2為-81.3955°時
theta3_11_22    =   theta3_calculate(theta1_1,theta2_2)  %theta1為22.123°theta2為22.0674°時
theta3_12_23    =   theta3_calculate(theta1_2,theta2_3)  %theta1為-157.8770°theta2為172.8834°時
theta3_12_24    =   theta3_calculate(theta1_2,theta2_4)  %theta1為-157.8770°theta2為228.4872°時



%theta4的解
[theta4_1_11_21,theta4_2_11_21] = theta4_calculate(theta1_1,theta2_1,theta3_11_21)  %theta1為22.123°theta2為-81.3955°時
[theta4_1_11_22,theta4_2_11_22] = theta4_calculate(theta1_1,theta2_2,theta3_11_22)  %theta1為22.123°theta2為22.0674°時
[theta4_1_12_23,theta4_2_12_23] = theta4_calculate(theta1_2,theta2_3,theta3_12_23)  %theta1為-157.8770°theta2為172.8834°時
[theta4_1_12_24,theta4_2_12_24] = theta4_calculate(theta1_2,theta2_4,theta3_12_24)  %theta1為-157.8770°theta2為228.4872°時


%theta5的解
theta5_11_21_41 = theta5_calculate(theta1_1,theta2_1,theta3_11_21,theta4_1_11_21) %theta1為22.123°theta2為-81.3955°,theta4為第1種
theta5_11_21_42 = theta5_calculate(theta1_1,theta2_1,theta3_11_21,theta4_2_11_21) %theta1為22.123°theta2為-81.3955°,theta4為第2種
theta5_11_22_41 = theta5_calculate(theta1_1,theta2_2,theta3_11_22,theta4_1_11_22) %theta1為22.123°theta2為22.0674°,theta4為第1種
theta5_11_22_42 = theta5_calculate(theta1_1,theta2_2,theta3_11_22,theta4_2_11_22) %theta1為22.123°theta2為22.0674°,theta4為第2種

theta5_12_23_41 = theta5_calculate(theta1_2,theta2_3,theta3_12_23,theta4_1_12_23) %theta1為-157.8770°theta2為172.8834°,theta4為第1種
theta5_12_23_42 = theta5_calculate(theta1_2,theta2_3,theta3_12_23,theta4_2_12_23) %theta1為-157.8770°theta2為172.8834°,theta4為第2種
theta5_12_24_41 = theta5_calculate(theta1_2,theta2_4,theta3_12_24,theta4_1_12_24) %theta1為-157.8770°theta2為228.4872°,theta4為第1種
theta5_12_24_42 = theta5_calculate(theta1_2,theta2_4,theta3_12_24,theta4_2_12_24) %theta1為-157.8770°theta2為228.4872°,theta4為第2種


% theta6的解
theta6_11_21_41 = theta6_calculate(theta1_1,theta2_1,theta3_11_21,theta4_1_11_21) %theta1為22.123°theta2為-81.3955°,theta4為第1種
theta6_11_21_42 = theta6_calculate(theta1_1,theta2_1,theta3_11_21,theta4_2_11_21) %theta1為22.123°theta2為-81.3955°,theta4為第2種
theta6_11_22_41 = theta6_calculate(theta1_1,theta2_2,theta3_11_22,theta4_1_11_22) %theta1為22.123°theta2為22.0674°,theta4為第1種
theta6_11_22_42 = theta6_calculate(theta1_1,theta2_2,theta3_11_22,theta4_2_11_22) %theta1為22.123°theta2為22.0674°,theta4為第2種
theta6_12_23_41 = theta6_calculate(theta1_2,theta2_3,theta3_12_23,theta4_1_12_23) %theta1為-157.8770°theta2為172.8834°,theta4為第1種
theta6_12_23_42 = theta6_calculate(theta1_2,theta2_3,theta3_12_23,theta4_2_12_23) %theta1為-157.8770°theta2為172.8834°,theta4為第2種
theta6_12_24_41 = theta6_calculate(theta1_2,theta2_4,theta3_12_24,theta4_1_12_24) %theta1為-157.8770°theta2為228.4872°,theta4為第1種
theta6_12_24_42 = theta6_calculate(theta1_2,theta2_4,theta3_12_24,theta4_2_12_24) %theta1為-157.8770°theta2為228.4872°,theta4為第2種

function [theta2_1,theta2_2] = theta2_calculate(theta1)
%%
%導入?yún)?shù)
    syms r [3,3]
    syms a afa d
    syms PX_X PY_Y_Y PZ_Z
    T_ni = [-0.5    0   0.866   1635.672;
        0       1   0       594.531;
        -0.866  0   -0.5    1396.902;
        0       0   0       1];    
    r1_1 = T_ni(1,1);r1_2 = T_ni(1,2);r1_3 = T_ni(1,3);PX_X   = T_ni(1,4);
    r2_1 = T_ni(2,1);r2_2 = T_ni(2,2);r2_3 = T_ni(2,3);PY_Y   = T_ni(2,4);
    r3_1 = T_ni(3,1);r3_2 = T_ni(3,2);r3_3 = T_ni(3,3);PZ_Z   = T_ni(3,4);
    syms a d [1 6]
    d1 = 780;d4 = 1142.5;d6 = 200;
    a2 = 320;a3 = 1125  ;a4 = 200; 
    syms A B C D E F [1 6]
    theta1 = theta1/180*pi;

%%
%theta2計算
    A2 = ( PX_X - d6*r1_3 )*cos(theta1) + ( PY_Y - d6*r2_3 )*sin(theta1) - a2;
    B2 = d1 + d6*r3_3 - PZ_Z;
    C2 = 2*A2*a3;
    D2 = 2*B2*a3;
    E2 = A2^2 + B2^2 + a3^2 - a4^2 - d4^2;
    F2 = sqrt( C2^2 + D2^2 );
    
    theta2_1 = ( -atan2(C2,D2)  + atan2(  E2/F2 ,  sqrt( 1- (E2/F2)^2 ) ) )*180/pi  ;
    theta2_2 = ( -atan2(C2,D2)  + atan2(  E2/F2 , -sqrt( 1- (E2/F2)^2 ) ) )*180/pi  ;

end
function theta3 = theta3_calculate(theta1,theta2)
%%
%導入?yún)?shù)
    syms r [3,3]
    syms a afa d
    syms PX_X PY_Y_Y PZ_Z
    T_ni = [-0.5    0   0.866   1635.672;
        0       1   0       594.531;
        -0.866  0   -0.5    1396.902;
        0       0   0       1];    
    r1_1 = T_ni(1,1);r1_2 = T_ni(1,2);r1_3 = T_ni(1,3);PX_X   = T_ni(1,4);
    r2_1 = T_ni(2,1);r2_2 = T_ni(2,2);r2_3 = T_ni(2,3);PY_Y   = T_ni(2,4);
    r3_1 = T_ni(3,1);r3_2 = T_ni(3,2);r3_3 = T_ni(3,3);PZ_Z   = T_ni(3,4);
    syms a d [1 6]
    d1 = 780;d4 = 1142.5;d6 = 200;
    a2 = 320;a3 = 1125  ;a4 = 200; 
    syms A B C D E F [1 6]
    theta1 = theta1/180*pi;
    theta2 = theta2/180*pi;

%%
%theta3計算
    A3 = d1*sin(theta2) - a2*cos(theta2) - PZ_Z*sin(theta2) + d6*r3_3*sin(theta2) + PX_X*cos(theta1)*cos(theta2) ...
    + PY_Y*cos(theta2)*sin(theta1) - d6*r1_3*cos(theta1)*cos(theta2) - d6*r2_3*cos(theta2)*sin(theta1) - a3;

    B3 = d1*cos(theta2) - PZ_Z*cos(theta2) + a2*sin(theta2) + d6*r3_3*cos(theta2) - PX_X*cos(theta1)*sin(theta2) ...
    - PY_Y*sin(theta1)*sin(theta2) + d6*r2_3*sin(theta1)*sin(theta2) + d6*r1_3*cos(theta1)*sin(theta2);

    C3 = ( a4*B3-d4*A3 ) / ( a4^2 + d4^2 );
    
    D3 = ( a4*A3+d4*B3 ) / ( a4^2 + d4^2 );
    
    theta3 = atan2( C3,D3 )*180/pi;


end
function [theta4_1,theta4_2] = theta4_calculate(theta1,theta2,theta3)
%%
%導入?yún)?shù)
    syms r [3,3]
    syms a afa d
    syms PX_X PY_Y_Y PZ_Z
    T_ni = [-0.5    0   0.866   1635.672;
        0       1   0       594.531;
        -0.866  0   -0.5    1396.902;
        0       0   0       1];    
    r1_1 = T_ni(1,1);r1_2 = T_ni(1,2);r1_3 = T_ni(1,3);PX_X   = T_ni(1,4);
    r2_1 = T_ni(2,1);r2_2 = T_ni(2,2);r2_3 = T_ni(2,3);PY_Y   = T_ni(2,4);
    r3_1 = T_ni(3,1);r3_2 = T_ni(3,2);r3_3 = T_ni(3,3);PZ_Z   = T_ni(3,4);
    syms a d [1 6]
    d1 = 780;d4 = 1142.5;d6 = 200;
    a2 = 320;a3 = 1125  ;a4 = 200; 
    syms A B C D E F [1 6]
    theta1 = theta1/180*pi;
    theta2 = theta2/180*pi;
    theta3 = theta3/180*pi;

%%
%theta4計算

A4 = r3_3*cos(theta2)*sin(theta3) + r3_3*cos(theta3)*sin(theta2) - r1_3*cos(theta1)*cos(theta2)*cos(theta3) ...
    - r2_3*cos(theta2)*cos(theta3)*sin(theta1) + r1_3*cos(theta1)*sin(theta2)*sin(theta3) ...
    + r2_3*sin(theta1)* sin(theta2)*sin(theta3);  
B4 = r2_3*cos(theta1) - r1_3*sin(theta1);
theta4_1 = ( atan2( 0,1 ) + atan2( B4,A4 ) )*180/pi;
theta4_2 = ( atan2( 0,-1 ) + atan2( B4,A4 ) )*180/pi;

end
function theta5 = theta5_calculate(theta1,theta2,theta3,theta4)
%%
%導入?yún)?shù)
    syms r [3,3]
    syms a afa d
    syms PX_X PY_Y_Y PZ_Z
    T_ni = [-0.5    0   0.866   1635.672;
        0       1   0       594.531;
        -0.866  0   -0.5    1396.902;
        0       0   0       1];    
    r1_1 = T_ni(1,1);r1_2 = T_ni(1,2);r1_3 = T_ni(1,3);PX_X   = T_ni(1,4);
    r2_1 = T_ni(2,1);r2_2 = T_ni(2,2);r2_3 = T_ni(2,3);PY_Y   = T_ni(2,4);
    r3_1 = T_ni(3,1);r3_2 = T_ni(3,2);r3_3 = T_ni(3,3);PZ_Z   = T_ni(3,4);
    syms a d [1 6]
    d1 = 780;d4 = 1142.5;d6 = 200;
    a2 = 320;a3 = 1125  ;a4 = 200; 
    syms A B C D E F [1 6]
    theta1 = theta1/180*pi;
    theta2 = theta2/180*pi;
    theta3 = theta3/180*pi;
    theta4 = theta4/180*pi;

%%
%theta4計算

A5 = r1_3*sin(theta1)*sin(theta4) - r2_3*cos(theta1)*sin(theta4) - r3_3*cos(theta2)*cos(theta4)*sin(theta3) ...
    - r3_3*cos(theta3)*cos(theta4)*sin(theta2) + r1_3*cos(theta1)*cos(theta2)*cos(theta3)*cos(theta4) + ...
    r2_3*cos(theta2)*cos(theta3)*cos(theta4)*sin(theta1) - r1_3*cos(theta1)*cos(theta4)*sin(theta2)*sin(theta3) ...
    - r2_3*cos(theta4)*sin(theta1)*sin(theta2)*sin(theta3);
B5 = r3_3*sin(theta2)*sin(theta3) - r3_3*cos(theta2)*cos(theta3) - r1_3*cos(theta1)*cos(theta2)*sin(theta3) ... 
    - r1_3*cos(theta1)*cos(theta3)*sin(theta2) - r2_3*cos(theta2)*sin(theta1)*sin(theta3) - ... 
    r2_3*cos(theta3)*sin(theta1)*sin(theta2);
theta5 = atan2(-A5,B5)*180/pi;

end
function theta6 = theta6_calculate(theta1,theta2,theta3,theta4)
%%
%導入?yún)?shù)
    syms r [3,3]
    syms a afa d
    syms PX_X PY_Y_Y PZ_Z
    T_ni = [-0.5    0   0.866   1635.672;
        0       1   0       594.531;
        -0.866  0   -0.5    1396.902;
        0       0   0       1];    
    r1_1 = T_ni(1,1);r1_2 = T_ni(1,2);r1_3 = T_ni(1,3);PX_X   = T_ni(1,4);
    r2_1 = T_ni(2,1);r2_2 = T_ni(2,2);r2_3 = T_ni(2,3);PY_Y   = T_ni(2,4);
    r3_1 = T_ni(3,1);r3_2 = T_ni(3,2);r3_3 = T_ni(3,3);PZ_Z   = T_ni(3,4);
    syms a d [1 6]
    d1 = 780;d4 = 1142.5;d6 = 200;
    a2 = 320;a3 = 1125  ;a4 = 200; 
    syms A B C D E F [1 6]
    theta1 = theta1/180*pi;
    theta2 = theta2/180*pi;
    theta3 = theta3/180*pi;
    theta4 = theta4/180*pi;

%%
%theta4計算

A6 = r2_1*cos(theta1)*cos(theta4) - r1_1*cos(theta4)*sin(theta1) - r3_1*cos(theta2)*sin(theta3)*sin(theta4) ...
    - r3_1*cos(theta3)*sin(theta2)*sin(theta4) + r1_1*cos(theta1)*cos(theta2)*cos(theta3)*sin(theta4) + ...
    r2_1*cos(theta2)*cos(theta3)*sin(theta1)*sin(theta4) - r1_1*cos(theta1)*sin(theta2)*sin(theta3)*sin(theta4) ...
    - r2_1*sin(theta1)*sin(theta2)*sin(theta3)*sin(theta4);
B6 = r2_2*cos(theta1)*cos(theta4) - r1_2*cos(theta4)*sin(theta1) - r3_2*cos(theta2)*sin(theta3)*sin(theta4) ... 
    - r3_2*cos(theta3)*sin(theta2)*sin(theta4) + r1_2*cos(theta1)*cos(theta2)*cos(theta3)*sin(theta4)  ...
    + r2_2*cos(theta2)*cos(theta3)*sin(theta1)*sin(theta4) - r1_2*cos(theta1)*sin(theta2)*sin(theta3)*sin(theta4) ...
    - r2_2*sin(theta1)*sin(theta2)*sin(theta3)*sin(theta4);

theta6 = atan2(-A6,-B6)*180/pi;

end
function T = trans_cal(afa_ii,a_ii,d_i,theta_i)
%%
%計算變換矩陣函數(shù)T_{i-1,i}
%輸入的參數(shù)為,afa_{i-1},a_{i-1},d_i,theta_i,與DH表達法的參數(shù)表對應(yīng)
%ii 為i-1
%注意,這里輸入的角度,均采用角度制,不采用弧度制

T = [cosd(theta_i)              -sind(theta_i)             0               a_ii
     sind(theta_i)*cosd(afa_ii)  cosd(theta_i)*cosd(afa_ii)  -sind(afa_ii)    -sind(afa_ii)*d_i
    sind(theta_i)*sind(afa_ii)   cosd(theta_i)*sind(afa_ii)  cosd(afa_ii)     cosd(afa_ii)*d_i
     0                         0                         0                1               ];
 
end

參考文獻

[1] 尹緒偉. 打磨機器人不同位姿下的剛度特性研究[D]. 武漢: 武漢理工大學, 2019.

[2] 王宇迪. 基于加工姿態(tài)最優(yōu)的發(fā)動機飛輪殼機器人銑削修邊空間路徑規(guī)劃[D]. 武漢: 武漢理工大學, 2022.文章來源地址http://www.zghlxwxcb.cn/news/detail-409431.html

到了這里,關(guān)于機械臂正向與逆向運動學求解的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔相關(guān)法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 機器人學基礎(chǔ)(1)-位置運動學-正運動學、逆運動學方程建立及其求解

    機器人學基礎(chǔ)(1)-位置運動學-正運動學、逆運動學方程建立及其求解

    機器人學基礎(chǔ)學了個知識框架入門,以此來寫一下總結(jié)筆記,便于以后要用到相關(guān)知識點進行翻閱。 本次機器人學基礎(chǔ)筆記主要分為幾個章節(jié): 位置運動學、微分運動和速度、動力學分析和力、軌跡規(guī)劃。 后續(xù)其他的知識點等學到了再進行補充。 本人也是剛?cè)腴T學習,還有

    2023年04月21日
    瀏覽(24)
  • 機械臂運動學逆解(牛頓法)

    ??常用的工業(yè)6軸機械臂采用6軸串聯(lián)結(jié)構(gòu),雖然其運動學正解比較容易,但是其運動學逆解非常復雜,其逆解的方程組高度非線性,且難以化簡。 ??由于計算機技術(shù)的發(fā)展,依靠其強大的算力,可以通過數(shù)值解的方式對機械臂的運動學逆解方程組進行求解。以下將使用牛

    2024年01月22日
    瀏覽(19)
  • 5_機械臂運動學基礎(chǔ)_矩陣

    5_機械臂運動學基礎(chǔ)_矩陣

    上次說的向量空間是為矩陣服務(wù)的。 1、學科回顧 ? 從科技實踐中來的數(shù)學問題無非分為兩類:一類是線性問題,一類是非線性問題。線性問題是研究最久、理論最完善的;而非線性問題則可以在一定基礎(chǔ)上轉(zhuǎn)化為線性問題求解。 線性變換: 數(shù)域 F 上線性空間V中的變換T若滿

    2024年01月25日
    瀏覽(24)
  • 機械臂速成小指南(九):正運動學分析

    機械臂速成小指南(九):正運動學分析

    ?????????需要機械臂相關(guān)資源的同學可以在我的CSDN主頁中尋找哦?????? 指南目錄??: ????機械臂速成小指南(零點五):機械臂相關(guān)資源???? 機械臂速成小指南(零):指南主要內(nèi)容及分析方法 機械臂速成小指南(一):機械臂發(fā)展概況 機械臂速成小指南(二

    2023年04月18日
    瀏覽(22)
  • matlab機械臂建模運動學仿真+軌跡規(guī)劃

    matlab機械臂建模運動學仿真+軌跡規(guī)劃

    1.內(nèi)容參考B站視頻:https://www.bilibili.com/video/BV1q44y1x7WC?spm_id_from=333.337.search-card.all.click 2.工具箱10.4版下載 https://download.csdn.net/download/yohnyang/86099523 3.關(guān)于機器人控制相關(guān)算法的C++實現(xiàn)可以詳見我的專欄 :https://blog.csdn.net/yohnyang/category_12119720.html Link類使用介紹:https://blog.csdn.

    2024年02月01日
    瀏覽(23)
  • (6)六軸機械臂的運動學正、逆解

    (6)六軸機械臂的運動學正、逆解

    下面在前面的ur5機械臂的DH參數(shù)基礎(chǔ)是對其正逆解進行求解,為了后面能在MATLAB中利用stl文件進行實際顯示,這里以標準DH參數(shù)為例進行講解。( 修正DH參數(shù)在用plot3d函數(shù)是顯示失敗,不知道是不是這個函數(shù)只能顯示標準dh參數(shù)的機械臂模型,有知道的網(wǎng)友可以在評論里告知一

    2023年04月09日
    瀏覽(22)
  • MATLAB - 使用運動學 DH 參數(shù)構(gòu)建機械臂

    MATLAB - 使用運動學 DH 參數(shù)構(gòu)建機械臂

    ? ? ? ?使用 Puma560? 機械手機器人的 Denavit-Hartenberg (DH) 參數(shù),逐步建立剛體樹形機器人模型。在連接每個關(guān)節(jié)時,指定其相對 DH 參數(shù)。可視化機器人坐標系,并與最終模型進行交互。 DH 參數(shù)定義了每個剛體通過關(guān)節(jié)與其父體連接的幾何形狀。這些參數(shù)遵循四種變換慣例:

    2024年01月16日
    瀏覽(24)
  • 三軸機械臂逆運動學解算(附代碼)

    三軸機械臂逆運動學解算(附代碼)

    機械臂運動位姿的求解有兩種方式 通過控制已知的連軸(舵機或電機)的旋轉(zhuǎn)角度,求出機械臂終端的空間坐標 通過已知的抓取點的空間坐標,求解出三個舵機所需要轉(zhuǎn)動的角度,這里主要講解逆運動學解法 ?? 此處θ1 ,θ2, θ3是三個舵機所需轉(zhuǎn)動的角度 ,γ是桿3相對于

    2024年02月04日
    瀏覽(113)
  • 機械臂速成小指南(二十二):機械臂逆運動學的數(shù)值解方法

    機械臂速成小指南(二十二):機械臂逆運動學的數(shù)值解方法

    ?????????需要機械臂相關(guān)資源的同學可以在我的CSDN主頁中尋找哦?????? ? 指南目錄??: ????機械臂速成小指南(零點五):機械臂相關(guān)資源???? 機械臂速成小指南(零):指南主要內(nèi)容及分析方法 機械臂速成小指南(一):機械臂發(fā)展概況 機械臂速成小指南(

    2024年02月12日
    瀏覽(20)
  • 六自由度機器人(機械臂)運動學建模及運動規(guī)劃系列(一)——簡介

    六自由度機器人(機械臂)運動學建模及運動規(guī)劃系列(一)——簡介

    畢業(yè)設(shè)計做了六軸機器人相關(guān)的課題,做完之后學到很多,在這里分享一下。本篇首先對六軸機器人及其研究內(nèi)容進行簡單的介紹。 六軸機器人中的六軸指個六自由度,由關(guān)節(jié)和連桿組成。常見的六軸機器人為 串聯(lián)型旋轉(zhuǎn)關(guān)節(jié)機器人 。這里以一款川崎機器人為例,展示一下

    2024年02月02日
    瀏覽(53)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包