Back to Projects

MPC Controller
for RoboCup SSL

Implementation of RRT* for global planning and Model Predictive Control (MPC) for local obstacle avoidance in dynamic soccer environments.

C++ MPC RoboCup SSL
MPC Visualization

01. The Concept

The Delft Mercurians are a student team competing in the RoboCup Small Size League (SSL). In this fast-paced environment, robots must navigate dynamically to play soccer autonomously.

As an Infrastructure Software Developer, I focused on the navigation stack, combining Rapidly-exploring Random Tree Star (RRT*) for global path optimality and Model Predictive Control (MPC) for reactive, local obstacle avoidance and trajectory tracking.

02. Technical Deep Dive

Mathematical Formulation

We model the holonomic robot as a point mass in the state space. The discrete-time state space model is:

$$ \vec{x}[k+1] = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \vec{x}[k] + T_s \cdot \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \vec{u}[k] $$

Where $\vec{x}$ is position and $\vec{u}$ is velocity input. The optimization problem minimizes tracking error and control effort:

$$ \begin{aligned} \min_{u_k} \quad & \sum_{k=0}^{N-1} \left[ \|x_k - r_k\|_{Q}^2 + \|u_k\|_{R}^2 \right] + \|x_N - r_N\|_{Q}^2 \\ \text{subject to} \quad & \left\| p_{r} - p_{o} \right\|_2 \geq r_r + r_o, \\ & \vec{v} \leq \vec{v}_{lim} \end{aligned} $$

We utilize the CasADi solver to handle these logical constraints in real-time, ensuring the robot avoids dynamic obstacles (other players) while maintaining optimal trajectory.

Team Performance

The integration of these algorithms contributed to the team's performance in the 2024 competition.

5th
Place Eindhoven 2024 (Div B)

Project Context

Team Delft Mercurians (Student Team)

Role Software Developer - Infrastructure

Tech Stack C++, ROS 2, CasADi, CMake