Skip to content
WhymustIhaveanamePublic

About

R4R: Renormalization for Robotics - experiments for arXiv:2607.24079, effective simulator parameters measured across MuJoCo, Isaac Sim (PhysX) and MuJoCo Warp

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

R4R: Renormalization for Robotics

Experiments for Effective Parameters, Real Behavior: Renormalization for Robotics — From Infinite Electron Mass to Sim-to-Real Gap, by Youran Sun, Jiaxuan Guo, Xingyu Ren, Chugang Yi and Haizhao Yang.

arXiv PDF BibTeX

A simulator needs effective parameters, which change with the simulation frequency $f$. For PD control, an effective delay $\delta t \propto 1/f$ shifts them as follows:

$$ K_D^{\mathrm{sim}} = K_D^{\mathrm{real}} + \delta t \cdot K_P^{\mathrm{real}}, \qquad J^{\mathrm{sim}} = J^{\mathrm{measured}} + \delta t \cdot K_D^{\mathrm{real}}. $$

The real pendulum and two 200 Hz simulators of it The real double pendulum and two 200 Hz simulators of it

Experiment 1: PD-controlled pendulum

The pendulum is a uniform rod, 1 lb and 1 ft long, under gravity. A PD controller drives it with the ANYmal-C gains of legged_gym: $K_P$ = 80 N m/rad, $K_D$ = 2 N m s/rad. The commands are sines from 0.5 to 8 Hz, held at the control rate. The real pendulum is the exact continuous-time solution. MuJoCo holds an explicit PD torque over each physics step, so $\delta t = h/2$. For each time step $h$, CMA-ES finds the $(J, K_P, K_D)$ with the smallest error against the real trajectory. Every engine uses this fit and this protocol.

Result

At the same simulation frequency, the first-order formula of the paper gives a 36× smaller error. For the same accuracy, it needs 36× less computation.

Flow of the effective parameters

Flow

At second order, backward error analysis gives the effective parameters of Euler + explicit PD (upper sign) and implicitfast + native PD (lower sign):

$$J_e = J \mp \frac{h K_D}{2} - h^2 \frac{J K_P + K_D^2}{12 J}, \qquad K_{P,e} = K_P, \qquad K_{D,e} = K_D - h^2 \frac{K_P K_D}{12 J}$$

The simulator needs the opposite shifts. For a linear plant, the three parameters absorb all of the $h^2$ error. Gravity leaves a remainder that no parameter can absorb. derive_second_order.py derives each step map and checks it numerically.

Experiment 2: chaotic double pendulum

A second, free link hangs from the end of the pendulum of experiment 1. Its mass center is near its hinge, so it tumbles chaotically. The multi-body prediction of the paper is $\mathbf M^{\mathrm{sim}} = \mathbf M^{\mathrm{real}} + \delta t \cdot \mathbf K_D$. In MuJoCo, this is a rotor inertia (armature) on the driven joint.

Result

Chaos turns a small parameter error into a lost trajectory. At 200 Hz, the formula gives a 10× smaller error. For the same accuracy, it needs 11× less computation.

Flow of the effective parameters

Flow

The core trick: the theory gives $K_P$ no counterterm, so the fit leaves $K_P$ out. A free $K_P$ makes the condition number very large, and the fit becomes unstable. This is a good example of how theory helps engineering.

Experiment 3: a pendulum striking a slider

The pendulum of experiment 1 strikes a cube on a spring through a soft contact. The contact needs one more counterterm. Euler and RK4 follow the theory. implicitfast does not, because its contact solver does not see the implicit damping. Details: exp3_slider/README.md.

Isaac Sim: the single pendulum in PhysX

This section repeats experiment 1 in Isaac Sim 5.1. PhysX has no RK4, so the three schemes change the solver and the PD force.

Isaac behaviour

At 200 Hz, the formula gives a 47× smaller error. For the same accuracy, it needs 47× less computation.

Flow of the effective parameters

Isaac flow

The PhysX source is open (NVIDIA-Omniverse/PhysX), so the theory comes from the solver code. TGS substeps the drive but applies gravity once per step. The explicit PD and the PGS drive follow the theory at every control rate. The TGS drive does not: like SuperDex below, it depends on the control rate as well as on $h$.

SuperDex: the single pendulum in Mochi

This section repeats experiment 1 in SuperDex Physics 1.0.1, Meta's Mochi engine, as shipped. Mochi integrates implicitly. The schemes are backward Euler with an explicit PD torque, and BDF2 with Mochi's own PD.

SuperDex behaviour

At 200 Hz, the formula gives a 16× smaller error. For the same accuracy, it needs 16× less computation.

The flow depends on the control rate. Mochi steps the rod in maximal coordinates and applies gravity at the end of the step, and no parameter absorbs these two terms. A joint cannot have less inertia than its link, so backward Euler with Mochi's own PD cannot run, and 32 of the 100 fits of BDF2 stop at this limit.

MuJoCo Warp: the same pendulum on the GPU

This experiment is a high-level sanity check of MuJoCo Warp. It checks whether MuJoCo Warp gives the same results as MuJoCo. It does, so you can safely move from MuJoCo to MuJoCo Warp, and vice versa.

MuJoCo Warp flow

At the same parameters, the trajectories agree to float32 round-off: 2e-7 rad after 800 steps, 1e-6 rad after 16000. The fitted $J$, $K_P$ and $K_D$ agree within 0.04%, and the delay within 0.14%.

Genesis: the same pendulum in another MuJoCo-like engine

This section repeats experiment 1 in Genesis 1.5.0, as shipped (FP32). Its rigid solver follows MuJoCo's, and its Euler and implicitfast integrators are MuJoCo's. Its default, approximate_implicitfast, differs from implicitfast only in how the constraint solver sees the damping. This pendulum has no constraint, so the two agree to round-off, and only Euler and implicitfast are swept. Genesis adds a rotor inertia of 0.1 kg m², seven times the rod's, to every joint that a model file leaves without one. Here it is turned off.

Genesis flow

At the same parameters, the trajectories agree with MuJoCo's to float32 round-off, as MuJoCo Warp's do. The fitted $J$, $K_P$ and $K_D$ agree within 0.02%, and the delay within 0.13%.

Reproduce

uv sync
cd exp1_pendulum
uv run python sanity_check.py
uv run python run_gap.py
uv run python plot_pendulum.py
uv run python run_flow.py
uv run python run_flow.py --cross-seed
uv run python run_flow.py --delay
uv run python run_flow.py --delay --cross-seed
uv run python plot_flow.py
uv run python video.py                 # needs EGL
uv run python derive_second_order.py
uv run python probe_step_map.py

cd ../exp2_double_pendulum
uv run python sanity_check.py
uv run python run_flow.py
uv run python run_flow.py --delay
uv run python plot_flow.py
uv run python run_gap.py
uv run python plot_pendulum.py
uv run python video.py                 # needs EGL

Isaac Sim needs its own Python 3.11 environment, with isaacsim[all]==5.1.0.0 and mujoco.

cd isaac
./launch.sh                                    # one process per scheme; about 3.5 h
$ISAAC_VENV/bin/python run_single.py --arm tgs_explicit --gap   # the behaviour sweep; also tgs_drive and pgs_drive
$ISAAC_VENV/bin/python dump_traj.py single
$ISAAC_VENV/bin/python probe_step_map_isaac.py tgs_explicit 1 4 32
$ISAAC_VENV/bin/python probe_drive_law.py tgs_drive
uv run python plot_isaac_flow.py
uv run python plot_isaac_behaviour.py
uv run python video_isaac.py --exp single

cd ../superdex
uv sync --extra superdex
./launch.sh                                    # about 7 h on 32 cores
uv run --extra superdex python plot_superdex_flow.py default rod
uv run --extra superdex python plot_superdex_behaviour.py

cd ../mjwarp
./launch.sh
cd ../exp1_pendulum
uv run python plot_flow.py --engine mjwarp

cd ../genesis_world
uv sync --extra genesis
uv run --extra genesis python sanity_check.py
./launch.sh                                    # about 10 min on 10 cores
uv run --extra genesis python plot_genesis_flow.py

Citation

@misc{sun2026effective,
      title={Effective Parameters, Real Behavior: Renormalization for Robotics - From Infinite Electron Mass to Sim-to-Real Gap},
      author={Youran Sun and Jiaxuan Guo and Xingyu Ren and Chugang Yi and Haizhao Yang},
      year={2026},
      eprint={2607.24079},
      archivePrefix={arXiv},
      url={https://arxiv.org/abs/2607.24079},
}

About

R4R: Renormalization for Robotics - experiments for arXiv:2607.24079, effective simulator parameters measured across MuJoCo, Isaac Sim (PhysX) and MuJoCo Warp

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages