Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

License: Apache 2.0


What is OpenSCvx

OpenSCvx is a general python-based successive convexification implementation which uses a JAX backend. It is designed to be easy to use for anyone and fast enough for everyone, all while being open and modular for contributors.

OpenSCvx provides a clean symbolic interface for problem definition which should be intuitive to users of NumPy, JAX, and CVXPY. This allows us to hide a lot of the under-the-hood magic away from the user while also providing a modular architecture, enabling contributors to focus on the algorithms without worrying about interface design.

OpenSCvx makes heavy use of JAX to efficiently perform calculations in the successive convex programming loop through automatic differentiation, ahead-of-time (AOT) compilation, vectorization, and GPU acceleration. Behind this is a CVXPY-based backend to solve the convex subproblems.

This is an open project and is under active development. Try it out, give us feedback, and help contribute.

import openscvx as ox

g = 9.81

# Define states
position = ox.State("position", shape=(2,))
position.min = [0.0, 0.0]
position.max = [10.0, 10.0]
position.initial = [0.0, 10.0]
position.final = [10.0, 5.0]

velocity = ox.State("velocity", shape=(1,))
velocity.min = [0.0]
velocity.max = [10.0]
velocity.initial = [0.0]
velocity.final = [ox.Free(10.0)]

# Define control (angle from vertical)
theta = ox.Control("theta", shape=(1,))
theta.min = [0.0]
theta.max = [1.755]
theta.guess = [[0.09], [1.755]]

# Define dynamics
dynamics = {
    "position": ox.Concat(
        velocity * ox.Sin(theta),
        -velocity * ox.Cos(theta),
    ),
    "velocity": g * ox.Cos(theta),
}

constraints = []
for state in [position, velocity]:
    constraints.append(ox.ctcs(state <= state.max))
    constraints.append(ox.ctcs(state.min <= state))

# Build and solve
problem = ox.Problem(
    dynamics=dynamics,
    constraints=constraints,
    states=[position, velocity],
    controls=[theta],
    time=ox.Time(initial=0.0, final=ox.Minimize(2.0), min=0.0, max=2.0),
    N=2,
)


problem.initialize()
results = problem.solve()
results = problem.post_process()

Installation

OpenSCvx is available on PyPI and can be trivially installed with pip.

It is recommended to install OpenSCvx inside a virtual environment (venv, conda, uv, etc.). If you don't already have one set up:

python3 -m venv .venv
source .venv/bin/activate

Using pip

pip install openscvx

Using uv

If you have uv installed you can prefix the commands with uv for faster installation:

uv pip install openscvx

Installing From Source

Using pip

git clone https://github.com/OpenSCvx/OpenSCvx.git
cd OpenSCvx

python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Using uv

git clone https://github.com/OpenSCvx/OpenSCvx.git
cd OpenSCvx

uv venv
source .venv/bin/activate
uv pip install -e .

Documentation

Check out the OpenSCvx documentation:

Running the Examples

We also have a selection of problems in the examples/ folder as well as on the Examples page of the documentation. The example trajectory optimization problems are grouped by application and represent some of the problem types that can be solved by OpenSCvx.

To run a problem simply run any of the examples directly, for example:

python3 examples/abstract/brachistochrone.py

and adjust the plotting as needed.

Check out the problem definitions inside examples/ to see how to define your own problems.

Code Structure

What is implemented

This repo has the following features:

  1. Free Final Time
  2. Fully adaptive time dilation (s is appended to the control vector)
  3. Continuous-Time Constraint Satisfaction
  4. FOH and ZOH exact discretization (t is a state so you can bring your own scheme)
  5. Vectorized and Ahead-of-Time (AOT) Compiled Multishooting Discretization
  6. JAX Autodiff for Jacobians

(back to top)

Third-Party Integrations

OpenSCvx integrates with several optional third-party packages. Each installs as a pip extra (pip install openscvx[<extra>]); without it, the library and its tests degrade gracefully — the corresponding tests simply skip. Integrations with a badge are tested against main on every push and re-checked weekly against the latest upstream releases.

Integration Extra Provides Status
MuJoCo MJX mjx MJX dynamics adapter (openscvx.integrations) mjx
jaxlie lie SO(3)/SE(3) Lie-group operations and IK initialization jaxlie
qpax qpax JAX-native QP solver backend qpax
CVXPYGen cvxpygen Generated C solver code for the convex subproblem cvxpygen
moreau moreau Licensed QP solver backend moreau
stljax stl Signal Temporal Logic robustness bridge stljax
frax frax Robot dynamics for the manipulator examples frax

(back to top)

Acknowledgements

This work was supported by a NASA Space Technology Graduate Research Opportunity and the Office of Naval Research under grant N00014-17-1-2433. The authors would like to acknowledge Natalia Pavlasek, Fabio Spada, Samuel Buckner, Abhi Kamath, Govind Chari, and Purnanand Elango as well as the other Autonomous Controls Laboratory members, for their many helpful discussions and support throughout this work.

Citation

Please cite the following works if you use the repository,

@misc{hayner2026openscvxopensourcemodularextensible,
      title={OpenSCvx: An Open-Source Modular and Extensible Nonlinear Trajectory Planning Package}, 
      author={Christopher R. Hayner and Griffin J. Norris and Fabio Spada and Samet Uzun and Avi Mittal and Behcet Acıkmese and Karen Leung},
      year={2026},
      eprint={2608.21631},
      archivePrefix={arXiv},
      primaryClass={cs.RO},
      url={https://arxiv.org/abs/2608.21631}, 
}
@article{elango2025ctcs,
title = {Continuous-time successive convexification for constrained trajectory optimization},
journal = {Automatica},
volume = {180},
pages = {112464},
year = {2025},
issn = {0005-1098},
doi = {https://doi.org/10.1016/j.automatica.2025.112464},
url = {https://www.sciencedirect.com/science/article/pii/S0005109825003589},
author = {Purnanand Elango and Dayou Luo and Abhinav G. Kamath and Samet Uzun and Taewan Kim and Behçet Açıkmeşe},
keywords = {Trajectory optimization, Optimal control, Continuous-time constraint satisfaction, Sequential convex programming},
}
@article{chari2026qoco,
  title = {QOCO: a quadratic objective conic optimizer with custom solver generation},
  author = {Chari, Govind M. and A\c{c}ıkmeşe, Beh\c{c}et},
  journal = {Mathematical Programming Computation},
  issn = {1867-2957},
  url = {http://dx.doi.org/10.1007/s12532-026-00311-8},
  doi = {10.1007/s12532-026-00311-8},
  publisher = {Springer Science and Business Media LLC},
  year = {2026},
  month = mar,
}

Additionally please run problem.citation() to generate the appropriate bibtex citations for the corresponding components used within your problem.

Metadata

Release files for openscvx 0.5.3.dev57

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openscvx 0.5.3.dev57
File Size Uploaded
openscvx-0.5.3.dev57.tar.gz 51.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for openscvx 0.5.3.dev57
File Interpreter ABI Platform
openscvx-0.5.3.dev57-py3-none-any.whl Python 3 none any Details

Total release size: 52.2 MB

Release files / openscvx-0.5.3.dev57.tar.gz

Download URL openscvx-0.5.3.dev57.tar.gz
Size 51.6 MB
Tags Source
SHA-256 checksum
How to use checksums
625f4c88d602583310579e8daa3db958e2ed8241eb70502ba34d6b12a1a01256
BLAKE2b-256 checksum
How to use checksums
e006d43c305ebdf78d8b53300ec33b84b256421f30a4feb580ba2748870e8372
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / openscvx-0.5.3.dev57-py3-none-any.whl

Download URL openscvx-0.5.3.dev57-py3-none-any.whl
Size 568.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45c0f13f5728091c2af82e59f95709efc880f8c46eb8c23f5e0cc056ad12942c
BLAKE2b-256 checksum
How to use checksums
2249c1971537ade5e3abcfa664d894ca478c7d8c3eb1d5c55421da1c5b3d3967
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.5.3.dev57 This release

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

1 release file

0.2.1

1 release file

0.1.3

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page