Added support for msh2.2

Now we can load flex with format 2.2 binary and ASCII.
There are two different parsing strategies. One for gmsh app and the other is for ftetwild.

Used the shark model from Scanned Objects by Google Research:
https://app.gazebosim.org/GoogleResearch/fuel/models/Weisshai_Great_White_Shark

PiperOrigin-RevId: 619229499
Change-Id: I6eb876afcbc8a00631914b093c45bde10c0caaf6
This commit is contained in:
Google DeepMind
2024-03-26 10:11:07 -07:00
committed by Copybara-Service
parent 4d2aa46e56
commit 4f0293c6cb
35 changed files with 38103 additions and 219 deletions
@@ -0,0 +1,25 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG"/>
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512"/>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0"/>
<map force="0.1" zfar="30"/>
<rgba haze="0.15 0.25 0.35 1"/>
<quality shadowsize="4096"/>
<global offwidth="800" offheight="800"/>
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3"/>
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"/>
<flexcomp name="shark" type="gmsh" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4" mass="10" scale="1 1 1" file="shark_22_ascii_missing_element.msh">
<edge equality="true"/>
</flexcomp>
</worldbody>
</mujoco>
@@ -0,0 +1,27 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG" />
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3"
rgb2=".2 .3 .4" />
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2" />
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0" />
<map force="0.1" zfar="30" />
<rgba haze="0.15 0.25 0.35 1" />
<quality shadowsize="4096" />
<global offwidth="800" offheight="800" />
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3" />
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1" />
<flexcomp name="shark" type="gmsh" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4" mass="10"
scale="1 1 1" file="shark_22_ascii_missing_node.msh">
<edge equality="true" />
</flexcomp>
</worldbody>
</mujoco>
@@ -0,0 +1,27 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG" />
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3"
rgb2=".2 .3 .4" />
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2" />
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0" />
<map force="0.1" zfar="30" />
<rgba haze="0.15 0.25 0.35 1" />
<quality shadowsize="4096" />
<global offwidth="800" offheight="800" />
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3" />
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1" />
<flexcomp name="shark" type="gmsh" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4" mass="10"
scale="1 1 1" file="shark_22_ascii_missing_num_elements.msh">
<edge equality="true" />
</flexcomp>
</worldbody>
</mujoco>
@@ -0,0 +1,27 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG" />
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3"
rgb2=".2 .3 .4" />
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2" />
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0" />
<map force="0.1" zfar="30" />
<rgba haze="0.15 0.25 0.35 1" />
<quality shadowsize="4096" />
<global offwidth="800" offheight="800" />
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3" />
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1" />
<flexcomp name="shark" type="gmsh" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4" mass="10"
scale="1 1 1" file="shark_22_ascii_missing_num_nodes.msh">
<edge equality="true" />
</flexcomp>
</worldbody>
</mujoco>
@@ -0,0 +1,27 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG" />
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3"
rgb2=".2 .3 .4" />
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2" />
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0" />
<map force="0.1" zfar="30" />
<rgba haze="0.15 0.25 0.35 1" />
<quality shadowsize="4096" />
<global offwidth="800" offheight="800" />
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3" />
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1" />
<flexcomp name="shark binary 2.2" type="gmsh" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4"
mass="10" scale="1 1 1" file="shark_41_ascii_missing_element.msh">
<edge equality="true" />
</flexcomp>
</worldbody>
</mujoco>
@@ -0,0 +1,27 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG" />
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3"
rgb2=".2 .3 .4" />
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2" />
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0" />
<map force="0.1" zfar="30" />
<rgba haze="0.15 0.25 0.35 1" />
<quality shadowsize="4096" />
<global offwidth="800" offheight="800" />
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3" />
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1" />
<flexcomp name="shark binary 2.2" type="gmsh" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4"
mass="10" scale="1 1 1" file="shark_41_ascii_missing_element_header.msh">
<edge equality="true" />
</flexcomp>
</worldbody>
</mujoco>
@@ -0,0 +1,27 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG" />
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3"
rgb2=".2 .3 .4" />
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2" />
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0" />
<map force="0.1" zfar="30" />
<rgba haze="0.15 0.25 0.35 1" />
<quality shadowsize="4096" />
<global offwidth="800" offheight="800" />
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3" />
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1" />
<flexcomp name="shark binary 2.2" type="gmsh" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4"
mass="10" scale="1 1 1" file="shark_41_ascii_missing_node_header.msh">
<edge equality="true" />
</flexcomp>
</worldbody>
</mujoco>
@@ -0,0 +1,27 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG" />
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512" />
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3"
rgb2=".2 .3 .4" />
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2" />
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0" />
<map force="0.1" zfar="30" />
<rgba haze="0.15 0.25 0.35 1" />
<quality shadowsize="4096" />
<global offwidth="800" offheight="800" />
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3" />
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1" />
<flexcomp name="shark binary 2.2" type="gmsh" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4"
mass="10" scale="1 1 1" file="shark_41_ascii_missing_node_index.msh">
<edge equality="true" />
</flexcomp>
</worldbody>
</mujoco>
File diff suppressed because it is too large Load Diff
+25
View File
@@ -0,0 +1,25 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG"/>
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512"/>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0"/>
<map force="0.1" zfar="30"/>
<rgba haze="0.15 0.25 0.35 1"/>
<quality shadowsize="4096"/>
<global offwidth="800" offheight="800"/>
</visual>
<worldbody>
<geom name="floor" size="1 1 .05" type="plane" material="grid" condim="3"/>
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"/>
<flexcomp name="shark" type="gmsh" dim="3" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 .3" mass="10" scale="1 1 1" file="shark_22_ascii_fTetWild.msh">
<edge equality="true"/>
</flexcomp>
</worldbody>
</mujoco>
File diff suppressed because it is too large Load Diff
+25
View File
@@ -0,0 +1,25 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG"/>
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512"/>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0"/>
<map force="0.1" zfar="30"/>
<rgba haze="0.15 0.25 0.35 1"/>
<quality shadowsize="4096"/>
<global offwidth="800" offheight="800"/>
</visual>
<worldbody>
<geom name="floor" size="1 1 .05" type="plane" material="grid" condim="3"/>
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"/>
<flexcomp name="shark" type="gmsh" dim="3" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 0.3" mass="10" scale="1 1 1" file="shark_22_ascii_gmshApp.msh">
<edge equality="true"/>
</flexcomp>
</worldbody>
</mujoco>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
+25
View File
@@ -0,0 +1,25 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG"/>
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512"/>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0"/>
<map force="0.1" zfar="30"/>
<rgba haze="0.15 0.25 0.35 1"/>
<quality shadowsize="4096"/>
<global offwidth="800" offheight="800"/>
</visual>
<worldbody>
<geom name="floor" size="1 1 .05" type="plane" material="grid" condim="3"/>
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"/>
<flexcomp name="shark" type="gmsh" dim="3" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 0.3" mass="10" scale="1 1 1" file="shark_22_binary_fTetWild.msh">
<edge equality="true"/>
</flexcomp>
</worldbody>
</mujoco>
Binary file not shown.
+25
View File
@@ -0,0 +1,25 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG"/>
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512"/>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0"/>
<map force="0.1" zfar="30"/>
<rgba haze="0.15 0.25 0.35 1"/>
<quality shadowsize="4096"/>
<global offwidth="800" offheight="800"/>
</visual>
<worldbody>
<geom name="floor" size="1 1 .05" type="plane" material="grid" condim="3"/>
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"/>
<flexcomp name="shark" type="gmsh" dim="3" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 0.3" mass="10" scale="1 1 1" file="shark_22_binary_gmshApp.msh">
<edge equality="true"/>
</flexcomp>
</worldbody>
</mujoco>
File diff suppressed because it is too large Load Diff
+25
View File
@@ -0,0 +1,25 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG"/>
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512"/>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0"/>
<map force="0.1" zfar="30"/>
<rgba haze="0.15 0.25 0.35 1"/>
<quality shadowsize="4096"/>
<global offwidth="800" offheight="800"/>
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3"/>
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"/>
<flexcomp name="shark" type="gmsh" dim="3" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4" mass="10" scale="1 1 1" file="shark_41_ascii_gmshApp.msh">
<edge equality="true"/>
</flexcomp>
</worldbody>
</mujoco>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
+25
View File
@@ -0,0 +1,25 @@
<mujoco model="gmsh">
<option timestep="0.01" integrator="implicitfast" solver="CG"/>
<asset>
<texture type="skybox" builtin="gradient" rgb1=".3 .5 .7" rgb2="0 0 0" width="512" height="512"/>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".1 .2 .3" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
</asset>
<visual>
<headlight diffuse="0.9 0.9 0.9" ambient="0.3 0.3 0.3" specular="0 0 0"/>
<map force="0.1" zfar="30"/>
<rgba haze="0.15 0.25 0.35 1"/>
<quality shadowsize="4096"/>
<global offwidth="800" offheight="800"/>
</visual>
<worldbody>
<geom name="floor" size="20 20 .05" type="plane" material="grid" condim="3"/>
<light directional="false" diffuse=".2 .2 .2" specular="0 0 0" pos="0 0 5" dir="0 0 -1"/>
<flexcomp name="shark" type="gmsh" dim="3" rgba=".8 .2 .2 1" radius="0.001" pos="0 0 4" mass="10" scale="1 1 1" file="shark_41_binary_gmshApp.msh">
<edge equality="true"/>
</flexcomp>
</worldbody>
</mujoco>