1
- % Copyright 2022-2023 Peter Corke, Witold Jachimczyk, Remo Pillat
2
-
3
- function rvccheck()
4
-
5
- % this function is a help to users, and those providing help in forums to understand
6
- % the users environment. Peter's experience is that a mix of toolboxes and path issues
7
- % is the root cause of a lot of problems.
8
-
9
- % Checking installation for RVC3 toolbox
10
-
11
- % report version of MATLAB
12
- % warning if version is too old
13
-
14
- % check for presence of RST, CVST and other required MW toolboxes
15
- % error if key ones are missing
16
- % warning if some functionality might be lost, ie. The toolboxes required for Part III are not present, you need ....
17
-
18
- % check for presence of RTB, MVTB, SMTB
19
- % it looks like you have the older MATLAB toolboxes installed...
20
-
21
- % check for shadowing, or which toolboxes are first in the path
22
- % it looks like some older toolboxes are shadowing this toolbox, do you want to automatically fix your MATLAB path...
1
+ function rvccheck
2
+ % RVCCHECK Check MATLAB environment for running RVC3 Toolbox
3
+ % This function is a help to users, and those providing help in forums to
4
+ % understand the user's environment. Peter's experience is that a mix of
5
+ % toolboxes and path issues is the root cause of a lot of problems.
6
+ %
7
+ % This function does the following:
8
+ % - Warns if version of MATLAB is too old (< R2023a)
9
+ % - Checks for presence of required MathWorks toolboxes: Robotics System
10
+ % Toolbox, Navigation Toolbox, Image Processing Toolbox, and Computer
11
+ % Vision Toolbox. Warn if key ones are missing.
12
+ % - Checks for presence of RTB, MVTB, SMTB
13
+ % It looks like you have the older MATLAB toolboxes installed...
14
+
15
+ % Copyright 2022-2024 Peter Corke, Witold Jachimczyk, Remo Pillat
23
16
24
17
%% check MATLAB version
25
18
fprintf(" rvccheck for RVC3 Toolbox\n" )
26
- if verLessThan(" matlab" , " 9.14" )
27
- fprintf(" You have MATLAB release %s, at least (R2023a) is required\n" , ...
28
- ver(" matlab" ).Release);
19
+ fprintf(" Checking for MATLAB version: %s Update %d.\n" , matlabRelease .Release , matlabRelease .Update )
20
+ if isMATLABReleaseOlderThan(" R2023a" )
21
+ fprintf(" - You have MATLAB release (%s), but at least (R2023a) is required\n" , ...
22
+ matlabRelease .Release );
29
23
end
30
24
31
25
%% check that required toolboxes are present
32
26
33
27
required_toolboxes = [
34
28
" Robotics System Toolbox" , " robotics" , " Chapters 2-9"
35
- " Navigation Toolbox" , " navigation " , " Chapter 5"
29
+ " Navigation Toolbox" , " nav " , " Chapter 5"
36
30
" Image Processing Toolbox" , " images" , " Chapters 10-15"
37
31
" Computer Vision Toolbox" , " vision" , " Chapters 11-15"
38
32
];
39
33
40
34
if ~isempty(required_toolboxes )
41
- fprintf(" Some required Toolboxes are not installed: \n" )
35
+ fprintf(" Checking that required Toolboxes are installed. \n" )
42
36
for rt = required_toolboxes '
43
37
full = rt(1 ); short = rt(2 ); comment = rt(3 );
44
38
v = ver(short );
45
39
if isempty(v )
46
- fprintf(" %s is required for %s\n" , full , comment );
40
+ fprintf(" - %s is required for %s and not installed. \n" , full , comment );
47
41
end
48
42
end
49
43
end
50
44
51
45
%% check for other toolboxes
52
-
46
+ fprintf( " Checking for the presence of older Toolboxes.\n " )
53
47
p = which(' trotx' );
54
48
55
49
if ~isempty(p )
56
- fprintf(" You have Peter Corke's Robotics and/or Spatial Math Toolbox in your path\n" )
50
+ fprintf(" - You have Peter Corke's Robotics and/or Spatial Math Toolbox in your path\n" )
57
51
end
58
52
59
53
shadows = [];
60
54
shadows = checkshadow(shadows , " Camera" );
61
55
if ~isempty(shadows )
62
- fprintf(" You have Peter Corke's Machine Vision Toolbox shadowing the RVC3 Toolbox, please remove the former from your path\n" );
56
+ fprintf(" - You have Peter Corke's Machine Vision Toolbox shadowing the RVC3 Toolbox, please remove the former from your path\n" );
63
57
end
64
58
65
59
@@ -77,10 +71,3 @@ function rvccheck()
77
71
out = [out ; {funcname , which(funcname )}];
78
72
end
79
73
end
80
-
81
- function p = getpath(funcname )
82
- funcpath = which(funcname );
83
- k = strfind( funcpath , [filesep funcname ]);
84
- p = funcpath(1 : k - 1 );
85
- end
86
-
0 commit comments