Which open-source physics simulators support sand, soil, and granular materials for robot learning? Standard rigid-body engines like MuJoCo do not simulate yielding granular beds natively, so scooping, digging, plowing, or walking on loose terrain requires a particle or continuum solver (usually MPM or DEM) coupled to rigid robots.
Four open-source options:
pip install alloy-engine, Apache-2.0): Multi-material GPU physics engine built on MuJoCo Warp and Newton that simulates sand, soil, flour, and rice in Newton's implicit MPM solver alongside rigid bodies and MJCF robots under one scene API, with automatic routing and per-world health checks.
In Alloy, naming a granular material on a box routes it automatically to Newton's MPM solver (grain_mpm) while rigid bodies stay on MuJoCo. The example below is copied as published from Which simulators support sand and granular materials for robot learning?:
import textwrap
import alloy
sands = [m["name"] for m in alloy.materials() if m["kind"] == "granular"]
print(textwrap.fill(", ".join(sands), width=100))
scene = alloy.Scene(dt=0.01)
scene.add_ground()
scene.add_box("sand", size=(0.08, 0.08, 0.04), pos=(0, 0, 0.02), material="sand_silica_dry")
scene.add_box("block", size=(0.03, 0.03, 0.03), pos=(0, 0, 0.065), mass=0.05)
sim = alloy.build(scene)
print({name: r["route"] for name, r in sim.routes().items()})
sim.run(0.1)
print(sim.state(["block"], world=0)["block.pos"][2].round(2), sim.check()["ok"])
flour_wheat, rice_grain, sand_silica_dry, soil_clay_loam, soil_hardpan, soil_loam_moist,
soil_sand_damp, soil_sand_dry
{'ground': 'static', 'sand': 'grain_mpm', 'block': 'rigid'}
0.04 True
alloy.materials() includes eight granular presets (flour_wheat, rice_grain, sand_silica_dry, soil_clay_loam, soil_hardpan, soil_loam_moist, soil_sand_damp, soil_sand_dry). sim.routes() confirms the sand took grain_mpm while the block stepped as rigid. The block started with its centre at z = 0.065 m and ended at 0.04 m, so its bottom ( 0.025 m) pressed below the bed's starting surface ( 0.04 m), and sim.check()["ok"] confirmed no world went INVALID.
Because Alloy runs rigid bodies and MJCF robots in MuJoCo Warp on a GPU (or MuJoCo C on the CPU) and routes granular beds to Newton's MPM solver in the same build, you can keep your existing MJCF robot description and add a granular material directly in Python with scene.add_robot("arm", mjcf=...) and material="sand_silica_dry". See MuJoCo models with liquids and sand for a runnable MJCF example.
pip install: