<?xml version="1.0" encoding="utf-8"?>
<mujoco>
    <compiler angle="radian" coordinate="local" meshdir="../stls/hand" texturedir="../textures"/>
    <option timestep="0.002" iterations="20" apirate="200"> <!--cone="elliptic"-->
        <flag warmstart="enable"/>
    </option>

    <include file="shared_hf.xml"/>
    <size nconmax="200"/>

    <asset>
        <include file="shared_asset.xml"/>
        <material name="floor_mat:visible" specular="0" shininess="0.5" reflectance="0" rgba="0.2 0.2 0.2 1"/>
        <material name="table_mat" specular="0" shininess="0.5" reflectance="0" rgba="0.93 0.93 0.93 1"/>

        <texture name="texture:object" file="block.png" gridsize="3 4" gridlayout=".U..LFRB.D.."/>
        <texture name="texture:hidden" file="block_hidden.png" gridsize="3 4" gridlayout=".U..LFRB.D.."/>
        <material name="material:object" texture="texture:object" specular="1" shininess="0.3" reflectance="0"/>
        <material name="material:hidden" texture="texture:hidden" specular="1" shininess="0.3" reflectance="0"/>
        <material name="material:target" texture="texture:object" specular="1" shininess="0.3" reflectance="0" rgba="1 1 1 0.5"/>
    </asset>

    <equality>
        <weld body1="robot0:mocap" body2="robot0:forearm" solimp="0.9 0.95 0.001" solref="0.02 1"/>
        <placeholder name="finger_welds"/>
    </equality>

    <contact>
        <exclude body1="robot0:forearm" body2="table0"/>
        <exclude body1="robot0:hand mount" body2="table0"/>
        <exclude body1="robot0:base_link" body2="table0" />
        <exclude body1="robot0:wrist" body2="table0" />

        <exclude body1="robot0:forearm" body2="object"/>
        <exclude body1="robot0:hand mount" body2="object"/>
        <exclude body1="robot0:base_link" body2="object" />
        <exclude body1="robot0:wrist" body2="object" />
    </contact>

    <worldbody>
        <geom name="floor0" pos="0.8 0.75 0" size="0.85 0.7 1" type="plane" condim="3" material="floor_mat:visible"/>
        <body name="floor0" pos="0.8 0.75 0"/>

        <include file="robot_with_arm.xml"/>
        <placeholder name="finger_mocaps"/>

        <body pos="1.3 0.75 0.2" name="table0">
            <geom name="table0_geom" size="0.25 0.35 0.2" type="box" mass="2000" material="table_mat"/>
            <placeholder name="cage"/>
		</body>

        <body name="object" pos="0.025 0.025 0.025">
            <placeholder name="object_geom"/>
            <site name="object:center" pos="0 0 0" rgba="1 0 0 0" size="0.01 0.01 0.01"/>
            <joint name="object:joint" type="free" damping="0.01"/>
        </body>

        <body name="target" pos="1.1 0.87 0.3">
            <placeholder name="target_geom"/>
            <site name="target:center" pos="0 0 0" rgba="1 0 0 0" size="0.01 0.01 0.01"/>
            <joint name="target:joint" type="free" damping="0.01"/>
        </body>
        
        <light directional="true" ambient="0.2 0.2 0.2" diffuse="0.8 0.8 0.8" specular="0.3 0.3 0.3" castshadow="false" pos="0 1 4" dir="0 0 -1" name="light0"/>
    </worldbody>

</mujoco>
