RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': std::exception

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Weichao Gong
Posts: 2
Joined: Sun Feb 26, 2023 11:21 pm

RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': std::exception

Post by Weichao Gong » Sun Mar 19, 2023 11:22 pm

Hi,

I'm using official opensim-python container on Linux. The container is pulled from: https://hub.docker.com/r/stanfordnmbl/opensim-python

When I run the official exmple build_simple_arm_model.py, it end up with an exception:

freeglut (simbody-visualizer): failed to open display ''
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 271, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 118, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 706, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 163, in run_endpoint_function
return await dependant.call(**values)
File "./main.py", line 18, in root
sim()
File "./main.py", line 135, in sim
state = arm.initSystem()
File "/opensim_install/lib/python3.8/site-packages/opensim/simulation.py", line 14600, in initSystem
return _simulation.Model_initSystem(self)
RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': std::exception

It seems that the simbody-visualizer doesn't work.

Could you please give me some guidance about this problem?

Thank you!

Tags:

User avatar
tong niu
Posts: 1
Joined: Sun May 19, 2024 6:25 pm

Re: RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': std::exception

Post by tong niu » Wed May 22, 2024 8:12 pm

Hello! I would like to know if you solved this problem, as I have also encountered the same issue and hope to get some help!

POST REPLY