Humans effortlessly manipulate various kinds of fluids in everyday life—from creating intricate latte art to scooping floating objects from water or rolling an ice cream cone. Yet, using robots to augment or replace human labor in these daily settings remains a profound challenge due to the multifaceted complexities of fluid dynamics.
While robots have become increasingly adept at handling rigid objects and even some soft bodies like cloth, fluids remain a "final frontier." Previous research in robotic fluid manipulation has mostly been limited to simple Newtonian fluids (like water) in basic scenarios (like pouring). However, the real world is full of complex fluids that exhibit elastoplastic deformation (frothed milk), non-Newtonian flow (ice cream), or turbulent gas dynamics (air currents). These systems are notoriously difficult to simulate and even harder for robots to control because they involve high-dimensional state spaces and non-linear, non-smooth dynamics.
To bridge this gap, researchers have introduced FluidLab, a comprehensive virtual platform designed to evaluate and train robot learning algorithms on complex fluid systems.
Introducing FluidLab and FluidEngine
FluidLab provides a diverse set of manipulation tasks involving complex fluid dynamics, addressing interactions between solids and fluids, as well as among multiple fluids. At the heart of this platform is FluidEngine, a fully differentiable physics simulator.
Built using Taichi—a domain-specific language embedded in Python—FluidEngine is GPU-accelerated and supports a wide range of materials. It utilizes a hybrid simulation approach: the Moving Least Squares Material Point Method (MLS-MPM) for solids and liquids, and Eulerian grids for gases. This unified framework allows it to simulate interactions between rigid bodies, elastic objects, plasticine, Newtonian and non-Newtonian liquids, and smoke simultaneously.
The Power of Differentiable Physics
The most significant advantage of FluidEngine is its differentiability. Because the engine is fully differentiable, researchers can calculate exact gradients of a loss function with respect to the robot's actions. This allows for gradient-based optimization to solve manipulation challenges that are currently beyond the reach of standard reinforcement learning (RL).
However, simply having gradients isn't enough. Fluid dynamics are naturally "choppy" and non-smooth. Without specialized optimization techniques, gradient-based optimizers frequently get stuck in local minima. To stabilize this optimization, the authors introduced three domain-specific schemes:
- Soft Contact Model: Smooths out the "hard" mathematical jumps that occur when a robot makes contact with a fluid, providing more continuous and informative gradients.
- Temporally Expanding Optimization: A "warm-start" strategy that begins by optimizing short segments of a task before gradually expanding the optimization window to the full time horizon.
- Gradient Sharing: Because fluid particles are physically linked, this scheme allows particles that have successfully reached a goal state to "pull" their neighbors along via shared gradient information.
Benchmarking and Sim-to-Real Results
The FluidLab benchmark consists of 10 diverse manipulation tasks categorized by the fluid's role. In some tasks, the fluid is the manipulation target (e.g., Pouring, Latte Art, Ice Cream, Mixing, and Air Circulation). In others, the fluid acts as a transmitting medium (e.g., using a water jet to transport an object).
When evaluating standard Reinforcement Learning (RL) algorithms (like PPO and SAC), evolution strategies (CMA-ES), and their own Differentiable Physics (DP) approach, the researchers uncovered several key insights:
- Performance Gap: The DP approach outperformed model-free RL and CMA-ES in almost every task, often achieving "near-oracle" performance that matched human operators. DP found near-optimal trajectories with orders of magnitude fewer samples.
- RL Struggles: While model-free RL performed reasonably well on tasks with small observation spaces, it failed completely on complex shape-matching tasks like Latte Art or Ice Cream.
- Sim-to-Real Transfer: The authors successfully transferred optimized trajectories from the simulation to a real-world Franka Emika robot arm. Despite the inevitable "sim-to-real gap" (e.g., real frothed milk behaving slightly differently than simulated milk), the robot successfully executed complex tasks like latte stirring and ice cream squeezing.
Limitations and Future Directions
While FluidLab represents a major step toward general-purpose robotic manipulation, several challenges remain. Most current benchmark tasks involve a single "mode" of action, whereas real-world tasks often require switching between distinct skills (like pouring then stirring) over long horizons.
Additionally, the current system often relies on privileged state representations—knowing the exact position of every fluid particle. In the real world, robots must rely on visual inputs like pixels or point clouds, necessitating future work to bridge the gap between particle-based gradients and computer vision. Finally, while FluidEngine is highly versatile, real-world fluids possess even more nuanced properties (like surface tension) that can be further refined in future iterations of the simulator.
Summary updated