opensim-creator icon indicating copy to clipboard operation
opensim-creator copied to clipboard

Simulation breaking if a PointToPointSpring has sockets on the same body

Open itbellix opened this issue 1 year ago • 1 comments

Hi @adamkewley, I am running into some weird behavior when I simulate a model with a PointToPointSpring attached. What I am seeing is that if a spring is defined to have its two sockets on the same body, then hitting the Simulate button causes the simulation to break (it is reported as Completed immediately, and the model disappears from the screen. Plots below clarify what I am doing and what I observe, I also attach the model I am using: passive_dynamic_walker_bumps.zip

Spring sockets

image

Simulation breaking immediately

image

itbellix avatar May 03 '23 10:05 itbellix

Bug confirmed. Repro:

  • Open WalkerModel.osim
  • Add PointToPointSpring and set both sockets to Pelvis
  • Simulate
  • BUG: Model is visible at t = 0 and then disappears at t > 0

This bug is in OpenSim itself, rather than OpenSim Creator. OpenSim should reject a socket assignment like this with an appropriate error message (e.g. Error in PathSpring: body1 == body2 == "/bodyset/Pelvis": you must assign a PathSpring to two different frames) or similar.

adamkewley avatar May 03 '23 17:05 adamkewley

Closing because this was fixed upstream, which means that it'll percolate for OpenSim Creator sooner or later

adamkewley avatar Jun 13 '24 08:06 adamkewley