<mujoco model="xarm7">
    <actuator>
        <motor ctrllimited="true" ctrlrange="-50.0 50.0" joint="Actuator1" name="torq_j1"/>
        <motor ctrllimited="true" ctrlrange="-50.0 50.0" joint="Actuator2" name="torq_j2"/>
        <motor ctrllimited="true" ctrlrange="-30.0 30.0" joint="Actuator3" name="torq_j3"/>
        <motor ctrllimited="true" ctrlrange="-30.0 30.0" joint="Actuator4" name="torq_j4"/>
        <motor ctrllimited="true" ctrlrange="-30.0 30.0" joint="Actuator5" name="torq_j5"/>
        <motor ctrllimited="true" ctrlrange="-20.0 20.0" joint="Actuator6" name="torq_j6"/>
        <motor ctrllimited="true" ctrlrange="-20.0 20.0" joint="Actuator7" name="torq_j7"/>
        <velocity ctrllimited="true" ctrlrange="-2.1750 2.1750" joint="Actuator1" kv="10" name="vel_j1"/>
        <velocity ctrllimited="true" ctrlrange="-2.1750 2.1750" joint="Actuator2" kv="10" name="vel_j2"/>
        <velocity ctrllimited="true" ctrlrange="-2.1750 2.1750" joint="Actuator3" kv="10" name="vel_j3"/>
        <velocity ctrllimited="true" ctrlrange="-2.1750 2.1750" joint="Actuator4" kv="5" name="vel_j4"/>
        <velocity ctrllimited="true" ctrlrange="-2.6100 2.6100" joint="Actuator5" kv="5" name="vel_j5"/>
        <velocity ctrllimited="true" ctrlrange="-2.6100 2.6100" joint="Actuator6" kv="2.0" name="vel_j6"/>
        <velocity ctrllimited="true" ctrlrange="-2.6100 2.6100" joint="Actuator7" kv="2.0" name="vel_j7"/>
    </actuator> 
    <asset>
        <mesh name="link_base" file="mesh/link_base.STL" />
        <mesh name="link1" file="mesh/link1.STL" />
        <mesh name="link2" file="mesh/link2.STL" />
        <mesh name="link3" file="mesh/link3.STL" />
        <mesh name="link4" file="mesh/link4.STL" />
        <mesh name="link5" file="mesh/link5.STL" />
        <mesh name="link6" file="mesh/link6.STL" />
        <mesh name="link7" file="mesh/link7.STL" />

    </asset>
    <worldbody>
        <body name="base" pos="0 0 0">
            <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"/>

            <geom type="mesh" contype="0" conaffinity="0" group="1" rgba="1 1 1 1" mesh="link_base" />
            <geom type="mesh" conaffinity="0" rgba="0.75294 0.75294 0.75294 1" mesh="link_base" />
            <body name="link1" pos="0 0 0.267">
                <inertial pos="-0.0042142 0.02821 -0.0087788" quat="0.917781 -0.277115 0.0606681 0.277858" mass="0.42603" diaginertia="0.00144551 0.00137757 0.000823511" />
                <joint name="Actuator1" 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" rgba="1 1 1 1" mesh="link1" />
                <geom type="mesh" conaffinity="0" rgba="0.75294 0.75294 0.75294 1" mesh="link1" name="link1_collision"/>
                <body name="link2" pos="0 0 0" quat="0.707105 -0.707108 0 0">
                    <inertial pos="-3.3178e-05 -0.12849 0.026337" quat="0.447793 0.894132 -0.00224061 0.00218314" mass="0.56095" diaginertia="0.00319151 0.00311598 0.000980804" />
                    <joint name="Actuator2" pos="0 0 0" axis="0 0 1" limited="true" range="-2.059 2.0944" damping="0.1" frictionloss="0.01" />
                    <geom type="mesh" contype="0" conaffinity="0" group="1" rgba="1 1 1 1" mesh="link2" />
                    <geom type="mesh" conaffinity="0" rgba="0.75294 0.75294 0.75294 1" mesh="link2" name="link2_collision"/>
                    <body name="link3" pos="0 -0.293 0" quat="0.707105 0.707108 0 0">
                        <inertial pos="0.04223 -0.023258 -0.0096674" quat="0.883205 0.339803 0.323238 0.000542237" mass="0.44463" diaginertia="0.00133227 0.00119126 0.000780475" />
                        <joint name="Actuator3" 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" rgba="1 1 1 1" mesh="link3" />
                        <geom type="mesh" conaffinity="0" rgba="0.75294 0.75294 0.75294 1" mesh="link3" name="link3_collision"/>
                        <body name="link4" pos="0.0525 0 0" quat="0.707105 0.707108 0 0">
                            <inertial pos="0.067148 -0.10732 0.024479" quat="0.0654142 0.483317 -0.738663 0.465298" mass="0.52387" diaginertia="0.00288984 0.00282705 0.000894409" />
                            <joint name="Actuator4" pos="0 0 0" axis="0 0 1" limited="true" range="-0.19198 3.927" damping="0.1" frictionloss="0.01" />
                            <geom type="mesh" contype="0" conaffinity="0" group="1" rgba="1 1 1 1" mesh="link4" />
                            <geom type="mesh" conaffinity="0" rgba="0.75294 0.75294 0.75294 1" mesh="link4" name="link4_collision"/>
                            <body name="link5" pos="0.0775 -0.3425 0" quat="0.707105 0.707108 0 0">
                                <inertial pos="-0.00023397 0.036705 -0.080064" quat="0.981064 -0.19003 0.00637998 0.0369004" mass="0.18554" diaginertia="0.00099553 0.000988613 0.000247126" />
                                <joint name="Actuator5" 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" rgba="1 1 1 1" mesh="link5" />
                                <geom type="mesh" conaffinity="0" rgba="0.75294 0.75294 0.75294 1" mesh="link5" name="link5_collision"/>
                                <body name="link6" pos="0 0 0" quat="0.707105 0.707108 0 0">
                                    <inertial pos="0.058911 0.028469 0.0068428" quat="-0.188705 0.793535 0.166088 0.554173" mass="0.31344" diaginertia="0.000827892 0.000768871 0.000386708" />
                                    <joint name="Actuator6" pos="0 0 0" axis="0 0 1" limited="true" range="-1.69297 3.14159" damping="0.01" frictionloss="0.01" />
                                    <geom type="mesh" contype="0" conaffinity="0" group="1" rgba="1 1 1 1" mesh="link6" />
                                    <geom type="mesh" conaffinity="0" rgba="0.75294 0.75294 0.75294 1" mesh="link6" name="link6_collision"/>
                                    <body name="link7" pos="0.076 0.097 0" quat="0.707105 -0.707108 0 0">
                                        <inertial pos="-1.5846e-05 -0.0046377 -0.012705" quat="0.495801 0.504435 -0.503065 0.496642" mass="0.31468" diaginertia="0.000260352 0.00016985 0.000119208" />
                                        <joint name="Actuator7" pos="0 0 0" axis="0 0 1" limited="true" range="-6.28319 6.28319" damping="0.01" frictionloss="0.01" />
                                        <geom type="mesh" contype="0" conaffinity="0" group="1" rgba="1 1 1 1" mesh="link7" />
                                        <geom type="mesh" conaffinity="0" rgba="0.75294 0.75294 0.75294 1" mesh="link7" name="link7_collision"/>
                                        <!-- <body name="right_hand" pos="0 0 -0.065" quat="0 0.707105 -0.707108 0 "> -->
                                        <body name="right_hand" pos="0 0 0" quat="0 0 0 1">
                                            <!-- This sites were added for visualization. They are all standardized between models-->
                                            <!-- Position mimics the gripper attachment point (right_hand) -->
                                            <!--  Y-axis should be perpendicular to grasping motion, and Z-axis should point out of the robot eef -->
                                            <site name="ee" pos="0 0 0" size="0.01 0.01 0.01" rgba="0 0 1 1" type="sphere" group="1"/>
                                            <site name="ee_x" pos="0 0 0" size="0.005 .1"  quat="0.707105 0.707108 0 0 " rgba="1 0 0 0" type="cylinder" group="1"/>
                                            <site name="ee_z" pos="0 0 0" size="0.005 .1" quat="0.707105 0 0 0.707108" rgba="0 0 1 0" type="cylinder" group="1"/>
                                            <site name="ee_y" pos="0 0 0" size="0.005 .1" quat="0.707105 0 0.707108 0 " rgba="0 1 0 0" type="cylinder" group="1"/>
                                            <!-- This camera points out from the eef. -->
                                            <camera mode="fixed" name="eye_in_hand" pos="-0.05 0 0" quat="0 -0.707108 0.707108 0" fovy="75"/>
                                            <!-- To add gripper -->
                                        </body>
                                    </body>
                                </body>
                            </body>
                        </body>
                    </body>
                </body>
            </body>
        </body>
        
        <site name="hand-goal-site" type="cylinder" pos="0 0.5 0" size="0.06 0.001" rgba="0.5 0.2 0.2 1"/>
    </worldbody>
</mujoco>
