CoordinateCouplerConstraint function that can be added to model using Matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
K Sivaprasad
Posts: 5
Joined: Wed May 19, 2021 6:15 pm

CoordinateCouplerConstraint function that can be added to model using Matlab

Post by K Sivaprasad » Wed Sep 08, 2021 3:28 am

How can we implement CoordinateCouplerConstraint between two bodies in a model using Matlab?

Tags:

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: CoordinateCouplerConstraint function that can be added to model using Matlab

Post by Ayman Habib » Thu Sep 09, 2021 12:51 pm

Hello,

In general you can't define new component types but you can create new components (Body, Joint, Constraint, etc.) in Matlab. In your case you'll create a new CoordinateCoupleConstraint object, then add it to the model. The CoordinateCoupleConstraint provides an interface to set/customize the Function underneath it as well as the set of Cooridnates that it couples. The documentation of the class is here:
https://simtk.org/api_docs/opensim/api_ ... raint.html

Hope this helps,
-Ayman

User avatar
K Sivaprasad
Posts: 5
Joined: Wed May 19, 2021 6:15 pm

Re: CoordinateCouplerConstraint function that can be added to model using Matlab

Post by K Sivaprasad » Sun Sep 12, 2021 9:14 pm

Thank you Ayman. I tried your method and it worked perfect.

User avatar
K Sivaprasad
Posts: 5
Joined: Wed May 19, 2021 6:15 pm

Re: CoordinateCouplerConstraint function that can be added to model using Matlab

Post by K Sivaprasad » Sun Sep 12, 2021 11:01 pm

Following up on the doubt, how can we add IndependentCoordinateNames in matlab? What is the function they are asking for? Can you please clarify this for me. Thanks.

POST REPLY