  Contact-rich manipulation tasks with stiff frictional elements like connector
insertion are difficult to model with rigid-body simulators. In this work, we
propose a new approach for modeling these environments by learning a
quasi-static contact force model instead of a full simulator. Using a feature
vector that contains information about the configuration and control, we find a
linear mapping adequately captures the relationship between this feature vector
and the sensed contact forces. A novel Linear Model Learning (LML) algorithm is
used to solve for the globally optimal mapping in real time without any matrix
inversions, resulting in an algorithm that runs in nearly constant time on a
GPU as the model size increases. We validate the proposed approach for
connector insertion both in simulation and hardware experiments, where the
learned model is combined with an optimization-based controller to achieve
smooth insertions in the presence of misalignments and uncertainty. Our website
featuring videos, code, and more materials is available at
https://model-based-plugging.github.io/.
