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)
CustomJoint modelling using MATLAB
- Alexander Wolf
- Posts: 1
- Joined: Sun Feb 09, 2020 11:55 pm
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: CustomJoint modelling using MATLAB
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
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