<mujoco model="koko_reacher">
    <compiler angle="radian" />
    <default>
        <default class="arm">
            <joint damping="0.1" />
        </default>
        <default class="gripper">
            <joint damping="0.1" />
        </default>
    </default>
    <asset>
        <mesh name="base_link" file="base_link.STL" />
        <mesh name="shoulder_link" file="shoulder_link.STL" />
        <mesh name="shoulder_lift_link" file="shoulder_lift_link.STL" />
        <mesh name="upper_arm_link" file="upper_arm_link.STL" />
        <mesh name="upper_arm_lift_link" file="upper_arm_lift_link.STL" />
        <mesh name="forearm_link" file="forearm_link.STL" />
        <mesh name="wrist_lift_link" file="wrist_lift_link.STL" />
        <mesh name="wrist_roll_link" file="hand_base_link.STL" />
        <mesh name="rightfingerlimb_link" file="finger_limb_link.STL"/>
        <mesh name="leftfingerlimb_link" file="finger_limb_link.STL"/>
        <mesh name="rightfingertip_link" file="finger_tip_link.STL"/>
        <mesh name="leftfingertip_link" file="finger_tip_link.STL"/>
        <texture builtin="flat" height="32" name="plastic" type="2d" width="32"/>
        <material name="Plastic" shininess="0.93" specular="0.96" texture="plastic"/>
    </asset>
    <worldbody>
        <!-- Arm -->
        <body name="robotbase_link" pos="0 0 0" euler="0.6108652382 -0.5235987756 0">
            <inertial pos="0.0560024 0.000189446 0.0201836" quat="-0.000530006 0.707989 0.00204572 0.70622" mass="0.284612" diaginertia="0.00239707 0.00197713 0.000716923" />
            <geom type="mesh" material="Plastic" rgba="0.792157 0.819608 0.933333 1" mesh="base_link" contype="1" conaffinity="28" />
            <body name="robotshoulder_link" pos="0 0 0.054356" quat="1.34924e-11 -3.67321e-06 1 -3.67321e-06">
                <inertial pos="0.00434775 2.01235e-05 -0.0764683" quat="0.999953 0.000336513 -0.00963902 8.26702e-05" mass="1.80901" diaginertia="0.00919572 0.00871918 0.00387865" />
                <joint name="base_roll_joint" class="arm" pos="0 0 0" axis="0 0 1" limited="true" range="-2.3412 3.3999" />
                <geom type="mesh" material="Plastic" rgba="0.843137 0.815686 0.752941 1" mesh="shoulder_link" contype="2" conaffinity="24" />
                <body name="robotshoulder_liftlink" pos="-0.01143 0 -0.21082" quat="-2.59734e-06 2.59735e-06 -0.707108 0.707105">
                    <inertial pos="-5.00836e-06 0.000232928 -1.77451e-05" quat="0.708323 -0.00293225 -0.00290296 0.705876" mass="0.388307" diaginertia="0.000818261 0.00080429 0.000550823" />
                    <joint name="shoulder_lift_joint" class="arm" pos="0 0 0" axis="0 0 1" limited="true" range="-2.2944 0" />
                    <geom type="mesh" material="Plastic" rgba="0.792157 0.819608 0.933333 1" mesh="shoulder_lift_link" contype="0" />
                    <body name="robotupper_arm_link" pos="0 0.070147 -6.25e-05" quat="0.499124 0.499126 0.500872 -0.500874">
                        <inertial pos="0.00526565 5.32997e-05 -0.0641726" quat="0.999909 0.000376484 0.0133407 0.0019152" mass="1.52396" diaginertia="0.00578958 0.00530315 0.00342333" />
                        <joint name="shoulder_roll_joint" class="arm" pos="0 0 0" axis="0 0 1" limited="true" range="-2.6761 2.6761" />
                        <geom type="mesh" material="Plastic" rgba="1 1 1 1" mesh="upper_arm_link" contype="4" conaffinity="17" />
                        <body name="robotupperarm_liftlink" pos="-0.01143 -4.0407e-05 -0.18056" quat="0.00123484 -0.00123484 0.707107 -0.707104">
                            <inertial pos="9.06308e-09 -0.0023333 -1.637e-05" quat="0.707099 -0.00297056 -0.00288794 0.707102" mass="0.336088" diaginertia="0.000805057 0.000748407 0.000495706" />
                            <joint name="elbow_lift_joint" class="arm" pos="0 0 0" axis="0 0 1" limited="true" range="-2.2944 0" />
                            <geom type="mesh" rgba="1 0.501961 0.501961 1" mesh="upper_arm_lift_link" contype="0" />
                            <body name="robotforearm_link" pos="0 0.070147 -6.25e-05" quat="0.499998 0.5 -0.5 0.500002">
                                <inertial pos="0.00526386 2.70692e-05 -0.0641638" quat="0.99991 0.000246685 0.0133803 0.00035395" mass="1.52368" diaginertia="0.00578835 0.00530224 0.0034223" />
                                <joint name="elbow_roll_joint" class="arm" pos="0 0 0" axis="0 0 1" limited="true" range="-2.6761 2.6761" />
                                <geom type="mesh" material="Plastic" rgba="1 1 1 1" mesh="forearm_link" contype="8" conaffinity="3" />
                                <body name="robotwrist_liftlink" pos="-0.01143 0 -0.18056" quat="-2.59734e-06 2.59735e-06 0.707108 -0.707105">
                                    <inertial pos="-5.00413e-06 0.000232915 -1.77452e-05" quat="0.708323 -0.00293266 -0.00290346 0.705877" mass="0.388307" diaginertia="0.000818232 0.000804261 0.000550823" />
                                    <joint name="wrist_lift_joint" class="arm" pos="0 0 0" axis="0 0 1" limited="true" range="-2.2944 0" />
                                    <geom type="mesh" material="Plastic" rgba="0.792157 0.819608 0.933333 1" mesh="wrist_lift_link" contype="0" />
                                    <body name="robotwrist_rolllink" pos="0 0.070147 -6.25e-05" quat="-2.59734e-06 2.59735e-06 0.707108 -0.707105">
                                        <body name="robotfinger_actuator_inertia" pos="0 0 -0.10" quat="0.5 0.5 0.5 -0.5">
                                            <inertial pos="-7.00549073506807e-05 2.51271935254316e-05 -0.052367118189184" quat="1 0 0 0" mass="0.0047109755986862" fullinertia="0.000916887873826385 0.000877268801166351 0.000293333065172452 -6.04547948818479e-08 0.6796133363069e-06 0.64172907801915e-07"/>
                                            <joint name="robotfinger_actuator_joint" class="arm" pos="0 0 0" axis="0 0 1" limited="true" range="0 1.05" />
                                        </body>
                                        <camera name="hand_cam" mode="fixed" fovy="45" pos="0.05 0 -0.05" euler="0 0.2 -1.57"> </camera>
                                        <inertial pos="0.00526385736219506 2.70691865020822e-05 -0.0641638075944594" quat="0.999999 0.000484212 -0.00134643 -0.000743041" mass="0.657109755986862" fullinertia="0.0057866591250737 0.00530223654324281 0.00342399181200673 3.71515699629511e-07 -6.32890111626103e-05 8.9999884666805e-07" />
                                        <joint name="wrist_roll_joint" class="arm" pos="0 0 0" axis="0 0 1" limited="true" range="-2.6761 2.6761" />
                                        <geom type="mesh" material="Plastic" rgba="0.792157 0.819608 0.933333 1" mesh="wrist_roll_link" contype="16" conaffinity="7" />
                                        <body name="robotrightfingerlimb" pos="0.000 0.030703 -0.071979" quat="0.63 -0.321 -0.63 0.321">
                                            <inertial pos="0.00046733152633803 0.0122666320844707 1.16452530510985E-07" quat="1.0 0 0 0" mass="0.0384620979765985" fullinertia="1.93716279065148E-05 5.23390911087335E-06 1.92560542157392E-05 -1.74835869619804E-06 3.21020594362941E-11 -5.04535602261134E-11"/>
                                            <geom type="mesh" material="Plastic" rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" mesh="rightfingerlimb_link"  contype="16" conaffinity="7" />
                                            <joint name="right_fingerlimb_joint" class="gripper" pos="0 0 0" axis="0 0 1" limited="true" range="0 1.05" />
                                            <body name="robotrightfingertip" pos="0 0.06 0" quat="0.222 0.222 -0.672 -0.672">
                                                <inertial pos="0.000428096363398578 -6.3962924111774E-08 0.0162809660053768" quat="1.0 0 0 0" mass="0.0096424502794395" fullinertia="1.76146900164229E-06 1.95368501856251E-06 6.78506827465793E-07 -1.63725174281941E-11 -5.09403577370148E-07 -2.7403586363238E-12"/>
                                                <geom type="mesh" material="Plastic" rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" mesh="rightfingertip_link"  contype="1" conaffinity="1" />
                                                <joint name="right_fingertip_joint" class="gripper" pos="0 0 0" axis="0 1 0" limited="true" range="0 1.05" />
                                            </body>
                                        </body>
                                        <body name="robotleftfingerlimb" pos="0.000 -0.030703 -0.071979" quat="0.321 -0.63 0.321 -0.63">
                                            <inertial pos="0.00046733152633803 0.0122666320844707 1.16452530510985E-07" quat="1.0 0 0 0" mass="0.0384620979765985" fullinertia="1.93716279065148E-05 5.23390911087335E-06 1.92560542157392E-05 -1.74835869619804E-06 3.21020594362941E-11 -5.04535602261134E-11"/>
                                            <geom type="mesh" material="Plastic" rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" mesh="leftfingerlimb_link"  contype="16" conaffinity="7" />
                                            <joint name="left_fingerlimb_joint" class="gripper" pos="0 0 0" axis="0 0 1" limited="true" range="0 1.05" />
                                            <body name="robotleftfingertip" pos="0 0.06 0" quat="0.222 0.222 -0.672 -0.672">
                                                <inertial pos="0.000428096363398578 -6.3962924111774E-08 0.0162809660053768" quat="1.0 0 0 0" mass="0.0096424502794395" fullinertia="1.76146900164229E-06 1.95368501856251E-06 6.78506827465793E-07 -1.63725174281941E-11 -5.09403577370148E-07 -2.7403586363238E-12"/>
                                                <geom type="mesh" material="Plastic" rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" mesh="leftfingertip_link"  contype="1" conaffinity="1" />
                                                <joint name="left_fingertip_joint" class="gripper" pos="0 0 0" axis="0 1 0" limited="true" range="0 1.05" />
                                            </body>
                                        </body>
                                    </body>
                                </body>
                            </body>
                        </body>
                    </body>
                </body>
            </body>
        </body>
        <!-- Target -->
        <body name="target" pos="-0.5 0 -0.3">
            <joint armature="0" axis="1 0 0" damping="0" limited="true" name="target_x" pos="0 0 0" range="-.27 .27" ref=".1" stiffness="0" type="slide" />
            <joint armature="0" axis="0 1 0" damping="0" limited="true" name="target_y" pos="0 0 0" range="-.27 .27" ref="-.1" stiffness="0" type="slide" />
            <geom conaffinity="0" contype="0" name="target" pos="0 0 0" rgba="0.9 0.2 0.2 1" size=".009" type="sphere" />
        </body>
    </worldbody>
    <actuator>
        <motor ctrllimited="true" ctrlrange="-1.0 1.0" gear="2.0" joint="base_roll_joint" />
        <motor ctrllimited="true" ctrlrange="-1.0 1.0" gear="2.0" joint="shoulder_lift_joint" />
        <motor ctrllimited="true" ctrlrange="-1.0 1.0" gear="2.0" joint="shoulder_roll_joint" />
        <motor ctrllimited="true" ctrlrange="-1.0 1.0" gear="2.0" joint="elbow_lift_joint" />
        <motor ctrllimited="true" ctrlrange="-1.0 1.0" gear="2.0" joint="elbow_roll_joint" />
        <motor ctrllimited="true" ctrlrange="-1.0 1.0" gear="2.0" joint="wrist_lift_joint" />
        <motor ctrllimited="true" ctrlrange="-1.0 1.0" gear="2.0" joint="wrist_roll_joint" />
        <position ctrllimited="true" ctrlrange="0 1.05" gear="1.0" joint="robotfinger_actuator_joint" />
        <position ctrllimited="true" kp="1.0" ctrlrange="0 1.4" joint="right_fingerlimb_joint" />
        <position ctrllimited="true" kp="1.0" ctrlrange="-1.4 0" joint="right_fingertip_joint" />
        <position ctrllimited="true" kp="1.0" ctrlrange="0 1.4" joint="left_fingerlimb_joint" />
        <position ctrllimited="true" kp="1.0" ctrlrange="-1.4 0" joint="left_fingertip_joint" />
    </actuator>
</mujoco>