balloons.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <mujoco>
  2. <option density="1.204" viscosity="1.8e-5" integrator="implicit"/>
  3. <visual>
  4. <global elevation="-10"/>
  5. </visual>
  6. <default>
  7. <tendon limited="true" width="0.003" rgba="1 1 1 1"/>
  8. <geom friction=".2"/>
  9. <default class="weight">
  10. <geom rgba=".8 .4 .8 1"/>
  11. <site rgba=".8 .4 .8 1"/>
  12. </default>
  13. <default class="balloon">
  14. <!--
  15. 0.167 is the MKS density of helium at room temperature.
  16. Note this does not take into account the mass of the rubber,
  17. which is likely not insignificant.
  18. -->
  19. <geom density="0.167" fluidshape="ellipsoid"/>
  20. <default class="pink">
  21. <geom rgba="1 .6 .7 1"/>
  22. <site rgba="1 .6 .7 1"/>
  23. </default>
  24. <default class="blue">
  25. <geom rgba=".3 .7 .9 1"/>
  26. <site rgba=".3 .7 .9 1"/>
  27. </default>
  28. <default class="green">
  29. <geom rgba=".4 .9 .5 1"/>
  30. <site rgba=".4 .9 .5 1"/>
  31. </default>
  32. <default class="orange">
  33. <geom rgba="1 .4 0 1"/>
  34. <site rgba="1 .4 0 1"/>
  35. </default>
  36. </default>
  37. </default>
  38. <asset>
  39. <texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb2="0 0 0" rgb1="1 1 1"/>
  40. <material name="grid" texture="grid" texrepeat="2 2" texuniform="true" reflectance=".6"/>
  41. </asset>
  42. <worldbody>
  43. <geom name="ground" type="plane" size="5 5 .05" pos="0 0 -.5" material="grid"/>
  44. <geom name="ramp" type="box" size=".4 .2 .03" pos="0 0 -.4" euler="0 20 0" rgba="1 1 1 1"/>
  45. <body name="weight" childclass="weight" pos=".3 0 .2">
  46. <freejoint/>
  47. <light pos="1 0 3" dir="-1 0 -3" mode="trackcom"/>
  48. <light pos="-1 0 3" dir="1 0 -3" mode="trackcom"/>
  49. <!-- The mass of the weight was chosen to be slightly bigger than the total buoyancy of the balloons. -->
  50. <geom name="weight" type="box" size=".015 .015 .015" mass=".0347"/>
  51. <site name="weight1" pos=" .013 .013 .013" size="0.005"/>
  52. <site name="weight2" pos="-.013 -.013 .013" size="0.005"/>
  53. </body>
  54. <!-- The gravcomp value of 7.2 is the ratio of air and helium densities at room temperature. -->
  55. <body name="pink" gravcomp="7.2" pos="-.2 .1 .2" childclass="pink">
  56. <freejoint />
  57. <geom name="pink" type="ellipsoid" size=".11 .11 .15"/>
  58. <geom name="pink_knot" pos="0 0 -.15" size=".02"/>
  59. <site name="pink" pos="0 0 -.17" size="0.01"/>
  60. </body>
  61. <body name="blue" gravcomp="7.2" pos=".1 .1 .2" childclass="blue">
  62. <freejoint />
  63. <geom name="blue" type="ellipsoid" size=".12 .12 .15"/>
  64. <geom name="blue_knot" pos="0 0 -.15" size=".02"/>
  65. <site name="blue" pos="0 0 -.17" size="0.01"/>
  66. </body>
  67. <body name="green" gravcomp="7.2" pos=".1 -.1 .2" childclass="green">
  68. <freejoint />
  69. <geom name="green" type="ellipsoid" size=".12 .12 .14"/>
  70. <geom name="green_knot" pos="0 0 -.14" size=".02"/>
  71. <site name="green" pos="0 0 -.16" size="0.01"/>
  72. </body>
  73. <body name="orange" gravcomp="7.2" pos="-.12 -.12 .2" childclass="orange">
  74. <freejoint />
  75. <geom name="orange" type="ellipsoid" size=".12 .12 .13"/>
  76. <geom name="orange_knot" pos="0 0 -.13" size=".02"/>
  77. <site name="orange" pos="0 0 -.15" size="0.01"/>
  78. </body>
  79. </worldbody>
  80. <tendon>
  81. <spatial range="0 0.6">
  82. <site site="pink"/>
  83. <site site="weight1"/>
  84. </spatial>
  85. <spatial range="0 0.4">
  86. <site site="blue"/>
  87. <site site="weight1"/>
  88. </spatial>
  89. <spatial range="0 0.3">
  90. <site site="green"/>
  91. <site site="weight2"/>
  92. </spatial>
  93. <spatial range="0 0.5">
  94. <site site="orange"/>
  95. <site site="weight2"/>
  96. </spatial>
  97. </tendon>
  98. </mujoco>