|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
matlab robotics toolbox的逆运动学求解ikine为题。
: \! P, W) ~ ]" w! G代码如下:
4 R- g6 _; }$ `% P$ J4 \clear all;
4 m+ u+ ~; N# B+ f0 Pclc;
@2 T9 S% X( B: b3 ustartup_rvc;/ T) |- C& s% S4 S8 u; ]. n S, |
L(1) = Link([0,0.194,0.45,0,0]);7 R$ l/ S) ~$ ~( i& H
L(1).qlim=([-130*pi/180,130*pi/180]);
2 }2 h1 B0 c1 |( b9 N1 `8 H/ pL(2) = Link([0,0.072,0.35,0,0]);
$ @; F- h- p# m" {! w! ]8 RL(2).qlim=([-5*pi/6,5*pi/6]);
% c2 ^- A/ v9 Z0 `6 pL(3) = Link([0,0,0,0,1]);0 \ ?" M+ W( k7 c0 b# D& o* z F* v
L(3).qlim=[0,0.5];
% M0 d6 {- x, ]$ u! l: @& G- P. BL(4) = Link([0,0,0,0,0]);
: c8 o% Q! V* d/ X& pL(4).qlim=([-pi,pi]);
) i, L) w- P+ r! _bot = SerialLink(L); %连接连杆$ U" h* n# d, u
bot.name='SCARA';/ q* J. P# y' P
bot.display() %显示D-H参数表
! Y3 ]5 N% Y8 [: h, Vbot.teach()- I# O# K! u' L! B( ?6 Q
1 U7 l& ~; e9 E/ h WT=[-0.2588 0.9659 0 0.1344;-0.9659 -0.2588 0 0.7278;0 0 1 0.366;0 0 0 1]
' D: g/ I9 O5 Y2 @1 I3 ]2 Ninverse_kinematics=bot.ikine(T) %逆向运动学. 这个逆解为啥就是不能求?????
" P4 k, K$ ^* q* q/ s
" {4 h. G5 b+ M8 r. C$ p2 |! M0 e+ }# `, Q7 h9 L: W* Z( w# p
theta1=inverse_kinematics(1);6 g/ @/ q' P% w8 W9 W9 Z J
theta2=inverse_kinematics(2);
( o# a1 b7 o, h4 h* t0 D( \4 L4 W2 id=inverse_kinematics(3);
! }# E. {7 w* k. N- dtheta4=inverse_kinematics(4);
! [/ p1 g. f9 o3 Xforward_kinematics=bot.fkine([theta1 theta2 d theta4])
3 V! h. x1 C) y3 x错误信息:
1 }- ^+ X1 X% N5 S+ d! OError using SerialLink/ikine (line 164)0 L+ x& K. v1 z1 s/ N8 K1 w6 p
Number of robot DOF must be >= the same number of 1s in the mask matrix2 ]; x/ E- i u
7 o& I T% f9 @5 Y XError in ikine (line 19)# }, D, y' b# }* y6 E* M8 O- F1 P
inverse_kinematics=bot.ikine(T)- W$ z$ P3 z0 o. V! {( }
( X% O9 \$ K( J: `/ Y5 W0 t/ b8 b1 M, \: s6 x
+ J* r! i; }3 Y/ g- b1 a, A: L* p
求助大神!; C! C0 b1 e8 {' x
|
|