Skip to content

Commit

Permalink
Re-centering mass reguralizer after linear consistency solver
Browse files Browse the repository at this point in the history
  • Loading branch information
keenon committed Nov 2, 2022
1 parent a48a666 commit 1f12b9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dart/biomechanics/DynamicsFitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5837,6 +5837,8 @@ void DynamicsFitter::zeroLinearResidualsOnCOMTrajectory(
s_t scalePercentage = tentativeMass / originalMass;
init->bodyMasses *= scalePercentage;
mSkeleton->setLinkMasses(init->bodyMasses);
init->groupMasses = mSkeleton->getGroupMasses();
init->originalGroupMasses = mSkeleton->getGroupMasses();

// Calculate the trajectory of our COM over time
adjustedComPositions
Expand Down
5 changes: 3 additions & 2 deletions unittests/unit/test_DynamicsFitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,7 @@ std::shared_ptr<DynamicsInitialization> runEngine(
DynamicsFitProblemConfig(skel)
.setDefaults(true)
.setIncludePoses(true)
.setIncludeMasses(true)
.setIncludeBodyScales(true)
.setIncludeMarkerOffsets(true));

Expand Down Expand Up @@ -3752,8 +3753,8 @@ TEST(DynamicsFitter, END_TO_END_SPRINTER_WITH_SPINE)
c3dFiles,
trcFiles,
grfFiles,
200,
87,
-1,
0,
true);
}
#endif

0 comments on commit 1f12b9c

Please sign in to comment.