Page 1 of 1

Compute dependent coordinates

Posted: Fri May 08, 2020 6:10 am
by william_a
Hi All,

Is there any way to compute dependent coordinates given the independent coordinates as a function of time?

Thanks,
William

Re: Compute dependent coordinates

Posted: Fri May 08, 2020 6:59 am
by brycekillen05
You can use the API class "Function" and method "calc_value" to get of the dependent coordinate

https://simtk.org/api_docs/opensim/api_ ... ction.html

Bryce

Re: Compute dependent coordinates

Posted: Fri May 08, 2020 8:29 am
by william_a
Hi,

By coordinate here I mean joint angles. I have 14 coordinates (joint angles) in my model. After putting coupler constraints, there are 3 independent coordinates and 11 dependent coordinates. Now, given the 3 independent coordinates as a function of time I would like to compute all 11 dependent coordinates. How would I do that?

PS: All these 14 joint angles are states of the model.

Thanks,
William

Re: Compute dependent coordinates

Posted: Fri May 08, 2020 10:08 am
by brycekillen05
I think it depends on how you defined the joints and how the coordiantes, for example the knee is typically defined by a single knee flexion coordinate, and the other coordinates are dependent and defined using SimmSpline functions in the model. In this case the dependent coordinates can be calculated if you know the independent coordinate value, you can then use the custom joint class -> Spatial Transform - TransformAxis - Function to get the relationship between the two coordinates and use the function I linked previously to calculate the dependent coordinate.

How are you joints' defined in your model ?

Bryce

Re: Compute dependent coordinates

Posted: Wed Nov 25, 2020 8:47 am
by rainmakeryu
Hi, I actually have the same problem. Thanks for the answer.

I do have another problem, I want to use Matlab to create a custom joint, but since I am new to it, I don't know how to define this custom joint, particularly in defining the spatial transfrom part. Is there any example I can study?

Thanks so much~