CustomJoint modelling using MATLAB

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Alexander Wolf
Posts: 1
Joined: Sun Feb 09, 2020 11:55 pm

CustomJoint modelling using MATLAB

Post by Alexander Wolf » Wed Feb 19, 2020 8:26 am

Hello everybody,

I am trying to model a CustomJoint using Matlab. Unfortunately I'm struggling very hard with it, so I'd like to ask if someone could provide a "Blueptrint" code for the CustomJoint definition. I have attached my code which I use to try to connect a body "cylinder" to the body hand via a joint with one translational and one rotational degree of freedom. Unfortunately this code creates a CustomJoint without sockets and empty coordinates.

Thanks a lot!
Alex

(Software used: OpenSim4.1; Matlab2019a; Windows 7 - 64bit)
Attachments
code.txt
(2.26 KiB) Downloaded 10 times

Tags:

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

Re: CustomJoint modelling using MATLAB

Post by Ayman Habib » Mon Feb 24, 2020 12:13 am

Hi Alexander,

Please check the code (though in C++) at
https://github.com/opensim-org/opensim- ... Joints.cpp

In most cases, CustomJoint would be an overkill if you can use the less general but simpler to use other types of Joints (e.g. PinJoint, SliderJoint, BallJoint....) which gets you around dealing with the complicated SpatialTransform altogether. Example usage of these joints is shown in the same test case code above.

Hope this helps,
-Ayman

POST REPLY