petercorke / robotics-toolbox-matlab

Robotics Toolbox for MATLAB
GNU Lesser General Public License v2.1
1.26k stars 440 forks source link

SerialLink.Plot (Prismatic joints) #22

Closed Johnmper closed 6 years ago

Johnmper commented 6 years ago

I think the following code should work, however it outputs an error saying i didn't define the workspace option, which i clearly did.

q0 = [4,3];

L(1) = Link('theta',-pi/2,'alpha', pi/2,'a',1);
L(2) = Link('theta',    0,'alpha',-pi/2,'a',0);

R = SerialLink(L,'name','Arm');

R.plot(q0,'workspace',[-10,10,-10,10,-10,10]);

Error using RTBPlot.plot_options (line 755) Prismatic joint(s) present: requires the 'workspace' option

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

Error in test (line 8) R.plot(q0,'workspace',[-10,10,-10,10,-10,10]);

Johnmper commented 6 years ago

Sorry it seems there is already a opened issue #21.

Johnmper commented 6 years ago

Found solution, refer to issue #21 .