Segmental kinematic optimisation

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Radhakrishnan Vignesh
Posts: 104
Joined: Tue Jun 01, 2021 8:09 am

Segmental kinematic optimisation

Post by Radhakrishnan Vignesh » Tue Jun 13, 2023 11:02 am

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

User avatar
Ton van den Bogert
Posts: 164
Joined: Thu Apr 27, 2006 11:37 am

Re: Segmental kinematic optimisation

Post by Ton van den Bogert » Wed Jun 14, 2023 9:30 am

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

User avatar
Radhakrishnan Vignesh
Posts: 104
Joined: Tue Jun 01, 2021 8:09 am

Re: Segmental kinematic optimisation

Post by Radhakrishnan Vignesh » Wed Jun 14, 2023 9:35 am

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

User avatar
Ton van den Bogert
Posts: 164
Joined: Thu Apr 27, 2006 11:37 am

Re: Segmental kinematic optimisation

Post by Ton van den Bogert » Wed Jun 14, 2023 9:44 am

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).

User avatar
Radhakrishnan Vignesh
Posts: 104
Joined: Tue Jun 01, 2021 8:09 am

Re: Segmental kinematic optimisation

Post by Radhakrishnan Vignesh » Wed Jun 14, 2023 9:52 am

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

User avatar
Ton van den Bogert
Posts: 164
Joined: Thu Apr 27, 2006 11:37 am

Re: Segmental kinematic optimisation

Post by Ton van den Bogert » Wed Jun 14, 2023 10:27 am

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
Attachments
DISP3DB_FORTRAN.txt
(7.32 KiB) Downloaded 6 times
hmc3_soder.m.txt
(1.61 KiB) Downloaded 8 times

User avatar
Radhakrishnan Vignesh
Posts: 104
Joined: Tue Jun 01, 2021 8:09 am

Re: Segmental kinematic optimisation

Post by Radhakrishnan Vignesh » Wed Jun 14, 2023 11:22 am

Thanks a lot

Vignesh

User avatar
Radhakrishnan Vignesh
Posts: 104
Joined: Tue Jun 01, 2021 8:09 am

Re: Segmental kinematic optimisation

Post by Radhakrishnan Vignesh » Sat Jun 24, 2023 11:30 am

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

POST REPLY