<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.01" iterations="50"/>
    <size njmax="500" nconmax="100" />
    

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

    <asset>
        
        <texture name="texplane" type="2d" builtin="checker" rgb1="0 0 0" rgb2="0.8 0.8 0.8" width="100" height="100" />
        <material name='MatPlane' texture="texplane" shininess="1" texrepeat="50 50" specular="1"  reflectance="0.1" />
       
    </asset>

    <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='floor' material="MatPlane" pos='0 0 0' size='4 4 4' type='plane' conaffinity='1' rgba='0.8 0.9 0.8 1' condim='3' />

      

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

        <body name="claw" pos="-0.2 -0.2 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="slidex" type="slide" pos="0 0 0" axis="1 0 0" range= "-0.5 0.5" limited="true"/>

           
            <joint name="slidey" type="slide" pos="0 0 0" axis="0 1 0" range= "-0.5 0.5" limited="true"/>
            <joint name="slidez" type="slide" pos="0 0 0" axis="0 0 1" range= "-0.5 0.5" limited="true"/>

            <!--
            <joint name="rotx" type="hinge" pos="0 0 0" axis="1 0 0" range= "-3.14 3.14" limited="true"/>

            
            <joint name="roty" type="hinge" pos="0 0 0" axis="0 1 0" range= "-3.14 3.14" limited="true"/>
            <joint name="rotz" type="hinge" pos="0 0 0" axis="0 0 1" range= "-3.14 3.14" 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 0" size="0.01" />

                <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 0" size="0.01" />

                <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=".05" 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"
            />

            <site name="blockRight" pos="0 0.02 0" size="0.01" />
            <site name="blockLeft" pos="0 -0.02 0" size="0.01" />
           
        </body>
    

        
    </worldbody>

    <actuator>
     

        <motor gear="2" joint="slidex" ctrllimited="true" ctrlrange="-1 1.2"/>

        <motor gear="2" joint="slidey" ctrllimited="true" ctrlrange="-1 1"/>
        <motor gear="2" joint="slidez" ctrllimited="true" ctrlrange="-1 1"/>
       
         <!--       
        <motor gear="10" joint="rotx" ctrllimited="true" ctrlrange="-1 1"/>


        <motor gear="10" joint="roty" ctrllimited="true" ctrlrange="-1 1"/>
        <motor gear="10" joint="rotz" ctrllimited="true" ctrlrange="-1 1"/>

        /-->

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

</mujoco>
