set(h.pjoint(L), 'Matrix', diag([1 1 max(eps,q(L)) 1]))
set(h.link(L), 'Matrix', diag([1 1 max(eps, q(L)) 1]));
Can you explain what us wrong about it. From te pictures I don't see anything wrong... try plotting nonzero configuration or the teach function.
Erik
Op zondag 18 maart 2018 22:42:17 UTC+1 schreef Alessia Adele:
C
I tried to create a S.C.A.R.A. manipulator with RT10, and I used this code:%SCARA%Parametri D-H:d0=1;a1=0.5;a2=0.5;a4=0.25;%Definizione bracci:L1 = Link('d',0,'a',a1,'alpha',0);L2 = Link('d',0,'a',a2,'alpha',pi);L3 = Link('d',1,'a',0,'alpha',0);L4 = Link('d',0,'a',a4,'alpha',0);scara=SerialLink([L1 L2 L3 L4], 'name', 'SCARA');scara.plot([0 0 0 0])But the 3rd joint of the resulting manipulator is not prismatic:
So I tried to change the code in this way:L1 = Link([0,0,a1,0,0]);L2 = Link([0,0,a2,pi,0]);L3 = Link([0,d3,0,0,1]);L4 = Link([0,0.1,a4,0,0]);scara=SerialLink([L1 L2 L3 L4], 'name', 'SCARA');scara.plot([0 0 0 0])
But the toolbox give me an error:Error using RTBPlot.plot_options (line 772)prismatic joint 3 has no qlim parameter set, set it or specify 'workspace' plot optionError in SerialLink/plot (line 212)opt = RTBPlot.plot_options(robot, varargin);Error in SCARA (line 19)robot.plot([0 0 0 0])Well, I tried to set qlim (L3.qlim=[0 2];), but it just reduces a1 and a2 arms (I really don't know why!!).
Then I setted the workspace's limits (scara.plot([0 0 0 0],'workspace',[-2 2 -2 2 -2 2]), but in this way Matlab doesn't recognise "workspace" function.
clear all
close all
clc
%Parametri D-H:
d0=1;
a1=0.5;
a2=0.5;
a4=0.25;
d3=0.5
L1 = Link([0,0,a1,0,0]);
L2 = Link([0,0,a2,pi,0]);
L3 = Link([0,d3,0,0,1]); L3.qlim = [0 2];
L4 = Link([0,0.1,a4,0,0]);
scara=SerialLink([L1 L2 L3 L4], 'name', 'SCARA');
scara.plot([0 0 0 0])
scara.teachl1=link([0 1 0 0 0],'standard')
l2=link([0 1 0 0 0],'standard')
l3=link([-pi 0 0 1 1],'standard')
r=robot ({l1, l2, l3},'robot 3ddl')
plot(r, [0 0 0])
drivebot(r)