Skip to content

Commit

Permalink
fix calls to aligator
Browse files Browse the repository at this point in the history
  • Loading branch information
ManifoldFR committed Feb 9, 2024
1 parent 2aafe57 commit 912e079
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
8 changes: 2 additions & 6 deletions examples/simple_ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
9 changes: 1 addition & 8 deletions python/quadruped_reactive_walking/wb_mpc/ocp_proxddp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 912e079

Please sign in to comment.