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

Function lqr_problem_constrained

tests/python/test_solver.py:80–94  ·  view source on GitHub ↗
(lqr_problem)

Source from the content-addressed store, hash-verified

78
79@pytest.fixture
80def lqr_problem_constrained(lqr_problem):
81 problem, nx, nu, x0 = lqr_problem
82 ctrl_fn = aligator.ControlErrorResidual(nx, np.zeros(nu))
83 for stage in problem.stages:
84 stage: aligator.StageModel
85 umin = np.array([-1, -1, -1])
86 umax = np.array([1, 1, 1])
87 stage.addConstraint(ctrl_fn, aligator.constraints.BoxConstraint(umin, umax))
88 space = stage.xspace
89 xf = x0 * 0.9
90 state_fn = aligator.StateErrorResidual(space, nu, xf)
91 problem.addTerminalConstraint(
92 state_fn, aligator.constraints.EqualityConstraintSet()
93 )
94 return lqr_problem
95
96
97@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

addTerminalConstraintMethod · 0.80

Tested by

no test coverage detected