Closed SAI-sentinal-ai closed 7 months ago
Hi @SAI-sentinal-ai , I'm sorry to hear this
Just so I understand, is the OSC release you're using is 0.5.4? Or is it a development release (from the GitHub Actions)? And by "latest update", do you mean "the latest update of OSC (as in, OSC has broken something)" or "the latest update of MacOS (as in, there's something in MacOS that i need to investigate"?
(additional information): if it's related to the mac OS update, it could be that you've upgraded from a pre-Sonoma to a Sonoma release? There's a very large amount of posts that appear to indicate that Sonoma may have stability issues - esp with software that renders 3D (e.g. games, Blender, etc.)
Hi @adamkewley, thanks for the quick reply. I am using the latest version of OSC from: https://github.com/ComputationalBiomechanicsLab/opensim-creator/releases. In fact, I think OSC stopped working overnight even before I updated either OSC or macOS... but I am not 100% as I have macOS set up to update at night. I was using OSC on Sonoma previously, so it may have to do with the latest November update. I have not noticed issues other software such as Paraview or Cloudcompare which render in 3D.
Hi @SAI-sentinal-ai ,
I have managed to reproduce a crash on my Intel Macbook Air (note: it may not be your crash) and, after a little debugging, it turns out to be due to quite old code in OSC that was algorithmically bogus, but that has been fine until a recent update to Mac's standard library (see 69899c0 if you want a technical overview).
It would be useful if you tried out a build of OSC with the relevant fix in it. If it fixes your problem, then I can ship the fix as a patch release for OSC very soon.
To try it out:
Artifacts
If that doesn't work out for you then further steps would be:
Hi @adamkewley, the build on https://github.com/ComputationalBiomechanicsLab/opensim-creator/actions/runs/6930226982 seems to work! Thanks for the quick turn around. Your software makes editing OpenSim models much less painful :) I guess we can close this issue?
@SAI-sentinal-ai good to hear!
I'll try and test+ship a release that includes the fix, followed by closing this (I'll keep it open as a reminder)
@SAI-sentinal-ai the fix, along with another fix bug I found in the meshimporter (due to the C++20/math changes I made since 0.5.4) are now published as 0.5.5
on the releases page:
Cheers for taking the time to report this!
thanks for fixing it!
Perhaps you could help me with a related issue: I am trying to update locations and offsets in an osim file programatically. I guess you have used the CPP API to implement these sliders in OSC. Is there anyway to access OSC programatically, or how can I find the relevant code for updating locations, say of wirepoints of muscle, in the repo? Thanks! (my email is h.saini@auckland.ac.nz)
No problem!
Perhaps you could help me with a related issue: I am trying to update locations and offsets in an osim file programatically. I guess you have used the CPP API to implement these sliders in OSC.
Yep, exactly right, if you can squint past the UI-related stuff (making a table, adding buttons, etc. etc.) the source code behind (e.g.) the coordinate editor is calling OpenSim::Coordinate
methods (perhaps via an actions layer that handles undo/redo etc.):
Is there anyway to access OSC programatically, or how can I find the relevant code for updating locations, say of wirepoints of muscle, in the repo?
No way to access OSC programatically: it's designed as an application with only the UI exposed to end-users. This is (currently) a deliberate decision, because OSC's codebase undergoes very very aggressive changes (in comparison to, OpenSim, which has API users, so must guarantee long-term API stability).
I'd use python+anaconda to do it, or C++ (if you're familiar) against OpenSim itself. The code that OSC's doing to (e.g.) move muscle points around is very generic, because it also has to handle (e.g.) moving offset frames, stations, and so on. Rough breakdown is:
Whenever the user moves the object in the 3D scene then that's turned into an internal undoable function call:
And that function call computes the new location of the (e.g.) OpenSim::PathPoint
and saves it into the model:
But OSC's implementation of this approach is much heavier than what you could write yourself in (e.g.) python, because OSC has to handle it in realtime, with edge-cases, undo/redo support, error fallback (e.g. when muscle pennation angles are wrong) and automatic error rollback to earlier versions, etc. etc.
Thanks for the detailed answer. You are right, essentially I want to set up the same simulation with different joint offsets (this includes moving not only the bones but also the wrapping objects and wire points). Honestly, it may be easier to just modify the XML file directly. The Python API documentation is quite lacking, unless I am looking in the wrong place (could be the case!). Thanks anyway! Harry
No problem. For documentation, I'd recommend this page (tl;dr - use the anaconda version, it's much less painful):
And then you kind of need to translate the C++ doxygen documentation. But an easier way (imo) is to read the Examples/ scripts in opensim-core, or read other python-based projects that use OpenSim, such as Pose2Sim
Hi, thanks for all you work on this. I was using OSC up until last night with no issues on my M1 mac. However after the latest update (7 Nov, Sonoma), it does not seem to open. Here is a part of the crash report: