<?xml version="1.0"?>
<mujoco model="franka_desk_drawer">
  <compiler angle="radian"/>
  <size njmax="2000" nconmax="2000"/>
  <option timestep="0.002"/>
  <compiler angle="radian"/>
  <asset>
    <texture name="plane_texture" type="2d" height="1" width="1" file="textures/white_marble_tile.png"/>
    <material name="plane_material" reflectance="0.05" texture="plane_texture" texrepeat="4 4" texuniform="true"/>
    <!-- Desk meshes -->
    <mesh name="desk_main" file="meshes/desk_main.stl" scale="0.01 0.01 0.01"/>
    <mesh name="desk_slide_wood" file="meshes/desk_slide_wood.stl" scale="0.01 0.01 0.01"/>
    <mesh name="desk_slide_handle" file="meshes/desk_slide_handle.stl" scale="0.01 0.01 0.01"/>
    <mesh name="desk_drawer_wood" file="meshes/desk_drawer_wood.stl" scale="0.01 0.01 0.01"/>
    <mesh name="desk_drawer_handle" file="meshes/desk_drawer_handle.stl" scale="0.01 0.01 0.01"/>
    <texture name="desk_wood_texture" type="cube" height="1" width="1" file="textures/wood.png"/>
    <texture name="desk_metal_texture" type="cube" height="1" width="1" file="textures/metal.png"/>
    <material name="desk_wood_material" texture="desk_wood_texture" rgba="0.8 0.8 0.8 1" shininess="0.2" reflectance="0.3" texuniform="false"/>
    <material name="desk_metal_material" texture="desk_metal_texture" texrepeat="3 3" reflectance="0.7" texuniform="false"/>
  </asset>
  <default>
    <!-- Desk default classes -->
    <default class="desk_metal">
      <geom group="1" contype="0" conaffinity="0" type="mesh" material="desk_metal_material"/>
    </default>
    <default class="desk_wood">
      <geom group="1" contype="0" conaffinity="0" type="mesh" material="desk_wood_material"/>
    </default>
    <default class="desk_drawer">
      <geom contype="1" conaffinity="1" group="3" rgba="1 0 0 1"/>
      <joint limited="true" damping="2" frictionloss="5" armature="0.1"/>
    </default>
    <default class="desk_body">
      <geom contype="1" conaffinity="1" group="4" rgba="0 1 0 1"/>
      <joint limited="true" damping="1" frictionloss="0.5" armature=".01"/>
    </default>
  </default>
  <worldbody>
    <body pos="0 0“ 0">
      <body name="drawer" pos="0 0 0" childclass="desk_drawer">
        <geom type="box" size=".24 .26 .01" pos="0 0 -0.04" rgba="1.0 1.0 1.0 1.0" mass="2"/>
        <geom type="box" size=".24 .01 .05" pos="0 .25 0" rgba="0.8 0.9 0.7 1.0"/>
        <geom type="box" size=".24 .01 .05" pos="0 -.25 0" rgba="0.8 0.9 0.7 1.0"/>
        <geom type="box" size=".01 .26 .05" pos="-.23 0 0" rgba="0.8 0.9 0.7 1.0"/>
        <geom type="box" size=".01 .26 .05" pos=".23 0 0" rgba="0.8 0.9 0.7 1.0"/>
        <geom type="capsule" size=".014 .045" pos=".08203 -.315 .01" quat="0.707107 0.707107 0. 0." rgba="0.8 0.9 0.7 1.0"/>
        <geom type="capsule" size=".014 .045" pos="-.08203 -.315 .01" quat="0.707107 0.707107 0. 0." rgba="0.8 0.9 0.7 1.0"/>
        <geom type="capsule" size=".014 .08" pos="0 -.36 .01" quat="0.707107 0. 0.707107 0. " rgba="0.8 0.9 0.7 1.0"/>
        <joint name="drawer_joint" type="slide" pos="0 0 0" axis="0 1 0" limited="true" range="-0.48 0"/>
      </body>
    </body>
  </worldbody>
</mujoco>

