Error With prismatic joint in RT10

1,825 views
Skip to first unread message

alessi...@gmail.com

unread,
Mar 17, 2018, 7:25:20 PM3/17/18
to Robotics & Machine Vision Toolboxes

Hi,
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 option

Error 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.

How can I solve the problem???

Erik van Oene

unread,
Mar 18, 2018, 6:22:42 AM3/18/18
to Robotics & Machine Vision Toolboxes
Hi,

I changed line 97 in animate from:

set(h.pjoint(L), 'Matrix', diag([1 1 max(eps,q(L)) 1]))


to

set(h.link(L), 'Matrix', diag([1 1 max(eps, q(L)) 1]));


Erik

Don't now this is a valid fix of the prismatic joints should be displayed differently.

Erik

Op zondag 18 maart 2018 00:25:20 UTC+1 schreef ale....@gmail.com:

alessi...@gmail.com

unread,
Mar 18, 2018, 5:42:17 PM3/18/18
to Robotics & Machine Vision Toolboxes

Hi! I changed the cod that you said me, and I modified my code:

%Parametri D-H:
d0=1;
a1=0.5;
a2=0.5;

%Definizione bracci:

L1 = Link('d',0,'a',a1,'alpha',0);
L2 = Link('d',0,'a',a2,'alpha',pi);
L3 = Link('theta',0,'a',0,'alpha',0);
L4 = Link('d',0,'a',0,'alpha',0);

L3.qlim=[0 1];
scara=SerialLink([L1 L2 L3 L4], 'name', 'SCARA');
scara.plot([0 0 0 0])

But the manipulator is still wrong:


Erik van Oene

unread,
Mar 18, 2018, 5:51:38 PM3/18/18
to Robotics & Machine Vision Toolboxes
Hi,

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

alessi...@gmail.com

unread,
Mar 18, 2018, 7:20:05 PM3/18/18
to Robotics & Machine Vision Toolboxes
Yes, you're perfectly right! I used wrong parameters to plot the manipulator!
I'm sorry!
Thank you very much!! 

Peter Corke

unread,
Mar 24, 2018, 7:51:02 PM3/24/18
to Robotics & Machine Vision Toolboxes

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:


You didn't specify the 3rd joint to be prismatic, you have created an all revolute arm.   

You could make it Prismatic by writing either of

L3 = Link('d',1,'a',0,'alpha',0, 'jointtype', 'P');

or

L3 = Prismatac('d',1,'a',0,'alpha',0);


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])

OK, now you have specified the 3rd joint to be prismatic
 

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 option

Error 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!!).

I don't understand what you mean here.
 
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.

Can you show me the error message?   I don't understand what you mean by "doesn't recognise"

Erik van Oene

unread,
Mar 26, 2018, 8:02:00 AM3/26/18
to Robotics & Machine Vision Toolboxes
Peter is correct.

I tried your original code again after re-installing the latest version of the Toolbox, the original line in animate works fine now! So no need to change that line! (the pjoint field exists in h).

The following code runs fine now:
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
.teach

So my advice is to reinstall the toolbox and try it again. It should work with the code above.

Erik


Op zondag 25 maart 2018 00:51:02 UTC+1 schreef Peter Corke:

mina199...@gmail.com

unread,
Jul 13, 2019, 6:20:50 PM7/13/19
to Robotics & Machine Vision Toolboxes


Le dimanche 18 mars 2018 00:25:20 UTC+1, alessi...@gmail.com a écrit :

l1=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)


ecrire les instruction une par une dans le workspace  

Peter Corke

unread,
Jul 17, 2019, 6:28:26 PM7/17/19
to Robotics & Machine Vision Toolboxes
What's the question?  This code is written against a very old version of the toolbox, there are no classes/functions called link, robot or drivebot.  Therefore this code example can't be tested.

Ankit Kumar

unread,
Apr 2, 2021, 2:51:06 AM4/2/21
to Robotics & Machine Vision Toolboxes
%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([0,d3,0,0,1]);
L4 = Link('d',0,'a',a4,'alpha',0);

scara=SerialLink([L1 L2 L3 L4], 'name', 'SCARA');
scara.plot([0 0 0 0])

I tried this code but it's giving me error as follows :

Error using RTBPlot.plot_options (line 768)
prismatic joint 3 has no qlim parameter set, set it or specify 'workspace' plot option

Error in SerialLink/plot (line 213)
    opt = RTBPlot.plot_options(robot, varargin);

Error in Untitled3 (line 17)
scara.plot([0 0 0 0])

valeria leto

unread,
Apr 3, 2021, 2:07:04 PM4/3/21
to Robotics & Machine Vision Toolboxes
 You must  add this line in your code, to limit the extension of the prismatic joint
L3.qlim=[0 0.18];
Reply all
Reply to author
Forward
0 new messages