opensim-core: Run time error when trying to visualize the sim
Ubuntu 22.04, Python 3.9.15, and opensim 4.4.
I am getting the following errors when I set the visualize=True, it runs when I set the visualize=False.
RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': SimTK Exception thrown at VisualizerProtocol.cpp:162:- /home/aurelien/anaconda3/envs/opensim/simbody/libexec/simbody/Final system error was errno=2 (No such file or directory). (Required condition ‘status == 0’ was not met.)
RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': std::exception
These are the steps I took to create my conda environment
- conda create -n opensim python=3.9
- conda activate opensim
- conda install -c opensim-org opensim=4.4=py39np120
Am I missing an install step to be able to visualize the sim?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (16 by maintainers)
I have been having issues making the opensim-core on various Ubuntus. If following the build instructions is not working then another way to get the visualisation to work in conda on Ubuntu is:
This should allow you to enable visualisation.
A little update to this issue @aymanhab @nickbianco :
conda install -c opensim-org opensim, and activate visualization, it crashes. I was able to get a complete error message in Ubuntu 22.04. Is esentially the same error we where getting initially, but now it shows that the executable ‘simbody-visualizer’ cannot be found.I have checked the conda package from https://anaconda.org/opensim-org/opensim, and the simbody-visualizer executable is not present. I think this is the reason why @A-Artemis could not use it on Ubuntu 22.04, and why it is failing in the colab notebooks.
If I install opensim-core from scratch, and try to execute the visualizer on isolation, I get
RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': std::exception. After executing/home/albert/opensim-core/sdk/Simbody/libexec/simbody/simbody-visualizer: error while loading shared libraries: libSimTKcommon.so.3.8: cannot open shared object file: No such file or directoryas @A-Artemis suggested, it can be executed on isolation.If I add the directory
/home/albert/opensim-core/sdk/Simbody/libexec/simbody/to conda path withconda develop, the new path is shown in the error as a place where it looked for the executable, but it is still throwing the same error (even with the executable in one of the directories now). If I add it to PYTHONPATH, there is not difference either.@A-Artemis, @mrrezaie Thank you for looking into this!. I will test against the google colab tutorials and get back to you with the results.
This is the only solution that I have found that allows me to use the visualizer for 4.4 (On Ubuntu 22 and Python 3.11).
~/.bashrccd ~/opensim-core/sdk/Pythonand check thatsetup.pyandopensimare present.pip install -e .It should now be possible to run with the visualizer!