|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
matlab robotics toolbox的逆运动学求解ikine为题。
3 W7 ^- t5 I0 C; @; K代码如下:5 |: U4 [2 r' m& Y1 N* v$ k: }; v
clear all;
: e9 B& _, M, Qclc;
% }3 ?! l+ f4 E9 n1 Cstartup_rvc;
3 W+ Z. e; ?+ u2 B0 }L(1) = Link([0,0.194,0.45,0,0]);! e- q' J2 f) o4 I7 d
L(1).qlim=([-130*pi/180,130*pi/180]);
2 s7 k. U- I7 S7 m4 ZL(2) = Link([0,0.072,0.35,0,0]);: {( @. q0 W. p% ^6 O, O" C" C
L(2).qlim=([-5*pi/6,5*pi/6]);7 a3 v) J ~/ m7 B% }' g+ K
L(3) = Link([0,0,0,0,1]);0 `* G3 h7 h! A% ~
L(3).qlim=[0,0.5]; + }& O% c' \; r0 i
L(4) = Link([0,0,0,0,0]);
8 V1 G( n3 C8 I* \( a$ G/ W, pL(4).qlim=([-pi,pi]);
* \' u+ _0 ^" W" nbot = SerialLink(L); %连接连杆
" V9 w* s' y% g8 Bbot.name='SCARA';: M+ y2 M3 h) w9 O0 }
bot.display() %显示D-H参数表6 D4 n3 l, s8 W2 U
bot.teach(). k% j- M$ K: T+ ]& @! `
; D8 |2 A5 k9 y- w! t, ~3 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]
* J$ @5 {+ O$ W! K7 O- W& ainverse_kinematics=bot.ikine(T) %逆向运动学. 这个逆解为啥就是不能求?????+ p6 Z# Y& H: {1 W8 T% ^
: o/ S& c% n4 Y, Q6 y' r; H- r0 J# P' g
theta1=inverse_kinematics(1);
6 _( T! E9 R; btheta2=inverse_kinematics(2);1 c; U/ _* S" H# }
d=inverse_kinematics(3);
4 v1 q, r" a, K+ |& D& ptheta4=inverse_kinematics(4);1 z) P; E: x' M7 t4 W6 M, D
forward_kinematics=bot.fkine([theta1 theta2 d theta4])
1 k7 M. y9 M, L9 z& o) `错误信息:
9 y; P: t7 P' V- KError using SerialLink/ikine (line 164)
7 P7 O" U* _! t3 ^( N- W: d' F( gNumber of robot DOF must be >= the same number of 1s in the mask matrix* l% l$ k# |. s+ d/ I- C" C
5 g. o8 V5 u; N
Error in ikine (line 19)5 ?8 [0 o0 Y; _
inverse_kinematics=bot.ikine(T)
0 V2 S8 J0 k7 v+ `0 N: y% L( D: d
S' |7 {8 h; K/ \! p( ?8 r4 S9 e9 f: c0 E. D5 e- U% H
# ?9 c5 s# S5 y s7 y' w$ T" n
求助大神!$ V0 K, B& D# K1 m/ P" X3 z7 f" f
|
|