forked from robotology-playground/WBI-Toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup_wbitoolbox.m
30 lines (29 loc) · 1.5 KB
/
startup_wbitoolbox.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
disp(sprintf('\n'));
disp(sprintf('Whole Body Interface Toolbox\n'))
wbclibroot = fileparts(mfilename('fullpath'));
if exist(wbclibroot,'dir')
controllersDir = [wbclibroot filesep 'controllers'];
addpath(controllersDir);
cd(controllersDir);
cd /home/jorhabib/Software/codyco-superbuild/build/install/mex;
libDir = pwd;
imgDir = [controllersDir filesep 'img'];
addpath(libDir); %Path where mex libs are compiled
addpath(imgDir);
cd(controllersDir); % Go back to controllers dir
delete([pwd filesep 'pathdef.m'])
if (~savepath([pwd filesep 'pathdef.m']))
usrpath = userpath;
usrpath(end)=[];
% copyfile([controllersDir '']);
disp(sprintf('ATTENTION: In the current directory you should now see a file called pathdef.m. \nIf this file is not empty please replace your Matlab pathdef.m in'));
disp([matlabroot '/toolbox/local' ' with this new file in order to make the installation of the toolbox permanent.']);
disp(sprintf('Due to permissions restrictions this step must be done by the user.'));
disp('After doing this, you will see the WBCLibrary in the Simulink Library Browser');
else
disp('There was an error generating pathdef.m To proceed please manually add the contents of variables controllersDir, imgDir and libDir to your matlabpath')
end
end
addpath(genpath('/home/daniele/MATLAB'))
addpath(genpath('/home/daniele/src/codyco/build'))
addpath(genpath('/home/daniele/src/codyco/src/simulink'))