  Planning robot contact often requires reasoning over a horizon to anticipate
outcomes, making such planning problems computationally expensive. In this
letter, we propose a learning framework for efficient contact planning in
real-time subject to uncertain contact dynamics. We implement our approach for
the example task of robot air hockey. Based on a learned stochastic model of
puck dynamics, we formulate contact planning for shooting actions as a
stochastic optimal control problem with a chance constraint on hitting the
goal. To achieve online re-planning capabilities, we propose to train an
energy-based model to generate optimal shooting plans in real time. The
performance of the trained policy is validated %in experiments both in
simulation and on a real-robot setup. Furthermore, our approach was tested in a
competitive setting as part of the NeurIPS 2023 Robot Air Hockey Challenge.
