<mujoco model="pushing2d">

    <compiler inertiafromgeom="auto" angle="radian" coordinate="local" />
    <option timestep="0.01" gravity="0 0 -9.81" iterations="20" integrator="Euler" />
    <default>
        <joint limited="false" damping="1" />
        <geom contype="1" conaffinity="1" condim="4" friction=".5 .1 .1" density="1000" margin="0.002" />
    </default>

    <worldbody>
        <camera name="maincam" mode= "fixed" fovy="75" euler="0 0 0" pos="0 0 .75"/>
        <body name="particle" pos="0 0 0.03">
            <inertial pos="0 0 0" mass="5" diaginertia="166.667 166.667 166.667"/>
            <geom name="particle_geom" type="capsule" fromto="-0.01 0 0 0.01 0 0" size="0.05" rgba="0.9 0 0.1 0.6" />
            <joint name="ball_x" type="slide" pos="0 0 0" axis="1 0 0" />
            <joint name="ball_y" type="slide" pos="0 0 0" axis="0 1 0" />
        </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"/>
            </body>
        </body>


        <body name="object1" pos="0 0 0">
            <site name="reference_point" pos="0 0 0.1" size="0.01" type="sphere" rgba="0 0 0 0"/>
            <joint type="free"/>
            <geom type="box" size=".03 .1 .03" rgba="0.5 0.0 0.1 1" />
            <geom type="box" pos=".1 .1 0.0" size=".1 0.03 .03" rgba="0.5 0.0 0.1 1" />
        </body>

        <body name="goal_body" pos="0 0 0">
            <geom name="goal_point" pos="0 0 0.1" size="0.025" type="sphere" contype="0" conaffinity="0" rgba="0 0 0 0"/>
            <joint name="goalbody_x" type="slide" pos="0 0 0" axis="1 0 0" />
            <joint name="goalbody_y" type="slide" pos="0 0 0" axis="0 1 0" />
        </body>

    </worldbody>

    <actuator>
        <motor joint="ball_x" ctrlrange="-100.0 100.0" ctrllimited="true"/>
        <motor joint="ball_y" ctrlrange="-100.0 100.0" ctrllimited="true"/>
    </actuator>
</mujoco>
