Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Introduced two additional degrees of freedom in the torso by adding a…
…n upper lumbar joint and splitting the torso segment into thorax and abdomen segments according to [Dumas2015] and fixed subject parameters for the feet
  • Loading branch information
Janis Wojtusch committed Mar 7, 2016
1 parent 077001a commit 3c29267
Show file tree
Hide file tree
Showing 22 changed files with 606 additions and 445 deletions.
4 changes: 2 additions & 2 deletions CenterOfPressureEstimation.m
Expand Up @@ -37,8 +37,8 @@
'8' ...
};
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};

% Add functions to search path
Expand Down
4 changes: 2 additions & 2 deletions DirectoryStructureGeneration.m
Expand Up @@ -17,8 +17,8 @@
% Set parameters
path = pwd;
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};
directories = {
% Directories for each subject
Expand Down
4 changes: 2 additions & 2 deletions EventVisualization.m
Expand Up @@ -34,8 +34,8 @@
'8' ...
};
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};

for subjectIndex = 1:length(subjects)
Expand Down
4 changes: 2 additions & 2 deletions ForceFilter.m
Expand Up @@ -36,8 +36,8 @@
'8' ...
};
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};
signals = {
'Fx1', ...
Expand Down
4 changes: 2 additions & 2 deletions ForceMatching.m
Expand Up @@ -31,8 +31,8 @@
'8' ...
};
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};

% Add functions to search path
Expand Down
4 changes: 2 additions & 2 deletions ForceSeparation.m
Expand Up @@ -34,8 +34,8 @@
'8' ...
};
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};

% Add functions to search path
Expand Down
4 changes: 2 additions & 2 deletions ForceVisualization.m
Expand Up @@ -34,8 +34,8 @@
'8' ...
};
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};

for subjectIndex = 1:length(subjects)
Expand Down
4 changes: 2 additions & 2 deletions GroundReferenceEstimation.m
Expand Up @@ -47,8 +47,8 @@
'8' ...
};
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};

% Add functions to search path
Expand Down
166 changes: 103 additions & 63 deletions JointCenterEstimation.m
Expand Up @@ -6,7 +6,7 @@
% Technische Universität Darmstadt
% Department of Computer Science
% Simulation, Systems Optimization and Robotics Group
% Janis Wojtusch (wojtusch@sim.tu-darmstadt.de), 2015
% Janis Wojtusch (wojtusch@sim.tu-darmstadt.de), 2016
% Licensed under BSD 3-Clause License
% ------------------------------------------------------

Expand Down Expand Up @@ -38,8 +38,8 @@
'8' ...
};
subjects = {
'A',...
'B'...
'A', ...
'B' ...
};

% Add functions to search path
Expand Down Expand Up @@ -273,12 +273,17 @@
clear vectorC7_SUP vectorACR_R_ACR_L;

% Upper lumbar joint (ULJ)
% Estimate the upper lumbar joint ULJ (T12/L1) according to [Reed1999] with
% using the connection of the ACR markers as rotation axis
% Estimate the upper lumbar joint ULJ (T12/L1) according to [Reed1999],
% [Dumas2015] with using the connection of the ACR markers as rotation
% axis
vectorC7_SUP = vectorSUP_s - vectorC7_s;
vectorT12_T8 = vectorT8_s - vectorT12_s;
vectorACR_R_ACR_L = vectorACR_L_s - vectorACR_R_s;
vectorULJ = vectorT12_s + rotateVector((0.52 * norm(vectorC7_SUP) * vectorT12_T8 / norm(vectorT12_T8)), (94 * pi / 180), vectorACR_R_ACR_L);
if strcmp(subject, 'A')
vectorULJ = vectorT12_s + rotateVector((0.53 * norm(vectorC7_SUP) * vectorT12_T8 / norm(vectorT12_T8)), (83 * pi / 180), vectorACR_R_ACR_L);
else
vectorULJ = vectorT12_s + rotateVector((0.52 * norm(vectorC7_SUP) * vectorT12_T8 / norm(vectorT12_T8)), (94 * pi / 180), vectorACR_R_ACR_L);
end
clear vectorC7_SUP vectorT12_T8 vectorACR_R_ACR_L;

% Shoulder joints (SJ_L, SJ_R)
Expand Down Expand Up @@ -327,8 +332,8 @@
vectorPS_b = vectorPS_s - 17.7 * axisX_s - 17.7 * axisZ_s;
% Ambiguous value for the flesh margin correction vector for the PSIS
% markers in [Reed1999]: 10 mm in text and 5 mm in table 6
vectorPSIS_L_b = vectorPSIS_L_s + 10 * axisX_s;
vectorPSIS_R_b = vectorPSIS_R_s + 10 * axisX_s;
vectorPSIS_L_b = vectorPSIS_L_s + 5 * axisX_s;
vectorPSIS_R_b = vectorPSIS_R_s + 5 * axisX_s;
vectorASIS_R_b_PS_b = vectorPS_b - vectorASIS_R_b;
vectorASIS_R_b_ASIS_L_b = vectorASIS_L_b - vectorASIS_R_b;
vectorCP_b = vectorASIS_R_b + (dot(vectorASIS_R_b_PS_b, axisY) / dot(axisY, axisY) * axisY);
Expand Down Expand Up @@ -364,8 +369,8 @@
vectorASIS_R_b = vectorASIS_R_s - 10 * axisX_s;
% Ambiguous value for the flesh margin correction vector for the PSIS
% markers in [Reed1999]: 10 mm in text and 5 mm in table 6
vectorPSIS_L_b = vectorPSIS_L_s + 10 * axisX_s;
vectorPSIS_R_b = vectorPSIS_R_s + 10 * axisX_s;
vectorPSIS_L_b = vectorPSIS_L_s + 5 * axisX_s;
vectorPSIS_R_b = vectorPSIS_R_s + 5 * axisX_s;
vectorASIS_R_b_ASIS_L_b = vectorASIS_R_b - vectorASIS_L_b;
vectorPSIS_R_b_PSIS_L_b = vectorPSIS_R_b - vectorPSIS_L_b;
vectorCP_b = vectorASIS_L_b + 0.5 * vectorASIS_R_b_ASIS_L_b;
Expand Down Expand Up @@ -625,61 +630,96 @@

% Save shifted marker coordinates and estimated joint data
surfaceData = [
vectorTRA_L_s,...
vectorTRA_R_s,...
vectorGLA_s,...
vectorACR_L_s,...
vectorACR_R_s,...
vectorLHC_L_s,...
vectorLHC_R_s,...
vectorSUP_s,...
vectorC7_s,...
vectorT8_s,...
vectorT12_s,...
vectorASIS_L_s,...
vectorASIS_R_s,...
vectorPSIS_L_s,...
vectorPSIS_R_s,...
vectorPS_s,...
vectorGTR_L_s,...
vectorGTR_R_s,...
vectorLFC_L_s,...
vectorLFC_R_s,...
vectorMFC_L_s,...
vectorMFC_R_s,...
vectorLM_L_s,...
vectorLM_R_s,...
vectorMM_L_s,...
vectorMM_R_s,...
vectorCAL_L_s,...
vectorCAL_R_s,...
vectorMT2_L_s,...
vectorMT2_R_s,...
vectorMT5_L_s,...
vectorMT5_R_s,...
vectorHAL_L_s,...
vectorHAL_R_s...
vectorTRA_L_s, ...
vectorTRA_R_s, ...
vectorGLA_s, ...
vectorACR_L_s, ...
vectorACR_R_s, ...
vectorLHC_L_s, ...
vectorLHC_R_s, ...
vectorSUP_s, ...
vectorC7_s, ...
vectorT8_s, ...
vectorT12_s, ...
vectorASIS_L_s, ...
vectorASIS_R_s, ...
vectorPSIS_L_s, ...
vectorPSIS_R_s, ...
vectorPS_s, ...
vectorGTR_L_s, ...
vectorGTR_R_s, ...
vectorLFC_L_s, ...
vectorLFC_R_s, ...
vectorMFC_L_s, ...
vectorMFC_R_s, ...
vectorLM_L_s, ...
vectorLM_R_s, ...
vectorMM_L_s, ...
vectorMM_R_s, ...
vectorCAL_L_s, ...
vectorCAL_R_s, ...
vectorMT2_L_s, ...
vectorMT2_R_s, ...
vectorMT5_L_s, ...
vectorMT5_R_s, ...
vectorHAL_L_s, ...
vectorHAL_R_s ...
];
motion.surfaceX(:, currentFrame) = surfaceData(1,:)';
motion.surfaceY(:, currentFrame) = surfaceData(2,:)';
motion.surfaceZ(:, currentFrame) = surfaceData(3,:)';
motion.surfaceLabels = {'TRA_L', 'TRA_R', 'GLA', 'ACR_L', 'ACR_R', 'LHC_L', 'LHC_R', 'SUP', 'C7', 'T8', 'T12', 'ASIS_L', 'ASIS_R', 'PSIS_L', 'PSIS_R', 'PS', 'GTR_L', 'GTR_R', 'LFC_L', 'LFC_R', 'MFC_L', 'MFC_R', 'LM_L', 'LM_R', 'MM_L', 'MM_R', 'CAL_L', 'CAL_R', 'MT2_L', 'MT2_R', 'MT5_L', 'MT5_R', 'HAL_L', 'HAL_R'};
motion.surfaceLabels = { ...
'TRA_L', ...
'TRA_R', ...
'GLA', ...
'ACR_L', ...
'ACR_R', ...
'LHC_L', ...
'LHC_R', ...
'SUP', ...
'C7', ...
'T8', ...
'T12', ...
'ASIS_L', ...
'ASIS_R', ...
'PSIS_L', ...
'PSIS_R', ...
'PS', ...
'GTR_L', ...
'GTR_R', ...
'LFC_L', ...
'LFC_R', ...
'MFC_L', ...
'MFC_R', ...
'LM_L', ...
'LM_R', ...
'MM_L', ...
'MM_R', ...
'CAL_L', ...
'CAL_R', ...
'MT2_L', ...
'MT2_R', ...
'MT5_L', ...
'MT5_R', ...
'HAL_L', ...
'HAL_R' ...
};
jointData = [...
vectorLNJ,...
vectorSJ_L,...
vectorSJ_R,...
vectorEJ_L,...
vectorEJ_R,...
vectorULJ,...
vectorLLJ,...
vectorHJ_L,...
vectorHJ_R,...
vectorKJ_L,...
vectorKJ_R,...
vectorAJ_L,...
vectorAJ_R,...
vectorTJ_L,...
vectorTJ_R...
vectorLNJ, ...
vectorSJ_L, ...
vectorSJ_R, ...
vectorEJ_L, ...
vectorEJ_R, ...
vectorULJ, ...
vectorLLJ, ...
vectorHJ_L, ...
vectorHJ_R, ...
vectorKJ_L, ...
vectorKJ_R, ...
vectorAJ_L, ...
vectorAJ_R, ...
vectorTJ_L, ...
vectorTJ_R ...
];
motion.jointX.estimated(:, currentFrame) = jointData(1,:)';
motion.jointY.estimated(:, currentFrame) = jointData(2,:)';
Expand Down Expand Up @@ -722,6 +762,6 @@
motion = orderfields(motion);
variables.motion = motion;
save(file, '-struct', 'variables');
end
end

end
end

0 comments on commit 3c29267

Please sign in to comment.