InfinyTech3D / SofaUnity

SOFA-Renderer asset for Unity
Other
26 stars 4 forks source link

Resetting the scene in beamadapter demo to train agent #110

Open jhiltonjones opened 2 months ago

jhiltonjones commented 2 months ago

Hi, I have been enjoying your work.

I have been trying to train an agent within the beamadpter demo scene, however, when the episode ends I cannont reset the scene. How can I reload the scene without the environment crashing? Is there a way to reset the catheter to its orignial position?

Thank you

epernod commented 2 months ago

Hi,

thank you. The best way would be to have main scene that load/unload/reload the BeamAdapter scene. Then you could gather the catheter navigation position at the end of each simulation and process some training. You can check what is done in the tests: https://github.com/InfinyTech3D/SofaUnity/blob/main/Tests/api/ScenesTestRunner.cs we are loading successive SofaUnity scenes to execute and test them.

Then, from what I understand, the main issue is that the scene is crashing at end? Could you share the logs

Thank you