Hello,
I'd like to downweigh the tibia and foot IMU sensors for the IK calculation in OpenSense. I know how to do this on the GUI, but want to be able to do it on Matlab for faster processing.
Here's what I currently have:
imuIK = IMUInverseKinematicsTool();
imuIK.set_orientation_weights();
I am unsure what argument to put in the parentheses of the set_orientation_weights function, and if I can set different weights for specific sensors. I am trying to follow the OpenSense publication weights (pelvis=1.0, thigh=1.0, tibia=0.5, foot=0.01).
Thank you in advance for the help.
OpenSense- downweighing sensors in Matlab API
- Therese Parr
- Posts: 9
- Joined: Mon Dec 02, 2019 9:47 am
- Carmichael Ong
- Posts: 401
- Joined: Fri Feb 24, 2012 11:50 am
Re: OpenSense- downweighing sensors in Matlab API
There are a few steps needed to make this work.
For set_orientation_weights, we can see from the documentation that it takes an object of type OrientationWeightSet (https://simtk.org/api_docs/opensim/api_ ... 58dcef9a4e).
Working with Sets can be a little tricky, but here's one way to create an OrientationWeightSet and fill it in:
1. Create the OrientationWeightSet
2. Create an OrientationWeight, and then add it to the OrientationWeightSet
3. Now set the IMUIK's orientation weights:
For set_orientation_weights, we can see from the documentation that it takes an object of type OrientationWeightSet (https://simtk.org/api_docs/opensim/api_ ... 58dcef9a4e).
Working with Sets can be a little tricky, but here's one way to create an OrientationWeightSet and fill it in:
1. Create the OrientationWeightSet
Code: Select all
weightSet = OrientationWeightSet();
Code: Select all
thisWeight = OrientationWeight("name", 1.0);
weightSet.adoptAndAppend(thisWeight)
Code: Select all
imuIK.set_orientation_weights(weightSet)
- Therese Parr
- Posts: 9
- Joined: Mon Dec 02, 2019 9:47 am
Re: OpenSense- downweighing sensors in Matlab API
Thank you, Carmichael! This worked great.