<mujoco model="robotiq_c_model">
    <asset>
        <mesh name="robotiq_85_gripper_adapter_plate" file="meshes/robotiq_gripper/robotiq_85_gripper_adapter_plate.stl" />
        <mesh name="robotiq_85_gripper_base" file="meshes/robotiq_gripper/robotiq_85_gripper_base.stl" />
        <mesh name="robotiq_85_gripper_joint_0_L" file="meshes/robotiq_gripper/robotiq_85_gripper_joint_0_L.stl" />
        <mesh name="robotiq_85_gripper_joint_1_L" file="meshes/robotiq_gripper/robotiq_85_gripper_joint_1_L.stl" />
        <mesh name="robotiq_85_gripper_joint_0_R" file="meshes/robotiq_gripper/robotiq_85_gripper_joint_0_R.stl" />
        <mesh name="robotiq_85_gripper_joint_1_R" file="meshes/robotiq_gripper/robotiq_85_gripper_joint_1_R.stl" />
        <mesh name="robotiq_85_gripper_joint_2_L" file="meshes/robotiq_gripper/robotiq_85_gripper_joint_2_L.stl" />
        <mesh name="robotiq_85_gripper_joint_3_L" file="meshes/robotiq_gripper/robotiq_85_gripper_joint_3_L.stl" />
        <mesh name="robotiq_85_gripper_joint_2_R" file="meshes/robotiq_gripper/robotiq_85_gripper_joint_2_R.stl" />
        <mesh name="robotiq_85_gripper_joint_3_R" file="meshes/robotiq_gripper/robotiq_85_gripper_joint_3_R.stl" />
    </asset>
    <actuator>
        <position ctrllimited="true" ctrlrange="0 0.8575" joint="robotiq_85_left_knuckle_joint" kp="10" name="gripper_robotiq_85_left_knuckle_joint" forcelimited="true" forcerange="-20 20"/>
        <position ctrllimited="true" ctrlrange="0 1.5707" joint="robotiq_85_left_inner_knuckle_joint" kp="10" name="gripper_robotiq_85_left_inner_knuckle_joint" forcelimited="true" forcerange="-20 20"/>
        <position ctrllimited="true" ctrlrange="0 1.5707" joint="robotiq_85_left_finger_tip_joint" kp="10" name="gripper_robotiq_85_left_finger_tip_joint" forcelimited="true" forcerange="-20 20"/>
        <position ctrllimited="true" ctrlrange="0 1.5707" joint="robotiq_85_right_knuckle_joint" kp="10" name="gripper_robotiq_85_right_knuckle_joint" forcelimited="true" forcerange="-20 20"/>
        <position ctrllimited="true" ctrlrange="0 1.5707" joint="robotiq_85_right_inner_knuckle_joint" kp="10" name="gripper_robotiq_85_right_inner_knuckle_joint" forcelimited="true" forcerange="-20 20"/>
        <position ctrllimited="true" ctrlrange="0 1.5707" joint="robotiq_85_right_finger_tip_joint" kp="10" name="gripper_robotiq_85_right_finger_tip_joint" forcelimited="true" forcerange="-20 20"/>
    </actuator>
    <worldbody>
        <inertial pos="0 0 0" mass="1e-6" diaginertia="1e-6 1e-6 1e-6" />
        <body name="robotiq_85_adapter_link" pos="0.02 0 0" quat="0 0.709 0 0.706">
            <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
            <geom quat="0.500048 0.5 0.499952 0.5" type="mesh" group="0" mesh="robotiq_85_gripper_adapter_plate" />
            <geom quat="0.500048 0.5 0.499952 0.5" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_adapter_plate" />
            <body name="robotiq_85_base_link" pos="0.0085 0 -0.0041">
                <site name="grip_site" pos="0.1 0 0" size="0.01" rgba="1 0 0 1" type="sphere" group="1"/>
                <site name="grip_site_cylinder" pos="-0.02 0 0" quat="0.707 0 0.707 0" size="0.005 10" rgba="0 1 0 0.3" type="cylinder" group="1"></site>
                <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                <geom quat="3.27596e-05 0.707141 0.707073 3.27564e-05" type="mesh" group="0" mesh="robotiq_85_gripper_base" />
                <geom quat="3.27596e-05 0.707141 0.707073 3.27564e-05" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_base" />
                <body name="robotiq_85_left_knuckle_link" pos="0.04191 0.0306 0" quat="0.500048 -0.5 0.5 0.499952">
                    <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                    <joint name="robotiq_85_left_knuckle_joint" pos="0 0 0" axis="1 0 0" limited="true" range="0 0.8575" />
                    <geom pos="0 0.04191 -0.0306" quat="9.38231e-07 0.707141 -9.3814e-07 0.707073" type="mesh" group="0" mesh="robotiq_85_gripper_joint_0_L" name="robotiq_85_gripper_joint_0_L"/>
                    <geom pos="0 0.04191 -0.0306" quat="9.38231e-07 0.707141 -9.3814e-07 0.707073" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_joint_0_L" />
                    <body name="robotiq_85_left_finger_link" pos="0 0.00508 0.03134" quat="4.63268e-05 1 0 0">
                       <!--  <geom pos="0 0.047 -0.008" size="0.005" type="sphere" rgba="1 0 0 1"/> -->
                        <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                        <geom pos="0 -0.03683 0.06194" quat="0.707141 0 0.707073 0" type="mesh" group="0" mesh="robotiq_85_gripper_joint_1_L" name="robotiq_85_gripper_joint_1_L"/>
                        <geom pos="0 -0.03683 0.06194" quat="0.707141 0 0.707073 0" type="mesh" group="1" contype="0" conaffinity="0" mesh="robotiq_85_gripper_joint_1_L" />
                    </body>
                </body>
                <body name="robotiq_85_right_knuckle_link" pos="0.04191 -0.0306 0" quat="0.500048 0.5 -0.5 0.499952">
                    <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                    <joint name="robotiq_85_right_knuckle_joint" pos="0 0 0" axis="1 0 0" limited="true" range="0 1.5707" />
                    <geom pos="0 0.04191 -0.0306" quat="9.38231e-07 0.707141 9.3814e-07 -0.707073" type="mesh" group="0" mesh="robotiq_85_gripper_joint_0_R" name="robotiq_85_gripper_joint_0_R"/>
                    <geom pos="0 0.04191 -0.0306" quat="9.38231e-07 0.707141 9.3814e-07 -0.707073" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_joint_0_R" />
                    <body name="robotiq_85_right_finger_link" pos="0 0.00508 0.03134" quat="4.63268e-05 1 0 0">
                        <!-- <geom pos="0 0.047 -0.008" size="0.005" type="sphere" rgba="1 0 0 1"/> -->
                        <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                        <geom pos="0 -0.03683 0.06194" quat="0.707141 0 -0.707073 0" type="mesh" group="0" mesh="robotiq_85_gripper_joint_1_R" name="robotiq_85_gripper_joint_1_R"/>
                        <geom pos="0 -0.03683 0.06194" quat="0.707141 0 -0.707073 0" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_joint_1_R" />
                    </body>
                </body>
                <body name="robotiq_85_left_inner_knuckle_link" pos="0.04843 0.0127 0" quat="0.500048 0.5 0.5 -0.499952">
                    <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                    <joint name="robotiq_85_left_inner_knuckle_joint" pos="0 0 0" axis="1 0 0" limited="true" range="0 1.5707" />
                    <geom pos="0 -0.04843 0.0127" quat="0.707141 0 0.707073 0" type="mesh" mesh="robotiq_85_gripper_joint_2_L" name="robotiq_85_gripper_joint_2_L"/>
                    <geom pos="0 -0.04843 0.0127" quat="0.707141 0 0.707073 0" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_joint_2_L" />
                    <body name="robotiq_85_left_finger_tip_link" pos="0 0.04196 -0.0388">
                        <!-- <geom pos="0 -0.0065 -0.0185" size="0.005" type="sphere" rgba="0 1 0 1"/> -->
                        <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                        <joint name="robotiq_85_left_finger_tip_joint" pos="0 0 0" axis="1 0 0" limited="true" range="0 1.5707" />
                        <geom pos="0 -0.090381 0.051505" quat="0.707141 0 0.707073 0" type="mesh" group="0" mesh="robotiq_85_gripper_joint_3_L" name="robotiq_85_gripper_joint_3_L"/>
                        <geom pos="0 -0.090381 0.051505" quat="0.707141 0 0.707073 0" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_joint_3_L" />
                    </body>
                </body>
                <body name="robotiq_85_right_inner_knuckle_link" pos="0.04843 -0.0127 0" quat="0.500048 -0.5 -0.5 -0.499952">
                    <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                    <joint name="robotiq_85_right_inner_knuckle_joint" pos="0 0 0" axis="1 0 0" limited="true" range="0 1.5707" />
                    <geom pos="0 -0.04843 0.0127" quat="0.707141 0 -0.707073 0" type="mesh" contype="4" conaffinity="3" group="0" mesh="robotiq_85_gripper_joint_2_R" name="robotiq_85_gripper_joint_2_R"/>
                    <geom pos="0 -0.04843 0.0127" quat="0.707141 0 -0.707073 0" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_joint_2_R" />
                    <body name="robotiq_85_right_finger_tip_link" pos="0 0.04196 -0.0388">
                        <inertial pos="0 0 0" mass="0.01" diaginertia="0.001 0.001 0.001" />
                        <!-- <geom pos="0 -0.0065 -0.0185" size="0.005" type="sphere" rgba="0 1 0 1"/> -->
                        <joint name="robotiq_85_right_finger_tip_joint" pos="0 0 0" axis="1 0 0" limited="true" range="0 1.5707" />
                        <geom pos="0 -0.090381 0.051505" quat="0.707141 0 -0.707073 0" type="mesh" group="0"  mesh="robotiq_85_gripper_joint_3_R" name="robotiq_85_gripper_joint_3_R"/>
                        <geom pos="0 -0.090381 0.051505" quat="0.707141 0 -0.707073 0" type="mesh" contype="0" conaffinity="0" group="1" mesh="robotiq_85_gripper_joint_3_R" />
                    </body>
                </body>
            </body>
        </body>
    </worldbody>
    <equality>
        <connect body1="robotiq_85_right_finger_link" body2="robotiq_85_right_finger_tip_link" anchor="0 0.047 -0.008"/>
        <connect body1="robotiq_85_left_finger_link" body2="robotiq_85_left_finger_tip_link" anchor="0 0.047 -0.008"/>
    </equality>
    <contact>
        <exclude body1="robotiq_85_base_link" body2="robotiq_85_left_knuckle_link"/>
        <exclude body1="robotiq_85_base_link" body2="robotiq_85_right_knuckle_link"/>
        <exclude body1="robotiq_85_base_link" body2="robotiq_85_left_inner_knuckle_link"/>
        <exclude body1="robotiq_85_base_link" body2="robotiq_85_right_inner_knuckle_link"/>
        <exclude body1="robotiq_85_base_link" body2="robotiq_85_left_finger_link"/>
        <exclude body1="robotiq_85_base_link" body2="robotiq_85_right_finger_link"/>
        <exclude body1="robotiq_85_right_finger_link" body2="robotiq_85_right_finger_tip_link"/>
        <exclude body1="robotiq_85_left_finger_link" body2="robotiq_85_left_finger_tip_link"/>
    </contact>

</mujoco>
