<mujoco model="gripper">
    <compiler angle="radian" meshdir="meshes/" />
    <option gravity="0 0 -9.8" /> 
    <!-- <option impratio="0.01" /> -->
    <!-- <option collision="predefined" /> -->
    <option integrator="RK4" timestep="0.002" iterations="50"/>
    <size njmax="500" nconmax="100" />
    

    <visual>
        <headlight ambient="0.5 0.5 0.5"  />
    </visual>

    <default>
        <joint limited="true" damping="1" stiffness="0" armature=".1" user="0"/>
        <geom solref="0.008 1" solimp="0.95 0.95 0.01" margin="0.001" user="0"/>
        <motor ctrllimited="true" ctrlrange="-1 1"/>
        <position ctrllimited="true"/>

        <default class='0'>
            <geom friction="1 0.005 0.001" rgba=".75 .6 .5 1" contype="1" conaffinity="0"/>
        </default>

        <default class='1'>
            <geom friction="1 0.005 0.001" rgba=".7 .6 .55 1" contype="1" conaffinity="1"/>
        </default>

       
    </default>



    <worldbody>
        <!-- <light directional="true" cutoff="40" exponent="10" diffuse=".4 .4 .4" specular=".7 .7 .7" pos="0 0 1.5" dir="0 0 -1"/> -->

        <geom name="tableTop" type="plane" pos="0 0 0" size="0.5 0.5 0.5" rgba=".6 .6 .5 1" contype="15" conaffinity="15" />
        
      

<!--  ================= BEGIN GRIPPER ================= /-->
                                               

        <body name="claw" pos="0 0 0.3" quat="1 0 1 0">

            <geom name="rail" type="box" pos="-0.05 0 0" size="0.005 0.055 0.005" friction="0.001 0.005 0.0001" rgba="0.5 0.5 0.5 1.0"/>
            <joint name="vertical" type="slide" pos="0 0 0" axis="1 0 0" range= "-0.25 0.25" limited="true"/>

            <body name="rightclaw" pos="0 -0.05 0" >
                <geom name="rightclaw_it" class="1" type="box" pos="0 0 0" size="0.045 0.005 0.005" friction="0.001 0.005 0.0001" rgba="1.0 1.0 1.0 1.0"/>
                <site name="rightEndeffector" pos="0.035 0.01 0" size="0.01 0.01 0.01" type="box"/>

                <joint name="r_close" type="slide" pos="0 0 0" axis="0 1 0" range= "0 0.04"    limited="true"/>
            </body>
        
          

            <body name="leftclaw" pos="0 0.05 0">
                <geom name="leftclaw_it" class="1" type="box" pos="0 0 0" size="0.045 0.005 0.005" friction="0.001 0.005 0.0001" rgba="0.0 1.0 1.0 1.0"/>
                <site name="leftEndeffector" pos="0.035 -0.01 0" size="0.01 0.01 0.01" type="box" />

                <joint name="l_close" type="slide" pos="0 0 0" axis="0 1 0" range= "-0.04 0"  limited="true"/>

            </body>
        </body>
 
<!--  ================= END GRIPPER ================= /-->






    
        <body name="block" pos="0 0 0.02">
            <joint name="blockjoint" type="free" limited='false' damping="0" armature="0" />
           
            <inertial pos="0 0 0" mass=".1" diaginertia="100000 100000 100000"/>
            <geom name="blockbox" type="box" pos="0 0 0"
                  size="0.02 0.02 0.02" rgba=".1 .1 .9 1" contype="1" conaffinity="1"
            />
           
        </body>
    

        
    </worldbody>

    <sensor>
        <touch name="rightSensor" site="rightEndeffector"/>
        <touch name="leftSensor" site="leftEndeffector"/>


    </sensor>






    <actuator>
     

        <motor gear="10" joint="vertical" ctrllimited="true" ctrlrange="-1 1.2"/>    
        <motor gear="10" joint="r_close" ctrllimited="true" ctrlrange="-1 1"/>
        <motor gear="10" joint="l_close" ctrllimited="true" ctrlrange="-1 1"/>
    
    </actuator>

</mujoco>
