Skip to content

Commit 699d262

Browse files
committed
Small change to example
1 parent 21e9250 commit 699d262

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/simulate_planar_pcs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ def draw_robot(
101101
strain_basis, forward_kinematics_fn, dynamical_matrices_fn, auxiliary_fns = (
102102
planar_pcs.factory(sym_exp_filepath, strain_selector)
103103
)
104+
# jit the functions
105+
dynamical_matrices_fn = jax.jit(partial(dynamical_matrices_fn, include_coriolis=True))
104106
batched_forward_kinematics = vmap(
105107
forward_kinematics_fn, in_axes=(None, None, 0), out_axes=-1
106108
)
@@ -241,3 +243,4 @@ def draw_robot(
241243
video.write(img)
242244

243245
video.release()
246+
print(f"Video saved at {video_path}")

0 commit comments

Comments
 (0)