From 912e07941d0cdd4e2bbc341c4d476012fa6a24f6 Mon Sep 17 00:00:00 2001 From: ManifoldFR Date: Fri, 9 Feb 2024 17:43:19 +0100 Subject: [PATCH] fix calls to aligator --- examples/simple_ocp.py | 8 ++------ python/quadruped_reactive_walking/wb_mpc/ocp_proxddp.py | 9 +-------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/examples/simple_ocp.py b/examples/simple_ocp.py index 4d1ebee5..6a610a42 100644 --- a/examples/simple_ocp.py +++ b/examples/simple_ocp.py @@ -37,9 +37,7 @@ print("============== PARALLEL ===================") -ocp2 = AlgtrOCPProx( - params, footsteps, base_refs, aligator.LinearSolverChoice.LQ_SOLVER_PARALLEL -) +ocp2 = AlgtrOCPProx(params, footsteps, base_refs) ts = time.time() ocp2.solve(0) @@ -53,9 +51,7 @@ print("============== SERIAL ===================") -ocp3 = AlgtrOCPProx( - params, footsteps, base_refs, aligator.LinearSolverChoice.LQ_SOLVER_SERIAL -) +ocp3 = AlgtrOCPProx(params, footsteps, base_refs, aligator) ts = time.time() ocp3.solve(0) diff --git a/python/quadruped_reactive_walking/wb_mpc/ocp_proxddp.py b/python/quadruped_reactive_walking/wb_mpc/ocp_proxddp.py index 0d74f5aa..de869439 100644 --- a/python/quadruped_reactive_walking/wb_mpc/ocp_proxddp.py +++ b/python/quadruped_reactive_walking/wb_mpc/ocp_proxddp.py @@ -126,18 +126,11 @@ def get_type_str(): class AlgtrOCPProx(AlgtrOCPAbstract): """Solve the OCP using aligator.""" - def __init__( - self, - params: Params, - footsteps, - base_refs, - lsc=aligator.LinearSolverChoice.LQ_SOLVER_PARALLEL, - ): + def __init__(self, params: Params, footsteps, base_refs): print(Fore.GREEN + "[using SolverProxDDP]" + Fore.RESET) mu_init = 1e-11 self.solver = aligator.SolverProxDDP(params.ocp.tol, mu_init) self.solver.force_initial_condition = True - self.solver.linear_solver_choice = lsc self.solver.rollout_type = aligator.ROLLOUT_LINEAR super().__init__(params, footsteps, base_refs)