Page 1 of 1

Erratic hybrid muscle wrapping around ellipsoid

Posted: Fri Feb 09, 2024 5:04 pm
by ehourston
Cross-posted on github https://github.com/opensim-org/opensim-gui/issues/1484

Hello, I'm having issues with the hybrid muscle wrapping around ellipsoids. I've tried midpoint & axial wrapping methods as advised by the docs, and I understand that muscle wrapping (particularly around ellipsoids) is an ongoing issue. Any suggestions on how to fix erratic muscle behaviour with hybrid wrapping? Or if this particular problem hasn't yet been resolved, is there a workaround that can help with the discontinuities?

Photos are in the linked github post.

Thanks for the help

Re: Erratic hybrid muscle wrapping around ellipsoid

Posted: Sun Feb 11, 2024 12:13 pm
by johnjdavisiv
In the images, I noticed that the troublesome muscle appears to pass through a torus wrapping surface too. I've found that those torus wrapping surfaces can cause exactly this kind of "jumping" or "falling off" behavior on other wrapping surfaces. Try replacing the torus with a via point (located at the center of the torus) instead--does the muscle still jump around on the ellipse?

Re: Erratic hybrid muscle wrapping around ellipsoid

Posted: Tue Feb 13, 2024 12:24 pm
by ehourston
Hi, thanks for the suggestion. When (a) removing the torus wrapping or (b) removing the torus wrapping and adding a via point at or near the torus centroid, the motion is smooth but the muscle seems to duplicate itself (ie. there are two lines of action from the insertion points). Please see attached images. Any ideas why this may be? Thanks.

Re: Erratic hybrid muscle wrapping around ellipsoid

Posted: Wed Feb 14, 2024 9:50 am
by ehourston
Hi, nevermind my last response. Reran the sims and wrapping issue was sort of solved two ways: (1) as you suggested, switching to a via point, and (2) moving the torus. Although the via point solved the muscle jumping, I noticed the muscle moment arms were zero for several of the instances where it should have been non-zero. Moving the torus produced moment arms closer to the expected values.

I guess the question remains, is there another workaround aside from the via point and guess/check torus placement that could mitigate jumpy muscle behaviour?

Thanks for the help.

Re: Erratic hybrid muscle wrapping around ellipsoid

Posted: Wed Feb 14, 2024 12:57 pm
by johnjdavisiv
Two things come to mind:

First, I've found that I shouldn't always trust the visualizer--I've seen those 'double muscle' bugs sometimes and they don't always reflect actual errors in the wrapping. Checking the moment arm in the plot tool will sometimes show the wrapping is working just fine (though if yours is showing zero values, that is definitely not fine!).

Second, when a muscle jumps around or falls off a wrapping surface, one cause can be a via point (or the origin point or a departure point from where the muscle wraps on a previous surface) falling inside the wrapping surface geometry. This github bug shows how this can happen after scaling, but it might also happen when a via point is on another segment and that segment moves relative to the wrapping surface.