Skip to content

Nonconvex trajectory optimization

OpenSCvx

An Open-Source Modular and Extensible Nonlinear Trajectory Optimization Package

From a nonlinear optimal control problem to a dynamically feasible trajectory

Model in Python, compile with JAX, and scale batches on CPU or GPU—successive convexification turns a nonlinear OCP into a sequence of convex subproblems.

Nonlinear Optimal Control Problem
Batched · CPU · GPU

OpenSCvx

JAX · CVXPY
Solution

Trajectory Previews

Click. Drag. Zoom.

Installation instructions

uv pip install openscvx

# Optional: cvxpygen, stljax, jaxlie, mujoco-mjx extras
uv pip install "openscvx[cvxpygen,stl,lie,mjx]"
pip install openscvx

# Optional: cvxpygen, stljax, jaxlie, mujoco-mjx extras
pip install "openscvx[cvxpygen,stl,lie,mjx]"
git clone https://github.com/OpenSCvx/OpenSCvx.git
cd OpenSCvx
uv pip install -e .

# Optional: cvxpygen, stljax, jaxlie, mujoco-mjx extras
uv pip install -e ".[cvxpygen,stl,lie,mjx]"

Home

Why OpenSCvx

Modeling. Dynamics, costs, and constraints are defined together in a structured problem object. The Users Guide is the place to see how the pieces fit from a first model to a solve.

JAX. The symbolic layer lowers to JAX. On the compiled hot paths we jax.jit and immediately jax.export: export is always part of that pipeline, not an extra step you opt into later. CPU and GPU use the same problem definition; performance still depends on problem size and settings.

Vectorization. Two ideas show up in practice: the discretized dynamics and many nonlinear terms are evaluated across decision nodes in parallel inside the solver (see Vectorization and vmapping). When your model has a batch axis you want to treat uniformly—many obstacles, repeated geometry, and similar—ox.Vmap writes that data-parallel piece symbolically and lowers to jax.vmap. It helps avoid hand-written Python loops over those batch dimensions; it is not a general substitute for every outer loop (see Obstacle avoidance with Vmap).

Where to go next

  • Run examples — locate scripts in the repo, run them locally, and browse problem categories.
  • Users guide — modeling, constraints, and visualization.
  • API reference — modules and functions generated from source with docstrings.
  • Examples — runnable scripts organized by topic.