Page 1 of 1

CoordinateCouplerConstraint function that can be added to model using Matlab

Posted: Wed Sep 08, 2021 3:28 am
by cyvaa
How can we implement CoordinateCouplerConstraint between two bodies in a model using Matlab?

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

Posted: Thu Sep 09, 2021 12:51 pm
by aymanh
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

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

Posted: Sun Sep 12, 2021 9:14 pm
by cyvaa
Thank you Ayman. I tried your method and it worked perfect.

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

Posted: Sun Sep 12, 2021 11:01 pm
by cyvaa
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.