<?xml version="1.0" encoding="utf-8"?>
<mujoco>
  <include file="shared_config.xml"></include>
  <worldbody>
    <include file="jaco_xyz_base.xml"></include>

    <body name="drawer" pos="0 0.75 -0.05">
      <geom rgba="1 0.3 0.3 1" type="box" contype="1" size="0.1 0.1 0.001" name="drawer_bottom" conaffinity="1" pos="0 0 0.005" mass="1000" material="light_wood_v2" />
      <geom rgba="1 0.3 0.3 1" type="box" solimp="0.99 0.99 0.01" contype="1" size="0.1 0.001 0.05" name="drawer_wall1" conaffinity="1" pos="0.0 0.1 0.054" mass="1000" solref="0.01 1" material="light_wood_v2"/>
      <geom rgba="1 0.3 0.3 1" type="box" solimp="0.99 0.99 0.01" contype="1" size="0.1 0.001 0.05" name="drawer_wall2" conaffinity="1" pos="0.0 -0.1 0.054" mass="1000" solref="0.01 1" material="light_wood_v2"/>
      <geom rgba="1 0.3 0.3 1" type="box" solimp="0.99 0.99 0.01" contype="1" size="0.001 0.1 0.05" name="drawer_wall3" conaffinity="1" pos="0.1 0 0.054" mass="1000" solref="0.01 1" material="light_wood_v2"/>
      <geom rgba="1 0.3 0.3 1" type="box" solimp="0.99 0.99 0.01" contype="1" size="0.001 0.1 0.05" name="drawer_wall4" conaffinity="1" pos="-0.101 0 0.054" mass="1000" solref="0.01 1" material="light_wood_v2"/>
      <!--front, parallel to door-->
      <geom type="box" pos="0 -0.2 0.05" size="0.05 0.005 0.02" rgba="0 0 0 1" contype="1" conaffinity="1" name="handle" material="light_wood_v2"/>
      <!--front-->
      <geom type="box" pos="0.045 -0.15 0.05" size="0.005 0.05 0.02" rgba="0 0 0 1" contype="1" conaffinity="1" material="light_wood_v2"/>
      <!--front-->
      <geom type="box" pos="-0.045 -0.15 0.05" size="0.005 0.05 0.02" rgba="0 0 0 1" contype="1" conaffinity="1" material="light_wood_v2"/>
      <!-- <geom rgba="1 0.3 0.3 1" type="capsule" fromto="0.098 0.098 0.0075 0.098 0.098 0.06" contype="1" size="0.005" conaffinity="1"/>
      <geom rgba="1 0.3 0.3 1" type="capsule" fromto="0.098 -0.098 0.0075 0.098 -0.098 0.06" contype="1" size="0.005" conaffinity="1"/>
      <geom rgba="1 0.3 0.3 1" type="capsule" fromto="-0.098 0.098 0.0075 -0.098 0.098 0.06" contype="1" size="0.005" conaffinity="1"/>
      <geom rgba="1 0.3 0.3 1" type="capsule" fromto="-0.098 -0.098 0.0075 -0.098 -0.098 0.06" contype="1" size="0.005" conaffinity="1"/> -->
      <joint type="slide" range="-0.2 0" axis="0 1 0" name="goal_slidey" pos="0 0 0" damping="1.0"/>
      <!-- <site name="handleStart" pos="0 -0.17 0.08" size="0.01" rgba="1 0 0 1"/> -->
      <site name="handleStart" pos="0 -0.2 0.08" size="0.01" rgba="1 0 0 1"/>
      <!-- <joint type="slide" range="0. 0.00000001" axis="1 0 0" name="goal_slidex" pos="0 0 0" damping="1.0"/>
      <joint type="slide" range="0. 0.00000001" axis="0 0 1" name="goal_slidez" pos="0 0 0" damping="1.0"/> -->
    </body>
    <body name="drawer_cover" pos="0 0.9 -0.05">
      <geom rgba="0.3 0.3 1 1" type="box" contype="1" size="0.105 0.105 0.001" name="cover_top" conaffinity="1" pos="0 0 0.2" mass="1000" material="light_wood_v2"/>
      <!-- <geom rgba="0.3 0.3 1 1" type="box" contype="1" size="0.12 0.12 0.001" name="cover_bottom" conaffinity="1" pos="0 0 0.005" mass="1000"/> -->
      <geom rgba="0.3 0.3 1 1" type="box" solimp="0.99 0.99 0.01" contype="1" size="0.105 0.001 0.1" name="cover_wall1" conaffinity="1" pos="0.0 0.105 0.102" mass="1000" solref="0.01 1" material="light_wood_v2"/>
      <!-- <geom rgba="0.3 0.3 1 1" type="box" solimp="0.99 0.99 0.01" contype="1" size="0.1 0.001 0.03" name="cover_wall2" conaffinity="1" pos="0.0 -0.1 0.034" mass="1000" solref="0.01 1"/> -->
      <geom rgba="0.3 0.3 1 1" type="box" solimp="0.99 0.99 0.01" contype="1" size="0.001 0.105 0.1" name="cover_wall3" conaffinity="1" pos="0.105 0 0.102" mass="1000" solref="0.01 1" material="light_wood_v2"/>
      <geom rgba="0.3 0.3 1 1" type="box" solimp="0.99 0.99 0.01" contype="1" size="0.001 0.105 0.1" name="cover_wall4" conaffinity="1" pos="-0.106 0 0.102" mass="1000" solref="0.01 1" material="light_wood_v2"/>
      <geom rgba="0.3 0.3 1 1" type="capsule" fromto="0.103 0.103 0.0075 0.103 0.103 0.2" contype="2" size="0.005" conaffinity="2" material="light_wood_v2"/>
      <geom rgba="0.3 0.3 1 1" type="capsule" fromto="0.103 -0.103 0.0075 0.103 -0.103 0.2" contype="2" size="0.005" conaffinity="2" material="light_wood_v2"/>
      <geom rgba="0.3 0.3 1 1" type="capsule" fromto="-0.103 0.103 0.0075 -0.103 0.103 0.2" contype="2" size="0.005" conaffinity="2" material="light_wood_v2"/>
      <geom rgba="0.3 0.3 1 1" type="capsule" fromto="-0.103 -0.103 0.0075 -0.103 -0.103 0.2" contype="2" size="0.005" conaffinity="2" material="light_wood_v2"/>
      <!-- <joint type="slide" range="-0.2 0." axis="0 1 0" name="goal_slidey" pos="0 0 0" damping="1.0"/> -->
    </body>
    <site name="goal" pos="0. 0.7 0.05" size="0.02" 
          rgba="0 0.8 0 1"/>
</worldbody>

  <actuator>

    <position joint='jaco_joint_finger_1' kp="15" name='pos_act_finger_1' ctrlrange="-6.28 6.28" ctrllimited="true"/>
    <position joint='jaco_joint_finger_2' kp="15" name='pos_act_finger_2' ctrlrange="-6.28 6.28" ctrllimited="true"/>
    <position joint='jaco_joint_finger_3' kp="15" name='pos_act_finger_3' ctrlrange="-6.28 6.28" ctrllimited="true"/>
    <position joint='jaco_joint_finger_tip_1' kp="15" name='pos_act_finger_tip_1' ctrlrange="-6.28 6.28" ctrllimited="true"/>
    <position joint='jaco_joint_finger_tip_2' kp="15" name='pos_act_finger_tip_2' ctrlrange="-6.28 6.28" ctrllimited="true"/>
    <position joint='jaco_joint_finger_tip_3' kp="15" name='pos_act_finger_tip_3' ctrlrange="-6.28 6.28" ctrllimited="true"/>
  </actuator>

</mujoco>
