Skip to content

Commit

Permalink
fix E741
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed May 14, 2024
1 parent 9c35d8c commit 67b1a38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/notebooks/solutions/cartpole_dyn.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ def cartpole_dynamics(model, data, x, u):
f = u[0].item()

# Shortname for system parameters
m1, m2, l, g = model.m1, model.m2, model.l, model.g
m1, m2, le, g = model.m1, model.m2, model.l, model.g
s, c = np.sin(th), np.cos(th)

# Defining the equation of motions
m = m1 + m2
mu = m1 + m2 * s**2
xddot = (f + m2 * c * s * g - m2 * l * s * thdot) / mu
thddot = (c * f / l + m * g * s / l - m2 * c * s * thdot**2) / mu
xddot = (f + m2 * c * s * g - m2 * le * s * thdot) / mu
thddot = (c * f / le + m * g * s / le - m2 * c * s * thdot**2) / mu

return [xddot, thddot]

0 comments on commit 67b1a38

Please sign in to comment.