MCPcopy Create free account
hub / github.com/Simple-Robotics/aligator / test_rk2

Function test_rk2

tests/python/test_rollout.py:95–103  ·  view source on GitHub ↗
(setup_fig)

Source from the content-addressed store, hash-verified

93
94
95def test_rk2(setup_fig):
96 discrete_dyn = IntegratorRK2(ode_dynamics, dt)
97 u0 = np.zeros(discrete_dyn.nu)
98 us = [u0] * nsteps
99 xs = aligator.rollout(discrete_dyn, x0, us).tolist()
100 if DISPLAY:
101 display(xs, dt)
102 e = computeMechanicalEnergy(rmodel, rdata, xs)
103 plt.plot(times_, e, label="RK2")
104
105
106def test_midpoint(setup_fig):

Callers

nothing calls this directly

Calls 2

displayFunction · 0.85
computeMechanicalEnergyFunction · 0.85

Tested by

no test coverage detected