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

Function test_midpoint

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

Source from the content-addressed store, hash-verified

104
105
106def test_midpoint(setup_fig):
107 discrete_dyn = IntegratorMidpoint(ode_dynamics, dt)
108 u0 = np.zeros(discrete_dyn.nu)
109 us = [u0] * nsteps
110 xs = aligator.rollout_implicit(discrete_dyn, x0, us).tolist()
111 if DISPLAY:
112 display(xs, dt)
113 e = computeMechanicalEnergy(rmodel, rdata, xs)
114 plt.plot(times_, e, label="midpoint")
115
116
117if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

displayFunction · 0.85
computeMechanicalEnergyFunction · 0.85

Tested by

no test coverage detected