I'm trying to use reinforcement learning in Webots with keras-rl, but resetting the world with supervisor bot kills the whole python process. Is there a way to reset the simulation without killing the process?
I'm running Ubuntu and using IntelliJ Idea for running the bot.
robot.simulationReset() # this resets the simulation
# here the whole process dies
edit. The basic structure I'm having now is like this
Also tried to start and kill the whole simulator with subprocess.Popen, but it didn't work because the controller does not reconnect to simulator. It also cannot be initialized again because of some internal logic preventing initialization more than once.