Coordinate Coupler Constraint -- MatLab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Karoline Wucherer
Posts: 1
Joined: Sun Jan 03, 2021 1:45 pm

Coordinate Coupler Constraint -- MatLab

Post by Karoline Wucherer » Mon Apr 11, 2022 2:53 pm

Hello,

I am relatively new to using MATLAB to modify OpenSim models and am having some trouble with implementing a Coordinate Coupler Constraint. I am trying to create an object that follows the hands, but only in the x and z directions, with the y constrained to the ground plane. If the individual walks forward, the objects will follow the hands on the ground plane, almost like a shadow. I am able to successfully add the objects into OpenSim, however, have been unsuccessful in any steps past this. This is my thought process/what I have attempted to do so far:

1. Added two separate types of objects (as bodies), and got reference to ground and hand bodies
2. Created free joint between plate object and ground to establish coordinates
3. Created free joint between massless square object and hands to establish coordinates
4. Created a CoordinateCouplerConstraint using the massless object as the independent body and the plate moving around the ground as the dependent.

I have attached the relevant parts of my code below; I am using the Full Body Hamner model. Any suggestions on how to achieve a constraint as previously described?

My progress is mainly based off what I have seen on the forum and through Doxygen, however I am noticing there is not as much documentation for MATLAB as there is for C++. I was wondering if there are many limitations to using MATLAB for implementing mechanical models in OpenSim as compared to using C++? I have a background in MATLAB so would prefer to use it, however, if C++ or another language is more useful, I may adjust my methods.

Thanks!
Karoline, interested student
Attachments
CustomConstraint_Forum.txt
(7.15 KiB) Downloaded 147 times

Tags:

POST REPLY