-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Describe the Bug
Fluid physics does not reflect changes in fluid parameters and immersion properties until Webots is reset: When inserting a fluid into Webots or modifying an existing fluid's parameters, the physics engine does not reflect any of the changes when the simulation is ran. Instead, the physics behaves based on the original fluid parameters (or lack thereof). The only way to force the physics engine to recognise the fluid changes is to reload the .wbt file entirely manually or via custom script. Using supervisor commands (reload, reset from user interface, reset from supervisor, load node's state from supervisor, reset physics, reset node's physics) does not trigger the engine to recognise the new parameters, only a hard reset does.
Steps to Reproduce
- Launch Webots and .wbt world that contains a fluid and a solid with immersionproperties.
- Run simulation with current fluid parameters. Note variables such as torque or force.
- Place a new fluid, or update the existing fluid's parameters.
- Rerun simulation without closing and reopening .wbt file.
- Note that variables such as torque and force have not changed despite changes in fluid parameters.
Expected behavior
Fluid-related physics is expected update whenever the fluid and immersionproperties change. Preferably, automatically even if changed mid-simulation run via supervisor, but at the very least it should be updated when the reset from UI is done such that subsequent simulation runs recognise the new fluid and immersionproperties parameters.
System
- Operating System: Windows 11
- Processor: AMD Ryzen 5 5600X 6-Core Processor
- Installed RAM: 64 GB
- Graphics Card: NVIDIA GeForce RTX 3070 8 GB GDDR6
Additional context
My use case is to be able to change fluid parameters and immersion properties without having to do a hard reset to the .wbt file every time. I'm using the fluid node as a step-in for soil, and using fluid properties to simulate soil resistance acting on a wheel. This is tedious to do when running manual simulations, but the main issue is that it adds a level of complexity (and in some cases a major obstacle that isn't trivial to work around) when I use an external optimization script that modifies the .wbt file and a supervisor that calculates fluid properties at various intervals during the run.