Skip to content

Commit 0f4b72c

Browse files
committed
Fix disturbance example
1 parent 057cd6c commit 0f4b72c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

examples/disturbance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
def disturbance_fn(data: SimData) -> SimData:
1010
key, subkey = jax.random.split(data.core.rng_key)
1111
states = data.states
12-
disturbance_force = jax.random.normal(subkey, states.force.shape) * 2e-1 # In world frame
13-
states = states.replace(force=states.force + disturbance_force)
12+
disturbance_force = jax.random.normal(subkey, states.force.shape) * 0.2 # N, world frame
13+
states = states.replace(force=disturbance_force)
1414

1515
key, subkey = jax.random.split(key)
16-
disturbance_torque = jax.random.normal(subkey, states.torque.shape) * 2e-4
17-
states = states.replace(torque=states.torque + disturbance_torque)
16+
disturbance_torque = jax.random.normal(subkey, states.torque.shape) * 0.0002 # Nm, world frame
17+
states = states.replace(torque=disturbance_torque)
1818

1919
return data.replace(states=states, core=data.core.replace(rng_key=key))
2020

0 commit comments

Comments
 (0)