<?xml version="1.0"?>
<robot name="five_axis_robot" xmlns:xacro="http://ros.org/wiki/xacro">

  <!-- Определение ссылок -->
  <link name="base_link">
    <inertial>
      <mass value="1.0" />
      <inertia ixx="0.005" ixy="0.0" ixz="0.0" iyy="0.005" iyz="0.0" izz="0.005"/>
    </inertial>
    <visual>
      <geometry>
        <box size="0.5 0.5 0.4" />
      </geometry>
      <material name="grey">
        <color rgba="0.5 0.5 0.5 1.0" />
      </material>
    </visual>
  </link>

  <link name="link1">
    <inertial>
      <mass value="1.0" />
      <inertia ixx="0.005" ixy="0.0" ixz="0.0" iyy="0.005" iyz="0.0" izz="0.005"/>
    </inertial>
    <visual>
      <geometry>
        <cylinder radius="0.05" length="0.3" />
      </geometry>
      <material name="blue">
        <color rgba="0.0 0.0 1.0 1.0" />
      </material>
    </visual>
  </link>

  <link name="link2">
    <inertial>
      <mass value="1.0" />
      <inertia ixx="0.005" ixy="0.0" ixz="0.0" iyy="0.005" iyz="0.0" izz="0.005"/>
    </inertial>
    <visual>
      <geometry>
        <cylinder radius="0.05" length="0.3" />
      </geometry>
      <material name="green">
        <color rgba="0.0 1.0 0.0 1.0" />
      </material>
    </visual>
  </link>

  <link name="link3">
    <inertial>
      <mass value="1.0" />
      <inertia ixx="0.005" ixy="0.0" ixz="0.0" iyy="0.005" iyz="0.0" izz="0.005"/>
    </inertial>
    <visual>
      <geometry>
        <cylinder radius="0.05" length="0.3" />
      </geometry>
      <material name="red">
        <color rgba="1.0 0.0 0.0 1.0" />
      </material>
    </visual>
  </link>

  <link name="link4">
    <inertial>
      <mass value="1.0" />
      <inertia ixx="0.005" ixy="0.0" ixz="0.0" iyy="0.005" iyz="0.0" izz="0.005"/>
    </inertial>
    <visual>
      <geometry>
        <cylinder radius="0.05" length="0.3" />
      </geometry>
      <material name="yellow">
        <color rgba="1.0 1.0 0.0 1.0" />
      </material>
    </visual>
  </link>

  <link name="end_effector">
    <inertial>
      <mass value="1.0" />
      <inertia ixx="0.005" ixy="0.0" ixz="0.0" iyy="0.005" iyz="0.0" izz="0.005"/>
    </inertial>
    <visual>
      <geometry>
        <box size="0.1 0.1 0.1" />
      </geometry>
      <material name="black">
        <color rgba="0.0 0.0 0.0 1.0" />
      </material>
    </visual>
  </link>

  <!-- Определение суставов -->
  <joint name="joint1" type="revolute">
    <parent link="base_link" />
    <child link="link1" />
    <origin xyz="0 0 0.494600" rpy="0 0 0" />
    <axis xyz="0 0 1" />
    <limit lower="-3.14" upper="3.14" effort="10" velocity="1" />
  </joint>

  <joint name="joint2" type="revolute">
    <parent link="link1" />
    <child link="link2" />
    <origin xyz="0 0 0.729921" rpy="0 0 0" />
    <axis xyz="0 1 0" />
    <limit lower="-3.14" upper="3.14" effort="10" velocity="1" />
  </joint>

  <joint name="joint3" type="revolute">
    <parent link="link2" />
    <child link="link3" />
    <origin xyz="0 0 0.098277" rpy="0 0 0" />
    <axis xyz="0 1 0" />
    <limit lower="-3.14" upper="3.14" effort="10" velocity="1" />
  </joint>

  <joint name="joint4" type="revolute">
    <parent link="link3" />
    <child link="link4" />
    <origin xyz="0 0 1.109039" rpy="0 0 0" />
    <axis xyz="0 1 0" />
    <limit lower="-3.14" upper="3.14" effort="10" velocity="1" />
  </joint>

  <joint name="end_effector_joint" type="revolute">
    <parent link="link4" />
    <child link="end_effector" />
    <origin xyz="0 0 0.0170450" rpy="0 0 0" />
    <axis xyz="0 1 0" />
    <limit lower="-3.14" upper="3.14" effort="10" velocity="1" />
  </joint>

</robot>