From 74888157b6c056c92f1fa7e58391386354bf3270 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Thu, 27 Feb 2020 08:06:55 +1000 Subject: [PATCH] Fix bug in constructing path to mesh files --- @SerialLink/plot3d.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/@SerialLink/plot3d.m b/@SerialLink/plot3d.m index a3f73a5f..67af4169 100644 --- a/@SerialLink/plot3d.m +++ b/@SerialLink/plot3d.m @@ -124,7 +124,7 @@ function plot3d(robot, q, varargin) pth = fileparts(pth); % peel off the last folder s = regexp(pth, filesep, 'split'); - pth = join(s(1:6), filesep); + pth = join(s(1:end-1), filesep); % find the path to this specific model pth = fullfile(pth{1}, 'data/meshes', robot.model3d); @@ -142,6 +142,7 @@ function plot3d(robot, q, varargin) robot.points{i} = P; robot.faces{i} = F; fprintf('.'); + end fprintf('\n'); end