Skip to content

Unknown error running SOFAgym TrunkEnv #24

@tdillonmit

Description

@tdillonmit

Hi

I'm trying to compile the example TrunkEnv, using a simple python function:

import gym
import sofagym.envs
import time

import sofagym

env = gym.make('trunk-v0')
observation, info = env.reset()

done = False
while not done:
    action = env.action_space.sample()  # this is where you would insert your policy
    observation, reward, done, info = env.step(action)
    env.render()

    done = terminated or truncated
   
env.close()

The terminal output errors are below. The line "observation, info = env.reset()" seems to be causing this. I'm using the SOFA binaries on Windows 10 with Python 3.7.

[INFO]    [PluginManager] Loaded plugin: C:/Users/Tom/Documents/sofa_build/sofa_build/bin/Sofa.GL.Component.Shader.dll
[INFO]    [PluginManager] Loaded plugin: C:/Users/Tom/Documents/sofa_build/sofa_build/bin/Sofa.Component.LinearSolver.Preconditioner.dll
[INFO]    [PluginManager] Loaded plugin: C:/Users/Tom/Documents/sofa_build/sofa_build/bin/SofaComponentAll.dll
[INFO]    [PluginManager] Loaded plugin: C:/Users/Tom/Documents/sofa_build/sofa_build/bin/STLIB.dll
[INFO]    [PluginManager] Loaded plugin: C:/Users/Tom/Documents/sofa_build/sofa_build/bin/SoftRobots.dll

########## SIG 11 - SIGSEGV: segfault ##########
  sofa::helper::BackTrace::dump
  sofa::helper::BackTrace::sig
  seh_filter_exe
  seh_filter_exe
  _C_specific_handler
  _chkstk
  RtlRaiseException
  KiUserExceptionDispatcher
  PyObject_GetAttrString
  sofapython3::PythonEnvironment::getStaticData
  initExternalModule
  sofapython3::PythonEnvironment::getPythonCallingPointAsFileInfo
  sofapython3::PythonEnvironment::getPythonCallingPointAsFileInfo
  sofapython3::PythonEnvironment::getPythonCallingPointAsFileInfo
  sofapython3::PythonEnvironment::getPythonCallingPointAsFileInfo
  PyMethodDef_RawFastCallKeywords
  PyCFunction_FastCallKeywords
  PyMethodDef_RawFastCallKeywords
  PyEval_EvalFrameDefault
  PyEval_EvalCodeWithName
  PyMethodDef_RawFastCallKeywords
  PyEval_EvalFrameDefault
  PyEval_EvalCodeWithName
  PyMethodDef_RawFastCallKeywords
  PyEval_EvalFrameDefault
  PyEval_EvalCodeWithName
  PyEval_EvalCodeEx
  PyEval_EvalCode
  PyArena_Free
  PyRun_FileExFlags
  PyRun_SimpleFileExFlags
  PyRun_AnyFileExFlags
  Py_UnixMain
  Py_UnixMain
  PyErr_NoMemory
  Py_Main
  Py_Main
  Py_Main
  BaseThreadInitThunk
  RtlUserThreadStart
Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python37\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "c:\users\tom\documents\sofagym-main\sofagym\rpc_server.py", line 528, in deferredStart
    check=True)
  File "C:\Program Files\Python37\lib\subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\Program Files\\Python37\\python.exe', 'c:\\users\\tom\\documents\\sofagym-main/sofagym/rpc_client.py', "{'scene': 'Trunk', 'deterministic': True, 'source': [300, 0, 80], 'target': [0, 0, 80], 'goalList': [[40, 40, 100], [-10, 20, 80]], 'start_node': None, 'scale_factor': 5, 'timer_limit': 250, 'timeout': 50, 'display_size': (1600, 800), 'render': 1, 'save_data': False, 'save_image': False, 'save_path': 'c:\\\\users\\\\tom\\\\documents\\\\sofagym-main\\\\sofagym\\\\envs\\\\Trunk/Results/Trunk', 'planning': False, 'discrete': True, 'seed': None, 'start_from_history': None, 'python_version': 'python3', 'dt': 0.01, 'save_path_image': None, 'save_path_results': None, 'goal_node': 1, 'goalPos': [-10, 20, 80]}", '16', '62505']' returned non-zero exit status 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions