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
✅ Accepted to RSS 2026
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
- 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.
TinySDP is maintained by the Accessible and Accelerated Robotics Lab (A²R Lab).
