Open Source Robotics

A curated collection of high-quality open source robotics projects, tools, and software to propel the robotics community forward.

OpEn (Optimization Engine)

Embedded nonconvex optimization solver in Rust for real-time MPC on robots

License

MIT, Apache 2.0

Overview

OpEn (Optimization Engine) is a framework for fast, memory-safe nonconvex optimization on embedded systems, built around the PANOC proximal-averaged Newton-type algorithm with augmented-Lagrangian and penalty methods for constraints. Problems are described in Python or MATLAB using CasADi symbolics; OpEn generates a dependency-free Rust solver for the target — a robot's onboard computer, an MCU-class board, or a ROS node — enabling real-time model predictive control and collision-free trajectory optimization.

The workflow is code generation: you define decision variables, a (possibly nonconvex) cost and constraints in opengen, OpEn's Python/MATLAB front-end; it emits a standalone Rust crate implementing PANOC — a line-search method combining proximal gradients with L-BFGS directions that converges fast without Hessians — wrapped with ALM/penalty outer loops for general constraints. The generated solver has no heap allocation surprises, no external libraries, and provably bounded memory: exactly what certification-minded embedded control needs. Interfaces include direct Rust, C/C++ bindings, a TCP server mode, Python bindings, and a ROS package generator. Typical robotics uses are nonlinear MPC at hundreds of hertz for obstacle avoidance (its navigation examples became a reference for AGV/UAV collision-free MPC), trajectory optimization and moving-horizon estimation on resource-constrained platforms. OpEn is developed academically (Sopasakis et al., IFAC 2020 paper) and dual-licensed MIT/Apache-2.0.

Why it matters

OpEn made real-time nonconvex MPC practical on small robots: a solver with Rust's memory guarantees, no dependencies and bounded memory that runs on embedded boards — the piece you need when a robot must re-solve an obstacle-avoidance problem every few milliseconds onboard.

Problem it solves

General NLP solvers (IPOPT-class) are too slow and heavy for high-rate onboard MPC, and hand-coded solvers are error-prone. OpEn generates a fast, dependency-free, memory-safe solver for your specific problem from a few lines of CasADi.

Key takeaways

  • PANOC algorithm: proximal gradient + L-BFGS for fast nonconvex solves without Hessians
  • Generates standalone, dependency-free Rust solvers with bounded memory
  • Python (opengen) and MATLAB front-ends with CasADi symbolics
  • Direct Rust/C/C++ use, TCP server mode and ROS package generation
  • Reference choice for embedded collision-free MPC on AGVs and UAVs; dual MIT/Apache-2.0

Who it is for

  • Control engineers deploying onboard MPC
  • Robotics researchers in trajectory optimization
  • Embedded developers needing certified-friendly solvers
  • AGV/UAV autonomy teams

Limitations

  • First-order-based PANOC can trail interior-point methods on badly conditioned problems
  • Nonconvexity means local (not global) solutions — initialization matters
  • Constraint handling via ALM/penalty needs tolerance tuning for hard equality constraints

This website requires JavaScript to function properly. Please enable JavaScript to explore our collection of open source robotics projects.