  Manipulation of granular materials such as sand or rice remains an unsolved
problem due to challenges such as the difficulty of defining their
configuration or modeling the materials and their particles interactions.
Current approaches tend to simplify the material dynamics and omit the
interactions between the particles. In this paper, we propose to use a
graph-based representation to model the interaction dynamics of the material
and rigid bodies manipulating it. This allows the planning of manipulation
trajectories to reach a desired configuration of the material. We use a graph
neural network (GNN) to model the particle interactions via message-passing. To
plan manipulation trajectories, we propose to minimise the Wasserstein distance
between a predicted distribution of granular particles and their desired
configuration. We demonstrate that the proposed method is able to pour granular
materials into the desired configuration both in simulated and real scenarios.
