Page 1 of 1

Problem with Simbody-Visualizer on Linux

Posted: Mon Jul 08, 2024 4:04 pm
by mbebelveras
Hi,

I'm trying to run OpenSim with Python on Ubuntu 22.04 with no success.

I installed the newest version of Anaconda, created a new environment with Python 3.11, and installed the OpenSim packages following the instructions at https://anaconda.org/opensim-org/opensim

However, when I try to run the build_simple_arm_model.py script, the following error occurs:

RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': SimTK Exception thrown at VisualizerProtocol.cpp:167:
Error detected by Simbody method VisualizerProtocol::ctor(): Unable to spawn executable 'simbody-visualizer' from directories:
/home/bel/anaconda3/envs/opensim0/bin/
/home/bel/anaconda3/envs/opensim0/bin/
/home/bel/anaconda3/condabin/
/home/bel/opensim-core/bin/
/home/bel/perl5/perlbrew/bin/
/home/bel/perl5/perlbrew/perls/perl-5.32.0/bin/
/home/bel/bin/
/usr/local/sbin/
/usr/local/bin/
/usr/sbin/
/usr/bin/
/sbin/
/bin/
/usr/games/
/usr/local/games/
/snap/bin/
/home/bel/anaconda3/envs/opensim0/libexec/simbody/
/home/bel/anaconda3/envs/opensim0/simbody/libexec/simbody/Final system error was errno=2 (No such file or directory).
(Required condition 'status == 0' was not met.)
I'm very new to Python. Has anyone run into the same error?

Re: Problem with Simbody-Visualizer on Linux

Posted: Tue Jul 09, 2024 2:19 pm
by kernalnet
Hi, the simbody-visualizer is likely not included in the conda opensim package for Linux. A workaround is to install simbody separately: https://anaconda.org/conda-forge/simbody (You may also need to re-install opensim afterwards).
Must wait until the developers fix this.

Re: Problem with Simbody-Visualizer on Linux

Posted: Tue Jul 09, 2024 3:56 pm
by mbebelveras
Thank You.

It partially solved the problem.
After installing simbody and re-installing opensim I got two more errors. The first:
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
freeglut (simbody-visualizer): Unable to create OpenGL 1.0 context (flags 0, profile 0)
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 47
Current serial number in output stream: 48
I solved preloding libstdc++.so.6 before opening spyder from the terminal

Code: Select all

 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 spyder & 
The second one I could not solve.
RuntimeError: std::exception in 'SimTK::State const & OpenSim::Manager::integrate(double)': SimTK Exception thrown at VisualizerProtocol.cpp:458:
Error detected by Simbody method VisualizerProtocol: An attempt to write() 1 bytes to pipe 79 failed with errno=32 (Broken pipe).
(Required condition 'status!=-1' was not met.)
Any idea on how to fix this one ?

I'm having a similar error when running another example using matlab.