opensim-core
opensim-core copied to clipboard
`model.initSystem()` quits without warning after `model.setUseVisualizer(True)`
Just thought I'd make a note here, since it seems others have also encountered this problem. The following Python snippet failed on my Windows 10 laptop, mysteriously quitting without any warning whatsoever:
...
osimModel = osim.Model(modelFilename)
osimModel.setUseVisualizer(True)
state = osimModel.initSystem()
Heh. It turned out that I needed to set the PATH
environment variable (in the shell) as follows:
set PATH=%PATH%;"C:\OpenSim 4.3\Geometry"
I suppose it would be more helpful to the end-user if an informative error message is displayed to expose this condition.
That shouldn't be the case since Geometry folder contains only mesh files which are not loaded as runtime and mesh loading doesn't use the PATH! Need more investigation
Please re-open if you are still having this issue. Thanks!