OpenSCvx: An Open-Source Modular and Extensible Nonlinear Trajectory Planning Package
Authors: Christopher R. Hayner, Griffin J. Norris, Fabio Spada, Samet Uzun, Avi Mittal, Behcet Acıkmese, Karen Leung
Organizations: Dept. of Aeronautics and Astronautics, University of Washington, Seattle, WA, USA. · General Robotics, Seattle, WA, USA. · Dept. of Mechanical Engineering, University of California, Berkeley, Berkley CA, USA. · Zoox, San Francisco, CA, USA. · Dept. of Electrical Engineering and Computer Sciences, University of California, Berkeley, Berkley CA, USA.
Trajectory optimization computes dynamically feasible motions that enable autonomous systems to accomplish complex tasks while satisfying operational and environmental constraints. This tutorial presents OpenSCvx, an open-source Python framework that bridges the gap between high-level problem specification and efficient numerical optimization. Rather than requiring users to derive solver-specific mathematical formulations, OpenSCvx provides a symbolic modeling interface that automatically constructs and solves trajectory optimization problems from modular descriptions of objectives, dynamics, and constraints. Beyond simplifying problem formulation, OpenSCvx supports (i) continuous-time constraint modeling, (ii) temporal and logical specifications, (iii) automatic vectorization for scalable and batched optimization, and (iv) a modular architecture that enables new algorithms, models, and solver backends to be incorporated with minimal effort. These capabilities allow researchers and practitioners to rapidly prototype, solve, and extend state-of-the-art trajectory optimization methods.
Figures & tables
Fig. 1 : Example trajectory generated with OpenSCvx : a quadrotor flies through a sequence of gates while controlling a laser pointer to trace the OpenSCvx logo on a target surface.
Fig. 2 : A taxonomy of trajectory planning methods. The trajectory optimization categories reflect differences in problem formulation and optimization structure; numerical solvers used to solve intermediate subproblems such as IPM ’s or active set methods are not shown in this figure.
Framework
Transcription
Auto Trans.
Auto Diff
CTCS
STL / Logic
Mesh Adapt.
JIT / Compile
Batch / GPU
Language
General Modeling Frameworks
CasADi [ 7 ]
User-defined
–
✓
–
–
–
✓
–
C++ / Python / MATLAB
CusADi [ 42 ]
User-defined
–
✓
–
–
–
✓
✓
C++ / Python
Drake [ 76 ]
Collocation
✓
✓
–
–
–
✓
–
C++ / Python
CVXPY [ 22 ] / DNLP [ 19 ]
User-defined
–
✓
–
–
–
–
–
Python
JuMP [ 27 ]
User-defined
–
✓
–
–
–
✓
–
Julia
TABLE I : Representative trajectory optimization software and algorithmic paradigms. OpenSCvx combines the high-level problem specification of modern trajectory optimization frameworks with the structure-exploiting advantages of continuous-time successive convexification. Objective capability features replace subjective ratings: Auto Trans. indicates automatic continuous-to-discrete transcription; Auto Diff indicates automatic differentiation without manual Jacobians; CTCS indicates continuous-time path constraint satisfaction; STL / Logic indicates native support for Signal Temporal Logic or state-triggered constraints; Mesh Adapt. indicates adaptive mesh refinement; JIT / Compile indicates JIT/AOT compilation or C-code generation; and Batch / GPU indicates native vectorized batching or GPU acceleration.
Fig. 3 : The constraint a @ (p - w) >= Norm(p - w) as authored (left) and after canonicalization (right). Leaf nodes are red; operator nodes and the edges to their children are blue. Because the subexpression p - w feeds both the inner product and the norm, it has two parents – the graph is a directed acyclic graph rather than a tree. Canonicalization rewrites the inequality into residual form, moving all terms to one side against a constant 0 while reusing the shared subgraph.
Fig. 4 : Monte Carlo analysis of 6DoF powered descent guidance (PDG): 200 random initial positions denoted by the blue points. The coloring of the trajectories denotes the 2-norm of velocity, ∥v∥2 .
Fig. 5 : Continuous-time successive convexification (CT-SCvx) . The red blocks are problem parsing steps, the blue blocks are the iterative steps.
Fig. 6 : Nodal feasibility does not imply continuous-time feasibility. All nodes (green) lie outside the obstacle (blue), yet the trajectory connecting them cuts through the obstacle (hatched red), motivating continuous enforcement.
Fig. 7 : Control Parameterization for ZOH and FOH
Fig. 8 : Multiple shooting transcription. Early iterations (light gray) exhibit large defect gaps between integrated states (red) and the next state variables (yellow). As the algorithm converges, these defects are reduced, yielding a dynamically feasible trajectory (black).
TABLE VI : Position/velocity integration accuracy – ALV
∣Δa∣↓
∣Δe∣↓
∣Δi∣↓
∣ΔΩ∣↓
∣Δω∣↓
Solver
(km)
( 10−6 )
( 10−6∘ )
( 10−6∘ )
( 10−3∘ )
OpenSCvx
0.212
2.42
0.0022
0.029
0.0402
GPOPS-II (I.)
0.810
10.3
0.532
1.04
5.60
GPOPS-II (S.)
0.213
2.71
22.1
94.7
0.601
MAPTOR
2.030
25.9
0.883
1.68
15.4
PSOPT
0.013
0.113
0.289
2.57
0.0219
TABLE VII: Terminal orbital-element absolute errors against the target orbit ( a=24361140 m, e=0.7308 , i=28.5∘ , Ω=269.8∘ , ω=130.5∘ ) – ALV
Solver
J (kg) ↑
OpenSCvx
7514.45
GPOPS-II ( IPOPT )
7529.71
GPOPS-II ( SNOPT )
7529.67
MAPTOR
7529.71
PSOPT
7529.71
TABLE VIII : Solver/simulated objective – ALV
Fig. 12 : Simulated optimal altitude and latitude profiles - RRV
Solver
Reported J ( ∘ ) ↑
Simulated J ( ∘ ) ↑
% error ↓
OpenSCvx (f.)
34.1163
34.1160
0.00 %
OpenSCvx (s.)
34.1544
34.1544
0.00 %
GPOPS-II
34.1641
34.1641
0.00 %
ICLOCS2
34.1422
34.1554
0.04%
MAPTOR
34.1641
34.1641
0.00 %
PSOPT
34.1412
34.1521
0.03%
TABLE IX : Solver vs. simulated objective – RRV
Solver
Avg CPU (s) ↓
Std CPU (s) ↓
OpenSCvx (f.)
1.869
0.027
OpenSCvx (s.)
2.314
0.114
GPOPS-II
1.025
0.129
ICLOCS2
4.052
0.313
MAPTOR
4.197
0.278
PSOPT
1.643
0.418
TABLE X : Computational performance – RRV
Fig. 13 : UR5e pen-tracing experiment. Left: sequence composite of the hardware execution. Right: optimized simulation.
Fig. 14 : Time-optimal 6-DoF quadrotor racing trajectory.
Fig. 15 : Demonstration of implication-based compound state-triggered constraints in a 6-DoF powered descent guidance problem. The shaded areas denote the feasible regions. Note the intersample constraint satisfaction in fig. 15(a) .
Fig. 16 : Real-world experiment of the 6-DoF compound-STC problem. Left: NASA SENSS 6-DoF tendon robot executing the trajectory. Right: aligned nonlinear single-shot simulation. Both panels are sequence composites.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Arithmetic
JAX
CVXPY
+,−,∗,/
Addition, subtraction, multiplication, division
✓
✓
≤ , ==
Inequality, equality
✓
✓
@
Matrix multiplication
✓
✓
Power
✓
✓
Sqrt()
Element-wise square root
✓
✓
Exp()
Element-wise exponential
✓
✓
Appendix
TABLE XI : Basic Mathematical Operators
Logic & Signal Temporal Logic
All(), Any()
Logical AND / OR over all predicates
And(), Or(), Not()
Conjunction, disjunction, negation
Always()
Temporal operator, formula holds over a node or time interval