<mujoco model="arm3d">
    <compiler inertiafromgeom="true" angle="radian" coordinate="local" />
    <option timestep="0.01" gravity="0 0 0" iterations="20" integrator="RK4" />
    <default>
        <joint armature="0.04" damping="0.5" limited="true" />
        <geom friction=".8 .1 .1" density="300" margin="0.002" condim="1" contype="1" conaffinity="1" />
    </default>

    <worldbody>
        <body name="palm" pos="0 0 0">
            <geom type="capsule" fromto="0 -0.1 0 0 0.1 0" size="0.12" />
            <body name="proximal_1" pos="0 0 0">
                <joint name="proximal_j_1" type="hinge" pos="0 0 0" axis="0 1 0" limited="false" />
                <geom type="capsule"  fromto="0 0 0 0.4 0 0" size="0.06" contype="1" conaffinity="1" />
                <body name="distal_1" pos="0.4 0 0">
                    <joint name="distal_j_1" type="hinge" pos="0 0 0" axis="0 1 0" range="-2.3213 2.3" />
                    <geom type="capsule"  fromto="0 0 0 0.4 0 0" size="0.06" contype="1" conaffinity="1" />
                    <body name="distal_2" pos="0.4 0 0">
                        <joint name="distal_j_2" type="hinge" pos="0 0 0" axis="0 1 0" range="-2.3213 2.3" />
                        <geom type="capsule" fromto="0 0 0 0.4 0 0" size="0.06" contype="1" conaffinity="1" />
                        <body name="distal_4" pos="0.4 0 0">
                            <site name="tip arml" pos="0.1 0 -0.2" size="0.01" />
                            <site name="tip armr" pos="0.1 0 0.2" size="0.01" />
                            <joint name="distal_j_3" type="hinge" pos="0 0 0" axis="1 0 0" range="-3.3213 3.3" />
                            <geom type="capsule" fromto="0 0 -0.2 0 0 0.2" size="0.04" contype="1" conaffinity="1" />
                            <geom type="capsule" fromto="0 0 -0.2 0.2 0 -0.2" size="0.04" contype="1" conaffinity="1" />
                            <geom type="capsule" fromto="0 0 0.2 0.2 0 0.2" size="0.04" contype="1" conaffinity="1" />
                        </body>
                    </body>
                </body>
            </body>
        </body>
        <body name="object" pos="0.0 0.0 0.0">
            <geom rgba="1. 1. 1. 1" type="box" size="0.05 0.05 0.05" density='0.00001' contype="1" conaffinity="1" />
            <joint name="obj_slidez" type="slide" pos="0.025 0.025 0.025" axis="0 0 1" range="-10.3213 10.3" damping="0.07" />
            <joint name="obj_slidex" type="slide" pos="0.025 0.025 0.025" axis="1 0 0" range="-10.3213 10.3" damping="0.07" />
            <body name="distal_10" pos="0 0 0">
                <site name="obj_pos" pos="0.025 0.025 0.025" size="0.01" />
            </body>
        </body>

        <body name="goal" pos="0 0 0">
            <geom rgba="1. 0. 0. 1" type="box" size="0.1 0.1 0.1" density='0.00001' contype="0" conaffinity="0" />
            <body name="distal_11" pos="0 0 0">
                <site name="goal_pos" pos="0.05 0.05 0.05" size="0.01" />
            </body>
        </body>
    </worldbody>

    <actuator>
        <motor joint="proximal_j_1" ctrlrange="-2 2" ctrllimited="true" />
        <motor joint="distal_j_1" ctrlrange="-2 2" ctrllimited="true" />
        <motor joint="distal_j_2" ctrlrange="-2 2" ctrllimited="true" />
        <motor joint="distal_j_3" ctrlrange="-2 2" ctrllimited="true" />
    </actuator>

</mujoco>
