Page 1 of 1

Load Motion -> Play Animation fails to animate past a particular frame

Posted: Thu Feb 27, 2020 9:47 am
by jmgoodman
Hi everyone,

I have run into an issue with Opensim 4.x (both 4.0 and 4.1) when attempting to load a motion and replay it. I've tested this in Mac Yosemite.

Essentially, I have run inverse kinematics through command line tools and as far as I can tell the procedure has completed without any problems. When I load the kinematics into the player, no errors or exceptions are risen. However, when actually playing the kinematics, they halt at a particular frame, with the rest of the animation failing to proceed (but with no exceptions arising in the Messages window). Removing frames from the end of the .mot file to shorten the duration of the recording fails to have an effect. Removing frames prior to the point where the replay "freezes" results in the recording still freezing at the precise frame it did before (albeit reaching that frame more quickly now that fewer frames between the start of the recording and the "freeze" point now exist). If all frames from the start of the recording up to the "freeze" point are eliminated from the .mot file, no animation is played (although, again, no errors are shown in the Messages window). However, the "freeze" frame has no obvious problems: the kinematics are within a reasonable range of values, and there are no formatting differences between this frame and the rest of the file.

A culprit could very well be the version of the model being used to replay the kinematics. The original model file was created in Opensim 2.x, indicated by the <OpenSimDocument Version="20302"> field in the .osim file. Indeed, when I use Wine to load the model and kinematics file into an older version (Opensim 3.3), kinematic replay proceeds flawlessly. Also indicative of potential problems between old models and new software is that, upon loading the .osim file, a long string of warnings following this format are given:

"GeometryPath 'geometrypath' has subcomponents with duplicate name 'pathwrap'.
The duplicate is being renamed to 'pathwrap_0'."

However, when simply re-saving the model in a version 4.x .osim file, even though the above warnings disappear when loading the model, the same issues arise when replaying the kinematics. For this reason, I think the problem resides deeper than mere .osim formatting requirements across different versions. It could still be a model issue (the model we use is based on https://simtk.org/projects/ulb_project, for reference) and an indicator that an update is in order. But perhaps there is a known change in Opensim 4.x that could help me understand what is happening?

Re: Load Motion -> Play Animation fails to animate past a particular frame

Posted: Tue Apr 14, 2020 1:43 pm
by lanovaz
James,

We have had the same (or very similar) issues with Opensim 4 but it has happened on both Win and Mac versions. It also seems to depend a bit on the computer; one Win 10 machine showed the issue while another did not. I posted something about it a while back and sent in some example files but still haven't got anything. Hopefully you will hear something.

Joel

Re: Load Motion -> Play Animation fails to animate past a particular frame

Posted: Tue Apr 21, 2020 3:14 pm
by aymanh
Per follow up with Joel (thanks Joel), the issue had to do with one muscle wrapping that goes wrong tripping the visualization:

Removing one of the wrapping bodies for that muscle (the PL wrapping body attached to the proximal row) solved the problem.

Unfortunately there's no easy way to detect the issue other than a red stop sign at the corner of the application with a stack trace when trying to move a coordinate slider. We're working on methods to make this troubleshooting accessible to users in the future.

Best regards,
-Ayman

Re: Load Motion -> Play Animation fails to animate past a particular frame

Posted: Wed May 13, 2020 9:42 am
by lanovaz
Ayman,

Thanks for the reply, but I am not sure this is exactly the same issue (although it may be). When the wrapping surface issue showed up, we couldn't even get any saved mot file to load into the motion slider tool (not sure what the exact technical name is). Deactivating the offending wrapping surfaces solved that problem, but we are still occasionally getting the situation described by James where you can load a mot file (from IK) and press play but it freezes some way into the playback. The behaviour is a bit different than not loading at all so I am wondering if the source of the problem is different too?

Joel

Re: Load Motion -> Play Animation fails to animate past a particular frame

Posted: Wed May 13, 2020 1:24 pm
by aymanh
Joel,

While the specific muscle/wrap-object pair may be different, the fundamental issue is likely the same with this model: having way too many muscles wrap objects to be manageable. Try the model with no muscles at all, if that animates without an issue you can try to narrow it down.

Please let me know how that goes,
-Ayman

Re: Load Motion -> Play Animation fails to animate past a particular frame

Posted: Wed May 13, 2020 2:17 pm
by lanovaz
Ayman,

Thanks. It does seem to run (at with some initial tests) when all wrapping surfaces are deactivated. So now comes the fun part of tracking down the culprit(s). This model worked OK on 3.3; is there something about 4.1 that bogs it down with high numbers of muscles using wrapping?

Joel

Re: Load Motion -> Play Animation fails to animate past a particular frame

Posted: Sun Sep 27, 2020 10:23 am
by aspenect14
Hello,

I am experiencing similar issues with the motion player in OpenSim. My model has extra wrapping points to account for high knee and hip flexion angles during a squatting task, so I am unable to deactivate these wrapping points. Has either of you been able to resolve this issue?

Best,
Aspen