<mujoco model="pioneer">
    <compiler angle="radian"/>
    <size njmax="500" nconmax="100"/>

    <!-- we don't need no gravity: this is a purely kinematic environment -->
    <option gravity="0 0 0"/>

    <worldbody>
        <light mode="fixed" directional="true" pos="0 0 10" dir="0 0 -1" ambient="0.1 0.1 0.1"/>

        <body name="ground" pos="0 0 0">
            <geom pos="0 0 0" rgba="0.4 0.4 0.4 1" size="8 8 1" type="plane"/>
        </body>

        <!-- everything related to the robot itself must have the 'robot:' prefix -->
        <body name="robot:base" pos="0 0 0">
            <geom size="1 0.25" pos="0 0 0.25" rgba="0.175 0.175 0.175 1" type="cylinder"/>

            <body name="robot:rotator1" pos="0 0 0.25">
                <joint name="robot:base_to_rotator1" pos="0 0 0" axis="0 0 1" limited="true" range="-1.309 1.309" type="hinge"/>
                <geom size="0.25 0.375 0.125" pos="0 0 0.375" rgba="1 0.5 0.05 1" type="box"/>
                <geom size="0.25 0.125 0.25" pos="0 -0.25 0.75" rgba="1 0.5 0.05 1" type="box"/>
                <geom size="0.25 0.125 0.25" pos="0 0.25 0.75" rgba="1 0.5 0.05 1" type="box"/>

                <body name="robot:arm1" pos="0 0 0.5" euler="0 -1.5708 0">
                    <joint name="robot:rotator1_to_arm1" pos="0.25 0 0" axis="0 1 0" limited="true" range="-1.5708 1.5708" type="hinge"/>
                    <geom size="1.5 0.125 0.25" pos="1.75 0 0" rgba="0.07 0.25 0.54 1" type="box"/>

                    <body name="robot:arm2" pos="0 0 0" euler="0 1.5708 0">
                        <joint name="robot:arm1_to_arm2" pos="0 0 3" axis="0 1 0" limited="true" range="-4.71239 1.5708" type="hinge"/>
                        <geom size="1.25 0.125 0.25" pos="1 0.25 3" rgba="0.07 0.25 0.54 1" type="box"/>

                        <body name="robot:rotator2" pos="0 0 0">
                            <joint name="robot:arm2_to_rotator2" pos="0 0.25 3" axis="1 0 0" limited="true" range="-3.1416 3.1416" type="hinge"/>
                            <geom size="0.25 0.1" pos="2.35 0.25 3" euler="0 1.5708 0" rgba="0.175 0.175 0.175 1" type="cylinder"/>
                            <geom size="0.25 0.0625 0.125" pos="2.69 0.25 3" rgba="1 0.5 0.05 1" type="box"/>

                            <body name="robot:arm3" pos="0 0 0">
                                <joint name="robot:rotator2_to_arm3" pos="2.875 0 3" axis="0 1 0" limited="true" range="-1.5708 1.5708" type="hinge"/>
                                <geom size="0.375 0.0625 0.25" pos="3.125 0.375 3" rgba="0.07 0.25 0.54 1" type="box"/>
                                <geom size="0.375 0.0625 0.25" pos="3.125 0.125 3" rgba="0.07 0.25 0.54 1" type="box"/>

                                <body name="robot:rotator3" pos="0 0 0">
                                    <joint name="robot:arm3_to_rotator3" pos="0 0.25 3" axis="1 0 0" limited="true" range="-3.1416 3.1416" type="hinge"/>
                                    <geom size="0.25 0.1" pos="3.625 0.25 3" euler="0 1.5708 0" rgba="0.175 0.175 0.175 1" type="cylinder"/>
                                    <geom size="0.1 0.025 0.025" pos="3.825 0.25 3" rgba="1 0.5 0.05 1" type="box"/>
                                    <geom size="0.025 0.025 0.4" pos="3.95 0.25 2.8" rgba="1 0.5 0.05 1" type="box"/>

                                    <body name="robot:pointer" pos="0 0 0">
                                        <geom size="0.05" pos="3.95 0.25 2.35" rgba="1 0 0 1" type="sphere"/>
                                    </body>
                                </body>
                            </body>
                        </body>
                    </body>
                </body>
            </body>
        </body>

        <!-- obstacles <body> position must always be 0: we only care about the autogenerated <geom> entries inside -->
        <body name="obstacles">
            <!-- <geom size="0.1 0.1 3" pos="4 -2 3" rgba="0.3 0.3 0.3 1" type="box"/> -->
        </body>

        <!-- target <geom> position must always be 0: target location is controlled by the enclosing <body> -->
        <body name="target" pos="5 0 1">
            <geom conaffinity="0" contype="0" size="0.125" rgba="0.1 0.9 0.1 0.5" type="sphere"/>
        </body>

    </worldbody>
</mujoco>
