CALIPSO

Conic Augmented Lagrangian Interior-Point SOlver

https://github.com/thowell/calipso.jl

Science Score: 38.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    1 of 7 committers (14.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.7%) to scientific vocabulary

Keywords from Contributors

contact control differentiable friction gradients locomotion motion-planning reinforcement-learning system-identification trajectory-optimization
Last synced: 10 months ago · JSON representation ·

Repository

Conic Augmented Lagrangian Interior-Point SOlver

Basic Info
  • Host: GitHub
  • Owner: thowell
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Size: 4.45 MB
Statistics
  • Stars: 73
  • Watchers: 3
  • Forks: 11
  • Open Issues: 5
  • Releases: 0
Created over 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md

CI codecov

CALIPSO.jl

Conic Augmented Lagrangian Interior-Point SOlver: A solver for contact-implicit trajectory optimization

The CALIPSO algorithm is an infeasible-start, primal-dual augmented-Lagrangian interior-point solver for non-convex optimization problems. An augmented Lagrangian is employed for equality constraints and cones are handled by interior-point methods.

For more details, see our paper on arXiv.

Standard form

Problems of the following form:

$$ \begin{align} \underset{x}{\text{minimize}} & \quad c(x; \theta) \ \text{subject to} & \quad g(x; \theta) = 0, \ & \quad h(x; \theta) \in \mathcal{K}, \end{align} $$

can be optimized for

  • $x$: decision variables
  • $\theta$: problem data
  • $\mathcal{K}$: Cartesian product of convex cones; nonnegative orthant $\mathbf{R}_+$ and second-order cones $\mathcal{Q}$ are currently implemented

Trajectory optimization

Additionally, problems with temporal structure of the form:

$$ \begin{align} \underset{X{1:T}, \phantom{\,} U{1:T-1}}{\text{minimize }} & CT(XT; \thetaT) + \sum \limits{t = 1}^{T-1} Ct(Xt, Ut; \thetat)\ \text{subject to } & Ft(Xt, Ut; \thetat) = X{t+1}, \quad t = 1,\dots,T-1,\ & Et(Xt, Ut; \thetat) = 0, \phantom{\, _{t+1}} \quad t = 1, \dots, T,\ & Ht(Xt, Ut; \thetat) \in \mathcal{K}t, \phantom{X} \quad t = 1, \dots, T, \end{align} $$

with

  • $X_{1:T}$: state trajectory
  • $U_{1:T-1}$: action trajectory
  • $\Theta_{1:T}$: problem-data trajectory

are automatically formulated, and fast gradients generated, for CALIPSO.

Solution gradients

The solver is differentiable, and gradients of the solution, including internal solver variables, $w = (x, y, z, r, s, t)$ :

$$ \partial w^*(\theta) / \partial \theta, $$

with respect to the problem data are efficiently computed.

Examples

ball-in-cup

drawing

bunny hop

drawing

quadruped gait

drawing

cyberdrift

drawing

rocket landing with state-triggered constraints

cart-pole auto-tuning {open-loop (left) tuned MPC (right)}

acrobot auto-tuning {open-loop (left) tuned MPC (right)}

Installation

CALIPSO can be installed using the Julia package manager for Julia v1.7 and higher. Inside the Julia REPL, type ] to enter the Pkg REPL mode then run:

pkg> add CALIPSO

If you want to install the latest version from Github run:

pkg> add CALIPSO#main

Quick start (non-convex problem)

```julia using CALIPSO

problem

objective(x) = x[1] equality(x) = [x[1]^2 - x[2] - 1.0; x[1] - x[3] - 0.5] cone(x) = x[2:3]

variables

num_variables = 3

solver

solver = Solver(objective, equality, cone, num_variables);

initialize

x0 = [-2.0, 3.0, 1.0] initialize!(solver, x0)

solve

solve!(solver)

solution

solver.solution.variables # x* = [1.0, 0.0, 0.5] ```

Quick start (pendulum swing-up)

```julia using CALIPSO using LinearAlgebra

horizon

horizon = 11

dimensions

numstates = [2 for t = 1:horizon] numactions = [1 for t = 1:horizon-1]

dynamics

function pendulumcontinuous(x, u) mass = 1.0 lengthcom = 0.5 gravity = 9.81 damping = 0.1

[ x[2], (u[1] / ((mass * lengthcom * lengthcom)) - gravity * sin(x[1]) / lengthcom - damping * x[2] / (mass * lengthcom * length_com)) ] end

function pendulumdiscrete(y, x, u) h = 0.05 # timestep y - (x + h * pendulumcontinuous(0.5 * (x + y), u)) end

dynamics = [pendulum_discrete for t = 1:horizon-1]

states

stateinitial = [0.0; 0.0] stategoal = [π; 0.0]

objective

objective = [ [(x, u) -> 0.1 * dot(x[1:2], x[1:2]) + 0.1 * dot(u, u) for t = 1:horizon-1]..., (x, u) -> 0.1 * dot(x[1:2], x[1:2]), ];

constraints

equality = [ (x, u) -> x - stateinitial, [emptyconstraint for t = 2:horizon-1]..., (x, u) -> x - state_goal, ];

solver

solver = Solver(objective, dynamics, numstates, numactions; equality=equality);

initialize

stateguess = linearinterpolation(stateinitial, stategoal, horizon) actionguess = [1.0 * randn(numactions[t]) for t = 1:horizon-1] initializestates!(solver, stateguess) initializeactions!(solver, actionguess)

solve

solve!(solver)

solution

statesolution, actionsolution = get_trajectory(solver); ```

Owner

  • Name: Taylor Howell
  • Login: thowell
  • Kind: user
  • Location: Palo Alto
  • Company: Stanford University

PhD @ Stanford @RoboticExplorationLab @dojo-sim

Citation (CITATION.bib)

@article{howell2022calipso,
	title={{CALIPSO}: {A} {Differentiable} {Solver} for {Trajectory} {Optimization} with {Conic} and {Complementarity} {Constraints},
	author={Howell, Taylor A. and Tracy, Kevin and Le Cleac'h, Simon and Manchester, Zachary},
	year={2022},
    journal={arXiv preprint arXiv:2205.09255},
    url={https://arxiv.org/abs/2205.09255},
}

GitHub Events

Total
  • Issues event: 1
  • Watch event: 8
  • Pull request event: 1
  • Fork event: 2
Last Year
  • Issues event: 1
  • Watch event: 8
  • Pull request event: 1
  • Fork event: 2

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 198
  • Total Committers: 7
  • Avg Commits per committer: 28.286
  • Development Distribution Score (DDS): 0.167
Top Committers
Name Email Commits
taylor t****l@s****u 165
taylor howell t****r@m****l 13
Kevin Tracy k****r@g****m 8
Taylor Howell t****w@g****m 7
taylor t****l@g****m 3
taylor howell t****r@D****t 1
Kevin Tracy 4****y@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 6
  • Total pull requests: 1
  • Average time to close issues: less than a minute
  • Average time to close pull requests: N/A
  • Total issue authors: 4
  • Total pull request authors: 1
  • Average comments per issue: 1.17
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • richardrl (3)
  • EpicDuckPotato (1)
  • JuliaTagBot (1)
  • chenglong0791 (1)
Pull Request Authors
  • mainrs (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • julia 1 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
juliahub.com: CALIPSO

Conic Augmented Lagrangian Interior-Point SOlver

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1 Total
Rankings
Dependent repos count: 9.9%
Forks count: 14.9%
Stargazers count: 15.0%
Average: 19.7%
Dependent packages count: 38.9%
Last synced: 10 months ago