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

Add get methods and Outputs to compute whole-body momentum from Model #3474

Closed
nickbianco opened this issue Jun 1, 2023 · 0 comments
Closed

Comments

@nickbianco
Copy link
Member

It is possible to calculate whole-body linear and angular momentum from a Model by accessing the underlying SimbodyMatterSubsystem:

state = model.initSystem();
matter = model.getMatterSubsystem();
model.realizeVelocity(state);
momentum = matter.calcSystemCentralMomentum(state);

To make these quantities easier to find for users, we should provide methods that make them directly accessible through Model. Adding an Output would also make it possible to directly optimize momentum quantities via MocoOutputGoal.

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

No branches or pull requests

1 participant