Skip to content

Commit

Permalink
Make all fields of simulator.JaxSim static, excluding SimulatorData
Browse files Browse the repository at this point in the history
Fixes trace leaks  when jitting vectorized simulations
  • Loading branch information
diegoferigo committed Oct 20, 2023
1 parent e9bb166 commit 0d59772
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jaxsim/simulation/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class JaxSim(Vmappable):
"""The JaxSim simulator."""

# Step size stored in ns in order to prevent floats approximation
step_size_ns: jtp.Int = dataclasses.field(
step_size_ns: Static[jtp.Int] = dataclasses.field(
default_factory=lambda: jnp.array(1_000_000, dtype=jnp.uint64)
)

Expand Down

0 comments on commit 0d59772

Please sign in to comment.