Pipeline for synthesizing a large dataset from a nonlinear model-predictive controller (MPC), training a neural network approximation of this dataset, and deploying that neural network controller using C++ Eigen to control the yaw angle of the Mini Wheelbot. While balancing of the Mini Wheelbot is possible with a simpel, linear state-feedback controller, the yaw angle is linearly uncontrollable thus necessitating nonlinear methods like (approximate) MPC.
This repository contains code used for yaw control in the paper: Henrik Hose, Jan Weisgerber, and Sebastian Trimpe. "The Mini Wheelbot: A Testbed for Learning-based Balancing, Flips, and Articulated Driving", accepted to the IEEE International Conference on Robotics and Automation ICRA (2025).
Please cite our paper on the Mini Wheelbot:
@inproceedings{hose2025miniwheelbot,
title={The Mini Wheelbot: A Testbed for Learning-based Balancing, Flips, and Articulated Driving},
author={Hose, Henrik and Weisgerber, Jan and Trimpe},
year={2025},
booktitle={2025 IEEE International Conference on Robotics and Automation (ICRA)}
}
- A large dataset is computed by repeatedly solving the MPC optimization problem for random initial conditions, for which the code is provided in the dataset_synthesis folder. We use CasADi to formulate the optimization problem and IPOPT for solving it. See the respective README.md for details. You can also skip this step by downloading the dataset that we used for our experiments from Zenodo, here (3.5Gb).
- A neural network is trained with Jax to approximate an explicit controller for the dataset, for which we provide the code in neural_network_training. See the README.md for details. You can skip this step and use the neural network approximation of the optimal actions here. The neural network is then exported as C++ Eigen code using Jinja templates.