首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基于matlab机器人工具箱的六自由度机器人仿真

基于matlab机器人工具箱的六自由度机器人仿真
EN

Stack Overflow用户
提问于 2020-01-08 19:49:15
回答 1查看 316关注 0票数 0

我对matlab和它的机器人工具箱是个新手。我试图在matlab中模拟一个简单的6自由度机械手模型,但我得到了这个错误。下面是我的代码:

代码语言:javascript
复制
clc

startup_rvc;  
syms th1 th2 th3 th4 th5 
%//////////robot  d-h////////////
%%%%L= Link([ th d a alpha 'joint type'])%%%%
L(1) = Link([th1 0.1519 0 -pi/2 ]);
L(2) = Link([th2 0.1198 0.24365 0 ]);
L(3) = Link([th3 -0.0925 0.21325 0 ]);
L(4) = Link([th4 0.08505 0 -pi/2 ]);
L(5)= Link([th5 0.08535 0 pi/2]);
L(6)= Link([th6 0 0 0]);

robot = SerialLink(L,'name','surgicalarm');
q=[0 0 0 0 0];
robot.plot(q)
robot.teach();

但是当我运行这段代码时,我得到了这个错误:

代码语言:javascript
复制
Error using SerialLink/plot (line 205)
Insufficient columns in q

Error in surgicalarm (line 16)
robot.plot(q)

有人能帮我解决这个问题吗?谢谢。

EN

回答 1

Stack Overflow用户

发布于 2020-01-18 20:23:42

由于你的机器人有6个自由度,我希望q也有6列而不是5列。

尝试在您的代码中使用q = [0 0 0 0 0 0]

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59645243

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档