keenon / nimblephysics

Nimble: Physics Engine for Biomechanics and Deep Learning
http://www.nimblephysics.org
Other
403 stars 44 forks source link

nimble.biomechanics.OpenSimParser.loadGRF is sensitive to small values in timestamp #179

Closed TheOne-1 closed 1 year ago

TheOne-1 commented 1 year ago

nimble.biomechanics.OpenSimParser.loadGRF was not working properly with such kind of timestamp: image If I round the timestamp with 3 digit precision as follows, the function worked properly. image repeat the issue.zip

nickbianco commented 1 year ago

@TheOne-1 What exactly is the issue? Does the loadGRF call fail, or does it load the data incorrectly?

TheOne-1 commented 1 year ago

It loaded the data incorrectly. I can't remember very well but it's probably related to the sampling rate, which was not loaded as 200 Hz.

keenon commented 1 year ago

I think it's possible that this was fixed in the latest revision of the GRF loader, which now always gets exactly the desired timestamps in the output, even if it has to linearly interpolate between frames.