Adaptive Contact-Implicit Model Predictive Control with Online Residual Learning

Wei-Cheng Huang*¹, Alp Aydinoglu*¹, Wanxin Jin² and Michael Posa¹

*Contributed equally to this work. 

¹Wei-Cheng Huang, Alp Aydinoglu and Michael Posa are with the GRASP Laboratory, University of Pennsylvania, USA. 

²Wanxin Jin is with the School for Engineering of Matter, Transport and Energy, Arizona State University, USA.

Paper

arXiv link: 

Available now! 

Code

Github repository with code for real-time adaptive multi-contact MPC implemented in Drake (C++) and Casadi (Python)

Available now!  

Video

Supplementary video containing complete records of the following contents

Available now! 

Abstract

The hybrid nature of multi-contact robotic systems, due to making and breaking contact with the environment, creates significant challenges for high-quality control. Existing model-based methods typically rely on either good prior knowledge of the multi-contact model or require significant offline model tuning effort, thus resulting in low adaptability and robustness. In this paper, we propose a real-time adaptive multi-contact model predictive control framework,  which enables online adaption of the hybrid multi-contact model and continuous improvement of the control performance for contact-rich tasks. This framework includes an adaption module, which continuously learns a residual of the hybrid model to minimize the gap between the prior model and reality, and a real-time multi-contact MPC controller. We demonstrated the effectiveness of the framework in synthetic examples,  and applied it on hardware to solve contact-rich manipulation tasks, where a robot uses its end-effector to roll different unknown objects on a table to track given paths. The hardware experiments show that with a rough prior model, the multi-contact MPC controller adapts itself on-the-fly with an adaption rate around 20 Hz and successfully manipulates previously unknown objects with non-smooth surface geometries.

Rolling ball (inaccurate model) (5 ×)

Rolling lime (5 ×)

Rolling orange (5 ×)

Method: Learning Hybrid Residual for Adaptive Multi-Contact MPC

We consider solving model predictive control (MPC) problems subject to multi-contact hybrid dynamics, which can be locally represented as a Linear Complementarity System (LCS). In previous works [1], we present Consensus Complementarity Control (C3) that tackles the non-convex MPC problem at real-time rates. However, accurate multi-contact models are hard to get due to factors like geometry and friction coefficient, which pose challenges to the model-based approach such as C3. Therefore, we aim to achieve online model learning for adaptive MPC. Utilizing our previous works on offline LCS learning [2], we introduce a variant of the implicit loss function that was proposed. Our focus is on learning both the hybrid boundary and the contact dynamics, represented as a residual term in the complementarity part of the LCS formulation.

Synthetic Example: Cart-pole with Soft Walls

An example that demonstrates the principle of our approach is a classical cart-pole underactuated system that has been augmented with two soft walls. The model has a wrong estimate of the distance to the wall, leading to the contact model predicting both situations: contact and no contact, as well as the presence or absence of actual contact events during those situations. We highlight that our approach is capable of adapting even when there are no actual contact events. As shown in the above figure, a “contact event” refers to a situation where actual physical contact is occurring, while “contact prediction” pertains to instances where the model anticipates contact, potentially inaccurately. Our method can produce meaningful gradients, even when there is no actual contact event (yellow region). The only scenario in which a zero gradient is produced is when the model and data both agree that there is no contact (white region).

Hardware Experiment: Inaccurate Ball Trajectory Tracking

We also validate our framework on real hardware settings. The task is to roll a rigid ball along a circular trajectory using a Franka Emika Panda Arm, which requires high-speed reasoning about where and when to make contact. In previous work, careful manual identification of model parameters was required to achieve success. However, for this experiment, the actual radius of the ball is 5 mm smaller than our parameter estimation used in the MPC. Meanwhile, the state estimation of the ball is noisy. As a result, MPC with this incorrect model fails to interact with the ball as is shown on the top right, and therefore fails to accomplish the task. In contrast, with our adaptive module running 20 Hz on the fly, the discrepancy between model prediction and ground truth creates a non-zero gradient that compensates for the inaccurate model and quickly adapts the control to initiate rolling and accomplish the task successfully

Hardware Experiment: Deformable Fruit Trajectory Tracking

To push the limit of our framework, we repeat the same task on deformable objects that have non-smooth surface geometries such as fruits. In the MPC model, the estimate of the geometry of the fruit is simply a sphere, and we assign an approximate radius for it. Due to the bulges and dents on the fruit’s surface, initiating rolling can be hard since the fruit can roll back even after a push in the correct direction as shown on the top right. We highlight that our method quickly adapts and initiates rolling with stronger push, and can even be robust to unpredictable motions caused by the non-smooth surface geometry of the fruit.

Acknowledgement

This work was supported by the National Science Foundation under Grants No. FRR-2238480, EFRI-1935294, and Toyota Research Institute.

[1] A. Aydinoglu, A. Wei, and M. Posa, “Consensus Complementarity Control for Multi-Contact MPC,” arXiv preprint arXiv:2304.11259, 2023.

[2] W. Jin, A. Aydinoglu, M. Halm, and M. Posa, “Learning Linear Complementarity Systems,” in Learning for Dynamics and Control Conference, pp. 1137–1149, PMLR, 2022.