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

`model.initSystem()` quits without warning after `model.setUseVisualizer(True)`

Open ParticularMiner opened this issue 2 years ago • 1 comments

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.

ParticularMiner avatar Jun 27 '22 19:06 ParticularMiner

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

aymanhab avatar Jul 07 '22 20:07 aymanhab

Please re-open if you are still having this issue. Thanks!

jenhicks avatar Nov 23 '22 19:11 jenhicks