Repository navigation
Render GUI after each step in SofaPython3 #3170
|
Hi, When using SofaPython3, is it possible to use So far the examples I have read either do |
Replies: 2 comments 3 replies
|
Hi @3van0 Indeed, when trigger the SOFA GUI, the control of the simulation is given to the GUI. The python script is therefore not anymore in control. To control the simulation steps while rendering it in python, I know some devs are using SOFA with vedo (as rendering engine). Maybe @RobinEnjalbert could give us some insight? |
|
Hi @3van0, Sorry for the late reply.
That's why we use an external tool written with Vedo to render the objects at each time step while our python code drives the simulation. This rendering window is obviously not interactive for the same reasons but at least it allows you to visualize things. Our tool is a part of a large project (DeepPhysX), aiming at interfacing AI with simulation. You might find examples in the SOFA repository of the project, but first I can give you a few leads:
Since you work with reinforcement learning, I urge you to discover our DeepPhysX framework (it is not suitable for RL for now but in a next version coming soon). Hope this helps you ! |
Hi @3van0,
Sorry for the late reply.
As Hugo explained, your simulation can be driven either by the SOFA GUI either by your python code:
onAnimateBeginEventoronAnimateEndEvent);Sofa.Simulation.animate, you must do it without GUI.That's why we use an external tool written with Vedo to render the objects at each time step while our python code drives the simulation. This rendering window is obviously not interactive for the same reasons but at least it allows you to visualize things.
Our tool is a part of a large pro…