Skip to content

Commit 2c54f34

Browse files
committed
Fixed optimization script paths based on new folder names. Unified all measurement units to radians to fix comparison scripts. Created simple block that performs rotation matrix to Euler Angle conversion to remove product dependencies.
1 parent 857c78b commit 2c54f34

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

ControlDesign/walkingRobot3DMPC.slx

7.14 KB
Binary file not shown.

ControlDesign/walkingRobot3DPath.slx

1.74 KB
Binary file not shown.

Libraries/walkingRobotUtils.slx

1.32 KB
Binary file not shown.

ModelingSimulation/compareActuatorTypes.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,23 @@
8585
title('Joint Angles')
8686
legend('Motion','Torque','Motor');
8787
xlabel('Time [s]');
88-
ylabel('Right Leg Ankle Angle [deg]');
88+
ylabel('Right Leg Ankle Angle [rad]');
8989
subplot(3,1,2)
9090
hold on
9191
plot(simout_motion.yout{4}.Values.knee_angle.Time,simout_motion.yout{4}.Values.knee_angle.Data,'b-');
9292
plot(simout_torque.yout{4}.Values.knee_angle.Time,simout_torque.yout{4}.Values.knee_angle.Data,'r-');
9393
plot(simout_motor.yout{4}.Values.knee_angle.Time, simout_motor.yout{4}.Values.knee_angle.Data, 'k-');
9494
legend('Motion','Torque','Motor');
9595
xlabel('Time [s]');
96-
ylabel('Right Leg Knee Angle [deg]');
96+
ylabel('Right Leg Knee Angle [rad]');
9797
subplot(3,1,3)
9898
hold on
9999
plot(simout_motion.yout{4}.Values.hip_angle.Time,simout_motion.yout{4}.Values.hip_angle.Data,'b-');
100100
plot(simout_torque.yout{4}.Values.hip_angle.Time,simout_torque.yout{4}.Values.hip_angle.Data,'r-');
101101
plot(simout_motor.yout{4}.Values.hip_angle.Time, simout_motor.yout{4}.Values.hip_angle.Data, 'k-');
102102
legend('Motion','Torque','Motor');
103103
xlabel('Time [s]');
104-
ylabel('Right Leg Hip Angle [deg]');
104+
ylabel('Right Leg Hip Angle [rad]');
105105

106106

107107
%% Cleanup

ModelingSimulation/walkingRobot.slx

2.8 KB
Binary file not shown.

Optimization/doSpeedupTasks.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
% Sets up optimization environment for acceleration and parallel computing
2-
% Copyright 2017 The MathWorks, Inc.
2+
% Copyright 2017-2019 The MathWorks, Inc.
33

44
if parallelFlag
55

@@ -14,9 +14,9 @@
1414

1515
% Add paths and dependent files to run simulations in parallel
1616
rootDir = fullfile(fileparts(mfilename('fullpath')),'..');
17-
addAttachedFiles(p,fullfile(rootDir,{'Robot','Optim','Libraries'}));
18-
parfevalOnAll(@addpath,0,fullfile(rootDir,'Optim'), ...
19-
genpath(fullfile(rootDir,'Robot')), ...
17+
addAttachedFiles(p,fullfile(rootDir,{'ModelingSimulation','Optimization','Libraries'}));
18+
parfevalOnAll(@addpath,0,fullfile(rootDir,'Optimization'), ...
19+
genpath(fullfile(rootDir,'ModelingSimulation')), ...
2020
genpath(fullfile(rootDir,'Libraries')));
2121
parfevalOnAll(@load_system,0,mdlName);
2222

@@ -28,13 +28,13 @@
2828
end
2929

3030
% Change each worker to unique folder so cache files do not conflict
31-
cd(fullfile(rootDir,'Optim'));
31+
cd(fullfile(rootDir,'Optimization'));
3232
if exist('temp','dir')
3333
rmdir('temp','s');
3434
end
3535
mkdir('temp');
3636
spmd
37-
tempFolder = fullfile(rootDir,'Optim','temp');
37+
tempFolder = fullfile(rootDir,'Optimization','temp');
3838
cd(tempFolder);
3939
folderName = tempname(tempFolder);
4040
mkdir(folderName);
18 Bytes
Binary file not shown.
-31 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)