Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ProgramFiles/Animation/sysplotter_animation.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
% is not present
Animation_dir = 'Animation';

if ~ ( (ispc && strncmp(':\',destination{1},2)) || (isunix && strncmp('/',destination{1},1) ) )
if ~ ( (ispc && strcmp(':\',destination{1}(2:3))) || (isunix && strncmp('/',destination{1},1) ) )

destination = cellfun(@(x)fullfile(pwd, x, Animation_dir),destination,'UniformOutput',false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
%%%
% First, strip off sysf_ if it was included by the user

if startsWith(baseframe,'sysf_')
if strncmp(baseframe,'sysf_',5)
baseframe1 = baseframe(6:end);
else
baseframe1 = baseframe;
Expand Down
8 changes: 4 additions & 4 deletions ProgramFiles/Utilities/gait_gui_draw/gait_gui_optimize.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ function gait_gui_optimize(hAx,hObject,eventdata,handles)
end
end

% Interpolating to increase number of points forming the gait
endslope1 = (alpha1(2)-alpha1(end-1))/(t(end)-t(end-2));
endslope2 = (alpha2(2)-alpha2(end-1))/(t(end)-t(end-2));
spline_alpha1 = spline(t,[endslope1;alpha1(:);endslope1]);
spline_alpha2 = spline(t,[endslope2;alpha2(:);endslope2]);
period = 2*pi;



n_plot = 100;
t_plot = linspace(0,period,n_plot+1);

alpha1_plot = ppval(spline_alpha1,t_plot);
alpha2_plot = ppval(spline_alpha2,t_plot);

% loading sysf file
f=fullfile(datapath,strcat(current_system,'_calc.mat'));
load(f);

% Calling the optimizer
lb=0.95*[s.grid_range(1)*ones(n_plot+1,1);s.grid_range(3)*ones(n_plot+1,1)];%0.9 was points value
ub=0.95*[s.grid_range(2)*ones(n_plot+1,1);s.grid_range(4)*ones(n_plot+1,1)];
y=optimalgaitgenerator(s,2,n_plot,alpha1_plot,alpha2_plot,lb,ub);
Expand Down
Loading