OpenMA / openma

Library to explore, process, and analyze movement acquisition data
Other
44 stars 8 forks source link

python binding - extractKinetics #16

Open aaa34169 opened 8 years ago

aaa34169 commented 8 years ago

No warnings come up if extract_kinetics run without gravity vectors and mass within subject properties

Alzathar commented 8 years ago

The function ma::body::extract_joint_kinetics only looks for segment poses and joint forces and moments for each ma::body::DynamicsDescriptor found. The computation of segments and joint forces and moments are done within the function ma::body::reconstruct. Thus, no warning are displayed because no information was found.

The problem might be deeper than the display of a warning. The way to activate the inverse dynamics is not simple (set the gravity vector). The code might be refactored. For example, a new class ma::LaboratorySettings is in development to set the gravity direction and magnitude. This class might manage the need or not to compute the inverse dynamics. A specific option in this class might trigger the computation of the inverse dynamics. Thus, when the function ma::body::extract_joint_kinetics is used, the inverse dynamics computation set to truebut no information was found, a warning could be displayed.

Would it be a better way?

aaa34169 commented 8 years ago

I like the class ma::LaboratorySettings and the proposed process I thin ma::LaboratorySettings s the best place for stating the gravity vector.