Real-time semidefinite optimization for certifiable edge robotics.
TinySDP extends TinyMPC with small structured semidefinite relaxations, enabling obstacle-aware MPC to run onboard resource-constrained robots such as the Crazyflie 2.1 Brushless.
✅ Runs onboard at 25 Hz
✅ Supports PSD-relaxed obstacle avoidance
✅ Static-memory embedded implementation
✅ Hardware demos on Crazyflie
Robots running on small processors usually cannot afford generic semidefinite programming. TinySDP keeps the optimization structure small and fixed, so certifiable obstacle-aware control can run in real time without dynamic memory allocation or desktop-class hardware.
This repository contains the reusable C++ solver in include/solver and
src/solver, plus three standalone TinySDP examples:
ushape_demo: closed-loop 2D U-shape obstacle avoidance with rank-1 certificate loggingsweeping_gate_3d_demo: 3D sweeping gaterising_gate_3d_demo: 3D rising gate
In the dynamic moving-gap benchmark, TinySDP maintains safety with a final goal
distance of 0.018, while zero-margin TinyMPC-LIN and TinyMPC-HOCBF collide.
| Method | Goal distance | Safe |
|---|---|---|
| TinySDP (ours) | 0.018 | ✓ |
| RPCBF | 0.069 | ✓ |
| TinyMPC-LIN (m=1.5m) | 0.023 | ✓ |
| TinyMPC-LIN (m=0m) | — | ✗ |
| TinyMPC-HOCBF (m=3m) | 0.077 | ✓ |
| TinyMPC-HOCBF (m=0m) | — | ✗ |
For more information, visit the project page.
- CMake 3.15 or newer
- A C++17 compiler
- Eigen 3
- Matplotlib for plotting example outputs
On macOS with Homebrew:
brew install eigen cmake
python -m pip install matplotlibcmake -S . -B build
cmake --build buildRun the demos:
./build/examples/ushape_demo
./build/examples/sweeping_gate_3d_demo
./build/examples/rising_gate_3d_demoExample CSV outputs are written to outputs/ by default. Set
TINYSDP_OUTPUT_DIR=/path/to/output to write them elsewhere.
The U-shape demo defaults to the inside-the-cul-de-sac start. Other starts are available with:
./build/examples/ushape_demo --start edge_up
./build/examples/ushape_demo --start edge_down
./build/examples/ushape_demo --start outside_center
./build/examples/ushape_demo --start above
./build/examples/ushape_demo --start belowPlot any generated trajectory CSVs:
python scripts/plot_examples.pyThe plotting script scans outputs/ and writes trajectory PNGs to outputs/plots/.
Use --input-dir or --output-dir to override those paths.
include/solver: public solver headerssrc/solver: solver implementationexamples: TinySDP-only demosscripts: plotting and utility scriptsassets: README media
Open a GitHub issue for bugs, build problems, or questions about the examples.
If you use our code, please cite:
@inproceedings{mahajan2026tinysdp,
title={TinySDP: Real Time Semidefinite Optimization for Certifiable and Agile Edge Robotics},
author={Ishaan Mahajan and Jon Arrizabalaga and Andrea Grillo and Fausto Vega and James Anderson and Zachary Manchester and Brian Plancher},
booktitle={Robotics Science and Systems (RSS)},
address = {Sydney, Australia},
month={July},
year = {2026}
}TinySDP is maintained by the Accessible and Accelerated Robotics Lab (A²R Lab).
