Learning Differentiable Tensegrity Dynamics using Graph Neural Networks

Authors: nelson  chen
kun  wang
william r johnson
rebecca  kramer-bottiglio
kostas  bekris
mridul  aanjaneya
gen  graph
  𝑋
𝑋  t-
t  𝑋
Venue: robot-learning_org_CoRL_2024_Conference
Published: 2024-06-07 08:14:09

Abstract: Tensegrity robots are composed of rigid struts and flexible cables. They constitute an emerging class of hybrid rigid-soft robotic systems and are promising systems for a wide array of applications, ranging from locomotion to assembly. They are difficult to control and model accurately, however, due to their compliance and high number of degrees of freedom. To address this issue, prior work has introduced a differentiable physics engine designed for tensegrity robots based on first principles. In contrast, this work proposes the use of graph neural networks to model contact dynamics over a graph representation of tensegrity robots, which leverages their natural graph-like cable connec- tivity between end caps of rigid rods. This learned simulator can accurately model 3-bar and 6-bar tensegrity robot dynamics in simulation-to-simulation experiments where MuJoCo is used as the ground truth. It can also achieve higher accuracy than the previous differentiable engine for a real 3-bar tensegrity robot, for which the robot state is only partially observable. When compared against direct applications of recent mesh-based graph neural network simulators, the proposed approach is computationally more efficient, both for training and inference, while achieving higher accuracy. Code and data are available at https://github.com/nchen9191/tensegrity_gnn_simulator_public

Main paper: 
 introduction: 
 Tensegrity robots consist of rigid struts (rods) and flexible elements (cables). This allows them to be lightweight while exhibiting both compliance and rigidity. They can locomote by changing their shape via actuation of their cables. Tensegrity robots are attracting interest due to their wide array of possible applications, such as manipulation [1] , locomotion [2] , morphing airfoils [3] , and spacecraft landing [4] . Recent work [5] has also explored the assembly of multiple tensegrity robots to form and perform complex structures and tasks. Tensegrity robots, however, are difficult to accurately model and control due to their high number of degrees of freedom, significant nonlinearities, and complex dynamics, involving oscillatory behaviors and compliant mechanisms. This work proposes the use of graph neural networks (GNNs) to improve on previous work on the modeling of tensegrity robots using differentiable engines [6, 7, 8] , the current state of the art 8th Conference on Robot Learning (CoRL 2024), Munich, Germany.𝑈 0 𝑈 1 𝑈 T-1 𝑈 T SIM SIM SIM … G GFigure 2 : A trajectory rollout: Upon initialization, the tensegrity graph structure is generated and then used as input at every simulation step -a state X t and controls U t are passed to a feature generation module that updates the graph structure with contact edges and generates feature vectors for all nodes {N i } as well as edges {E ij }. These are passed to the simulator to predict X t+1 .in matching simulation to reality for tensegrity robots. Inspired by recent efforts that demonstrate GNNs' success in modeling discontinuous, rigid-body contact [9, 10, 11] , a GNN-based framework is proposed for learning contact mechanics for tensegrity robots. The method injects a structural prior by representing tensegrities as graphs. These graphs are constructed by leveraging the robots' natural graph-like connectivity with cables between rod end caps, as well as decomposition of the rigid rods to smaller primitive objects (e.g., spheres and cylinders), which constitute object-level nodes (Fig. 1 ). This graph representation has orders of magnitude fewer nodes and edges than the mesh-based representation introduced in prior GNN work for rigid-body simulators [9] , facilitating faster training and inference with less hardware and fewer computational resources, while achieving higher accuracy.The accompanying experiments evaluate the method and compare it against the first-principles differentiable physics engine in simulation and for a real tensegrity robot. In simulation, MuJoCo [12] provides the ground-truth system. The comparison shows that the learned GNN model performs better than the baseline, for both the 3-bar and 6-bar tensegrity variants, when it has full observability of the robot's state. The available data for a real robot correspond to captured trajectories on a 3-bar tensegrity using a vision-based solution [13] . The real data, however, only include end cap positions of the rods, but without instantaneous velocities at each time step, which are critical for simulating active motion. Due to this partial observability, the first-principles differentiable engine [8] can only be trained with the whole trajectory where the initial state is at rest. In contrast, the GNN model does not require instantaneous velocity information and can improve upon the baseline by warm-starting with simulation data first and then fine-tuning given the real data. The evaluation includes measuring the computational requirements of mesh and surface-based versions of GNNs used in prior work [9, 10, 11] compared to the proposed sparser representation. The proposed method requires less computational resources for both training and inference. Finally, an ablation study evaluates the different choices of the proposed pipeline. In summary, the key contributions are:• A simple and computationally efficient graph representation for tensegrity systems using objectlevel nodes and edges that can be used for modeling them using a GNN. • A learning pipeline that combines both analytical physics components and a GNN to train models that are predictive and stable over long rollouts. • Evaluations, in simulation and reality, of the GNN in modeling tensegrity robot dynamics. 
related work: 
 One family of tensegrity simulators is based on solving systems of analytical differential equations representing tensegrity dynamics and structures. These include TensegrityMATLABObjects [14] , Software for Tensegrity Dynamics [15] , and Models of Tensegrity Structures [16] . These simulators are built using MATLAB and only support frictionless contact. Other simulators support frictional contact and are based on traditional engines where governing equations from physics, analytical models, and numerical solvers are used. Paul et al. [17] built a simulator on top of ODE [18] , which supports massless and volumeless virtual cables but has no contact. The open-source NASA tensegrity robot toolkit [19] and Caliper [20] are built on top of Bullet [21] . These simulators can still suffer from a large simulation-to-reality gap due to unknown system parameters or unmodeled physics. To address this, Wang et al. developed a differentiable physics engine for tensegrity robots [6, 7, 8] , which serves as the baseline for this work.Differentiable physics engines have been gaining momentum in robotics. They are able to identify and learn model parameters via gradient-based optimization, often resulting in faster training and better data efficiency. These simulators range from fully first-principled [22, 23, 24, 25, 26] to purely data-driven [27, 28, 29, 30, 31] , as well as hybrid setups [32, 33, 34] .One emerging data-driven modeling choice is graph neural networks (GNNs). GNNs are able to model particle-based physics [35, 36, 37, 38] , mesh-based physics [39, 40, 41] , and deformable rod dynamics [42] . Contrary to prior works [33, 43] that suggest that neural networks cannot learn discontinuous, rigid-body contact, recent work [9, 10, 11] demonstrates that GNNs can. Applications in robotics include GNNs modeling object-object and object-gripper interactions [44, 45, 46] and predicting the next states of a soft gripper [47] . Beyond simulation, GNNs have also been used in a variety of other applications, such as modeling robot kinematics [48, 49] , multi-robot coordination [50] , and path-planning [51] . This work uses a hybrid model with analytical models of actuation and passive forces combined with a data-driven GNN model for ground contact. 
approach: 
 Tensegrity robots are typically treated as a set of rigid rods and a set of cables that connect between the rods' end caps, referred to as their system topology. The robot state X t includes the state of each rod i at time step t, X t i = (P t i , R t i , V t i , Ω t i ), consisting of the position P t i , orientation R t i , linear velocity V t i , and angular velocity Ω t i . Then, the simulator can be seen as a function F SIM (X t , U t ) that takes the current state X t , along with a set of controls U t , to predict the next state, i.e., X t+1 = F SIM (X t , U t ) (1) The proposed simulator F SIM uses a GNN to model the robot dynamics where the tensegrity robot is represented by a graph, G t , with nodes N t and edges E t , at time step t. This results in a learnable simulator GNN θ that predicts changes in velocity from contact:EQUATION)EQUATIONwhere F (•) is a feature generator function. In parallel, passive forces (cable and gravity) are computed analytically with function H(•) and transformed to node-level velocity changes, ∆v t P F , via mapping function M (•).EQUATION) Finally, ∆v t GN N and ∆v t P F are integrated up with the semi-implicit Euler scheme to predict next node states (p t+1 , v t+1 ) and mapped back to rigid-body state X t+1 with M ′ (•).v t+1 = v t + ∆v t P F + ∆v t GN N (5) p t+1 = p t + v t+1 ∆t (6) X t+1 = M ′ (p t+1 , v t+1 ) (7)This procedure serves as a single simulation step in our framework. Trajectory rollouts can then be generated by applying this process for K number of steps in an auto-regressive manner (X 0 , X 1 , . . . , X K ), as shown in Fig. 2 . The details of a single step are depicted in Fig. 3 .The actuation and cable forces are computed analytically with linear models. For actuation, there are motors that act on cables to change their rest lengths. The cables are modeled as linear springs using Hooke's law, but they only allow tension and not compression. It should be noted that in sim-to-sim experiments, these linear models are exact, but in reality, the cables and the motors can have non-linear components that the GNN can potentially compensate for. The current rigid-body state X t and controls U t are used to analytically compute the cable's rest length changes ∆l t+1 rest and the passive force induced velocity changes ∆V t+1 P F . ∆V t+1 P F is mapped to node-space velocity changes ∆v t+1 P F . X t and ∆l t+1 rest are used to generate node and edge features. They are then encoded, processed through multiple messagepassing steps, and decoded to the predicted ∆v t+1 GN N . Finally, ∆v t+1 P F and ∆v t+1 GN N are summed, time-integrated, and mapped to the predicted next rigid-body state X t+1 . i , E t ij ) and node states in the world frame x t i = (p t i , v t i ) are computed based on (X t , U t ) and are added to the topology graph G 0 to form G t . Each rod is represented by a subgraph consisting of a set of connected body nodes along its center axis formed by decomposing the rod into simpler primitive rigid bodies, as shown in Fig. 4 . Rod subgraphs are connected with each other via cable edges at nodes corresponding to the cables between pairs of rod end caps. A special ground body node is constructed with dynamically generated contact edges connecting the ground body node to rod body nodes that are within a radius r g . All of these together form a full graph that represents the tensegrity robot. Examples of the graph structures for 3-bar and 6-bar tensegrities can be seen in Fig. 1 . Nodes The set N of nodes represents primitive rigid bodies that, together, compose the rods. For the GNN to be translationequivariant, velocities, instead of positions, are used as input features. More detailed descriptions of the features can be found in Appendix A. In addition, the proposed approach only requires the average velocity v F D i , which can be computed from positional data as (p t i -p t-1 i )/∆t, as shown in Fig. 5 . Previous works in traditional physics simulators [52, 23] that model contact typically compute time-of-impact within a time step and split the step into a pre-contact and post-contact phase for accurate simulation. This computation requires accurate approximations of instantaneous velocities, something hard to infer given only positional data. In contrast, the GNN is able to learn over the average velocities and accurately incorporate contact dynamics in its predictions.Edges There are three types of edges: (i) body edges E body ij , (ii) cable edges E cable ij , and (iii) contact edges E con ij . The body edges E body ij connect nodes belonging to the same rod. These edges learn rigid-body constraints, but do not strictly enforce them. This allows for a small degree of softness that can aid in the learning process. The cable edges E cable ij connect end cap nodes belonging to different rods with physical cable attachments. The contact edges E con ij connect body nodes to the ground node when they are within a user-specified distance. While contact is often viewed as a constraint, this formulation models contact as a unique edge type in the graph neural network due to the fact that contact introduces discontinuous motion with complex friction dynamics.GNN architecture -encoder The encoder is a multi-layer perceptron (MLP), which receives the input feature vectors N i or E ij and outputs a latent vector embedded in a larger dimensional space. There is a dedicated encoder for each type of node and edge of the graph. In our setup, there is one node encoder, MLP enc N , and three edge encoders, MLP enc E body , MLP enc E cable , MLP enc Econ . GNN architecture -processor The processor is a sequence of message-passing steps that aims to learn the latent dynamics. At each message-passing step l, all latent edge vectors are updated from the current latent edge vectors and the two connecting latent nodes' vectors. Then, node vectors are updated from aggregating new edges and passed through another MLP. This process is repeated L times with L different MLPs that do not share weights.EQUATIONEQUATIONGNN architecture -decoder The decoder is also an MLP that takes the last latent node vectors and outputs the predicted velocity changes ∆v t i per node, which are then used to integrate up to velocities and positions. ∆v t i are predicted instead of position or velocities so that the GNN's predictions would not violate the underlying governing differential equations.EQUATIONLoss The loss function is the mean squared error (MSE) per node between the predicted and (computed) ground truth (GT) velocity changes.EQUATIONEQUATIONAs the experiments show, the loss must be defined at the node level instead of the rigid-body state level. A loss at the state level does not drive the GNN to learn node dynamics since the node output is averaged when mapping back to the rigid-body state. In addition, ∆v i are used instead of positions or velocities as the acceleration errors are not functions of the time step. As time step decreases (often needed for accuracy and stability), the positional error magnitude becomes smaller, causing the update gradients to vanish. 
experimental results: 
 The approach is compared against the previous first-principles differentiable engine (DPE) in both simulation and reality. There is also an ablation on which parts of the engine should be computed with first-principles and which should be learned via a GNN, as well as which quantities to compute the loss over. Lastly, the proposed approach is compared against the surface-based (mesh and meshless) GNN representations from the literature on learning rigid-body simulators.Evaluation metrics: The metrics are the average positional, rotational, and ground-penetration error over a trajectory rollout (X 0 , X 1 , ..., X K ). The positional error e pos is measured as the absolute distance between the predicted and GT robot center of mass P normalized by the length of a rod L rod . The rotational error e rot is measured as the angular difference between the rods' predicted and GT center axes r. The ground penetration error e pen is the absolute penetration distance into the ground beyond what is seen in the GT data and normalized by the length of the rod, where z is the height of the point closest to the ground on the robot:e pos = 1 L rod K |P i GT -P i pred |, e rot = 1 K cos -1 (r i GT • ri pred ) e pen = 1 L rod K max(min(z i GT , 0) -min(z i pred , 0), 0)Sim-to-sim evaluation Two types of GT trajectories are generated in MuJoCo: (1) active trajectories with control signals, and (2) passive trajectories where the tensegrity robot is initialized with random height and linear velocity. This is done for both a 3-bar and a 6-bar tensegrity robot. Forty-six trajectories were generated, amounting to ∼ 17 minutes of data. These data were split into 50% training, 25% validation, and 25% testing by trajectory. The models were trained for a fixed number of epochs, and the model with the lowest validation loss was saved and executed on the held-out test set. The baselines are the DPE, an MLP trained to predict rod dynamics, and an MLP trained to predict all rods simultaneously. Penetration error (% rod length)Figure 6 : Sim-to-sim results for the 3-bar and 6-bar robots. The approach is compared against 3 alternatives: the baseline differentiable engine, an MLP for each rod, and an MLP for all rods.In simulation where we have access to high-frequency, full state information, the proposed method strongly outperforms the baselines as highlighted in Fig. 6 . It improved upon the differentiable physics engine by 30% and 9°for the 3-bar tensegrity and 11% and 13°for the 6-bar tensegrity. The 6-bar tensegrity was more difficult to learn over due to increased complexity. The 6-bar robot has a smaller base of support than the width of the robot, which causes it to be unstable with small momentum. For the 3-bar tensegrity, the base's width is equal to the robot's width, so it is more stable.The MLP variants performed poorly, especially with high penetration errors, reinforcing the results seen in previous works showing vanilla neural networks have difficulty learning discontinuous contact dynamics. Although the penetration error is higher in the proposed method than the baseline, both the proposed model and baseline have low penetration errors, i.e., below 0.01% (0.036mm) in simulation results. Furthermore, the authors hypothesize that, with the graph formulation, the no-penetration constraint is "softened," and hence the contact dynamics are smoothed and learning is eased. are unavailable. Furthermore, the data are captured at a lower frequency with non-uniform step sizes, including control signals. Due to these issues, additional steps to the current training and testing process are used to work with real data. A PID controller is included in the loop reflecting the operation of a PID controller on the real platform that receives cable length targets and generates the low-level controls. This introduces temporal differences, and the evaluation criteria focus on measuring errors at the last frame per gait cycle. Finally, the engine is pre-trained over data generated from a simulator (MuJoCo and baseline), then fine-tuned over the entire trajectories of the real robot.The GNN model can still learn over observations of a real tensegrity and improve upon it, as seen in Fig. 7 . The improvements are more incremental relative to the full observability results with about 3% improvement over the baseline in positional error and about 1°and 5°over the baseline in rotational error. A potential reason is that fine-tuning over long trajectories may not be ideal. The long trajectories produce deep computational graphs, which can cause vanishing gradients. Secondly, the long trajectories also have noisy observations that produce conflicting gradients when trained in a single step. Lastly, the PID controller also influences the number of steps and input control signals, changing the internal structure of the computational graph and, subsequently, the loss function that the model is optimizing for. Thus, it is not necessarily the case that the gradients are still pointing in a downward direction for the changed loss function. Qualitatively, the GNN models trained in this fashion are still able to exhibit improved predictive capabilities in terms of the test trajectories of Fig. 8 . Similar to the simulation results, even though the GNN results have higher penetration errors than the baseline results, the GNN results are still below 0.008% (0.03mm). 1 evaluates (i) an all analytical model (DPE baseline), (ii) analytical with a GNN global residual, (iii) analytical passive forces (cable and gravity) computation and the GNN for contact (our chosen method), and (iv) a single GNN that learns both passive forces and contact.The data used here are the 3-bar tensegrity data from MuJoCo also used for the above sim-to-sim experiments. All GNN variants outperformed the all analytical baseline, and the proposed hybrid approach showed the best results in positional and rotational error.Table 2 evaluates the choice of the loss function. Two alternatives to the proposed approach are considered that operate in rigid-body space: (i) a positional loss over the rod end cap positions, which combines positional and rotational errors into one metric; (ii) a 6D pose loss comprising a Euclidean distance between centers of mass and an angular difference between center axes per rod. The end points' positional loss outperformed the 6D pose loss, but the proposed node-based loss strongly outperformed both rigid body-based losses as it better enforces node dynamics. Mesh/Surface representations vs. multi-object representations Table 3 compares the proposed approach against alternative choices for the graphical representation for the GNN previously used for general rigid-body GNN simulators i.e., the general mesh [9, 10] , and surface-based [11] The proposed object-based representation is much more accurate as well as efficient. The mesh and surface-based representations did not converge to a good rollout accuracy for the same epochs. They also need more time, model size, and node density to achieve reasonable accuracy, all of which increases the computational resources required. The proposed approach can be trained via CPU only with a small increase in training time. For inference over GPU, the proposed representation is mildly slower than the mesh and surface ones. When inference is performed over a single CPU, the proposed object-based representation is faster than the alternatives. 
limitations: 
 While the proposed engine outperforms the alternatives in data captured from a real 3-bar tensegrity, it performs more effectively on data captured from simulation with full observability. This is due to several key differences between the two setups: (i) real sensing data only provide the center position of each end cap, providing only five out of the six DoFs of each rod (missing the orientation about its center axis); (ii) real state estimation is not directly estimating instantaneous linear and angular velocities; (iii) real observations have lower frequency than what is possible in simulation and may be available at non-uniform time intervals; (iv) the real PID controller was a black box that could not be perfectly modeled in simulation. A potential direction to overcome these partial observability limitations corresponds to applying trajectory smoothing and using additional sensing information to estimate each rod's orientation about its axis. Smoothing can help identify the set of states that best explain the entire observed trajectory so that it respects physical constraints.Another limitation is that the proposed method only considers flat ground, as a step in modeling contact dynamics for tensegrity structures using GNNs. To deal with non-flat terrains and obstacles, the plan is to generalize the distance-to-ground feature to a signed-distance field given the terrain. This would be a high-dimensional feature, so the encoding of this information would need to be explored. Additionally, data diversity would increase, thus increasing data requirements. 
discussion: 
 This work shows that representing tensegrity robots as object-based graphs allows GNNs to learn complex contact dynamics and improves simulation accuracy for differentiable engines. It also provides computational benefits over alternatives. This observation can have broader implications for modeling robotic platforms via GNNs, especially those that are difficult to model analytically and which exhibit a graphical structure. A potential target is adaptive hands [53] that are also cabledriven, have compliant joints, and can be graphically represented. The simulator can also be used for learning controllers that achieve more sophisticated gaits and skills.Network architecture All the multi-layer perceptron (MLP) models have two layers, ReLU activations, and residual connections. All MLPs, except the decoder, apply LayerNorm on their outputs. For the surface-based vs multi-object experiments, the width and latent vector dimension sizes were 64. For all other experiments, the dimension sizes were 128. Lastly, models for the 3-bar tensegrity had four message-passing steps while the models for the 6-bar tensegrity had 10 message-passing steps due to the larger graph. All inputs were normalized to zero-mean and unit variance.Rigid-body state to node states Let T t be the rigid-body transformation that takes the rigid body from its body frame to the world frame at time step t. To compute the node states, p t i , v t i , the same transformation is applied to the node positions in the body frame:[p t i , v t i ] = [T t (p B i ), (T t -T t-1 )(p B i )/∆t]Node states to rigid-body state Since the node positions are not strictly enforced to maintain relative distance from one another, there can be shape violations. Hence, an approximation of the rod's pose is needed. P t is approximated as the average of the node positions. R t is computed as the minimal rotation needed to rotate the z-axis unit vector to rod's center axes r, approximated with the unit vector pointing from one rod endpoint to the other. A more principled method, such as shape matching [54] , can be used if the graph is more complex. Subsequently, the rigid-body velocities are the first-order approximation of velocities needed to take[P t , R t ] to [P t+1 , R t+1 ].Cable model The cable model is a linear model following Hooke's law that allows for tension but not compression. It computes the cable force F t cable at time t based on the stiffness component F t K and the damping component F t c :F t K = K(l t rest -∆x t ) if l t rest ≥ ∆x t 0 otherwise F t c = c(v t rel • xt ) F t cable = (F t k -F t c )x twhere K is the cable stiffness, c is the cable damping, l t rest is the rest length at time t, ∆x t is the distance between the cable attachment points at time t, v t rel is the relative velocity between the cable attachment points, and xt is the unit direction pointing from one attachment point to the other.The actuation model consists of a linear model of a motor that receives an input control signal u t between [-1, 1] and acts on a cable by changing the cable's rest length l t rest at time t: ω t = sω max u t ∆l rest = 0.5(ω t + ω t-1 )r winch ∆t l t rest = l t-1 rest -∆l rest where ω t is the angular velocity of the motor at time t, s is an input speed parameter [0, 1], ω max is the maximum angular velocity the motor can achieve, ∆l rest is the change in rest length due to the motor, r winch is the winch radius of the motor, and ∆t is the time step size. MuJoCo was the simulator chosen to be the ground truth data in the sim-to-sim experiments. The data were generated using the following setup:• Rigid bodies and cables were set with the same mass, geometric properties, and stiffnesses as the real robot shown in Table 4 of the appendix;• Friction coefficients were set to 0.5 for tangential, 0.005 for torsional, and 0.9 for rolling.• The time step size was 10 ms, and a semi-explicit Euler time integration scheme was employed.• The tendon model was adopted but modified to only apply tension but no compression forces.• The authors executed the rolling and crawling controls developed for the real robot, and a simulated PID controller, to generate trajectories as the training, validation, and testing data sets.• Additionally, the authors generated drop and throwing trajectories by initializing robots at random heights and random linear velocities.MLPs were used in the sim-to-sim experiments to show why a specialized architecture based on GNNs is beneficial. In order to best compare against the MLP baselines to the GNN, the authors tried to keep the neural network size the same between the two. This resulted in the MLP comparison points having:• Layer widths of 128 For the real 3-bar tensegrity robot experiments, the following steps were taken:Then, the pretrained GNN model was fine-tuned by training over the real training trajectories, where a single forward pass is a full rollout. This model was trained over 10 epochs at a relatively small learning rate of 10 -8 . Additionally, a PID controller was included in the training loop. 
: 
 A simulated 6-bar tensegrity robot in MuJoCo and the graphical representation superimposed. For both platforms, the graph consists of nodes (white) along the rods' axes connected with body edges (blue). Cable edges (yellow) connect two nodes on end caps of different rods. A special ground node (red G node) has contact edges (red) connected to body nodes close to the ground. 
 
 Appendix:  


Decision: PRE REBUTTAL:

High level summary of reviews:

Strengths:

- All reviewers feel that the paper presents a novel application of GNNs to the complex dynamics of tensegrity robots.
- Many reviewers state that the paper is well-written and clear.
- Experiments are thorough (and on real world hardware) and the video included was high quality.
- Improvement over state of the art for tensegrity robots.
 
Weaknesses:

- Multiple reviewers question whether the experiments generalize well; for example, the models were only tested on flat ground (method assumption) and the real experiments were only conducted on a 3-bar robot.
- Some issues around the problem formulation were raised by multiple reviewers. For example a position-based euler-scheme would be too stiff (Reviewer Luga).
- Additional clarifications on method details were requested (e.g. Mujoco simulation setup, details on MLP, etc). See individual reviewer comments for details.
- The ablation studies are limited and more exploration into different architectures or representations could be beneficial.
- The penetration error is higher and this is not explained in the paper.
- Only incremental improvements on real-world data.

POST REBUTTAL:

The authors provided a very detailed rebuttal and made a number of clarifying updates to the manuscript. Many of the weaknesses raised by the reviewers were resolved. One remaining weakness is still the incremental improvements on real-world data, which will certainly limit the impact of this work within the broader community (as the community is very real-world results driven these days). The authors comment that this will effectively be fixed in another submission (with orthogonal contributions) is understood, but the decision to make these 2 papers rather than one strong paper definitely results in a weaker submission as a result. This paper has a number of novel contributions and is well written is clear, but is ultimately weakened by final results. With that said, the paper marginally crosses the threshold for acceptance. The simulation results might be of interest to the community and the algorithmic contributions are somewhat novel.

Reviews: review: title: title: Interesting application of graph-neural-networks to tensegrity structures.
paper_summary: paper_summary: This work proposes a method for simulating tensegrity structures using graph-neural networks to aid in modeling contact dynamics. The approach is compared to traditional analytic rigid-body simulation and validated on a tensegrity robot.  The novelty of the work is in the explicit modeling of the tensegrity structure with a graph-neural-network (GNN) to aid in the computation of the contact dynamics, where other attempts either used a generalized formulation (mesh-primitives + GNNs) or relied on rigid-body simulators and first-principles.
main_review: main_review: # Soundness of claims, significance of work, novelty of contribution, and relevance to CoRL

The authors’ provide a technique for modeling a tensegrity structure and a process for training a GNN to match experimental observations. Furthermore, the authors’ claim the method is more computationally efficient (faster) and more accurate in predicting the behavior of tensegrity structures.

The technique has immediate application in modeling “semi-soft” structures and possibly mechanisms that have numerous active tensile elements, such as tendon-driven robotics and musculoskeletal modeling.

The approach is novel and important beyond previous work using rigid-body simulators and differentiable physics, because it provides a very direct data-driven approach for fitting the simulation to observed phenomena.

The claims on performance are weak, since this paper does not provide significant comparison with previous methods. Furthermore the comparisons that are provided show comparable or modest improvements over the next-best method. Suggestion: soften the statements on computational speed and clarify what makes this method more accurate OR provide further evidence that this method is superior against a wider range of simulators referenced.

# Weaknesses and limitations

The paper proposes an interesting methodology that happens to associate the physical embodiment of a tensegrity structure with the graph structure of GNNs. There is a certain poetry in this composition of “graph-like-things”, but it isn’t obvious why only the contact portion of the problem was modeled with a data-centric approach. Suggestion: Add some framing (or highlight if I missed it) why (a) a hybrid approach was taken (b) why only contact was modeled with the GNN.

The approach as laid out in Section 3 is reasonably clear, but is abstracted enough from the actual physics to beg a few questions. What is the physical intuition on “average velocity”? This reviewer would expect some justification via impulse-and-momentum or at least some excuse as to why this doesn’t violate causality. Suggestion: Either in prose (even better if done with some equations) connect the GNN model to how this directly relates to the rigid-body simulator and explain why this should converge to Newton's laws.

The approach appears to be “position-based”, which is presumably a very “stiff” problem in the context of contact. This appears to be the case given the amount of penetration error observed in the experiments. Suggestion: In the discussion explain why this method is either superior to other approaches or how this might be mitigated (e.g. would formulating this in terms of impulses result in better/worse performance?).

# Correctness

This author would prefer more explicit descriptions of the underlying physics being modeled; however, what is presented appears to be consistent with no visible errors.

# Clarity

The paper is reasonably clear. The exact layout of what pieces are used in the full simulation vs training and ground-truth is a little challenging to follow. Suggestion: A similar figure to Fig 3 describing the ground-truth simulation in context to the training would be very helpful.

The various error-plots use normalized units. I am sure this is very helpful, but it begs questions from a reader of the paper about the absolute values. It would be helpful to have an appendix or another set of plots that demonstrated the penetration in meters, for example.

This author may be an outlier, but I did expect to see some explicit connection to newton’s laws of motion. It is very difficult to evaluate if this method is destined to massive overfitting, because it is just a high-parameter curve-fit or if there are obvious advantages that could lead to guarantees on physical correctness (conservation of momentum, passivity, etc). Suggestion: Either make it clear that this approach is meant to be a black-box or provide some additional context on why this would converge to physical laws.

Nit: L13 “is only being” can be simply “is only”; “is” defines being.

# Relation to prior work

Very enjoyable and concise coverage of prior work and well connected to the advances laid out in this paper.

# Reproducibility
At a high-level the techniques give a reasonable guide to reproducing the results in this paper. However, invariably, the details are often very important, especially when a statement of performance is made. If the authors are able to provide source-code and working examples this work could truly be reproduced.
questions: questions: Please see review for suggestions and nits. I only have one fundamental issue that I would like addressed:

Why is the contact problem formulated via a state-transition? Can the authors please provide prose (math would be wonderful) explaining why the problem wasn't framed in terms of impulse-momentum or energy? And explain why the "average velocity" over time-steps does not violate causality (e.g. present-state has knowledge of future-state) or it doesn't matter?
limitations: limitations: 3
review_summary: review_summary: The paper is a novel application, which provides support for the method of using graph-neural-networks as a technique for modeling complex physical systems. The claims on performance are nascent and would require a solid benchmark paper to be convincing that this technique was truly superior. My pause on giving a solid accept is that I have one lurking doubt about the validity of the problem formulation; classically a position-based euler-scheme would be too stiff and nearly impossible to achieve good results. A solid rebuttal from the authors would convert me to a solid accept.
title: title: Learning Differentiable Tensegrity Dynamics using Graph Neural Networks
paper_summary: paper_summary: The paper introduces an approach to modeling the dynamics of tensegrity robots using Graph Neural Networks (GNNs). The paper's primary strength lies in its innovative application of GNNs to model the complex dynamics of tensegrity robots. In particular, they propose a framework that represents tensegrity robots as graphs, utilizing the graph-like structure formed by the robots' cables and rods. The approach aims to overcome challenges in modeling and controlling tensegrity robots due to their complex dynamics and high degrees of freedom. The method leverages GNNs to predict the contact dynamics and improves upon previous differentiable physics engines. The results show better accuracy and computational efficiency when compared to existing methods, demonstrating the potential of GNNs in this domain.
main_review: main_review: Strength
+ Innovatively applying GNNs to model the complex dynamics of tensegrity robots
+ Providing a detailed description of the proposed method
+ Conducting thorough experiments, comparing this approach with previous differentiable engines and GNN-based simulators.

Weaknesses

- The model assumes a flat ground, which may not generalize well to varied terrains encountered in practical scenarios. The authors acknowledge this limitation and suggest the need for more sophisticated models.

- The ablation studies provided are informative but somewhat limited.  Further exploration into different GNN architectures or alternative representations for the tensegrity structures could provide deeper insights.

- The discussion on handling noisy real-world data and the effect of imperfect PID control loops is brief. More detailed analysis or strategies to mitigate these issues would be valuable, especially since real-world data is often imperfect.

- It appears that the template has been manipulated, potentially to fit more content into the document. This can negatively impact readability.
questions: questions: - Why was the specific GNN architecture chosen, and how does it compare to other possible architectures, such as those incorporating attention mechanisms or recurrent elements? Would alternative architectures potentially improve the model's performance, especially in handling temporal dynamics and varying contact conditions?

- Given the assumption of flat ground in the current model, what modifications would be necessary to accommodate complex terrains or non-flat surfaces? Can you discuss the potential challenges and solutions for expanding the model to more diverse environments?

- How does the model scale with increasing complexity in tensegrity structures or more extensive simulation environments?
limitations: limitations: 2
review_summary: review_summary: The paper presents an advancement in the modeling of tensegrity robot dynamics using GNNs.
title: title: Review on Learning Differentiable Tensegrity Dynamics using Graph Neural Networks
paper_summary: paper_summary: This work proposes a learning method using graph neural networks (GNNs) to improve tensegrity robots modeling. The graph representation leverages the natural-like cable connectivity between the rod end caps. The model is used for 3-bar and 6-bar tensegrity robots in simulation and 3-bar one in reality. The result shows higher accuracy and efficiency than previous work. This work shows a good application of GNN for modeling the dynamics of a hybrid rigid-soft mobile robot.
main_review: main_review: # Quality
The GNN based model proposed in this work has been validated in both sim-tosim and real experiments, and it has been demonstrated that this method has improved the dynamic modeling quality compared to previous work.
# Clarity
This paper clearly describes the design principles of the GNN based model used, as well as the results of sim-to-sim experiment and real experiment. However, it still lacks some detailed introductions, such as the parameters of GNN.
# Originality
This paper applies GNN to tensegrity robots, which is innovative compared to the original work.
# Strengths
1. This paper demonstrates better dynamic modeling performance for tensegrity robots compared to previous work.
# Weaknesses
1. In sim-to-sim experiments, 3-bar and 6-bar robots are tested and performed well; while in real experiment, only 3-bar robot was tested. It's more convincing to validate the model on real 6-bar robot.
2. The positional and rotational error of the proposed model is much lower than the DPE, but the penetration error is higher, of which the influence is not introduced in the paper.
3. There lacks some detailed introductions on MLP and GNN, such as layers, training epoches.
questions: questions: 1. Please add more details on the setup of the simulation in MuJoCo.
2. Please point out what DPE is used for comparison, and is it state-of-the-art?
3. Please introduce the details on MLP, such as layer numbers, epoches, and can it be improved by adding more layers or other ways?
4. Please add more details on the finetune during the real 3-bar tensegrity robot experiment.
limitations: limitations: 2
review_summary: review_summary: This paper shows the potential advantage of graph neural network (GNN) for applicaitons on hybrid rigid-soft robot, which inspires readers to model the dynamics to robot using GNN.
title: title: Interesting paper with nice simulation results
paper_summary: paper_summary: The paper proposes a graph neural network architecture to learn the discrete-time forward dynamics of tensegrity robots. Each joint of the robot is modeled as node in a Graph while linear rigid bodies are modeled as a sequence of nodes that are connected by edges. Contacts are modeled as edges between nodes and the ground which is assumed to be flat. The GNN is trained via supervised regression to predict changes in the node states. The utility of the proposed model is being demonstrated in simulation using a Mujoco model as baseline and hard-ware experiments.
main_review: main_review: Using the graph-like structure of multi-body dynamics in neural network regression is sensible. Investigating this topic from the perspective of tensegrity robots is also quite interesting. On one hand, these robots have a relatively "simple" mechanical design that one can intuitively grasp. On the other hand, the kinematic closed-loop structure is by no means straightforward to model accurately through analytical methods. In particular, when contact forces and actuation are being involved. 

Strength:
- Video is top notch.
- GNN model combining robot kinematics with NN regression.
- Paper is well written.
- Hardware experiments.

Weaknesses:
- **C1: Residual learning on velocity level:**
  The author predict the change in velocity using the analytical model and then learn the error in these velocities with a GNN. This is clearly the first thing one would try when doing residual learning on such a mechanical system. However, I have the superstition that most of the errors in your model actual arise from an inaccurate depiction of the forces being involved. It might be easier to learn errors in the impulse/force space than in velocity-space as the latter arises from nonlinear transformations involving the impulses, masses, and system kinematics. In other words, what the authors do is to use the structural knowledge from the robot's kinematics (interaction between body points and constraints) to build a GNN, but there is a lot of structural knowledge in the system's dynamics (interacting between mass and force) that one could use to setup a GNN.
  
- **C2: Body nodes are not kept at a fixed distance from each other:**
  The authors seem to not enforce explicitly that the model's predictions respect the kinematic constraints (fixed rod length). This can be rather problematic as the constrained system dynamics form a low-dimensional manifold inside the chosen high-dimensional state space. Prediction errors of long feed-forward predictions push your system state of this manifold. In turn, the network predictions deteriorate as it has not seen these "off-manifold" points during training. You could add a regularization term to the loss that punishes kinematic constraint violations or, alternatively, add to your network an implicit function layer that enforces constraint satisfaction (slows down training a lot).

- **C3: Only incremental improvements on real-world data:**
  On the real-world system the model only shows a neglectable 3% improvement. However, learning contact dynamics alongside a quite complicated dynamical system is a difficult task that roboticists are fencing with since years. As the contribution of this work is not on contact modeling, but on exploiting the graph structure in tensigrity robots, I don't mind the model's performance on real-world data. I have the following suggestions for improving the performance of follow-up models: 1) Improve the state observer or feed a history of states to the network such that it can learn to filter the noise in the model inputs. If you unroll a dynamics model over several steps, small input noise can cause large overall prediction errors. 2) Train your model first on short trajectories and then increase the trajectory length after some episodes. This approach benefits model convergence, see e.g. https://docs.kidger.site/diffrax/examples/neural_ode/ 3) Consider also an error in the robots contact point, as the time of impact has a tremendous effect on the simulation.


Minor comments:
- Please share your code and data.
- I assume the authors represent rotation via quaternions. If this is the case, I suggest that you use instead vectorized rotation matrices in your input and predict changes in rotation via quaternions. See e.g. "Learning with 3D rotations, a hitchhiker's guide to SO(3)" Geist et al. and "Deep Regression on Manifolds: A 3D Rotation Case Study" by Bregier.
- Figure 2: The background is distracting.
- Many illustrations use the png format, please turn them into vector graphics. If the figures are not images nor contain thousands of points, there is no reason why you shouldn't.
questions: questions: - **Question - C1:** Do the authors feed to the GNN the position of each node? If yes, how do you ensure that the GNNs prediction stays invariant to translation in space?
- **Question 2:** How do you tune the baseline model? Can you share the hyper-parameter search method and its results?
- **Question 3 - C2:**  What is Fig. 8 showing? Is this simply a model rollout? If yes, for how long and what prediction FPS? If the roll-out is longer than 2 seconds, how do you ensure that the predicted state is not diverging?
limitations: limitations: 2
review_summary: review_summary: Nice work that shows how to use structure from robot kinematics to predict dynamics using GNNs. The authors could discuss a bit more critically what design decisions they made to get the model and why. Also the experimental discussion requires some polishing. Albeit, I enjoyed reading this paper.