| 
 | 
	
    
 
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册  
 
x
 
matlab robotics toolbox的逆运动学求解ikine为题。 
" l5 d2 A# V/ Z& k; u/ ~代码如下: 
. q. @8 z- O: {6 Q! n- {clear all; 
- L: h( j+ ]( I' s$ B7 M. u/ dclc; 
0 x$ j0 d( {% n/ C: p, i- s6 ^+ w) Estartup_rvc; 
& K9 ^  q6 z; Z. O. `* ~. J8 VL(1) = Link([0,0.194,0.45,0,0]);7 u( |, y' _7 r* W 
L(1).qlim=([-130*pi/180,130*pi/180]);  l) d' ^  u& C 
L(2) = Link([0,0.072,0.35,0,0]);: P7 l  p: I  |) Q 
L(2).qlim=([-5*pi/6,5*pi/6]);& n; |; t$ o/ ~5 s- L0 G 
L(3) = Link([0,0,0,0,1]); 
' _* q8 g' X: V- a6 ?3 sL(3).qlim=[0,0.5];    
0 o9 Q- E' s& L* P+ F* `L(4) = Link([0,0,0,0,0]);1 w- q8 d! t" a7 g* z- Z4 \ 
L(4).qlim=([-pi,pi]);# R/ |9 _4 f2 [) f% [0 v  I 
bot = SerialLink(L);   %连接连杆 
! b, t9 h# g. L$ f8 e/ h# rbot.name='SCARA'; 
6 }/ j1 \" V& `# z$ M5 jbot.display()         %显示D-H参数表 
. p" c# P6 y" y+ C9 g' H1 Ibot.teach()9 g5 \& U; @. d9 s- W 
9 s) g. P9 v5 D+ ~8 u 
T=[-0.2588 0.9659 0 0.1344;-0.9659 -0.2588 0 0.7278;0 0 1 0.366;0 0 0 1]5 p" ?# G" J7 D( N6 I( e 
inverse_kinematics=bot.ikine(T) %逆向运动学. 这个逆解为啥就是不能求????? 
' E# Y) b- E* ]! C3 g2 a$ c9 l& x- _3 x9 g: S: ]: X5 U 
 
% ^  j/ ^5 {+ l& C! r+ r" Ptheta1=inverse_kinematics(1);  \# T0 Q/ ^, g! _ 
theta2=inverse_kinematics(2);. @+ e5 O0 ~) |' j* ^% c 
d=inverse_kinematics(3);  V/ a: y; Y& @8 L1 o 
theta4=inverse_kinematics(4); 
2 i7 @/ P8 Y, j3 Mforward_kinematics=bot.fkine([theta1 theta2 d theta4]) 
* u; i" k  c& }5 V9 E4 G  ]- F错误信息:- x' r1 b: G: b+ m# m$ }& ~- I$ I 
Error using SerialLink/ikine (line 164) 
8 k* `% h1 y; ]' hNumber of robot DOF must be >= the same number of 1s in the mask matrix  C" m4 ]7 y* r3 p& A 
 
/ H! E$ g; L8 y4 IError in ikine (line 19) 
6 `( H& r/ W: `; x0 R" Jinverse_kinematics=bot.ikine(T)5 ~6 Y% Q; g; X) f 
 
: {; y3 a, Q! B2 Z 
8 K( I/ F1 \6 h* q 
  V6 P( O& R7 k" @3 k  M, F) E( P8 l! O求助大神! 
& Q$ {4 @6 l; Q) x2 [$ d |   
 
 
 
 |