<mujoco>
  <option density="1.204" viscosity="1.8e-5" integrator="implicit"/>

  <visual>
    <global elevation="-10"/>
  </visual>

  <default>
    <tendon limited="true" width="0.003" rgba="1 1 1 1"/>
    <geom friction=".2"/>
    <default class="weight">
      <geom rgba=".8 .4 .8 1"/>
      <site rgba=".8 .4 .8 1"/>
    </default>
    <default class="balloon">
      <!--
        0.167 is the MKS density of helium at room temperature.
        Note this does not take into account the mass of the rubber,
        which is likely not insignificant.
      -->
      <geom density="0.167" fluidshape="ellipsoid"/>
      <default class="pink">
        <geom rgba="1 .6 .7 1"/>
        <site rgba="1 .6 .7 1"/>
      </default>
      <default class="blue">
        <geom rgba=".3 .7 .9 1"/>
        <site rgba=".3 .7 .9 1"/>
      </default>
      <default class="green">
        <geom rgba=".4 .9 .5 1"/>
        <site rgba=".4 .9 .5 1"/>
      </default>
      <default class="orange">
        <geom rgba="1 .4 0 1"/>
        <site rgba="1 .4 0 1"/>
      </default>
    </default>
  </default>

  <asset>
    <texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb2="0 0 0" rgb1="1 1 1"/>
    <material name="grid" texture="grid" texrepeat="2 2" texuniform="true" reflectance=".6"/>
  </asset>

  <worldbody>
    <geom name="ground" type="plane" size="5 5 .05" pos="0 0 -.5" material="grid"/>
    <geom name="ramp" type="box" size=".4 .2 .03" pos="0 0 -.4" euler="0 20 0" rgba="1 1 1 1"/>

    <body name="weight" childclass="weight" pos=".3 0 .2">
      <freejoint/>
      <light pos="1 0 3" dir="-1 0 -3" mode="trackcom"/>
      <light pos="-1 0 3" dir="1 0 -3" mode="trackcom"/>
      <!-- The mass of the weight was chosen to be slightly bigger than the total buoyancy of the balloons. -->
      <geom name="weight" type="box" size=".015 .015 .015" mass=".0347"/>
      <site name="weight1" pos=" .013  .013 .013" size="0.005"/>
      <site name="weight2" pos="-.013 -.013 .013" size="0.005"/>
    </body>

    <!-- The gravcomp value of 7.2 is the ratio of air and helium densities at room temperature. -->
    <body name="pink" gravcomp="7.2" pos="-.2 .1 .2" childclass="pink">
      <freejoint />
      <geom name="pink" type="ellipsoid" size=".11 .11 .15"/>
      <geom name="pink_knot" pos="0 0 -.15" size=".02"/>
      <site name="pink" pos="0 0 -.17" size="0.01"/>
    </body>

    <body name="blue" gravcomp="7.2" pos=".1 .1 .2" childclass="blue">
      <freejoint />
      <geom name="blue" type="ellipsoid" size=".12 .12 .15"/>
      <geom name="blue_knot" pos="0 0 -.15" size=".02"/>
      <site name="blue" pos="0 0 -.17" size="0.01"/>
    </body>

    <body name="green" gravcomp="7.2" pos=".1 -.1 .2" childclass="green">
      <freejoint />
      <geom name="green" type="ellipsoid" size=".12 .12 .14"/>
      <geom name="green_knot" pos="0 0 -.14" size=".02"/>
      <site name="green" pos="0 0 -.16" size="0.01"/>
    </body>

    <body name="orange" gravcomp="7.2" pos="-.12 -.12 .2" childclass="orange">
      <freejoint />
      <geom name="orange" type="ellipsoid" size=".12 .12 .13"/>
      <geom name="orange_knot" pos="0 0 -.13" size=".02"/>
      <site name="orange" pos="0 0 -.15" size="0.01"/>
    </body>
  </worldbody>

  <tendon>
    <spatial range="0 0.6">
      <site site="pink"/>
      <site site="weight1"/>
    </spatial>
    <spatial range="0 0.4">
      <site site="blue"/>
      <site site="weight1"/>
    </spatial>
    <spatial range="0 0.3">
      <site site="green"/>
      <site site="weight2"/>
    </spatial>
    <spatial range="0 0.5">
      <site site="orange"/>
      <site site="weight2"/>
    </spatial>
  </tendon>
</mujoco>
