Expose the energy dissipation state variable in BushingForce#4054
Merged
nickbianco merged 7 commits intomainfrom Apr 7, 2025
Merged
Expose the energy dissipation state variable in BushingForce#4054nickbianco merged 7 commits intomainfrom
BushingForce#4054nickbianco merged 7 commits intomainfrom
Conversation
Member
Author
|
FYI @nicos1993 and @stingjp. |
aymanhab
approved these changes
Apr 7, 2025
Member
aymanhab
left a comment
There was a problem hiding this comment.
Reviewed 3 of 4 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nickbianco)
CHANGELOG.md line 93 at r2 (raw file):
- Fixed bugs in `PolynomialPathFitter` when too few coordinate samples were provided. (#4039) - Exposed the "dissipated energy" state variable allocated by the `SimTK::Force::LinearBushing` that is internal to `BushingForce`. This changed fixed a bug in Moco, where adding a `BushingForce` led to a segfault due to a mismatch between the size of the
typo (changed -> change?)
aymanhab
approved these changes
Apr 7, 2025
Member
aymanhab
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nickbianco)
Member
Author
|
Thanks @aymanhab! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue #4042
Brief summary of changes
This change exposes the "dissipated energy" state variable allocated by the
SimTK::Force::LinearBushingthat is internal toBushingForce. This fixes the bug in #4042, which occurred because the size of the auxiliary state vector reserved by Moco did not matchSimTK::State::getZ(). This happened because Moco reserves state vectors based on the number of state variables reported by eachComponent, butBushingForcedid not report the "dissipated energy" state as part of the system, even though a slot for it is reserved in theSimTK::State.For convenience, I added the
Output"statebounds_dissipated_energy", which Moco will use to automatically set the bounds on the energy dissipation state variable (i.e., so users do not have to callsetStateInfo).Testing I've completed
Added tests to
testMocoInterface.cppandtestForces.cpp.Looking for feedback on...
CHANGELOG.md (choose one)
This change is