Page 1 of 1

Segmental kinematic optimisation

Posted: Tue Jun 13, 2023 11:02 am
by vigneshrk
Hi,

I would like to apply segmental kinematic optimisation such as Sodervisk, Cheze etc to calculate joint kinematics. I know how to specify a 6 DoF joint between two segments but how do I apply the above algorithms? Are there any use cases or examples?

Thanks

Re: Segmental kinematic optimisation

Posted: Wed Jun 14, 2023 9:30 am
by bogert
When you have 6-dof joints, OpenSim's inverse kinematics will give you exactly the same solution as those algorithms you mention. They all use a least-squares fit of marker positions.

Ton van den Bogert

Re: Segmental kinematic optimisation

Posted: Wed Jun 14, 2023 9:35 am
by vigneshrk
Hello Ton van den Bogert,

Thanks for the reply. Just to confirm IK would give a similar residual error and rotation matrix compared to if you use a svd or eigen value method if the joints are 6 dof?

Thanks

Re: Segmental kinematic optimisation

Posted: Wed Jun 14, 2023 9:44 am
by bogert
Yes, absolutely it will be the same result in all respects.

You could verify this with some simple test data (one frame, one bone with 3 markers). Let me know if you need code for the SVD and eigenvalue methods. SVD and eigenvalue methods also give the same answer, but the eigenvalue method is somewhat more sensitive to very poor marker sets (i.e. all markers nearly placed on a line).

Re: Segmental kinematic optimisation

Posted: Wed Jun 14, 2023 9:52 am
by vigneshrk
If it is possible to share the code, it would be really helpful.

I rewrote aspects of pycgm2 in MATLAB for my application but the results are not very consistent so I was trying to use Simbody (via OpenSim) for the same.

Thanks

Re: Segmental kinematic optimisation

Posted: Wed Jun 14, 2023 10:27 am
by bogert
I have attached my Matlab implementation of the SVD method.

Also a Fortran code for the eigenvalue method. I have once (a long time ago) verified that both give the same result unless the marker configuration is almost on a line.

Ton

Re: Segmental kinematic optimisation

Posted: Wed Jun 14, 2023 11:22 am
by vigneshrk
Thanks a lot

Vignesh

Re: Segmental kinematic optimisation

Posted: Sat Jun 24, 2023 11:30 am
by vigneshrk
Hello Ton,

Sorry to disturb but I have a question regarding the IK process. Specifically, I am interested in the residual error of the IK process, whether using SVD or using global optimisation. I would like to know:

1) How are the joint angles determined when we use global optimisation such as applied in OpenSim? Do we still determine the transformation matrix of each segment and determine the relative rotation?

2) I would like to ask a question regarding pycgm2 since I have read some of your comments in their github page. In CGM version >2.3, opensim is integrated. But SVD is again applied to the new marker locations determined using opensim's IK. Do you know the reasoning behind this? How would this differentiate between joint angles calculated using OpenSim alone? Is there any benefit to this?

Thanks