Compute dependent coordinates

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
William A
Posts: 21
Joined: Thu Feb 16, 2017 10:02 am

Compute dependent coordinates

Post by William A » Fri May 08, 2020 6:10 am

Hi All,

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

Thanks,
William

Tags:

User avatar
Bryce Killen
Posts: 104
Joined: Mon Nov 24, 2014 7:12 pm

Re: Compute dependent coordinates

Post by Bryce Killen » Fri May 08, 2020 6:59 am

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

User avatar
William A
Posts: 21
Joined: Thu Feb 16, 2017 10:02 am

Re: Compute dependent coordinates

Post by William A » Fri May 08, 2020 8:29 am

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

User avatar
Bryce Killen
Posts: 104
Joined: Mon Nov 24, 2014 7:12 pm

Re: Compute dependent coordinates

Post by Bryce Killen » Fri May 08, 2020 10:08 am

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

User avatar
Yu Zhou
Posts: 4
Joined: Thu Jan 26, 2017 7:36 am

Re: Compute dependent coordinates

Post by Yu Zhou » Wed Nov 25, 2020 8:47 am

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~

POST REPLY