Replies: 3 comments 6 replies
-
Hi @WRetagne , were you able to find a fix? We are facing the same issue |
Beta Was this translation helpful? Give feedback.
-
Please note that calling Reset on spacecraft does not restore fully the conditions at the start of the script. In Monte Carlo runs we tend to kill off a BSK simulation and start a new one. The ability to on the fly restore initial setup across all BSK modules would be nice, but we have not rewritten the simulation modules to achieve this. With FSW modules the reset function does typically reset the module to clean initial conditions. @adam-herrmann-95 or @Mark2000 , any thoughts on this as you have worked with Gym interface to BSK? |
Beta Was this translation helpful? Give feedback.
-
As an initial note, our Basilisk RL environment has moved to https://github.com/AVSLab/bsk_rl. Depending on what you’re doing, building off of the new generalized environment in this repo could be the easiest route forward. Our approach (especially with the generalized environment, which is getting the most current development) is to completely delete the Basilisk simulation and any Basilisk components on env.reset and reinstantiate every part. That said, we’re still seeing a very slow memory leak with this environment, though I’ve yet to spend enough time tracing it to blame the leak on Basilisk specifically. Planning to take a closer look in the next month or two, will report back if the root cause is identified. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone,
first of all thank you for developing Basilisk! It's an amazing program with so many capabilities!
I am trying to interface Basilisk with openAI Gym and followed https://bitbucket.org/avslab/basilisk-gym-interface/src/master/ closely.
However, it seems like each time I call the simulation like
rwAttitudeSimulator.RWAttitudeSimulator(.1, 1.0, self.step_duration)
in my reset method the old simulation doesn't get removed from memory. I don't know if this is exactly where the memory leak is coming from. I've tried using tracemalloc to investigate and I see this as a result:The spacecraft.py calls keep growing with each time I reset my environment. If I just loop through my simulation (and therefore just create
rwAttitudeSimulator.RWAttitudeSimulatorr(.1, 1.0, self.step_duration)
once) this doesn't happen, but of course then I am not starting from a clean initial state. Have you encountered something similar before? Do you have any idea where the memory leak might come from?Cheers
Wiebke
Beta Was this translation helpful? Give feedback.
All reactions