matlab - 在 matlab 机器人工具箱中模拟 6 自由度机器人
问题描述
我是 matlab 及其机器人工具箱的新手。我正在尝试在 matlab 中模拟 6 DOF 机械手的简单模型,但出现此错误。这是我的代码:
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();
但是当我运行这段代码时,我得到了这个错误:
Error using SerialLink/plot (line 205)
Insufficient columns in q
Error in surgicalarm (line 16)
robot.plot(q)
谁能帮我解决这个问题?谢谢。
解决方案
由于您的机器人有 6 个自由度,我希望q
也有 6 个列而不是 5 个。
q = [0 0 0 0 0 0]
在您的代码中尝试使用。
推荐阅读
- html - 如何创建用作重定向输入的逻辑?
- reactjs - 如何在 PhpStorm 中为 WordPress Gutenberg 创建 React.js 文件
- crystal-reports - Crystal Report“导出 DLL 检测到错误”- 仅限 Excel (Win7)
- c# - 为 Token Google Api 发出交换授权码
- c - 与stdarg相关的clang错误?
- java - 如何将简单的字符串值添加到 JsonObjectBuilder?
- python - 如何从 Keras 中不同维度的多输出中引用一个输出
- angular - Angular 2 中的组件或服务何时被破坏?
- php - POST http://localhost:8000/index/bots 500(内部服务器错误)
- c# - 将 json 数组转换为对象列表