Skip to content
Robotics.world

Research

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

Trajectory optimization in robotics requires transcribing a problem into a nonlinear program, and existing libraries do this by generating the NLP at runtime through a heavy software toolchain — so…

The paper’s first page · arXiv:2609.28377
arXiv
2609.28377 · Preprint · not peer-reviewed
Published
2026-09-23
Authors
Nelson Rosa

In plain words

Trajectory optimization in robotics requires transcribing a problem into a nonlinear program, and existing libraries do this by generating the NLP at runtime through a heavy software toolchain — so anyone trying to reproduce a published result needs the library, a general-purpose language, and every dependency.

AI summary

Overview

Research area: Robotics — trajectory optimization, nonlinear programming (NLP), and reproducible research software.

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

Scope (one sentence): The paper presents Amplify, a 537-line AMPL-based library that embeds robot dynamics, ODE integration, and Bézier reference-trajectory generation directly inside the optimization model as constraints, so that a trajectory optimization problem can be reproduced from at most 3 text files without installing a robotics software stack.

What This Paper Is About

Trajectory optimization in robotics requires transcribing a problem into a nonlinear program, and existing libraries do this by generating the NLP at runtime through a heavy software toolchain — so anyone trying to reproduce a published result needs the library, a general-purpose language, and every dependency. The paper's argument is that most of that stack can be removed by writing the dynamics, integrator, and reference curves as constraints in the model itself, using a declarative algebraic modeling language. The goal is a library where "the model is the library," runnable by anyone with an Internet connection and a text editor.

Key Contributions

  1. An optimization library paradigm for reproducible robotics research. Amplify has minimal dependencies (an Internet connection and a text editor), requires at most 3 text files to distribute a reproducible result, and treats the NLP model file as the artifact rather than library code that regenerates the model each run.

  2. Computationally efficient rigid-body dynamics algorithms expressed as optimization constraints. The Recursive Newton-Euler Algorithm (which computes the bias force term), the Composite Rigid Body Algorithm (which computes the mass matrix), and a Task Jacobian Algorithm (which computes constraint Jacobians, transmission matrices, and Jacobian-derivative times velocity) are rewritten as NLP constraints using spatial vector algebra, removing the dependency on external rigid-body dynamics libraries such as Pinocchio, RBDL, or spat_v2.

  3. Generic Runge-Kutta integration and Bézier curves as constraints, plus a unified treatment of physical and virtual constraints. Arbitrary user-defined Runge-Kutta schemes and polynomial reference curves become constraints in the model, rather than a small set of pre-defined options; physical constraints (stabilized with Baumgarte's method) and virtual constraints (stabilized with an input-output linearizing control law, as in hybrid zero dynamics) share one formulation, with the physical Jacobian entering both the constraint Jacobian and the transmission matrix.

  4. Use of the NEOS cloud server as the solver backend, and a public baseline. Amplify targets the Network-Enabled Optimization Server, a free cloud service with 32 commercial and open-source solvers that accept AMPL input and allow problems of up to 8 GB in RAM for up to 8 hours on an HTC Condor computing grid; the authors state this is the first use of NEOS for robotics optimization problems, and position Amplify as a comparison baseline for other libraries. Code is at https://github.com/nr-codes/Amplify.

Main Findings

  • Library size comparison: Amplify is a 537-line library (formatted at 80 characters per line), described as self-contained with no external libraries. By contrast, the surveyed libraries in Table I range from TrajectoryOptimization.jl at 6,185 lines of code in 68 files to TROPIC at 1,309,945 lines in 2,280 files; Drake is listed at 842,197 lines in 5,172 files and CasADi's Opti at 334,875 lines in 1,496 files. Line counts were obtained with CLOC on repositories cloned on February 28, 2026.

  • Paradigm gap in existing libraries: Of the libraries surveyed in Table I, only Amplify and TACO use a declarative, AMPL-based interface (TACO targets MUSCOD-II with 39,728 lines in 141 files); all others use an object-oriented or procedural API in a general-purpose language (C, C++, Matlab, Python, Julia). Amplify lists IPOPT and 25+ other solvers, and offers bindings for Python, R, C#, C++, Java, and Matlab.

  • Dependency commonalities identified: Most surveyed libraries depend on CasADi for derivatives (with PyRoboCop using ADOL-C instead), and many depend on Pinocchio, RBDL, or spat_v2 for rigid-body dynamics — dependencies the authors argue are avoidable by expressing those computations as constraints.

  • Reproducibility bottleneck diagnosed: The paper identifies two recurring obstacles — access to optimization solvers and the required software toolchain — and argues that runtime NLP generation is what forces end-users to reconstruct an entire stack to replicate a trajectory.

  • Benchmark comparison (results not available in the provided text): The abstract and outline state that Amplify is compared against 3 other libraries on benchmark optimization problems across several fields, including bipedal locomotion and grasp planning (Section IX). The numerical outcomes of that comparison are not present in the excerpt supplied, so no accuracy, runtime, or success-rate figures can be reported here.

Methodology in Plain English

The authors take the standard recipe for a robot trajectory optimization — equations of motion, a numerical integrator, and reference trajectories for joints or end effectors — and write each piece as a set of algebraic constraints inside an AMPL model file, instead of calling a robotics library to produce those constraints in code.

The robot is modeled as a tree of rigid links connected by joints, with several phases of motion separated by impacts. Velocities, forces, and inertias are handled as six-dimensional spatial vectors, and the classic recursive dynamics algorithms are re-expressed as sums over the links and joints of the tree, so that each intermediate quantity (velocities, accelerations, forces, mass matrix entries, Jacobians) is a variable or constraint in the optimization problem. Rotation and translation between link frames are written in axis-angle form with Rodrigues-type formulas, then converted to Euler angles and positions so they can be expressed in the modeling language.

Physical constraints (such as a grasp or foot contact) and virtual constraints (reference trajectories that actuators are made to track) are handled by the same machinery: a combined constraint Jacobian and transmission matrix, with a proportional-derivative correction term that drives constraint error to zero — Baumgarte stabilization for the physical constraints and an input-output linearizing law for the virtual ones. Integration is written generically so the user can pick a Runge-Kutta scheme, and reference paths are Bézier curves defined as constraints. Because everything lives in the model file, changing the robot or the problem means editing text, not rebuilding software.

Why This Matters

Impact on research: The paper reframes reproducibility as a modeling-language problem rather than a packaging problem. If the model file is the library, a published result can be distributed as at most 3 text files and rerun on a free cloud solver, which removes the usual failure mode where a result cannot be reproduced because a dependency, API, or platform is unavailable. The authors also note that the extent of the reproducibility problem in optimization-related robotics literature has not been formally documented, so this work supplies both an argument and a concrete alternative.

Real-world applications:

  • Bipedal locomotion: the paper discusses hybrid zero dynamics, virtual constraints, and bipeds including RABBIT, Mabel, Marlo, and Cassie, and uses bipedal locomotion as a benchmark problem.
  • Manipulation and grasp planning: grasp planning is used as a benchmark, and the illustrative example is an arm grasping a rectangular object and transporting it onto a ramp, with the grasp as a physical constraint and the path as a virtual constraint.
  • Medical robotics: listed among the application areas where trajectory optimization has been applied.
  • Unmanned vehicles: also listed as an application area for constrained trajectory optimization.

Industry relevance: Practitioners prototyping on commercial solvers benefit from NEOS's free access to 32 solvers through an AMPL front end, and the authors argue the design decisions are not tied to AMPL — they are offered as guidance for any transcription library that wants to become lighter and reproducible.

Future Directions

  • Demonstrating the benchmark results in full. The comparison against 3 other libraries on bipedal locomotion and grasp planning is central to the paper's claims, but the quantitative outcomes are not available in the supplied text; the reported comparisons need to be examined directly.
  • Porting the paradigm to other stacks. The authors explicitly invite developers of modeling languages and of robotics transcription libraries to adopt the formulation of objectives, decision variables, and constraints, and to shed dependencies — the open question is whether the approach generalizes beyond AMPL and NEOS.
  • Formally documenting the reproducibility problem. The paper notes the extent of the reproducibility issue in optimization-based robotics has yet to be formally documented; a systematic study would substantiate the motivation.
  • Handling user-supplied time-dependent terms. Quantities such as the second time derivative of a reference trajectory must currently be computed by the user or supplied by other Amplify modules, which suggests extending the library's coverage of time-varying constraints.

Target Audience

The paper names three audiences explicitly: (1) developers of optimization modeling languages who are not robotics specialists but want their tools to serve the field; (2) developers of robotic transcription libraries who want to remove dependencies and become lightweight; and (3) end-users who want a straightforward, reproducible optimization problem they can run and extend. It is most useful to readers already comfortable with nonlinear programming, rigid-body dynamics, and AMPL — the paper is written to give enough algorithmic detail that others can reimplement its contributions in their own codebase.

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…

The full abstract on arXiv
Read the original paper

Related papers