<mujoco model="panda">
    <actuator>
        <!-- Physical limits of the actuator. -->
        <motor ctrllimited="true" ctrlrange="-80.0 80.0" joint="joint1" name="torq_right_j0"/>
        <motor ctrllimited="true" ctrlrange="-80.0 80.0" joint="joint2" name="torq_right_j1"/>
        <motor ctrllimited="true" ctrlrange="-80.0 80.0" joint="joint3" name="torq_right_j2"/>
        <motor ctrllimited="true" ctrlrange="-80.0 80.0" joint="joint4" name="torq_right_j3"/>
        <motor ctrllimited="true" ctrlrange="-80.0 80.0" joint="joint5" name="torq_right_j4"/>
        <motor ctrllimited="true" ctrlrange="-12.0 12.0" joint="joint6" name="torq_right_j5"/>
        <motor ctrllimited="true" ctrlrange="-12.0 12.0" joint="joint7" name="torq_right_j6"/>
    </actuator>
    <default>
       <joint damping=".1"/>
    </default>
    <asset>
        <mesh name="link0" file="meshes/link0.stl" />
        <mesh name="link1" file="meshes/link1.stl" />
        <mesh name="link2" file="meshes/link2.stl" />
        <mesh name="link3" file="meshes/link3.stl" />
        <mesh name="link4" file="meshes/link4.stl" />
        <mesh name="link5" file="meshes/link5.stl" />
        <mesh name="link6" file="meshes/link6.stl" />
        <mesh name="link7" file="meshes/link7.stl" />
        <mesh name="link0_vis" file="meshes/link0_vis.stl" />
        <mesh name="link1_vis" file="meshes/link1_vis.stl" />
        <mesh name="link2_vis" file="meshes/link2_vis.stl" />
        <mesh name="link3_vis" file="meshes/link3_vis.stl" />
        <mesh name="link4_vis" file="meshes/link4_vis.stl" />
        <mesh name="link5_vis" file="meshes/link5_vis.stl" />
        <mesh name="link6_vis" file="meshes/link6_vis.stl" />
        <mesh name="link7_vis" file="meshes/link7_vis.stl" />
        <mesh file="meshes/pedestal.stl" name="pedestal"/>
    </asset>
    <worldbody>
        <body name="link0" pos="0 0 0">
            <body name="base" pos="0 0 0">
                <inertial diaginertia="0 0 0" mass="0" pos="0 0 0"/>
                <body name="controller_box" pos="0 0 0">
                    <inertial diaginertia="1.71363 1.27988 0.809981" mass="46.64" pos="-0.325 0 -0.38"/>
                    <geom pos="-0.325 0 -0.38" size="0.11 0.2 0.265" type="box" name="controller_box_col"/>
                </body>
                <body name="pedestal_feet" pos="0 0 0">
                    <inertial diaginertia="8.16095 9.59375 15.0785" mass="167.09" pos="-0.1225 0 -0.758"/>
                    <geom pos="-0.1225 0 -0.758" size="0.385 0.35 0.155" type="box" name="pedestal_feet_col"/>
                </body>
                <body name="torso" pos="0 0 0">
                    <inertial diaginertia="1e-08 1e-08 1e-08" mass="0.0001" pos="0 0 0"/>
                    <geom conaffinity="0" contype="0" group="1" rgba="0.2 0.2 0.2 1" size="0.05 0.05 0.05" type="box" name="torso_col"/>
                </body>
                <body name="pedestal" pos="0 0 0">
                    <inertial diaginertia="6.0869 5.81635 4.20915" mass="60.864" pos="0 0 0" quat="0.659267 -0.259505 -0.260945 0.655692"/>
                    <geom conaffinity="0" contype="0" group="1" mesh="pedestal" pos="0.26 0.345 -0.91488" quat="0.5 0.5 -0.5 -0.5" rgba="0.2 0.2 0.2 1" type="mesh" name="pedestal_col1"/>
                    <geom pos="-0.02 0 -0.29" rgba="0.2 0.2 0.2 1" size="0.18 0.31" type="cylinder" name="pedestal_col2"/>
                </body>
            </body>
            <inertial pos="0 0 0.05" mass="4" diaginertia="0.4 0.4 0.4" />
            <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="link0_vis" name="link0_visual" rgba="1 1 1 1"/>
            <geom type="mesh" group="0" mesh="link0" name="link0_collision"/>
            <body name="link1" pos="0 0 0.333">
                <inertial pos="0 0 -0.07" mass="3" diaginertia="0.3 0.3 0.3" />
                <joint name="joint1" pos="0 0 0" axis="0 0 1" limited="true" range="-2.8973 2.8973" />
                <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="link1_vis" name="link1_visual" rgba="1 1 1 1"/>
                <geom type="mesh" group="0" mesh="link1" name="link1_collision"/>
                <body name="link2" pos="0 0 0" quat="0.707107 -0.707107 0 0">
                    <inertial pos="0 -0.1 0" mass="3" diaginertia="0.3 0.3 0.3" />
                    <joint name="joint2" pos="0 0 0" axis="0 0 1" limited="true" range="-1.7628 1.7628" />
                    <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="link2_vis" name="link2_visual" rgba="1 1 1 1"/>
                    <geom type="mesh" group="0" mesh="link2" name="link2_collision"/>
                    <body name="link3" pos="0 -0.316 0" quat="0.707107 0.707107 0 0">
                        <inertial pos="0.04 0 -0.05" mass="2" diaginertia="0.2 0.2 0.2" />
                        <joint name="joint3" pos="0 0 0" axis="0 0 1" limited="true" range="-2.8973 2.8973" />
                        <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="link3_vis" name="link3_visual" rgba="1 1 1 1"/>
                        <geom type="mesh" group="0" mesh="link3" name="link3_collision"/>
                        <body name="link4" pos="0.0825 0 0" quat="0.707107 0.707107 0 0">
                            <inertial pos="-0.04 0.05 0" mass="2" diaginertia="0.2 0.2 0.2" />
                            <joint name="joint4" pos="0 0 0" axis="0 0 1" limited="true" range="-3.0718 -0.0698" />
                            <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="link4_vis" name="link4_visual" rgba="1 1 1 1"/>
                            <geom type="mesh" group="0" mesh="link4" name="link4_collision"/>
                            <body name="link5" pos="-0.0825 0.384 0" quat="0.707107 -0.707107 0 0">
                                <inertial pos="0 0 -0.15" mass="2" diaginertia="0.2 0.2 0.2" />
                                <joint name="joint5" pos="0 0 0" axis="0 0 1" limited="true" range="-2.8973 2.8973" />
                                <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="link5_vis" name="link5_visual" rgba="1 1 1 1"/>
                                <geom type="mesh" group="0" mesh="link5" name="link5_collision"/>
                                <body name="link6" pos="0 0 0" quat="0.707107 0.707107 0 0">
                                    <inertial pos="0.06 0 0" mass="1.5" diaginertia="0.1 0.1 0.1" />
                                    <joint name="joint6" pos="0 0 0" axis="0 0 1" limited="true" range="-0.0175 3.7525" />
                                    <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="link6_vis" name="link6_visual" rgba="1 1 1 1"/>
                                    <geom type="mesh" group="0" mesh="link6" name="link6_collision"/>
                                    <body name="link7" pos="0.088 0 0" quat="0.707107 0.707107 0 0">
                                        <inertial pos="0 0 0.08" mass="0.5" diaginertia="0.05 0.05 0.05" />
                                        <joint name="joint7" pos="0 0 0" axis="0 0 1" limited="true" range="-2.8973 2.8973" />
                                        <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="link7_vis" name="link7_visual" rgba="1 1 1 1"/>
                                        <geom type="mesh" group="0" mesh="link7" name="link7_collision"/>
                                        <!-- to add gripper -->
                                        <!-- rotate 45deg to align physically to the tool-->
                                        <body name="right_hand" pos="0 0 0.107" quat="0.924 0 0 0.383">
                                            <inertial pos="0 0 0" mass="0.5" diaginertia="0.05 0.05 0.05" />
                                            <!-- This sites were added for visualization. -->
                                            <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 1" 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 1" 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 1" type="cylinder" group="1"/>
                                        </body>
                                    </body>
                                </body>
                            </body>
                        </body>
                    </body>
                </body>
            </body>
        </body>
    </worldbody>
</mujoco>
