-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown error running SOFAgym TrunkEnv #24
Comments
Hi, It seems that you are using both gym and gymnasium syntax. Can you try to change the allocation of the reset and done by doing "observation = env.reset()" and removing "done = terminated or truncate". Let me know. Etienne |
Hi Etienne,
|
Hi, We fix some error in the last pr. Can you try it? Cheers, Etienne |
Hi, I tried reinstalling but still get the same error. Any other potential reasons for this issue? |
Please make sure you are able to run the SOFA scene https://github.com/SofaDefrost/SofaGym/blob/main/sofagym/envs/Trunk/TrunkScene.py |
Hi @alxbilger yes the TrunkScene and TrunkEnv run fine |
Hi, the error is not expressive and we can't reproduce it on our computer. Could you remove the try at the time of the creation of the scene to check if the problem does not come from here (file simulate.py). Also can you tell me at which precise moment of your test code there is the problem (render, step, reset, ...). Cheers, Etienne |
Hi Etienne, the problem is coming when I run "observation = env.reset()". The creation of the scene "env = gym.make('trunk-v0')" runs fine. Let me know if theres some other way of providing additional information on the error |
Sorry I can't give you an answer directly, as we can't reproduce the error we are doing by trial and error. Can you tell me which line of the reset produces the error? To do this, you can put prints in the AbstractEnv or use a debugger. The ideal would be to have a log a little more precise than the one you sent in your first message (which just tells me that a client is down). Let me know ! Etienne |
I'm having trouble identifying the line in reset of abstractenv that produces the error. I put prints in the "initialization" and "reset" functions of abstractenv which seem to be ok and are present midway through the log below. I can also look into TrunkEnv to see if placing print statements there makes the problem clear |
Right, seems that everything is good during the make env. But I don’t see the message during the second initialisation … Can you check your test with another scene please. Etienne |
Hi Etienne, I tried with the cartstem scene and env instead. The error seems to be slightly more informative than last time, but its still complaining about subprocess.py. See the new log attached Does my gym environment registration seem ok? |
Could you please try to run some of the scenes like trunk and cartstem using runSofa not python. |
Hi Tom, Yes, Samuel is right. In the new_log.txt we can see this error: Traceback (most recent call last): There is a problem in the construction of the scene. Perhaps this error is cause by the scene (and so you can see it with runSofa) or with some parameters you use during the simulation. Try to replace in simulate.py the lines (l.40-44) try: with just create_scene = importlib.import_module("sofagym.envs."+scene+"." + scene + "Scene").createScene to see what is the problem with this import. Let me know Etienne |
Thanks both for your continued help. Please find attached the updated log when I use runSofa TrunkScene.py instead of python. It looks like its missing the "linear solver" component. Are there additional plugins I need to download? I cloned sofagym and downloaded the following binaries: |
DefrostSofaBundle is outdated. Is is based on Sofa v22.06. You should use the latest binaries of Sofa. |
Thanks @alxbilger
This forum has a similar problem, but I'm not sure how to resolve the issue: |
Do you set your pythonpath to the sofapython3 plugin ? |
Yes, and I'm still getting the same error (whether I use a relative or absolute path for the Sofapython3 library)
|
Hi
I'm trying to compile the example TrunkEnv, using a simple python function:
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.
The text was updated successfully, but these errors were encountered: