Python ML and SOFA simulation integration #2946
-
I have been working on an RL problem for quite sometime and i have been looking online for environment simulator. I recently stumbled upon SOFA framework and found the Timishenko Beam plugin to be very close to what i want as an environment simulator. I am requesting for help in integrating the Timoshenko Beam: catheters plugin into python environment . Basically i will be using SOFA framework as an environment simulation. My RL training would look like 1)Start RL python code in anaconda My questions are
PS: I am not a prolific programmer and my knowledge in software is very limited to being able to write simple python scripts. Exchanging information between two softwares or processes is not my domain, but i can learn. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi @snsvsn thanks a lot for your post and your interest in SOFA! To reply your points, some work already performed step by step simulation in the context of simulation of RL. @p-shg should be able to enlighten us! Best. |
Beta Was this translation helpful? Give feedback.
-
Hi @snsvsn It is possible to create a sofa scene and run a step by a step simulation from a pure python3 interpreter. At each simulation step it is also possible to get the simulation state. Restarting a simulation from an existing state is much harder in the general case as it depend on how are implemented the components used in the scene. Not all of sofa component allowed this "interruptile and warm start" behavior. I have no clear view on the current compatibility state on this topic. The solution used in SofaGym was to fork the process to create the different branches of the simulation. I let @p-shg to speak about that. |
Beta Was this translation helpful? Give feedback.
-
Hi From what I understand of your message, what you are trying to develop is quite close to my thesis subject. I can probably help a little. I don't understand what you mean by "Use the information in RL prediction to update the SOFA scene". The SOFA scene is the RL environment, I don't get what you want to predict. Anyways to answer your questions: We have been working on a SofaGym software library. It will be published probably at the end of the month on the SofaDefrost github. We are hoping to include SOFA binaries to make the code easier to run. Hope this helps. If you need further help once the code is released please contact me or Etienne Ménager (https://team.inria.fr/defrost/team-members/etienne-menager/) |
Beta Was this translation helpful? Give feedback.
SofaGym has been released here: https://github.com/SofaDefrost/SofaGym/