Skip to content
AI.info

Research

Amplify: A Lightweight Library for Reproducible Nonlinear Programming Problems in Robotics

Overview Research area: Robotics trajectory optimization, nonlinear programming (NLP) tooling, and scientific reproducibility. Technical level: Advanced. The paper assumes familiarity with nonlinear p

arXiv
2609.28377
Published
2026-09-23
Authors
Nelson Rosa

AI summary

Overview

Research area: Robotics trajectory optimization, nonlinear programming (NLP) tooling, and scientific reproducibility.

Technical level: Advanced. The paper assumes familiarity with nonlinear programming, rigid-body dynamics, spatial vector algebra, hybrid dynamical systems, and the AMPL algebraic modeling language.

Scope: The paper introduces Amplify, a 537-line declarative AMPL library that embeds a robot's dynamics, integration scheme, and reference trajectories directly inside the optimization model so that robotic trajectory optimization results can be reproduced from a small number of self-contained text files.

What This Paper Is About

Trajectory optimization is central to robotics, but reproducing published results is difficult because the optimization problem is typically entangled with a specific solver and a heavyweight software toolchain. Amplify attacks this by writing the algorithms that normally live inside a library (system dynamics, ODE solver, polynomial reference trajectories) as constraints of the optimization problem itself, so that "the model is the library." The paper presents that formulation, the underlying spatial-vector dynamics algorithms rewritten as constraints, and a comparison against three other libraries on benchmark problems including bipedal locomotion and grasp planning.

Key Contributions

  1. An optimization library paradigm for reproducible robotics research. Amplify requires only an Internet connection and a text editor, distributes at most 3 text files to reproduce a result, and uses freely available dependencies. The authors state the approach is generic and can be implemented in other optimization frameworks.
  2. Rigid-body dynamics algorithms rewritten as optimization constraints. The Recursive Newton-Euler Algorithm (RNEA, computing b(q, q̇)), the Composite Rigid Body Algorithm (CRBA, computing M(q)), and the Task Jacobian Algorithm (TJA, computing J^i(q), B^i(q), J̇_p(q)q̇, J̇_v(q)q̇) are expressed as NLP constraints rather than as calls to external dynamics libraries.
  3. Generic Runge-Kutta methods and Bézier curves as constraints. Arbitrary integration schemes and polynomial curves (for tracked joints, control inputs, end effectors, or mobile robots) are implemented as constraints, rather than a small set of pre-defined options.
  4. A unified treatment of physical and virtual constraints, exploiting the computational similarity between Baumgarte-stabilized physical constraints and the input-output linearizing control law used to enforce virtual constraints, plus the use of the Network-Enabled Optimization System (NEOS) as a free cloud solving service.

Main Findings

  • Minimal footprint: Amplify is a 537-line library (counted at 80 characters per line). Its stated requirements are an Internet connection, familiarity with AMPL, and a text editor. At most 3 files are needed to replicate a solution.
  • Model-as-library design: In contrast to libraries that generate the NLP at runtime, Amplify separates the mathematical model from the problem data, producing a self-contained NLP model file that does not need regenerating when the dynamics, solver, or reference trajectories change.
  • Dependency reduction: By expressing dynamics, integration, and curves as constraints, the framework eliminates typical library dependencies such as CasADi (used by several surveyed libraries) or ADOL-C (used by PyRoboCop), as well as external rigid-body dynamics packages such as Pinocchio, RBDL, and spat_v2.
  • Cloud solving via NEOS: NEOS is a free cloud-based service offering access to 32 commercial and open-source solvers that accept AMPL input, with up to 8 GB of RAM for up to 8 hours on an HTC Condor computing grid.
  • Library scale comparison (Table I): Amplify can target IPOPT and 25+ other solvers with a declarative AMPL API. For contrast, the surveyed libraries include TROPIC (1,309,945 lines / 2,280 files), Drake (842,197 / 5,172), acados (787,963 / 1,191), CasADi's Opti (334,875 / 1,496), acado (271,877 / 1,968), TRAJOPT (86,360 / 456), FROST (99,725 / 1,357), PyRoboCop (49,974 / 141), Horizon (49,130 / 300), TACO (39,728 / 141), do-mpc (30,438 / 208), trep (23,236 / 188), roboptim (19,816 / 223), OptimTraj (18,508 / 189), ROCKIT (16,770 / 146), and TrajectoryOptimization.jl (6,185 / 68). Line/file counts were taken from the respective online repositories as cloned on February 28, 2026 after running CLOC.
  • Ecosystem gap identified: Throughout Table I, the surveyed ROP libraries are built on general-purpose programming languages with object-oriented APIs; Amplify and TACO are the only declarative AMPL entries listed. All surveyed ROP libraries implement their own code for declaring decision variables, objectives, and constraints despite the availability of CasADi's Opti interface and AMPL bindings.
  • Benchmark comparison scope: The paper compares Amplify against 3 other libraries across benchmark optimization problems spanning several fields, including bipedal locomotion and grasp planning. The specific numerical results of that comparison are not reported in the available content (the paper text is truncated before the results discussion).
  • Application grounding: Trajectory optimization with these methods is documented for legged locomotion, manipulation, unmanned vehicles, and medical robotics, with deployment on the biped walkers RABBIT, Mabel, Marlo, and Cassie; libraries dedicated to hybrid zero dynamics problems are TROPIC and FROST.

Methodology in Plain English

The authors treat a robot's motion as a hybrid dynamical system with multiple phases (for example, alternating stance and flight), described by equations of motion plus impulse-momentum equations at impacts. Normally, a robotics library computes the mass matrix, the gravity/Coriolis terms, constraint Jacobians, and integration steps in code at runtime, and then hands a problem instance to a solver. Amplify inverts this: the paper shows how to write those algorithms as constraints in the optimization model itself, using the declarative AMPL language.

Concretely, the three classic rigid-body algorithms (RNEA, CRBA, TJA) are formulated as constraint blocks using spatial vector algebra, with spatial transforms, cross products, and inertia matrices stated as algebraic relations among decision variables. Physical constraints (real contact forces, stabilized with Baumgarte's method) and virtual constraints (feedback control laws enforcing tracked outputs, as in hybrid zero dynamics) are handled by the same machinery. Runge-Kutta integration schemes and Bézier curves are likewise declared as constraints, so integration and trajectory shape become part of the model rather than options baked into a library. Because the model file is self-contained, it can be shipped alongside the data, and solved on NEOS from any machine with an Internet connection. For comparison purposes, the authors benchmarked the framework against other libraries on problems including bipedal locomotion and grasp planning.

Why This Matters

Impact on research: The paper argues that reproducibility failures in optimization-based robotics stem partly from software artifacts — a solution requires the original library's API, general-purpose language, and dependency stack. Amplify's "model is the library" formulation means a result can be checked with a handful of text files and a free cloud solver, which lowers the barrier to replicating and extending published work.

Real-world applications (as discussed in the paper):

  • Bipedal locomotion, including periodic gait generation and stabilizing control laws for walkers such as RABBIT, Mabel, Marlo, and Cassie within the hybrid zero dynamics framework.
  • Grasp planning and manipulation, where physical contact constraints (y_p(q) = 0) model objects being grasped and moved while the arm tracks a path.
  • Medical robotics, listed as an application area for trajectory optimization.
  • Unmanned vehicles, also listed as an application area.

Industry relevance: Algebraic modeling languages like AMPL, AIMMS, and GAMS are widely used in industry and academia and are backed by compiler services such as multi-solver targeting, bound tightening, elimination of unused variables, and automatic first- and second-order derivatives. Amplify shows that robotics problems, which are typically implemented directly at solver APIs such as SNOPT, IPOPT, and fmincon, can instead inherit those operations-research benefits. NEOS access to 32 commercial and open-source solvers makes commercial-grade solving reachable without local licenses, which matters for prototyping and for groups without heavy compute infrastructure.

Future Directions

  • Generalizing the design beyond AMPL: The authors explicitly invite developers of modeling languages and of robotic transcription libraries to adopt the formulation so that "the model is the library" becomes a broader pattern rather than a single implementation.
  • Extending the NLP model itself: The paper notes that extending an NLP currently requires the entire toolchain even for trivial changes; a self-contained model file removes that obstacle, and the framework is described as extensible with user-defined objectives, decision variables, and constraints.
  • Broadening benchmarking: The reported comparison covers Amplify plus 3 other libraries on benchmark problems including bipedal locomotion and grasp planning; the results reported in the full paper would need to be examined to see where the approach succeeds or struggles relative to object-oriented ROP libraries.
  • Formal study of the reproducibility problem: The paper states that the extent of the reproducibility problem in optimization-related robotics literature has yet to be formally documented and currently exists only anecdotally — a gap the authors implicitly flag as open.

Target Audience

The paper names three intended audiences: (1) developers of optimization modeling languages who are not robotics specialists but want to extend their libraries to robot applications; (2) developers of robotic transcription libraries who want to shed dependencies and become more lightweight; and (3) end users who want straightforward, reproducible optimization problems they can run and extend. It is also relevant to roboticists working on legged locomotion and manipulation who rely on virtual constraints, and to researchers in operations research or optimization tooling interested in a declarative, cloud-solved approach to robotics problems.

Authors’ abstract

Optimization problems (OPs) are key to solving many challenging research problems in robotics. However, reproducibility still remains a major issue. In this paper, we present Amplify, a lightweight nonlinear programming library aimed at reproducible results of robotic-related trajectory optimization problems. The minimalistic requirements for the 537-line library (80 characters per line) are an Internet connection, familiarity with the AMPL modeling language, and a text editor. Our primary contribution is the formulation of a library where trajectory optimization algorithms are represented directly within the optimization model. Specifically, we implement the algorithms used to compute the dynamics, trajectories, and reference motions as constraints of the OP in a declarative programming paradigm. We outline how our formulation of objectives, decisions variables, and constraints can be implemented in other transcription libraries that want to be lightweight and reproducible. We also compare the Amplify framework with 3 other libraries across examples of benchmark optimization problems across several fields, including bipedal locomotion and grasp planning.

Read the original paper