Page 1 of 1

Experimental Data from Kinect IK

Posted: Mon Mar 03, 2014 3:10 am
by mitkof6
I am using Microsoft Kinect for tracking skeleton movements. I generated .trc motion file to use for IK. I have 9 markers (pelvis, hip, knee, ankle, toes)/leg for lower limb and I modified the gait2354_simbody.osim from the examples to fit my markers. When I run the my program I got this error from inverse kinematics.

Loaded marker file motion.trc (9 markers, 312 frames)
InverseKinematicsTool Failed: AssemblySolver::assemble() Failed: SimTK Exception thrown at Assembler.cpp:842:
Method Assembler::assemble() failed because:
Optimizer failed with message: SimTK Exception thrown at Assembler.cpp:225:
Error detected by Simbody method AssemblerSystem::objectiveFunc(): calcGoal() method of assembly condition Markers returned a negative or non-finite value -1.#IND.
(Required condition 'goalValue >= 0' was not met.)

Assembly error tolerance achieved: 0 required: 0.01.
InverseKinematicsTool Failed, please see messages window for details...

I checked the opensim documentation I found that in order to find a solution you need 3 markers for 6DOF joint. My question is if there is a way to perform the IK with just 9 markers?

Re: Experimental Data from Kinect IK

Posted: Tue Mar 04, 2014 12:02 am
by sunlixin
Hi Jim,
I think your problem is not about less markers, because the marker file you import must follow what your model has defined as landmarkers. You can refer to the tutorials published with your OpenSim installation.

Furthermore, I think you have blurred the concepts of "joints" and "markers". Joint is between the bodies, while markers are on the bodies. I don't know if the weighted least square method that OpenSim is using to calculate coordinates is suitable for joint data, but you can have a try.

I once thought of fabricating marker data according to joint data, but I think it kind of troublesome and unnecessary, so I gave up.

I think maybe you can write your own method and plug into OpenSim.

Best regards,
Lixin Sun

Re: Experimental Data from Kinect IK

Posted: Tue Mar 04, 2014 10:57 am
by mitkof6
I placed the markers on the 'joint's' positions with relative displacement on the body segment. I believe that it should work, because it tries to get the model in the same configuration. My experimental data are the joints positions.

For some reason when it calculates the objective function it returns invalid number.

I've implemented the IK problem very easy in Matlab, but I had the knowlage of relative tranformations from the model. The way I've done it was:

I started from the root (for example pelvis) and I know the T from pelvis to hip. The only unkown is the q1 to get the hip to the desired position. You can find the minimum that minimize the distance. Then I advanced to the next joint and substitutethe q1 to the new T and againt try to minimize q2 for the next joint position in the hierarchy and so on till the end effector. It's is very easy aproach and you minimize for one unknow every step. Maybe I will try to implement it that way.