Skip to content

Add methods and Outputs for calculating the momentum of a Body#3962

Merged
nickbianco merged 3 commits intomainfrom
body_momentum_wrappers
Nov 9, 2024
Merged

Add methods and Outputs for calculating the momentum of a Body#3962
nickbianco merged 3 commits intomainfrom
body_momentum_wrappers

Conversation

@nickbianco
Copy link
Member

@nickbianco nickbianco commented Nov 8, 2024

Fixes issue #3937

Brief summary of changes

Added the methods calcMomentumAboutOrigin, calcAngularMomentumAboutOrigin, calcLinearMomentumAboutOrigin, calcMomentumAboutMassCenter, calcAngularMomentumAboutMassCenter, and calcLinearMomentumAboutMassCenter to Body and associated Outputs. This change required updating the Simbody commit to include a fix for a missing const qualifier in MobilizedBody.

I also cleaned up a few unused using directives/declarations in Body and fixed some misplaced changelog entries.

Testing I've completed

Tested all methods and Outputs locally using a simple sliding mass model. Could add unittests if desired, but these methods should all be tested in Simbody.

Looking for feedback on...

CHANGELOG.md (choose one)

  • updated.

This change is Reviewable

Copy link
Member

@carmichaelong carmichaelong left a comment

Choose a reason for hiding this comment

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

LGTM. I'm inclined to agree that since these are such light wrappers, it's OK to not have unit tests.

@nickbianco nickbianco merged commit 0710a3b into main Nov 9, 2024
@nickbianco nickbianco deleted the body_momentum_wrappers branch November 9, 2024 01:07
@nickbianco
Copy link
Member Author

Thanks @carmichaelong!

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