<mujoco model="jaco_v2">
    <actuator>
        <!-- Physical limits of the actuator. Pulled from raw actuator spec sheet, see:
         https://www.kinovarobotics.com/sites/default/files/AS-ACT-KA58-KA75-SP-INT-EN%20201804-1.2%20%28KINOVA%E2%84%A2%20Actuator%20series%20KA75%2B%20KA-58%20Specifications%29.pdf -->
        <motor ctrllimited="true" ctrlrange="-30.5 30.5" joint="j2s7s300_joint_1" name="torq_j1"/>
        <motor ctrllimited="true" ctrlrange="-30.5 30.5" joint="j2s7s300_joint_2" name="torq_j2"/>
        <motor ctrllimited="true" ctrlrange="-30.5 30.5" joint="j2s7s300_joint_3" name="torq_j3"/>
        <motor ctrllimited="true" ctrlrange="-30.5 30.5" joint="j2s7s300_joint_4" name="torq_j4"/>
        <motor ctrllimited="true" ctrlrange="-30.5 30.5" joint="j2s7s300_joint_5" name="torq_j5"/>
        <motor ctrllimited="true" ctrlrange="-6.8 6.8" joint="j2s7s300_joint_6" name="torq_j6"/>
        <motor ctrllimited="true" ctrlrange="-6.8 6.8" joint="j2s7s300_joint_7" name="torq_j7"/>
    </actuator>
    <asset>
        <mesh name="base" file="meshes/base.stl" />
        <mesh name="shoulder" file="meshes/shoulder.stl" />
        <mesh name="ring_big" file="meshes/ring_big.stl" />
        <mesh name="arm_half_1" file="meshes/arm_half_1.stl" />
        <mesh name="arm_half_2" file="meshes/arm_half_2.stl" />
        <mesh name="forearm" file="meshes/forearm.stl" />
        <mesh name="ring_small" file="meshes/ring_small.stl" />
        <mesh name="wrist_spherical_1" file="meshes/wrist_spherical_1.stl" />
        <mesh name="wrist_spherical_2" file="meshes/wrist_spherical_2.stl" />

        <!-- Materials for robot -->
        <texture type="cube" name="carbon_tex" builtin="flat" width="100" height="100" rgb1="1 1 1" rgb2="1 1 1"/>
        <texture type="cube" name="grey_plastic_tex" builtin="flat" width="100" height="100" rgb1="1 1 1" rgb2="1 1 1"/>
        <material name="carbon_jaco" texture="carbon_tex" rgba="0.05 0.05 0.05 1" />
        <material name="grey_plastic_jaco" texture="grey_plastic_tex" rgba="0.88 0.86 0.86 1" />
    </asset>
    <worldbody>
        <body name="base" pos="0 0 0">
            <!-- robot view -->
            <camera mode="fixed" name="robotview" pos="1.0 0 0.4" quat="0.653 0.271 0.271 0.653"/>
            <inertial diaginertia="0 0 0" mass="0" pos="0 0 0"/>
            <!-- mount attached here -->
            <body name="j2s7s300_link_0" pos="0 0 0">
                <inertial pos="0 0 0.05" mass="4" diaginertia="0.4 0.4 0.4" />
                <geom type="mesh" contype="0" conaffinity="0" group="1" material="carbon_jaco" mesh="base" />
                <geom type="mesh" material="carbon_jaco" mesh="base" name="base_collision"/>
                <body name="j2s7s300_link_1" pos="0 0 0.15675" quat="0 0 1 0">
                    <inertial pos="0 -0.002 -0.0605" mass="0.7477" diaginertia="0.00152032 0.00152032 0.00059816" />
                    <joint name="j2s7s300_joint_1" pos="0 0 0" axis="0 0 1" limited="true" range="-6.28319 6.28319" damping="0.1" frictionloss="0.01"/>
                    <geom type="mesh" contype="0" conaffinity="0" group="1" material="carbon_jaco" name="s_visual" mesh="shoulder" />
                    <geom type="mesh" contype="0" conaffinity="0" group="1" material="grey_plastic_jaco" name="s_ring_visual" mesh="ring_big" />
                    <geom type="mesh" material="carbon_jaco" mesh="shoulder" name="s_collision"/>
                    <body name="j2s7s300_link_2" pos="0 0.0016 -0.11875" quat="0 0 -0.707107 0.707107">
                        <inertial pos="0 -0.103563 0" quat="0.707107 0.707107 0 0" mass="0.8447" diaginertia="0.00247074 0.00247074 0.000380115" />
                        <joint name="j2s7s300_joint_2" pos="0 0 0" axis="0 0 1" limited="true" range="0.820305 5.46288" damping="0.1" frictionloss="0.01"/>
                        <geom type="mesh" contype="0" conaffinity="0" group="1" material="carbon_jaco" name="ah1_visual" mesh="arm_half_1" />
                        <geom type="mesh" contype="0" conaffinity="0" group="1" material="grey_plastic_jaco" name="ah1_ring_visual" mesh="ring_big" />
                        <geom type="mesh" material="carbon_jaco" mesh="arm_half_1" name="ah1_collision"/>
                        <body name="j2s7s300_link_3" pos="0 -0.205 0" quat="0.707107 -0.707107 0 0">
                            <inertial pos="0 0 -0.102245" mass="0.8447" diaginertia="0.00247074 0.00247074 0.000380115" />
                            <joint name="j2s7s300_joint_3" pos="0 0 0" axis="0 0 1" limited="true" range="-6.28319 6.28319" damping="0.1" frictionloss="0.01"/>
                            <geom type="mesh" contype="0" conaffinity="0" group="1" material="carbon_jaco" name="ah2_visual" mesh="arm_half_2" />
                            <geom type="mesh" contype="0" conaffinity="0" group="1" material="grey_plastic_jaco" name="ah2_ring_visual" mesh="ring_big" />
                            <geom type="mesh" material="carbon_jaco" mesh="arm_half_2" name="ah2_collision"/>
                            <body name="j2s7s300_link_4" pos="0 0 -0.205" quat="0 0 0.707107 0.707107">
                                <inertial pos="0 0.081 -0.0086" quat="0.707107 0.707107 0 0" mass="0.6763" diaginertia="0.00142022 0.00142022 0.000304335" />
                                <joint name="j2s7s300_joint_4" pos="0 0 0" axis="0 0 1" limited="true" range="0.523599 5.75959" damping="0.1" frictionloss="0.01"/>
                                <geom type="mesh" contype="0" conaffinity="0" group="1" material="carbon_jaco" name="f_visual" mesh="forearm" />
                                <geom type="mesh" contype="0" conaffinity="0" group="1" material="grey_plastic_jaco" name="f_ring_visual" mesh="ring_small" />
                                <geom type="mesh" material="carbon_jaco" mesh="forearm" name="f_collision"/>
                                <body name="j2s7s300_link_5" pos="0 0.2073 -0.0114" quat="0 0 -0.707107 0.707107">
                                    <inertial pos="0 0.00288489 -0.0541933" mass="0.463" diaginertia="0.000432132 0.000432132 9.26e-05" />
                                    <joint name="j2s7s300_joint_5" pos="0 0 0" axis="0 0 1" limited="true" range="-6.28319 6.28319" damping="0.1" frictionloss="0.01"/>
                                    <geom type="mesh" contype="0" conaffinity="0" group="1" material="carbon_jaco" name="ws1_visual" mesh="wrist_spherical_1" />
                                    <geom type="mesh" contype="0" conaffinity="0" group="1" material="grey_plastic_jaco" name="ws1_ring_visual" mesh="ring_small" />
                                    <geom type="mesh" material="carbon_jaco" mesh="wrist_spherical_1" name="ws1_collision"/>
                                    <body name="j2s7s300_link_6" pos="0 0 -0.10375" quat="0 0 0.707107 0.707107">
                                        <inertial pos="0 0.0497209 -0.00285628" quat="0.707107 0.707107 0 0" mass="0.463" diaginertia="0.000432132 0.000432132 9.26e-05" />
                                        <joint name="j2s7s300_joint_6" pos="0 0 0" axis="0 0 1" limited="true" range="1.13446 5.14872" damping="0.01" frictionloss="0.01"/>
                                        <geom type="mesh" contype="0" conaffinity="0" group="1" material="carbon_jaco" name="ws2_visual" mesh="wrist_spherical_2" />
                                        <geom type="mesh" contype="0" conaffinity="0" group="1" material="grey_plastic_jaco" name="ws2_ring_visual" mesh="ring_small" />
                                        <geom type="mesh" material="carbon_jaco" mesh="wrist_spherical_2" name="ws2_collision"/>
                                        <body name="j2s7s300_link_7" pos="0 0.10375 0" quat="0 0 -0.707107 0.707107">
                                            <inertial pos="0 0 -0.06" quat="0.5 0.5 -0.5 0.5" mass="1e-6" diaginertia="1e-6 1e-6 1e-6" /> <!--mass="0.99" diaginertia="0.0005816 0.000345324 0.000345324" /> -->
                                            <joint name="j2s7s300_joint_7" pos="0 0 0" axis="0 0 1" limited="true" range="-6.28319 6.28319" damping="0.01" frictionloss="0.01"/>
                                            <body name="right_hand" pos="0 0 0" quat="0 1 0 0">
                                                <!-- This camera points out from the eef. -->
                                                <camera mode="fixed" name="eye_in_hand" pos="0.08 0 0" quat="0 0.707108 0.707108 0" fovy="75"/>
                                                <!-- To add gripper -->
                                            </body>
                                        </body>
                                    </body>
                                </body>
                            </body>
                        </body>
                    </body>
                </body>
            </body>
        </body>
    </worldbody>
</mujoco>
