Commit 92ea2532 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

Merge remote-tracking branch 'main/devel' into topic/format

parents 0c565b76 2fb8a27b
Pipeline #3974 passed with stage
in 41 seconds
from centroidal_utils import createPhiFromContactSequence, createMultiphaseShootingProblem, createSwingTrajectories
[flake8]
max-line-length = 119
exclude = examples/notebooks,crocoddyl/__init__.py,cmake,unittest/sandbox
exclude = examples/notebooks,crocoddyl/__init__.py,crocoddyl/locomotion/__init__.py,cmake,unittest/sandbox
ignore = N802,N803,N806
[yapf]
......
......@@ -10,7 +10,7 @@ np.set_printoptions(linewidth=np.nan, suppress=True)
# -------------------------------------------------------------------------------
nq = 10
nu = 10
nu = 5
nv = nq
dmodel = DifferentialActionModelLQR(nq, nu, driftFree=False)
......@@ -101,7 +101,6 @@ for i in range(4):
assert (np.isclose(data.dy_dx[i][:, nv:], dy_dv(i), atol=tolerance).all())
mnum.calcDiff(dnum, x, u)
print(norm(data.Lx - dnum.Lx), norm(data.Lu - dnum.Lu))
assert (norm(data.Fx - dnum.Fx) < 1e2 * mnum.disturbance)
assert (norm(data.Fu - dnum.Fu) < 1e2 * mnum.disturbance)
assert (norm(data.Lu - dnum.Lu) < np.sqrt(2 * mnum.disturbance))
......@@ -120,6 +119,8 @@ Lxx0 = df_dx(lambda _x: get_attr_analytical(_x, u, "Lx"), a2m(x), h=eps)
Lxu0 = df_dx(lambda _u: get_attr_analytical(x, _u, "Lx"), a2m(u), h=eps)
Luu0 = df_dx(lambda _u: get_attr_analytical(x, _u, "Lu"), a2m(u), h=eps)
assert (norm(Lxx0 - data.Lxx) < np.sqrt(mnum.disturbance))
assert (norm(Lxu0 - data.Lxu) < np.sqrt(mnum.disturbance))
# assert (norm(Luu0 - data.Luu) < np.sqrt(mnum.disturbance)) TODO: What is this Luu0 ?
assert (norm(Luu0 - data.Luu) < np.sqrt(mnum.disturbance))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment