<mujoco model="pushing2d">

    <compiler inertiafromgeom="auto" angle="radian" coordinate="local" eulerseq="XYZ"/>
    <size njmax="2000" nconmax="2000"/>
    <option timestep="0.005" gravity="0 0 -9.81" iterations="50" integrator="Euler" />
    <default>
        <joint limited="false" damping="1" />
        <geom contype="1" conaffinity="1" condim="3" friction=".5 .1 .1" density="1000" margin="0.002" />
    </default>

    <worldbody>
        <camera name="maincam" mode= "fixed" fovy="32" euler="0.7 0 0" pos="0 -1.1 1.3"/>
        <camera name="leftcam" mode= "fixed" fovy="32" euler="0.7 0 -1.57" pos="-1.1 0 1.3"/>
        <body name="gripper" pos="0 0 0.25">
            <inertial pos="0 0 0" mass="1" diaginertia="16.667 16.667 16.667"/>
            <geom type="box" size=".1 .03 .03" rgba="0.1 0.0 0.9 1" contype="0" conaffinity="0"/>
            <geom type="box" size=".07 .07 1" rgba="0.9 0.9 0.9 1" pos="0 0 1" contype="0" conaffinity="0"/>

            <joint name="slide_x" type="slide" pos="0 0 0" axis="1 0 0" limited="true" range="-0.5 0.5" armature="0" damping="30" stiffness="0"/>
            <joint name="slide_y" type="slide" pos="0 0 0" axis="0 1 0" limited="true" range="-0.5 0.5" armature="0" damping="30" stiffness="0"/>
            <joint name="slide_z" type="slide" pos="0 0 0" axis="0 0 1"  limited="true" range="-0.08 0.15"/>
            <!--<joint name="hinge_z" type="hinge" pos="0 0 0" axis="0 0 1" limited="true" range="-3.14 3.14" damping="30"/>-->

            <body name="fingers" pos="'0 0 0">
                <body name="finger1" pos="-0.07 0 -0.1">
                    <!--<joint name="j_finger1" type="slide" pos="0 0 0" axis="1 0 0"  limited="true" range="0. 0.1" />-->
                    <!--<geom contype="1" conaffinity="1" type="box" size=".01 .02 .1" rgba="0.3 0.3 0.3 1"  mass="0.08"/>-->
                    <geom contype="2" conaffinity="2" type="box" size=".01 .02 .1" rgba="0.3 0.3 0.3 1"  mass="0.08"/>
                </body>

                <body name="finger2" pos="0.07 0 -0.1">
                    <!--<joint name="j_finger2" type="slide" pos="0 0 0" axis="1 0 0" />-->
                    <!--<geom contype="1" conaffinity="1"  type="box" size=".01 .02 .1" rgba="0.3 0.3 0.3 1" mass="0.08"/>-->
                    <geom contype="4" conaffinity="4"  type="box" size=".01 .02 .1" rgba="0.3 0.3 0.3 1" mass="0.08"/>
                </body>
            </body>


        </body>


        <body name="container" pos="0  0  -0.05">

            <body name="border_front" pos="0 -.5  0">
                 <geom type="box" size=".5 .01 .1" rgba="0 .1 .9 .3" />
            </body>

            <body name="border_rear" pos="0 .5  0">
                 <geom type="box" size=".5 .01 .1" rgba="0 .1 .9 .3" />
            </body>

            <body name="border_right" pos=".5 0  0">
                 <geom type="box" size=".01  .5 .1" rgba="0 .1 .9 .3" />
            </body>

            <body name="border_left" pos="-.5 0  0">
                 <geom type="box" size=".01  .5 .1" rgba="0 .1 .9 .3" />
            </body>

            <body name="table" pos="0 0 -.01">
                 <geom type="box" size=".5  .5 .01" rgba="0 .9 0 1" contype="7" conaffinity="7"/>
            </body>

        </body>

        <body name="light_body0" pos="0 0  1">
             <light name="light0" mode="fixed" directional="false" active="true" castshadow="true"/>
        </body>


    </worldbody>


    <actuator>
        <position joint="slide_x" ctrllimited="false" kp="200"/>
        <position joint="slide_y" ctrllimited="false" kp="200"/>
        <general joint="slide_z" gaintype="fixed" dyntype="none" dynprm="1 0 0" gainprm ="100 0 0" biastype="affine" biasprm="10 -100 -4"/>

        <!--<position joint="hinge_z" ctrllimited="false" kp="300"/>-->
        <!--<position joint="j_finger1" ctrllimited="false" kp="100"/>-->
    </actuator>

</mujoco>
