Hi everyone,
I am modelling a robot with a remote center of motion. To do so in the toolbox, I just created a joint, where the RCM lies. For the visualization, I would like to hide either all joints and links and only see the endeffector coordinate frame or in the best case hide just the particular joint (q5 in the example) and the connected links.
I tried using the 'nojoints' option from the plot method, but I get the following error message:
Reference to non-existent field 'pjoint'.
Error in SerialLink/animate (line 98)
set(h.pjoint(L), 'Matrix',
diag([1 1 max(eps, q(L)) 1]));
Error in SerialLink/plot (line 297)
robot.animate(qq);
Error in codeforquestion (line 40)
bot.plot(q0, 'workspace', w_dim,'jointdiam', 1, 'scale',
0.1, 'nojoints')
The code that generated the error is below:
clearvars; close all; clc
%param
startup_rvc; %start robotics toolbox by peter corke
%Link config
off_z0 = 30; %offset from x,y stage in negative world_frame_z direction
r_arc = 140;
off_x1 = 150; %offset from first to second rotation axis
off_syr = 50; %final offset
off_dx = 10; %small offset so joints cant collide in simulation
off_dy = 10; %small offset so joints cant collide in simulation
y_max = 1000; %range
x_max = 1000; %range
z_max = 100; %range
%Robot link parameters, in D-H convention
theta = [0 1 1 0 0 0 0] *pi/2;
d = [0 0 0 off_z0+r_arc 0 r_arc 0];
a = [0 0 0 0 0 0 0];
alpha = [-1 -1 1 1 1 2 0] *pi/2;
isprism = [1 1 1 0 0 0 1];
offset = [0 off_dx off_dy 0 0 0 off_syr];
qmin = [0 0 0 0 0 0 0];
qmax = [z_max y_max x_max 2*pi pi/2 0 100];
%possible q0s
q0=[0 485.3401 289.1116 6.0947 1.0927 0 100.0000]
%dimensions for robot plot figure
w_dim = [-450 50 -50 (1000) -300 100];
%build robot object from connected links
for i=1:(size(theta,2)-0)
L(i) = Link ([theta(i) d(i) a(i) alpha(i) isprism(i) offset(i)], 'standard');
L(i).qlim = [qmin(i) qmax(i)];
end
bot = SerialLink(L, 'name', 'PPRRP 5DOF')
bot.plot(q0, 'workspace', w_dim,'jointdiam', 1, 'scale', 0.1, 'nojoints')
Does anybody have an idea, how I could hide individual joints and links, if possible at all?
Thank you for your help and best regards,
Oliver Z