-
Notifications
You must be signed in to change notification settings - Fork 449
/
startup_rtb.m
88 lines (78 loc) · 2.95 KB
/
startup_rtb.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
%STARTUP_RTB Initialize MATLAB paths for Robotics Toolbox
%
% Adds demos, data, contributed code and examples to the MATLAB path, and adds also to
% Java class path.
%
% Notes::
% - This sets the paths for the current session only.
% - To make the settings persistent across sessions you can:
% - Add this script to your MATLAB startup.m script.
% - After running this script run PATHTOOL and save the path.
%
% See also PATH, ADDPATH, PATHTOOL, JAVAADDPATH.
% Copyright (C) 1993-2019, by Peter I. Corke
%
% This file is part of The Robotics Toolbox for MATLAB (RTB).
%
% RTB is free software: you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% RTB is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU Lesser General Public License for more details.
%
% You should have received a copy of the GNU Leser General Public License
% along with RTB. If not, see <http://www.gnu.org/licenses/>.
%
% http://www.petercorke.com
function startup_rtb(tbpath)
fp = fopen('RELEASE', 'r');
release = fgetl(fp);
fclose(fp);
fprintf('- Robotics Toolbox for MATLAB (release %s)\n', release)
if nargin == 0
tbpath = fileparts( mfilename('fullpath') );
end
addpath( fullfile(tbpath, 'demos') );
addpath( fullfile(tbpath, 'examples') );
addpath( fullfile(tbpath, 'Apps') );
addpath( fullfile(tbpath, 'mex') );
addpath( fullfile(tbpath, 'models') );
addpath( fullfile(tbpath, 'data') );
w = warning ('off', 'MATLAB:javaclasspath:jarAlreadySpecified');
javaaddpath( fullfile(tbpath, 'java', 'DHFactor.jar') );
warning(w)
p = fullfile(tbpath, 'simulink');
if exist(p, 'dir')
addpath( p );
end
addpath( fullfile(tbpath, 'interfaces', 'VREP') );
% add the contrib code to the path
rvcpath = fileparts(tbpath); % strip one folder off path
p = fullfile(rvcpath, 'contrib');
if exist(p, 'dir')
addpath(p)
end
p = fullfile(tbpath, 'data', 'meshes');
disp([' - ARTE contributed code: 3D models for robot manipulators (' p ')']);
p = fullfile(rvcpath, 'contrib', 'pHRIWARE', 'next');
if exist(p, 'dir')
addpath( p );
disp([' - pHRIWARE (release ',pHRIWARE('ver'),'): ',pHRIWARE('c')]);
end
p = fullfile(rvcpath, 'contrib/paretofront');
% if exist(p)
% addpath( p );
% disp([' - paretofront contributed code (' p ')']);
% end
% [currentversion,status] = urlread('http://www.petercorke.com/RTB/currentversion.php', 'Timeout', 2.0);
% if status == 1
% if ~strcmp(release, currentversion)
% fprintf('** Release %s now available\n\n', ...
% currentversion);
% end
% end
end