keenon / AddBiomechanics

A tool to automatically process and share biomechanics data
https://addbiomechanics.org/
Other
31 stars 5 forks source link

Kinematics fitting pipeline uses default foot body names during post-processing #227

Closed nickbianco closed 7 months ago

nickbianco commented 8 months ago

Even when only running the kinematics fitter of the AddBiomechanics pipeline, the foot bodies are used to compute some values when writing out results. This happens in a call to SubjectOnDiskTrialPass::computeValuesFromForcePlates when writing out B3D files.

Since users are not prompted to pass foot body names when not fitting dynamics, the pipeline will use the default foot body names calcn_r and calcn_l. If the user is using a model with differing foot body names, this will lead to a segfault within SubjectOnDiskTrialPass::computeValuesFromForcePlates (retrieved foot bodies are nullptr).

Aside from some fixes on the nimblephysics side, we need to decide how to handle this user case. Should we even be calling SubjectOnDiskTrialPass::computeValuesFromForcePlates after running the kinematics fitter? If so, how do we obtain the foot body names? Should we always ask the user for foot body names, regardless of fitting dynamics or not?