<mujoco model='sawyer-DHand-v2.0'>
<!-- ======================================================
    Model       :: Sawyer-DHand (MuJoCoV2.0)
    Author      :: Vikash Kumar
        Contacts    : vikashplus@gmail.com
        Last edits  : 3Apr'20,
    Copyright 2018 Vikash Kumar
        Licensed under Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
====================================================== -->
    <compiler meshdir="../../../sawyer_sim/" texturedir="../../../dsuite-scenes/scenes/"/>

    <include file="../../../sawyer_sim/assets/basic_scene.xml"/>

    <!-- Sawyer -->
    <include file="../../../sawyer_sim/assets/sawyer_dependencies.xml"/>
    <include file="../../../sawyer_sim/assets/sawyer_mocap_ee_act.xml"/>

    <!-- D'Hand -->
    <include file="../../../robel-scenes_dev/dhand/assets/dhand_dependencies.xml"/>

    <size njmax='1000' nconmax='1000'/>

    <include file='./dependencies.xml' />
    <asset>
      <material name="screw-material" shininess='0.6' specular='0.35'/>
    </asset>
    <worldbody>
        <!-- ROBOT -->
        <include file="../../base_env/assets/sawyer_dHand_chain.xml"/> <!--dHand is imported in here-->

        <!-- <body name="v1body" pos="0.305 -0.215 0.7">
          <site name="v1" type="sphere" size="0.05" pos="0 0 0" rgba="1 1 1 0.2" />
        </body>
        <body name="v2body" pos="0.305 0.485 0.7">
          <site name="v2" type="sphere" size="0.05" pos="0 0 0" rgba="1 1 1 0.2" />
        </body>
        <body name="v3body" pos="1.105 0.485 0.7">
          <site name="v3" type="sphere" size="0.05" pos="0 0 0" rgba="1 1 1 0.2" />
        </body>
        <body name="v4body" pos="1.105 -0.215 0.7">
          <site name="v4" type="sphere" size="0.05" pos="0 0 0" rgba="1 1 1 0.2" />
        </body>
        <body name="v5body" pos="0.305 -0.215 1.25">
          <site name="v5" type="sphere" size="0.05" pos="0 0 0" rgba="1 1 1 0.2" />
        </body>
        <body name="v6body" pos="0.305 0.485 1.25">
          <site name="v6" type="sphere" size="0.05" pos="0 0 0" rgba="1 1 1 0.2" />
        </body>
        <body name="v7body" pos="1.105 0.485 1.25">
          <site name="v7" type="sphere" size="0.05" pos="0 0 0" rgba="1 1 1 0.2" />
        </body>
        <body name="v8body" pos="1.105 -0.215 1.25">
          <site name="v8" type="sphere" size="0.05" pos="0 0 0" rgba="1 1 1 0.2" />
        </body> -->

        <!-- <body name="mocap_bounds_phys" pos="0 0 0.95" euler="0 0 0">
          <site name="phys_bounds" type="sphere" size="0.95" pos="0 0 0" rgba="0 1 0 0.1" />
        </body> -->

        <!-- TABLE -->
        <body name="table" pos="0.7 0.15 0.72">
          <!-- Arena platform -->
          <geom type="box" size="0.55 0.55 0.5" pos="0 0 -0.5" rgba=".75 .75 .75 1.0"/>

          <!-- Spherical bound of object movement, due to the string attached (see below) -->
          <site name="workspace" type="sphere" size="0.4" pos="0 0 0.165" rgba="1 1 1 0.05"/>

          <!-- Axes markers -->
          <site name="x_ax" type="cylinder" size="0.01 0.1" pos="0.1 0 0" rgba="1 0 0 .25" euler="0 1.57 0"/>
          <site name="y_ax" type="cylinder" size="0.01 0.1" pos="0 0.1 0" rgba="0 1 0 .25" euler="1.57 0 0"/>
        </body>

        <body name="phase_indicator" pos="1.1 0.6 1.02" euler="0 0 0">
          <geom name="pi" type="sphere" size="0.05" contype="0" conaffinity="0"  group='1' rgba="1 0 0 1"/>
        </body>

        <!-- Rod Target -->
        <body name="target" pos="0.72 0.15 0.8" euler="0 0 0">
          <include file="./rod_visual.xml" />
        </body>

        <!-- Rod -->
        <body name="object" pos="0.72 0.15 0.8" euler="0 0 0">
          <include file="./mug.xml"/>
          <freejoint name="r1"/>
        </body>

   </worldbody>

    <tendon>
      <spatial limited="true" range="0 0.4" width="0.005">
        <site site="workspace"/>
        <site site="rod_center"/>
      </spatial>
    </tendon>


</mujoco>
