opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
800 stars 323 forks source link

Add accessors for the angular momentum of a `Body` #3937

Open nickbianco opened 1 month ago

nickbianco commented 1 month ago

Simbody has methods for calculating the angular momentum of an individual body (e.g., MobilizedBody::calcBodyMomentumAboutBodyOriginInGround()). PhysicalFrame provides accessors to the underlying MobilizedBody, but the momentum methods are not wrapped by SWIG and therefore accessible via scripting in Matlab or Python (reported by Hannah Heigold).

An easy solution would be to wrap the Simbody-level methods in PhysicalFrame, which would then make them available via SWIG.

aymanhab commented 1 month ago

Sure, would it make sense to utilize these as outputs?

nickbianco commented 1 month ago

No reason not to add Outputs for these as well!