<?xml version="1.0"?>
<robot name="chair">

  <!-- Base link at the top of the front right leg -->
  <link name="chair_link">
    <visual>
      <geometry>
        <sphere radius="0.0007415730337078652"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
      <material name="invisible">
        <color rgba="0 0 0 0"/>
      </material>
    </visual>
    <collision name="chair">
      <geometry>
        <sphere radius="0.0007415730337078652"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    </collision>
    <inertial>
      <mass value="0.000407813676913453"/>
      <inertia ixx="2.2426920548352496e-07" ixy="0.0" ixz="0.0" iyy="2.2426920548352496e-07" iyz="0.0" izz="2.2426920548352496e-07"/>
    </inertial>
  </link>

  <!-- Base link at the top of the front right leg -->
  <link name="base">
    <visual>
      <geometry>
        <sphere radius="0.0007415730337078652"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
      <material name="invisible">
        <color rgba="0 0 0 0"/>
      </material>
    </visual>
    <inertial>
      <mass value="0.000407813676913453"/>
      <inertia ixx="2.2426920548352496e-07" ixy="0.0" ixz="0.0" iyy="2.2426920548352496e-07" iyz="0.0" izz="2.2426920548352496e-07"/>
    </inertial>
  </link>

  <!-- Seat -->
  <link name="seat">
    <visual>
      <geometry>
        <box size="0.2669662921348315 0.28921348314606743 0.014831460674157304"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
      <material name="wood">
        <color rgba="0.6 0.4 0.2 1.0"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <box size="0.2669662921348315 0.28921348314606743 0.014831460674157304"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    </collision>
    <inertial>
      <mass value="0.407813676913453"/>
      <inertia ixx="0.0026912304658022997" ixy="0.0" ixz="0.0" iyy="0.0022426920548352497" iyz="0.0" izz="0.0044853841096704995"/>
    </inertial>
  </link>

  <!-- Front left leg -->
  <link name="front_left_leg">
    <visual>
      <geometry>
        <cylinder radius="0.014831460674157304" length="0.3262921348314607"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
      <material name="wood">
        <color rgba="0.6 0.4 0.2 1.0"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <cylinder radius="0.014831460674157304" length="0.3262921348314607"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    </collision>
    <inertial>
      <mass value="0.00407813676913453"/>
      <inertia ixx="0.00022426920548352497" ixy="0.0" ixz="0.0" iyy="0.00022426920548352497" iyz="0.0" izz="2.24269205483525e-05"/>
    </inertial>
  </link>

  <!-- Front right leg -->
  <link name="front_right_leg">
    <visual>
      <geometry>
        <cylinder radius="0.014831460674157304" length="0.3262921348314607"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
      <material name="wood">
        <color rgba="0.6 0.4 0.2 1.0"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <cylinder radius="0.014831460674157304" length="0.3262921348314607"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    </collision>
    <inertial>
      <mass value="0.00407813676913453"/>
      <inertia ixx="0.00022426920548352497" ixy="0.0" ixz="0.0" iyy="0.00022426920548352497" iyz="0.0" izz="2.24269205483525e-05"/>
    </inertial>
  </link>

  <!-- Back left leg -->
  <link name="back_left_leg">
    <visual>
      <geometry>
        <cylinder radius="0.014831460674157304" length="0.3262921348314607"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
      <material name="wood">
        <color rgba="0.6 0.4 0.2 1.0"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <cylinder radius="0.014831460674157304" length="0.3262921348314607"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    </collision>
    <inertial>
      <mass value="0.00407813676913453"/>
      <inertia ixx="0.00022426920548352497" ixy="0.0" ixz="0.0" iyy="0.00022426920548352497" iyz="0.0" izz="2.24269205483525e-05"/>
    </inertial>
  </link>

  <!-- Back right leg -->
  <link name="back_right_leg">
    <visual>
      <geometry>
        <cylinder radius="0.014831460674157304" length="0.3262921348314607"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
      <material name="wood">
        <color rgba="0.6 0.4 0.2 1.0"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <cylinder radius="0.014831460674157304" length="0.3262921348314607"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    </collision>
    <inertial>
      <mass value="0.00407813676913453"/>
      <inertia ixx="0.00022426920548352497" ixy="0.0" ixz="0.0" iyy="0.00022426920548352497" iyz="0.0" izz="2.24269205483525e-05"/>
    </inertial>
  </link>

  <!-- Backrest (tilted back support) -->
  <link name="backrest">
    <visual>
      <geometry>
        <box size="0.2669662921348315 0.011123595505617978 0.30404494382022473"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
      <material name="wood">
        <color rgba="0.6 0.4 0.2 1.0"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <box size="0.2669662921348315 0.011123595505617978 0.30404494382022473"/>
      </geometry>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    </collision>
    <inertial>
      <mass value="0.2039068384567265"/>
      <inertia ixx="0.0026912304658022997" ixy="0.0" ixz="0.0" iyy="0.0044853841096704995" iyz="0.0" izz="0.0022426920548352497"/>
    </inertial>
  </link>

  <!-- Joint connecting base_link to seat -->

  <joint name="baselink_to_base" type="fixed">
    <parent link="chair_link"/>
    <child link="base"/>
    <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
  </joint>

  <joint name="base_to_seat" type="fixed">
    <parent link="base"/>
    <child link="seat"/>
    <origin xyz="0.11865168539325843 -0.13348314606741574 0.0" rpy="0 0 0"/>
  </joint>

  <!-- Joint connecting front left leg to seat -->
  <joint name="seat_to_front_left_leg" type="fixed">
    <parent link="seat"/>
    <child link="front_left_leg"/>
    <origin xyz="0.11123595505617978 0.11123595505617978 -0.170561797752809" rpy="0 0 0"/>
  </joint>

  <!-- Joint connecting front right leg to seat -->
  <joint name="seat_to_front_right_leg" type="fixed">
    <parent link="seat"/>
    <child link="front_right_leg"/>
    <origin xyz="0.11123595505617978 -0.11123595505617978 -0.170561797752809" rpy="0 0 0"/>
  </joint>

  <!-- Joint connecting back left leg to seat -->
  <joint name="seat_to_back_left_leg" type="fixed">
    <parent link="seat"/>
    <child link="back_left_leg"/>
    <origin xyz="-0.11123595505617978 0.11123595505617978 -0.170561797752809" rpy="0 0 0"/>
  </joint>

  <!-- Joint connecting back right leg to seat -->
  <joint name="seat_to_back_right_leg" type="fixed">
    <parent link="seat"/>
    <child link="back_right_leg"/>
    <origin xyz="-0.11123595505617978 -0.11123595505617978 -0.170561797752809" rpy="0 0 0"/>
  </joint>

  <!-- Joint connecting backrest to seat (tilted back 15 degrees) -->
  <joint name="seat_to_backrest" type="fixed">
    <parent link="seat"/>
    <child link="backrest"/>
    <origin xyz="0.0 -0.170561797752809 0.14831460674157304" rpy="0.21 0 0"/>
  </joint>

</robot>
