Hello all,
I'm working with OpenSim API 3.3 to perform simulations in an optimal control algorithm. I wanted to compute the total angular momentum about the COM of the model. For now I found the function calcBodyMomentumAboutBodyMassCenterInGround() that calculates the angular and linear momenta about the COM of each body of the model. However, I would like to obtain the angular momentum of the whole multibody system. Is there any function that computes what I look for? Or do you have any suggestion for calculating it?
Any help or idea is really appreciated. Thanks!
Roger
Compute the total angular momentum of a model
- Roger Pallarès López
- Posts: 6
- Joined: Mon Feb 13, 2017 6:25 am
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Compute the total angular momentum of a model
Code: Select all
SimTK::SpatialVec momentum =model.getMultibodySystem().getMatterSubsystem().calcSystemMomentumAboutGroundOrigin(state);