필터 지우기
필터 지우기

3-DOF Robot Dynamics error in Robotics Toolbox

조회 수: 4 (최근 30일)
Mohsina Zafar
Mohsina Zafar 2019년 7월 15일
편집: Mohsina Zafar 2019년 7월 16일
Hello,
I am trying to compute dynamics of 3 DOF robot using Robotics Toolbox by executing this code:
robot.accel(q, zeros(1,3), zeros(1,3))
But I am getting this error: Assignment has more non-singleton rhs dimensions than non-singleton subscripts
My robot is:
L(1)= Link([0 0.03 0 -pi/2]);
L(2)= Link([0 0 0.28 0]);
L(3)= Link([0 0 0.2 0]);
L(1).m = 1;
L(2).m = 4;
L(3).m = 3;
L(1).r=[0 0 -0.015];
L(2).r=[0.14 0 0];
L(3).r=[0.1 0 0];
ax1=0.03; ay1=0.03; az1=0.03;
ax2=0.28; ay2=0.05; az2=0.05;
ax3=0.2; ay3=0.05; az3=0.05;
I1=1/12*[ay1^2+az1^2 0 0; 0 ax1^2+az1^2 0; 0 0 ax1^2+ay1^2];
I2=4/12*[ay2^2+az2^2 0 0; 0 ax2^2+az2^2 0; 0 0 ax2^2+ay2^2];
I3=3/12*[ay3^2+az3^2 0 0; 0 ax3^2+az3^2 0; 0 0 ax3^2+ay3^2];
L(1).I=I1;
L(2).I=I2;
L(3).I=I3;
q=[0 0 0]
robot=SerialLink(L);
Kindly help in this regard

채택된 답변

Mohsina Zafar
Mohsina Zafar 2019년 7월 16일
편집: Mohsina Zafar 2019년 7월 16일
The error was due to no mention of motor inertias. I have set them to:
for i=1:3
robot.links(i).Jm = 2.1184*10^-4;
end
and the error is gone while using robot.accel command.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Robotics에 대해 자세히 알아보기

제품


릴리스

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by