Skip to content

Commit

Permalink
Updating the way ForcePlate::detectAndFixMomentConvention() works
Browse files Browse the repository at this point in the history
  • Loading branch information
keenon committed Jan 6, 2025
1 parent 953abf5 commit d502bdb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dart/biomechanics/ForcePlate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,11 @@ void ForcePlate::detectAndFixCopMomentConvention(int trial, int i)
Eigen::Vector3s f = forces[t];
Eigen::Vector3s m = moments[t];
Eigen::Vector3s cop = centersOfPressure[t];
cop += averageOffset;
Eigen::Vector3s tau = cop.cross(f);
Eigen::Vector3s offsetCop = cop + averageOffset;
Eigen::Vector3s tau = offsetCop.cross(f);
Eigen::Vector3s worldM = m - tau;
worldM(0) = 0.0;
worldM(2) = 0.0;
if (f.norm() < 3 || cop.isZero())
continue;
moments[t] = worldM;
Expand Down

0 comments on commit d502bdb

Please sign in to comment.