Page 1 of 1

frame rate of my solution?

Posted: Thu Sep 28, 2023 2:43 am
by deyvidpi
I'm asking Moco to track a mot file.

Code: Select all

track = osim.MocoTrack()
[...]
track.set_initial_time(0.07)
track.set_final_time(1.45)
track.set_mesh_interval(0.05)
I do not understand how the frame rate of the solution is calculated. I would assume the frame rate to be 1/meshInterval = 20 fps, and to obtain (finalTime-initialTime)/meshInterval = 27.6 frames.
Instead, the frame rate of the solution is about 41 fps, with 57 frames.

Would you be able to explain this to me?
Thanks in advance!

Re: frame rate of my solution?

Posted: Fri Sep 29, 2023 7:42 pm
by brian
Hi David,

Are you using the Hermite-Simpson transcription scheme? If so, that results in 2n+1 grid points. See here:

https://simtk.org/api_docs/opensim/api_ ... psontheory

"With Hermite-Simpson transcription, we have n+1 mesh points and n mesh intervals like Trapezoidal transcription, but we also introduce additional collocation points at the mesh interval midpoints. This leads to a total of 2n+1 grid points on which we discretize the continuous variables."

Hope this is helpful.

Best,
Brian

Re: frame rate of my solution?

Posted: Sat Sep 30, 2023 12:14 pm
by deyvidpi
It seems like you put your finger right on point!
And it's a good thing, because now I know a bit about transcription schemes.

I had no idea what I was using, but calling track = osim.MocoTrack() apparently uses by default Hermite-Simpson transcription.
https://simtk.org/api_docs/opensim/api_ ... %2DSimpson

Thank you :idea: