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

Added accessor for kinematics from MocoInverse init #3896

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

AllisonJohn
Copy link
Member

@AllisonJohn AllisonJohn commented Aug 29, 2024

Fixes issue #3646

Brief summary of changes

Allows users to get the kinematics which are removed from the study if they need to add them back to the solution

Testing I've completed

Tested the forum example, exampleMocoInverse.cpp solveMocoInverseWithEMG() but with
TimeSeriesTable kinematics = inverse.initializeKinematics();
after making the MocoStudy and

solution.insertStatesTrajectory(kinematics);

std::vector<std::string> outputPaths;
outputPaths.push_back(".*tendon_force");
TimeSeriesTable outputs = study.analyze(solution, outputPaths);
OpenSim::STOFileAdapter::write(outputs, "tendon_forces_withEMG.sto");

after getting the MocoSolution, which previously failed without inserting kinematics.

testMocoInverse still works, added a section for initializeKinematics.

Looking for feedback on...

CHANGELOG.md (choose one)

  • updated.

This change is Reviewable

@AllisonJohn AllisonJohn changed the title added accessor for kinematics from init Added accessor for kinematics from MocoInverse init Aug 29, 2024
@AllisonJohn AllisonJohn marked this pull request as ready for review August 30, 2024 18:32
Copy link
Member

@nickbianco nickbianco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AllisonJohn)

@nickbianco nickbianco merged commit 43e2c6b into opensim-org:main Aug 30, 2024
11 of 12 checks passed
@nickbianco
Copy link
Member

Windows failure is unrelated. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants