Closed mrrezaie closed 8 months ago
I just tested this code on Google Colab to make sure nothing is wrong with my Python environment and configuration; the same happened.
OpenSim v.4.5 Thank you.
Thanks @mrrezaie for posting this issue. What do you mean by "freeze"? Does your working environment hang or crash? Or is it just taking a long time to perform the fit? With positive error variance, the spline fitter in Simbody will try to apply smoothing during the spline fit. I wonder if it's struggling to perform a smooth fit for the IK data in particular.
What do you mean by "freeze"? Does your working environment hang or crash? Or is it just taking a long time to perform the fit? With positive error variance, the spline fitter in Simbody will try to apply smoothing during the spline fit.
Thanks @nickbianco for your response. It keeps processing and cannot finish it even after 30 min. Also, the keyboard interrupt command, Ctrl+C, does not work here and I have no choice but to restart the console.
I think the errorVariance
of 0.5 is too big for signals such as 'pelvis_tz' angle (during gait cycle) which has a very small range. I found that if there are locked coordinates (zeros columns) in the input table, it would freeze even with a very small errorVariance
, e.g., 0.001. So, I think I need to design a GCVSpline
specifically for each signal. But as a suggestion, the positive errorVariance
value in GCVSplineSet
should be somehow relative, not absolute. In this case, same smoothness would be applied to all signals.
Based on this description from GCVSpline, providing a negative number tells the fitter to estimate the error variance before the spline fit. This is probably the best approach in most cases. If you need additional smoothing, I would try doing that as a preprocessing step (e.g., a Butterworth filter) before performing the spline fit.
Fair enough. Is there any method to get the estimated error variance?
I would probably dig into the source code for that, specifically Simbody's SplineFitter class.
Hi, Sorry for posting this issue here. Could you please test this example and see if this is reproducible?
GCVSplineSet
witherrorVariance
values of 0 and -1 works well. But it freezes if I use positiveerrorVariance
(even very small values). This behavior is not stable (sometimes works). inverse_kinematics.zipOr this:
Thank you.