Hi there,
I was wondering if it would be possible to have different weighting factors for tracking goals in the x/y/z axes? In my case when tracking IMU signals I am having more success with a 2D model tracking signals with the OpenSim z axis components set to 0, so am considering whether reducing the weight on tracking these components could assist with obtaining a converged solution in 3D.
Is this something that could be added as a custom goal or potentially developed for a future release? Or would it be difficult to implement with the signals being wrapped in a TimeSeriesTableVec3? I imagine the same concept could also be applied to GRF/joint reaction/marker tracking if it was feasible.
Thanks!
Grace
Different weighting factors for each axis?
- Ross Miller
- Posts: 374
- Joined: Tue Sep 22, 2009 2:02 pm
Re: Different weighting factors for each axis?
Hi Grace,
You can do this for GRF with MocoContactTrackingGoal, I do it like this:
This tells this particular contact tracking goal to track just the vertical GRF component with weight weightForThisGoal. You can create other separate contact tracking goals with different weights for other components.
For motion-tracking, with MocoTrack and MocoStateTrackingGoal I think you can only track model states, e.g. generalized coordinates and speeds. I haven't used MocoOrientationFrameTrackingGoal much but it might be able to do what you described.
https://simtk.org/api_docs/opensim/api_ ... gGoal.html
Hope this helps,
Ross
You can do this for GRF with MocoContactTrackingGoal, I do it like this:
Code: Select all
contactTracking1 = MocoContactTrackingGoal('name for this goal',weightForThisGoal)
...
contactTracking1.setProjection('vector');
contactTracking1.setProjectionVector(Vec3(0, 1, 0));
For motion-tracking, with MocoTrack and MocoStateTrackingGoal I think you can only track model states, e.g. generalized coordinates and speeds. I haven't used MocoOrientationFrameTrackingGoal much but it might be able to do what you described.
https://simtk.org/api_docs/opensim/api_ ... gGoal.html
Hope this helps,
Ross
Re: Different weighting factors for each axis?
Thanks Ross, yes I don't think that is an option for IMU signal related goals but would be very useful for GRF tracking!
- Nicholas Bianco
- Posts: 1028
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Different weighting factors for each axis?
Hi Grace, Ross,
No, there isn't an "projection" option for the IMU tracking goals. I realize now that we should have made this an option for all tracking goals with 3D data by default. But it's an easy enough addition. It won't make it into 4.4 since that's already in beta, but if you need a custom build for your project we can do that too.
-Nick
No, there isn't an "projection" option for the IMU tracking goals. I realize now that we should have made this an option for all tracking goals with 3D data by default. But it's an easy enough addition. It won't make it into 4.4 since that's already in beta, but if you need a custom build for your project we can do that too.
-Nick
Re: Different weighting factors for each axis?
That sounds great thanks Nick, I don't think this should be crucial for my project at this point but will let you know if that changes, or if you do implement this in a future build/update please let me know!
- Nicholas Bianco
- Posts: 1028
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Different weighting factors for each axis?
Sounds good! I'll create a GitHub issue for now and let you know when we get around to updating these goals.
-Nick
-Nick