Practical Reinforcement Learning For MPC: Learning from sparse objectives in under an hour on a real robot

Napat Karnchanachari, Miguel de la Iglesia Valls, David Hoeller, Marco Hutter

Introduction

Model Predictive Control (MPC) is a cornerstone of modern robotics, valued for its ability to handle complex system dynamics and hard constraints. However, its effectiveness is often bottlenecked by the "dirty secret" of control engineering: the manual tuning of cost functions. Engineers must painstakingly balance proxy costs (the actual objective) with regularization costs (mathematical hacks to ensure stability).

This research introduces a practical framework that bridges the gap between the stability of MPC and the flexibility of Reinforcement Learning (RL). By learning a value function from scratch on a real unmanned ground vehicle (UGV) in under an hour, the system eliminates manual tuning while achieving performance comparable to expert-tuned controllers.

Methodology

The core of the approach is an Actor-Critic framework where the "Actor" is an MPC controller and the "Critic" is a neural network representing the value function. The authors propose two primary architectures:

  1. Terminal Deep Value MPC (TDMPC): The learned value function serves as the terminal cost at the end of the MPC's lookahead horizon, providing a long-term perspective beyond the immediate planning window.
  2. Deep Value MPC (DMPC): Both the stage cost (immediate cost) and terminal cost are derived from the learned value function. The stage cost is approximated using a Lie derivative, calculating how the value changes over a discrete time step.
The learned value function landscape. Smoothness is achieved through Jacobian regularization, ensuring the MPC optimizer can reliably find the minimum.

Ensuring Stability and Efficiency

A critical technical innovation is Gradient Regularization. Because MPC solvers (typically Quadratic Programming) rely on differentiable landscapes, the Critic cannot simply be accurate; it must be smooth. By regularizing the Jacobian of the neural network during training, the authors prevent jagged cost landscapes that would otherwise cause the optimizer to fail. Additionally, the system leverages Data Augmentation (exploiting physical symmetries like left/right turns) and n-step targets to maximize sample efficiency on real hardware.

Experimental Setup

The framework was validated using both a simulated unicycle model and a real-world differential-drive UGV (a Wetrok scrubber). The real-world robot, equipped with an Intel i7 CPU and visual-inertial SLAM, was tasked with navigating four distinct paths: Curves, Circle, Tight Turn, and Straight.

The real-world experimental platform (a Wetrok scrubber) performing path tracking. The green line represents the target path, with predicted trajectories overlaid.

Key Results and Insights

  • Rapid Training: The system demonstrated remarkable sample efficiency, learning to track paths from scratch in under 30 minutes for dense rewards and under 45 minutes for sparse (binary) rewards.
  • Robustness to Model Mismatch: One of the most significant findings was the system's inherent robustness. When a turning delay was introduced that the base MPC model did not account for, the RL-augmented MPC automatically adapted its behavior to become more "cautious," whereas a standard expert-tuned MPC became unstable.
  • Success with Sparse Rewards: The DMPC variant successfully learned to navigate using only a binary signal (1 if within 10cm of the path, 0 otherwise). This is a significant milestone, as standard MPC solvers typically require differentiable cost gradients that sparse rewards do not provide.

Conclusion and Future Work

By using MPC as a physics-based prior, this framework allows agents to start with "common sense" about robot motion, drastically reducing the millions of samples usually required by model-free RL. While highly effective, the approach currently faces a "dead zone" problem where the robot may stall if it starts too far from a sparse reward source. Future research will focus on scaling this method to dynamic obstacle avoidance and multi-robot interactions, while exploring formal safety guarantees during the learning phase.

Summary updated

BibTeX
@inproceedings{karnchanachari2020practical,
  author = {Napat Karnchanachari and Miguel de la Iglesia Valls and David Hoeller and Marco Hutter},
  title = {{Practical Reinforcement Learning For MPC: Learning from sparse objectives in under an hour on a real robot}},
  booktitle = {L4DC},
  year = {2020},
}
Figure