Manipulation of Granular Materials by Learning Particle Interactions

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.


I. INTRODUCTION
The concept of granular materials encompasses materials such as ground coffee, uncooked rice, and sand to name a few.These materials are difficult to manipulate due to their particle nature [1], as the particles of the material interact with each other potentially grouping into individual shapes.Recently, several attempts have been made to solve various tasks involving granular materials ranging from transporting the material [2], shaping [3], [4], to common daily tasks such as gathering, spreading or flipping [5].A common approach is to use visual feedback to learn to manipulate the material.However, there is a common caveat on these approaches, the interactions of the material particles are not captured.Thus, these methods are not able to plan manipulation of granular materials into a desired configuration when there are complex interactions including e.g.dropping the material and the material interacting with rigid bodies.This is because learning the interactions from visual-feedback is not feasible as the material is not fully observable.
Instead of using models learned from direct observations, simulations of the physical interaction can be used.However, high-fidelity simulators are considerably expensive computationally.Instead, we can learn a computational surrogate model from these simulators to speed up the manipulation planning.Fig. 1: Granular manipulation using the GNN (left) and physical system (right).The granular material is manipulated using a rigid-body (cup) following the optimal trajectory T * to pour the material in the particles target distribution P g,G .
for modeling interactions between particles [6], [7], [8], [9].Some of these works have explored modeling the dynamics of complex materials such as granular [10] or deformable ones [11], [12].The GNN based approaches have shown good accuracy and generalisation capabilities, and thus present a promising surrogate model for granular manipulation planning.
In this work, we address the problem of manipulating granular materials into a desired configuration by interacting with a rigid-object (see Fig. 1).In order to capture the interactions of the granular material with the rigid-body, we take on a model-based approach and learn a surrogate model from simulated data based on the idea of Graph Networksbased Simulators (GNS) [10].We propose to solve the problem of manipulating the material into a desired configuration as a trajectory planning problem, where we use the GNS to rollout the dynamics of the system.The trajectory of the rigid-body is planned by minimising the Wasserstein distance between the simulated final distribution of granular particles and its target.
We evaluate two different aspects of the method.First, we perform an ablation study of the graph attributes and GNN architecture, and provide evidence that the chosen attributes and architecture are able to capture the rigid-body and granular material interactions.Secondly, we evaluate the proposed trajectory planning method over different target distributions of the granular particles, both using the GNN rollout and a real robot set-up (Fig. 1).As a test-case task we perform pouring of a granular material into a desired configuration.Our results demonstrate that the proposed method effectively pours the material into different desired distributions.Furthermore, we demonstrate that the optimal trajectories in the real robot approximate the expected result using the GNN dynamics model.
The main contributions of this paper are: 1) A GNN based approach for modeling the interaction of granular materials and rigid bodies, and evaluation of the model parameters required to effectively predict the interactions.2) A solution for trajectory planning based on the Wasserstein distance between the distribution of the manipulated granular material and its target distribution.3) A demonstration of the framework for pouring granular materials into a desired configuration both in simulated and real scenarios.

A. Granular manipulation
The manipulation of granular materials has been studied in different tasks such as robotic excavation [13], scooping [14] and pouring [15].Recent works have focused on learning to manipulate granular materials using feedback-based methods where data is collected in the real-world [2], [3], [4], [15], [16].In [2], a ConvNet model is learned to choose the required actions for transporting beans to a goal shape.Similarly, a learning-based approach was proposed by [16] to grasp granular foods.These methods learn a surrogate model from height or density maps, which does not capture the interaction of the granular particles.Furthermore, collecting data in the real-world is prohibitive and the feedback from the real data does not capture the inherent dynamics of the material.More recently, [5] proposed to learn a Reinforcement Learning policy to manipulate in simulation amorphous materials.However, the policy takes as input the density and height map, facing the same limitation of previous approaches.In contrast, [17] proposed a framework to infer the properties of granular materials using real-world data for fine tuning a simulator to perform robotic tasks.
In the present work, we propose to solve granular manipulation directly in simulation.This alleviates the burden of gathering data in the real-world of previous approaches.In addition, the proposed GNN approach enables learning the granular material interactions, as opposed to the aforementioned surrogate models.Furthermore, our method defines the desired configuration of granular particles as an experimental distribution.This enables planning for target particle configurations potentially more complex than those given by height or density maps.

B. Liquid manipulation
Similar approaches to those in granular manipulation have been proposed for pouring liquids [18], [19], [20].These either used visual feedback to detect the liquid [18], [19] or learned to manipulate from human demonstrations [20].While dynamics may be learned on from real examples, using real-world data is limited by data collection, as with granular materials, which can be solved by using simulated dynamics.Some of the works in liquid manipulation have considered the dynamics of the material either using high-complexity simulations [21] or simplified dynamics models [22], [23], [24].Considering the dynamics of the system allows trajectory planning in more complex manipulation tasks.However, simplified dynamics models might lead to inaccurate trajectories, whereas using high-quality simulations might be costly for complex materials.

C. Learning particle interactions using GNNs
An alternative is to learn the dynamics of the system from high-fidelity simulators using data-driven models [9], [10], [11].These can learn from simulation techniques and present the benefit of lower computational cost than the simulators they learn from.Particularly, some GNN approaches have shown outstanding results on learning to simulate complex materials [10], [11].Sanchez-Gonzalez et al. [10] proposed the Graph Networks-based Simulators (GNS) framework, which demonstrated accurate forecasting for different materials such as sand or fluids.However, their work does not involve modeling the interactions when the materials are manipulated.Recently, the GNS framework was used to learn the dynamics of manipulated cloths [12], which suggests it is a good candidate for learning to manipulate granular materials.The closer work to our aim is DPI-Nets [9], as it combines a GNN model for learning material dynamics with model predictive control for controlling a fluid.However, they do not consider the interaction dynamics of pouring the material and the fluid does not have the mechanical properties of granular materials.

III. METHOD
In this paper, we address the problem of manipulation of granular materials that are shaped into a desired configuration by interacting with them using a rigid-object.We distinguish between two types of materials: the rigid-body that manipulates the granular material, and the granular material itself.We model both materials as particles, which has proven as a good representation for modelling the interaction between different materials [7], [9], [10].Rigid bodies are modelled as a set of rigid-body particles p r ∈ P r controllable, where the true position is assumed known.Granular material particles p g ∈ P g are affected by gravity, their interaction with each other and with rigid-body particles, and the boundaries of the manipulation scene.The granular particles cannot be directly controlled, but we can affect their state through their interaction with controlled rigid-body particles.

A. Graph-based representation
Our method makes use of a graph representation where each particle p i is represented by a node in a graph G.The nodes are connected via edges if the particles they represent interact with each other.We assume an interaction exists when two particles are in contact, that is, their distance is lower than a connectivity radius R (see Section IV-B).
We define a graph as G = (V, E), where v i ∈ V is a node attribute vector and e ij ∈ E represents an edge attribute vector, where i is the index of the sender node and j is the Fig. 2: The initial graph G i = (V i , E i ) is created from the particles of the granular material P g and the rigid-body P r .The particles are manipulated to match the goal particle distribution P g,G .The graph G i is mapped through the GNN model encoder f , processor g and decoder h to predict the acceleration ẍi ∈ A of the granular material particles.index of the receiver node.Here, we represent the node set as a matrix V ∈ R N ×D , where the i-th column represents the node attribute for node i, N represents the number of nodes and D the node attributes.Similarly, we represent the edge set as a matrix E ∈ R M ×F , where M is the number of edges and F the number of edge attributes.We define the node attribute vector as where ẋt−C , • • • , ẋt−1 are the C previous velocities of the particle, b t represents the relative distance to the manipulation scene boundaries, m denotes whether the particle is a rigid-body or a granular material particle, and c t represents the control input applied to the particle.The control input is defined as the current velocity of the particle ẋt for rigid-body particles, and as a zero vector for granular material particles.The edge attribute vector is where s ij represents the relative displacement between the particles s ij = p i − p j , and d ij represents their relative distance.

B. Graph Neural Network model
We learn the dynamics of the granular material particles and their interaction with the rigid-body using a GNN model.The GNN model is used to predict the acceleration of the granular material particles and their trajectories assuming their initial position as well as the position of the rigid-body particles are known.Our network architecture is based on the GNS framework [10].The model is divided into three sequential parts: (a) an encoder f : The encoder maps the input graph G i into a latent graph G l .The processor propagates the information through K latent graphs, outputting the final latent graph G K .Finally, the decoder produces as output the acceleration of each particle represented by a node using the node attributes of the final latent graph G K .Each sequential part is built as follows: a) Encoder: The encoder takes an input graph G i = (V i , E i ) and encodes the node attributes V i ∈ R N ×Di and edge attributes The latent node and edges are given by where ϕ v and ϕ e are multi-layer perceptrons (MLPs).
b) Processor: The processor consists of K interaction networks (IN) [6] such that the output attributes of one network are summed to its input attributes to produce a new latent graph.The new latent graph is given as input to the next network to propagate information through the graph.The output of the processor is the final latent graph Each IN is defined as where where ẍi ∈ A is the acceleration of the particle and ϕ a is an MLP.
The predicted accelerations are used to update the next state and then compute the trajectory.The next state is computed using the semi-implicit Euler integration via ẋi,t = ẋi,t−1 + ∆t ẍi,t−1 ,

C. Trajectory planning for granular manipulation
Our objective is to control the rigid-body particles P r by following a trajectory T that leads the granular particles to settle into a desired goal position P g,G .We consider a planning horizon H, where the granular particles start from an initial position P g,0 , located inside the rigid-body.The rigid-body can be controlled through two set of actions: rotation and translation u t = (R t , x t ).The optimal trajectory is defined by Q via-points T * = (u 0 , . . ., u Q ).The trajectory is then interpolated to get the actions in the planning horizon H that minimise the distance between the end position of the particles and the desired goal position: where d(•, •) is the distance between the desired and predicted distributions of the particles.We choose this approach as it is unnecessary to transport each particle to the exact position of that same particle in the target distribution, as long as the distributions match.In contrast to existing approaches in particle manipulation that use the Chamfer distance, which measures the distance of every particle to its nearest neighbour [9], [25], we propose to use the Wasserstein distance, which can be understood as the minimum cost of moving the particles from one distribution to the other.We expect this to express better the semantics of material transport.Thus, the trajectory planning is formulated as a discrete optimal transport (OT) problem, where we minimise the quadratic Wasserstein distance: where X i,G ∈ P g,G and X i,H ∈ P g,H are the samples of each empirical distribution.One of the issues when computing the Wasserstein distance for a large number of particles is the cost.In order to utilise the Wasserstein distance with large datasets we use the Sinkhorn loss S ε (P g,G , , P g,H ), which an approximation of OT and reduces the complexity as presented [26].
To solve the optimisation problem, we adopt a populationbased black-box optimiser, the Covariance Matrix Adaptation Evolution Strategy (CMA-ES) [27], and treat the trajectory planning as a constrained optimisation problem.As constraints, we use the manipulator end-effector limits and the velocity limits used for training the model, similar to [28].The constraints guide the optimisation to consider trajectories within the training data of the model.The optimisation problem is then min u0,...,u Q J(P g,G , P g,H , T ) for all q = 0, . . ., Q, where J(•) is the cost function and u min , u max and ∆u max are the boundaries and velocity limits respectively.The cost function, in addition to minimising the distance between experimental distributions, includes a term that penalises the acceleration of the rigid-body to reduces abrupt motions, such that where α and β are regularisation constants.
The optimal trajectory is found by following Algorithm 1.The algorithm takes as input an initial trajectory T as well as the initial and target particle configurations P g,0 and P g,G .Then, the next position of the rigid-body particles P r,t is computed after applying the actions u t .From this, the control inputs c t are computed as the difference of the rigid-body position P r,t and P r,t−1 .Next, the graph G i,t is created as explained in Section III-A.The next position of granular particles P g,t+1 is updated on line 5 by following the semiimplicit Euler formulation (4).Once the rollout has finished, the cost J(•) is computed.We perform the optimisation T times, where CMA-ES generates a new population until the maximum number of iterations is reached.

IV. EXPERIMENTAL RESULTS
In this section, we first provide information about the physics engine simulation set-up as well as the GNN training and the trajectory planning routine.Then, we perform an ablation study of the graph attributes and GNN parameters, where we evaluate the accuracy of the models predictions.After that, we assess the trajectory planning routine accuracy for pouring the granular material into different goal positions.The goals of the experiments are twofold: 1) to assess the required parameters for predicting accurately the interaction of granular materials with rigid-bodies, 2) to evaluate whether the proposed method can pour granular material into a desired shape, both in simulation and in a physical system.

A. Simulation set-up
We use Taichi-MPM [29] to generate training data for the GNN model.We create a simulated scene where a cup pours granular material into a container, which acts as boundaries of the scene.The container is a 10 × 20 × 20 cm box with an open top allowing the cup and granular material to be located above the container.The cup is modelled as a 3D mesh of ∅7 × 10 cm, which has been populated and replaced by rigidbody particles P r .The cup is controlled via translation and rotation actions.The granular material is modelled as sand particles which are initialised inside the cup.The simulation consists of H = 300 time-steps, where the number of particles is 1945, out of which 70% represent the granular material and the rest the rigid-body particles.

B. GNN training details
The training dataset consists of 20 simulations where the cup is translated along the Y -axis and rotated along the Xaxis.The translation and rotation axes are constrained so that the granular material is always poured inside the container.We provide details about the different trajectories used for

Wasserstein distance
Fig. 3: Boxplot of ablation study using Wasserstein distance.Boxes represent values between 1st and 3rd quartiles, orange horizontal lines represent medians and dotted green lines represent means.Models marked with darker blue represent the GNN model with the proposed graph attributes and architecture.
generating the training data in the Appendix.In addition, we have included a simulation where the cup only translates and rotates with small Gaussian noise and a simulation of the granular material falling without a cup in the scene.The connectivity radius used to construct the graph is R = 0.015.Before constructing the graph we add a randomwalk noise with standard deviation σ = 3 • 10 −4 to the particle positions to improve the acceleration prediction as shown by [10].The velocities and accelerations are normalised with mean and standard deviation of the dataset.The distance to boundaries b in node attributes and displacement s ij in edge attributes are normalised using the connectivity radius R, and b is clipped to range [−1, 1] as in [10].The model is trained for 2000 epochs using the Adam optimiser [30].For the first 500 epochs the learning rate is constant lr = 10 −4 , after which we switch to an exponential learning rate with γ = 0.997.The training is done using minibatches of size 2. For each MLP in our model, we use two hidden layers where each hidden layer has a size of 128.Each MLP in the encoder and processor are followed by a Layer Normalization [31].We have experimented using two different loss functions, the number of message-passing steps, including and excluding control inputs c t , as well as the length of velocity history { ẋt−C , . . ., ẋt−1 } in the node attributes.The first loss function evaluated, L g , is the L1-loss that considers only accelerations of granular material particles.The second one, L g+r , is the L1-loss of both granular material and rigid-body particle acceleration.Both losses are averaged over all particles in the minibatch.All GNN models were trained until convergence, which takes 12 days for the model with parameters K = 10 and C = 5 on a computer with a NVIDIA V100 GPU.

C. Trajectory planning details
We use four target distributions P g,G of the granular material for evaluating the optimal trajectory determined using Algorithm 1.The target distributions are generated from simulations that are not included in the training data of the GNN model.The trajectory T has Q = 6 via-points and it is interpolated using a piecewise cubic hermite interpolating polynomial to the rollout horizon length used in the GNN training and test models.For the CMA-ES optimiser we used an initial variance of σ T = 1.5 and a population size of 20.In order to speed up the optimisation process, we scaled the trajectory rotation by π and the translation by 0.11 so that both variables are within the same range.The algorithm is run for 150 iterations with five different random seeds, where each random seed took 10 hours on a computer with a V100.The constraints were defined as u min,max = {±2.8973,±0.1} and ∆u max = {2.1973,0.02}, which matches the maximum values of the training data distribution.We used α = 1000 and β = 0.001 as values for the regularisation terms of the cost function (8).The α parameter is scaled with a high value due to the order of magnitude of the Sinkhorn loss, whereas β is reduced to keep it as a second minimisation objective.The values for these parameters were determined experimentally.We used one of the sinusoidal trajectories used for training (see Appendix) as initial trajectory T , where the final material distribution does not match the test cases target.

D. GNN ablation study
We perform an ablation study of the aforementioned parameters.To evaluate the accuracy of the predictions, we use the Wasserstein distance between the predicted granular material particles and the ground-truth simulation.The initial Wasserstein distance for simulations when the particles are relatively still in the cup and the forecast error has not yet accumulated is in the order of 10 −5 .In our experimental set-up we can consider that a Wasserstein distance of 10 −2 for the entire rollout presents distant distributions, whereas a value in the order of 10 −4 accurately matches the rollout particle distributions.The tests are performed by starting from the same initial state onward to create a rollout prediction, where the rollout length is the same as the simulation.The test-set includes 8 simulations that are in the model training domain.The results are summarised in Fig. 3, where the box plot excludes minimum and maximum values, since they are similar in each tested model.In Fig. 3 the best performing model is highlighted in darker blue, which was used to rollout the dynamics in the trajectory planning.
a) Training loss: We experimented on two loss functions L g and L g+r .As shown in Fig. 3, the loss L g presents a slightly lower median and mean.The most noticeable difference between the two models is their quartiles, which are lower for the loss L g .This provides evidence that including the acceleration of rigid-body particles in the loss is unnecessary as it affects adversely when learning granular particle behaviour.
b) Control inputs: We investigated whether including control inputs c t as a node attribute improves the model accu-racy.Considering the quartiles of the models in Fig. 3 we can observe lower loss for the model that includes control inputs.This is to be expected since it gives additional information about the movement of the rigid-body, which improves the predictions of the granular material particles.c) Message-passing steps: We also experimented on the number of INs in the processor.[10] suggests that using a higher number of message-passing steps provides better results.We selected K = 10 as maximum and evaluated how models with smaller values perform.The range of values selected was K ∈ {1, 2, 4, 5, 6, 8, 10}.We can notice in Fig. 3 that the highest K value indeed does perform best.The message-passing steps affect on how far the particle information reaches in the graph and, thus, how many interactions affect the particles.With K = 4 the performance is not significantly worse than K = 10.This suggests that K = 4 message-passing steps is enough to capture the system behaviour.However, the third quartile of K = 6 and K = 8 are higher than for K = 4, which suggests otherwise.
d) Node velocity history length: Finally, we assessed how the number of previous velocities included in the node attribute affects the performance.The values we tested were C ∈ 2, 3, 4, 5}.One would hypothesise that C = 3 would be sufficient to capture the dynamics, as granular materials can be approximated via a second-order system.However, the performance of C = 4 and C = 5 is significantly better than the other models.This suggests that knowing the three previous velocities is not enough to accurately predict rollout dynamics in our system.
Overall, the results show that including the control input and the L g loss function yield drastically lower values compared to the other variants, as the interquartile range improves by almost one order of magnitude.The results for the number of message-passing steps showed that with K = 10 the mean and interquartile range are lowest within the tested models.The node velocity history length C = 5 provided slightly higher mean and median than C = 4, but presented lowest interquartile range.For this reason we choose to use C = 5, K = 10, control inputs and L g as loss function for the GNN model in the trajectory planning.This model speeds up the computation of the rollout dynamics by 20 times the highfidelity simulator.

E. Trajectory planning results
The Sinkhorn loss for each of the four test cases is shown in Table I.The initial loss S ε (P g,G , P g,0 ) measures the distance between the distribution of the particles in the initial configuration of the cup and its target.We also provide the loss for the end distribution of the particles following the initial trajectory P g,H .This is used as a reference to highlight the improvement on matching the target distribution using the proposed algorithm.We can notice that the order of magnitude improves by an order of two following the optimal trajectory P g,H * .Our experiments showed that two particles distributions are well matched when the Wasserstein distance is in the order of 10 −6 , whereas distances larger than 10 −4 are far from the target distribution.The results indicate that our method is able TABLE I: Sinkhorn loss between the target shape P g,G , the initial material distribution P g,0 , the final distribution following the initial trajectory P g,H , and the optimal trajectory P g,H * , for each test set over five different random seeds.
Test Sε(P g,G , P g,0 ) Sε(P g,G , P g,H ) Sε(P g,G , P g,H * ) to consistently reduce the distance between the end and target particle distributions by an order of magnitude.The particles distribution after following the optimal trajectory as well as the desired distribution for each test case are shown in Figure 4.
The final distribution for the test cases one, two and four nicely overlays the desired configuration of the material.On the other hand, the third test case Sinkhorn loss is reduced by an order of magnitude from the initial loss (see Table I).However, the final configuration does not accurately match the target shape.We hypothesise that with a larger population of CMA-ES the Algorithm 1 would find a better solution.
We noticed that our GNN model was unable to generalise to rotation and angular velocities greater beyond those seen during training, where the model would predict the material leaking from the rigid-body (see supplementary material).This

F. Granular manipulation in real-world
We perform experiments on a real set-up where we use a Franka Emika Panda robot to manipulate the cup.We selected ground coffee as the granular material to pour into the container.We executed the best four trajectories optimised in simulation using the real robot and qualitatively evaluated the end result of the ground coffee particles.Prior to running the trajectories, we transform the reference frame of the rigid-body into the robot end-effector reference frame.The robot is controlled via a Cartesian controller [32], where each trajectory point is interpolated from the simulation frequency (100Hz) to the robot frequency (1KHz).
We show the qualitative results in Figure 5.We can observe that the first and second test cases, (Figure 5 (a), Figure 5 (b)), match closely the desired distribution.In contrast, the fourth test case, Figure 5 (d), slightly differs from the target distribution.Furthermore, the third test case, Figure 5 (c), which required pouring in both left and right side of the container was the distribution furthest to the target.In addition, in the supplementary material we provide the real-world performance of the predefined trajectories used for generating the target distributions.These show that the distributions generated in the simulator do not exactly match the real-world, with some spilling of the material for the first test case, and a slight mismatch for the third and fourth test cases.This provides further evidence of the sim-to-real gap between the simulated and the real material.
As a summary, our results provide evidence that the proposed method is able to optimise the trajectory of the cup and pour the material in the desired configuration using the GNN rollout.In addition, the results on the real-world highlight that the proposed method is able to effectively pour the material in some of the presented test cases without gathering data from the real-world to train the model.However, some of the test cases were far from the results using the GNN rollout.This is at least partially caused by imperfect simulation.Particles sometimes leak through the rigid body in the simulation, which is also illustrated in the supplementary material.We hypothesise that with a higher fidelity simulation that resembles better the granular material, such as the one proposed by [17], the proposed model would be able to match better the real material and pour precisely the granular material.

V. CONCLUSION
In this paper, we introduced a model-based approach for manipulating granular materials into a desired configuration by interacting with a rigid-object.The proposed method uses a GNN to learn the interactions of the granular material from simulations, as well as the interactions of the material with the rigid-body that manipulates it.We presented a trajectory planning routine that uses the GNN model to rollout the dynamics and optimises the trajectory by minimising the Wasserstein distance between the rollout result and the goal distribution of the poured material.We provided a study of the GNN model architecture as well as the graph attributes that can accurately predict the interactions between the material and the manipulated rigid-body.Our results show that the planning routine is able to find the required motions to pour the material in the desired configuration.We also demonstrated that the optimal trajectories used with the GNN rollouts are able to effectively pour the material in a real-world set-up.
One of the main limitations of using data from a simulator for planning is the simulation-to-real world gap.Naturally, using a high fidelity simulation is beneficial but the calibration of any simulation with a particular real world setting is difficult.Thus, it is an important avenue for future to study how simulation can be combined with limited data from the real world in order to achieve complex granular manipulation tasks across a variety of materials and tasks.

ACKNOWLEDGEMENT
The authors would like to thank Fares J. Abu-Dakka and Gokhan Alcan of Aalto University for their help and support in this work.The authors would also like to acknowledge the computational resources provided by the Aalto Science-IT project.

APPENDIX ADDITIONAL TRAINING DETAILS
We defined four sets of trajectories equations to generate the data for training the Graph Neural Network: 1) The first trajectory rotates following a cosine function with zero-mean Gaussian noise.The rotation stops for several timesteps once the maximum rotation is reached and then rotates back to upright position.The translation is given by a zero-mean Gaussian noise which is added to the position at the previous timestep.
2) The second trajectory follows sinusoidal to translate and rotate the cup.
3) The third trajectory is given by a linear translation and rotation that tilt the cup a single time in both directions with constant velocity.4) The last trajectory is given by a linear translation and rotation with Gaussian noise N (0, 10 −3 ) and N (0, 1) respectively.The trajectory is defined as 300 time-steps where the first third is limited to translation, the second to rotation, and the last to going back to the origin position and orientation.
All the trajectories have randomised direction, maximum rotation angles and frequency for the sine and cosine trajectories, and maximum velocities for the linear trajectory.The specific details as well as the open source code can be found at: https://sites.google.com/view/granular-gnn-manipulation.
the set of edges whose receiver node is the node with index j.The functions φ e and φ v are MLPs such that each IN has the same architecture but different weights.c)Decoder: The decoder produces the output for each node using the nodes of the graph produced by the final IN of the processor by

Fig. 5 :
Fig. 5: Qualitative results of pouring ground coffee.The images show front and top views of the particles distribution after following the optimised trajectories on the real robot (left) and target distribution using the ground-truth simulation (right).