Add flex edge flap connectivity to mjModel.

PiperOrigin-RevId: 758593152
Change-Id: I79836df961972c9eae8037e5fcbfc3d0122645de
This commit is contained in:
Alessio Quaglino
2025-05-14 02:49:46 -07:00
committed by Copybara-Service
parent 2386dfd7da
commit 34e8ff1aad
11 changed files with 122 additions and 95 deletions
+4 -2
View File
@@ -83,8 +83,10 @@ TEST_F(ElasticityTest, ElasticEnergyShell) {
// check that a plane is in the kernel of the energy
for (mjtNum scale = 1; scale < 4; scale++) {
for (int e = 0; e < shell->ne; e++) {
int* v = shell->flaps[e].vertices;
for (int e = 0; e < m->flex_edgenum[0]; e++) {
int* edge = m->flex_edge + 2*(m->flex_edgeadr[0] + e);
int* flap = m->flex_edgeflap + 2*(m->flex_edgeadr[0] + e);
int v[4] = {edge[0], edge[1], flap[0], flap[1]};
if (v[3]== -1) {
continue;
}