<mujoco model="obstacle_course">
    <!-- A 2D particle must navigate around walls to reach a goal state. -->

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

    <worldbody>
        <body name="particle" pos="0 0 0">
            <geom name="particle_geom" type="capsule" fromto="-0.01 0 0 0.01 0 0" size="0.1" />
            <site name="particle_site" pos="0 0 0" size="0.01" />
            <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="wall1" pos="1 0.8 0">
            <geom name="wall1_geom" type="capsule" fromto="0 -0.3 0 0 0.3 0.01" size="0.1" contype="1" rgba="0.9 0 0.1 1"/>
        </body>
        <body name="wall2" pos="1 -0.8 0">
            <geom name="wall2_geom" type="capsule" fromto="0 -0.3 0 0 0.3 0.01" size="0.1" contype="1" rgba="0.9 0 0.1 1"/>
        </body>
        <body name="wall3" pos="2 0 0">
            <geom name="wall3_geom" type="capsule" fromto="0 -0.01 0 0 0.01 0" size="0.2" contype="1" rgba="0.9 0 0.1 1"/>
        </body>
        <body name="wall4" pos="2 1.3 0">
            <geom name="wall4_geom" type="capsule" fromto="0 -0.3 0 0 0.3 0.01" size="0.1" contype="1" rgba="0.9 0 0.1 1"/>
        </body>
        <body name="wall5" pos="2 -1.3 0">
            <geom name="wall5_geom" type="capsule" fromto="0 -0.3 0 0 0.3 0.01" size="0.1" contype="1" rgba="0.9 0 0.1 1"/>
        </body>
        <body name="target" pos="3 0 0">
            <geom name="target_geom" type="capsule" fromto="-0.01 0 0 0.01 0 0" size="0.1" rgba="0 0.9 0.1 1"/>
        </body>
    </worldbody>

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