3-DOF Robot Dynamics error in Robotics Toolbox

1 visualización (últimos 30 días)
Mohsina Zafar
Mohsina Zafar el 15 de Jul. de 2019
Editada: Mohsina Zafar el 16 de Jul. de 2019
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

Respuesta aceptada

Mohsina Zafar
Mohsina Zafar el 16 de Jul. de 2019
Editada: Mohsina Zafar el 16 de Jul. de 2019
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.

Más respuestas (0)

Categorías

Más información sobre Robotics en Help Center y File Exchange.

Productos


Versión

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by