Skip to content
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

How to reset the simulation #4704

Open
candi4 opened this issue May 1, 2024 · 0 comments
Open

How to reset the simulation #4704

candi4 opened this issue May 1, 2024 · 0 comments

Comments

@candi4
Copy link

candi4 commented May 1, 2024

Hello, thank you for good simulator.

I'm attempting to utilize SOFA for RL.
I'd like to create a function for resetting the simulation, but I'm not sure how to go about it.

I have tried the following methods to reset the simulation with SofaPython3, but they have been unsuccessful:

del root
del Sofa
import Sofa
root = Sofa.Core.Node("root")
createScene()
Sofa.Simulation.init(root)
del root
import importlib
importlib.reload(Sofa)
root = Sofa.Core.Node("root")
createScene()
Sofa.Simulation.init(root)
del root
import sys
del sys.modules['Sofa']
root = Sofa.Core.Node("root")
createScene()
Sofa.Simulation.init(root)

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant