Clone wiki

Tutorial_NMPC_SIMPAR2018 / Home

SIMPAR 2018 - Tutorial on Nonlinear Model Predictive Control for Robotics


  • Michael Neunert (

  • Markus Giftthaler (

  • Jonas Buchli (

Agile & Dexterous Robotics Lab, ETH Z├╝rich, Switzerland (


Recent publications and conference discussions show an increased interest of the Robotics community in Model Predictive Control (MPC) approaches. Due to the increase in computational power and growing complexity of robotic systems, MPC is a viable approach for solving planning and control problems in a unified fashion. While it is relatively straightforward to set up an optimal control problem, solving it fast enough for MPC applications remains a challenge. There are several subproblems to tackle and even subtle algorithmic or parameter choices can decide whether the problem can be solved fast enough or not. In this tutorial, we will provide attendees with an in-depth view on how to formulate the MPC problem, how to model their system, what solver to choose as well as providing practical tips on how to run MPC on their system. During this interactive tutorial, attendees will have the chance to model their own dynamical system or robot and apply whole-body MPC to it in simulation within a single day. Attendees will learn how to use open source linear and nonlinear MPC solvers and try state-of-the-art tools such as Automatic Differentiation and derivative code generation.


Registration is done via the regular conference registration. Feel free to reach out to the organizers prior to the tutorial in case of questions! For any comments, suggestions or topics you wish that we cover, feel free to create an issue!

Schedule (Preliminary)

The workshop will contain short introductory presentations, followed by brief exercises. This way, we hope to be able to accommodate both, theory and practice. We plan to organize a joint lunch. In case food is not provided at the conference venue, we will make a lunch reservation outside. In this case, lunch has to be covered by each participant individually. In order to give us an idea for how many people we need to reserve, please briefly comment on the issue #1.

Time Agenda
09:00 Welcome & Introduction
09:30 Overview of Numerical Optimal Control and Trajectory Optimization
10:00 Numerical Optimal Control for Multi Body Systems
10:30 Installation support and Exercise 1: Trajectory Optimization
11:00 Coffee break (continued installation support)
11:30 Introduction to Automatic Differentiation
12:00 Exercise 2: Auto-Diff and Feedback Control
12:45 - 14:00 Lunch break (SIGN UP FOR WORKSHOP LUNCH)
14:00 Nonlinear Model Predictive Control
14:30 Exercise 3: NMPC
15:30 Extensions: Constraints, second order methods, switched systems
16:00 Exercise 4: Create an MPC controller for your own robot!


Exercise Description

Excercises are optional but highly recommended. We will make sure they are fun and insightfull. During the course you will take all necessary steps to develop a nonlinear, fully dynamic model predictive controller for a robot that runs at >100 Hz. They can be solved individually, in pairs or in groups. In case you are not interested in the exercises, feel free to skip them and use the time to engage in technical discussion with the organizers or other participants. At the end of the workshop, you can come with your own model of your robot and we will help you to create a NMPC controller for it!

The exercise will involve C++ programming and is based on the ADRL Control Toolbox ( An outline of this toolbox is given in this arXiv paper. Basic C++ knowledge is recommended but not strictly necessary. Each participant should bring a laptop running a recent Linux Mint or Ubuntu distribution to perform the exercise. Please follow the installation instructions and prework prior to the workshop.

Exercise code snippets will be provided in this repository briefly before the workshop.

Installation / Prework

The Control Toolbox is developed and tested on Ubuntu 14.04 and 16.04. While other versions of Linux and even other platforms might be supported, we cannot guarantee it. Furthermore, we will use ROS for simulation and visualization during the tutorial. We recommend ROS Indigo for Ubuntu 14.04 and ROS Kinetic for Ubuntu 16.04.

Installation Instructions

  1. Install Ubuntu 14.04 or 16.04
  2. Install the Control Toolbox
  3. Run the tests of the Control Toolbox
  4. Clone this repository in your catkin workspace

In case the installation fails, simply open up a bug report either in the Control Toolbox repository or here, depending on your issue.