CoordinateCouplerConstraint function that can be added to model using Matlab
- K Sivaprasad
- Posts: 5
- Joined: Wed May 19, 2021 6:15 pm
CoordinateCouplerConstraint function that can be added to model using Matlab
How can we implement CoordinateCouplerConstraint between two bodies in a model using Matlab?
Tags:
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: CoordinateCouplerConstraint function that can be added to model using Matlab
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
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
- K Sivaprasad
- Posts: 5
- Joined: Wed May 19, 2021 6:15 pm
Re: CoordinateCouplerConstraint function that can be added to model using Matlab
Thank you Ayman. I tried your method and it worked perfect.
- K Sivaprasad
- Posts: 5
- Joined: Wed May 19, 2021 6:15 pm
Re: CoordinateCouplerConstraint function that can be added to model using Matlab
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.