Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Treatment optimization incorrectly reads initial guess GRF into experimental GRF #326

Open
RobSalati opened this issue Jul 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@RobSalati
Copy link
Contributor

Describe the bug
When parsing ground reactions, treatment optimization reads data from the initial guess directory into inputs.contactSurfaces{i}.experimentalGroundReactionForces. This results in the initial guess ground reactions being tracked instead of the tracked data ground reactions.

To Reproduce

  1. Run TO with initial guess ground reactions and tracked data ground reactions that are noticeably different
  2. Place a breakpoint at line 36 in TrackingOptimizationTool
  3. run commands:

plot(inputs.contactSurfaces{1,1}.experimentalGroundReactionForces)
figure()
plot(inputs.contactSurfaces{1,1}.initialGroundReactionForces)
These 2 plots will look exactly the same, which is incorrect.

Expected behavior
The experimental ground reactions should be read from tracked data directory, not initial guess directory.

Screenshots
This is the plot produced from a TO run after I cancelled it in the middle, and used the cancelled results as the initial guess. The blue line should be the experimental data, but is instead the ground reactions from the cancelled run.
untitled

Desktop (please complete the following information):

  • OS: Windows 11
  • MATLAB Version: 2023a
  • NMSM Pipeline Version: V1.2 (dev)

Additional context
I think this can be fixed by switching lines 191-192 with 194-195 in parseTreatmentOptimizationDataDirectory.

@RobSalati RobSalati added the bug Something isn't working label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants