Page 1 of 1

moco tracking without reference coordinates

Posted: Mon Mar 07, 2022 7:52 am
by sheeba
Hi,

I have been working with moco tracking with 2D walking model in matlab. I generated an initial guess with a coarser mesh interval (set to 11) and used the initial guess for generating tracking solutions with finer grid (set to 20), which worked fine. But once i set track.set_apply_tracked_states_to_guess(false), the solution is not a normal walking. I have also used modelProcessor.append(ModOpIgnoreTendonCompliance()); but there is no improvement in the solution.

My goal is to try different 2D models that may not have reference coordinates to track.

I really appreciate if anyone can help me with this issue, thanks in advance.

Sheeba

Re: moco tracking without reference coordinates

Posted: Mon Mar 07, 2022 5:03 pm
by aafox
Hi Sheeba,

Nice to see you getting into working with Moco.

What you've probably done in the first instance is use your tracking states (i.e. the motion you want) as the initial guess - i.e. track.set_apply_tracked_states_to_guess(true). This essentially sets the optimisation at a good starting point, because your initial guess for the motion is the end motion that you want. When you turn this process off - i.e. track.set_apply_tracked_states_to_guess(false) - you potentially get an initial guess that doesn't represent your final motion well and your optimisation can end up with a solution that doesn't look right (it's typically a local minimum).

I think what you're finding here is that the initial guess can have a big impact on the final 'decision' a model takes as it's optimal solution. Take this practical example - if you were teaching someone to walk, and you showed them videos of dogs or horses, they might end up thinking that walking on all fours is the best option. In this example the videos of dogs/horses are your initial guess that's impacting on the final solution.

Hope that helps.

Aaron

Re: moco tracking without reference coordinates

Posted: Tue Mar 08, 2022 7:22 am
by sheeba
Hi Aaron

Nice to connect with you in this platform and thank you for your response.

I have generated an initial guess with track.set_apply_tracked_states_to_guess(true) and used the initial guess for rest of the trials. I want to use models of different size (for which i do not have reference coordinates), hence i used the initial guess track.set_guess_file('gaitTracking_solution_fullStride_trial_1.sto'); and set track.set_apply_tracked_states_to_guess(false). If this works, then i can use different size models for generating a walking gait.

I am not sure whether i am doing it right. But my question is, what should i do when i don't have a guess file and reference coordinates?

Thanks
Sheeba

Re: moco tracking without reference coordinates

Posted: Tue Mar 08, 2022 8:59 am
by rosshm
Hi Sheeba,

I think you can probably still get good results for different-sized models by giving them the same initial guess from the reference tracking targets. Have you tried this and it doesn't work well?

You may have to adjust the vertical coordinate of the pelvis in the tracking targets up or down by some offset, or else models with very different heights from the original model will have very bad GRF in the initial guess, but other than that I can't think of a technical reason by this couldn't work reasonably well. I've done things like this in the past, using a tracking solution from another model as the initial guess for a different-sized model, and it usually produces reasonable results (good tracking).

Ross

Re: moco tracking without reference coordinates

Posted: Tue Mar 08, 2022 9:53 am
by sheeba
Hi Ross

Thank you for your reply.

Yes, I have tried it and it has not generated a good tracking solution. But, I haven't changed the coordinates of tracking targets. Do you mean to say that I will have to manually change the vertical coordinate of the reference coordinates based on the size of the model in order to use a different size model? Can you please explain how I can adopt this?

Thanks
Sheeba

Re: moco tracking without reference coordinates

Posted: Tue Mar 08, 2022 10:59 am
by rosshm
Hi Sheeba,

Yes, you would be adjusting the height of the pelvis by some constant amount, e.g. adding or subtracting 0.02 m or whatever, to the pelvis height at all timesteps in the tracking targets. For example, if the data are starting at heel-strike, you could set the pelvis height to whatever height makes the height of the heel contact element equal to zero.

Especially if the initial guess has a very bad cost function score and very large constraint violations, I would guess it's probably a situation where the model's feet are starting very deep under the ground, producing huge GRF.

Ross

Re: moco tracking without reference coordinates

Posted: Tue Mar 08, 2022 11:15 am
by sheeba
Hi Ross

Thank you very much for your suggestion. I will try it and update it here.

Sheeba