|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
matlab robotics toolbox的逆运动学求解ikine为题。
. m' o( J+ m4 O b4 m8 k. U3 p代码如下:
2 V, D4 n( @6 y+ U9 A# }clear all;
, G% H# W3 B; Vclc;, L- C/ b2 D6 G" S. d+ ? V
startup_rvc;9 t# ^5 R, P+ j& W1 Z3 z& f
L(1) = Link([0,0.194,0.45,0,0]);5 s9 [* ]% m e- L+ I9 A/ a
L(1).qlim=([-130*pi/180,130*pi/180]);/ u& r) p& x) e3 ^) o/ F: v2 j' o
L(2) = Link([0,0.072,0.35,0,0]);4 K3 v# F5 ~$ [3 M
L(2).qlim=([-5*pi/6,5*pi/6]);9 U( S: g6 a6 ^5 [
L(3) = Link([0,0,0,0,1]);/ y: d- M$ Z0 _
L(3).qlim=[0,0.5];
3 B5 {- o! U, S5 zL(4) = Link([0,0,0,0,0]);* S( z3 A9 |/ L/ ~ y+ ~6 W& X: q
L(4).qlim=([-pi,pi]);
' H( }% o q1 @# dbot = SerialLink(L); %连接连杆* m. ], a9 q. ^' Q' C, t( Y% g
bot.name='SCARA';
; M' c5 r" I4 h0 ?4 G8 O/ E6 `bot.display() %显示D-H参数表
# E. ~: e6 A, s4 I% `" abot.teach(): q7 f. h* e- W
. w& d1 T/ o, v6 R* bT=[-0.2588 0.9659 0 0.1344;-0.9659 -0.2588 0 0.7278;0 0 1 0.366;0 0 0 1]$ }" r v7 j) z- W# g: L, ^/ F
inverse_kinematics=bot.ikine(T) %逆向运动学. 这个逆解为啥就是不能求?????& P: S1 C X U0 z
1 c3 b7 Y1 M# W* h& j4 H
' u7 J' H. L( x4 |9 f, k; q6 P
theta1=inverse_kinematics(1);
7 p1 o0 a% N# v, v% _theta2=inverse_kinematics(2);
8 [7 E F! L) Y0 Q1 n1 td=inverse_kinematics(3);
: M# W) K) x! m9 x/ Mtheta4=inverse_kinematics(4);
, ?* R4 [8 @2 K* j. C" w1 Y; Rforward_kinematics=bot.fkine([theta1 theta2 d theta4])( J9 [; G3 ]4 [1 t1 h- k1 m' n
错误信息:8 N: \) v3 q: a3 G: p
Error using SerialLink/ikine (line 164)
& b0 ~( @( i) f- U$ D9 Y# {9 uNumber of robot DOF must be >= the same number of 1s in the mask matrix
1 W+ n2 w: v& o( f7 F5 n! k* S! g# n ~6 a- e4 E0 E: M5 V. V
Error in ikine (line 19)
( r9 z4 b% l" Dinverse_kinematics=bot.ikine(T); U; d( z6 t9 `0 j3 I8 L6 r
, Q! E, Q S, ^% w1 [3 K5 U" D9 Z/ Y8 L6 q0 E4 i4 A0 C0 v
1 `7 O' D2 M$ |" c想问下大家这个错误信息的自由度问题怎么解决? , ^5 Z) |; R* B6 Z/ |% R9 a
|
|