Defining Joint Motion using Generalized Cordinates

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Rahul Agrawal
Posts: 47
Joined: Mon Aug 31, 2015 3:16 pm

Defining Joint Motion using Generalized Cordinates

Post by Rahul Agrawal » Fri Jul 13, 2018 2:30 pm

Hello Everyone,

I am using 6DOF custom joint between scapula and humerus to stimulate dislocation. I have generated trajectory in Matlab i.e. translation XYZ and rotation Euler angles. Opensim requires generalized coordinate as an input for prescribing joint motion. Does anyone know how I can implement it.

Please see the attached file from "Minimal formulation of joint motion for biomechanisms"- Ajay seth
I have Theta1,Theta2,Theta3 and P1,P2,P3 wrt. parent body . How can I calculate generalized coordinate q?

Thanks!
Attachments
Capture1.PNG
Capture1.PNG (10.51 KiB) Viewed 727 times

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Defining Joint Motion using Generalized Cordinates

Post by Dimitar Stanev » Mon Jul 16, 2018 12:56 am

If theta and p are a function of one independent variable then the easiest way is to use a function in the TransformAxis (e.g. see the example for knee translation as a function of knee_angle_r):

https://github.com/opensim-org/opensim- ... .osim#L590

Unfortunately, I am not sure if OpenSim supports a multivariate function. In this case you would have to implement your own custom function and export it as an OpenSim plugin.

User avatar
Rahul Agrawal
Posts: 47
Joined: Mon Aug 31, 2015 3:16 pm

Re: Defining Joint Motion using Generalized Cordinates

Post by Rahul Agrawal » Mon Jul 16, 2018 6:58 am

Hi Dimitar,

Thank you for your reply.

In my case theta and p are independent of each other as I am prescribing motion from located position to dislocated position for humerus.

Do you think is there any way to implement this eg (modelling 6 DOF with 6 different joints at the same location and prescribing thetha and p accordingly).

Thanks!

Regards,
Rahul

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Defining Joint Motion using Generalized Cordinates

Post by Dimitar Stanev » Tue Jul 17, 2018 12:34 am

Yes as I told you, you will have to implement your own Function as a plugin that can have multiple dependent variables, because OpenSim does not have such a function. Then you can add this function to the TransformAxis providing the dependent coordinates and the coefficients for evaluating the function value, if we assume that it is a polynomial.

You can look at the source code to see how different function are defined (e.g. check the inheritance diagram https://simtk.org/api_docs/opensim/api_ ... ction.html and particularly the PolynomialFunction) and create your own function by extending OpenSim::Function. Then create a plugin:

https://simtk-confluence.stanford.edu/d ... ng+Plugins

POST REPLY