File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99def 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
You can’t perform that action at this time.
0 commit comments