Skip to content

Commit

Permalink
Use ordered split keys in random data generation
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Mar 12, 2024
1 parent 67486e0 commit 5dcfeb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jaxsim/api/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,16 +767,16 @@ def random_model_data(
)

physics_model_state.joint_velocities = jax.random.uniform(
key=k6, shape=(model.dofs(),), minval=ṡ_min, maxval=ṡ_max
key=k4, shape=(model.dofs(),), minval=ṡ_min, maxval=ṡ_max
)

if model.floating_base():
physics_model_state.base_linear_velocity = jax.random.uniform(
key=k4, shape=(3,), minval=v_min, maxval=v_max
key=k5, shape=(3,), minval=v_min, maxval=v_max
)

physics_model_state.base_angular_velocity = jax.random.uniform(
key=k5, shape=(3,), minval=ω_min, maxval=ω_max
key=k6, shape=(3,), minval=ω_min, maxval=ω_max
)

return random_data

0 comments on commit 5dcfeb9

Please sign in to comment.