<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from rope.urdf.xacro                | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="flexible_cable">
  <material name="blue">
    <color rgba="0 0 0.8 1"/>
  </material>
  <material name="gray">
    <color rgba="0.5 0.5 0.5 1"/>
  </material>
  <!-- World link (invisible) -->
  <link name="world"/>
  <link name="base_link">
    <visual>
      <geometry>
        <box size="0.04 0.04 0.02"/>
      </geometry>
      <material name="red">
        <color rgba="1 0 0 1"/>
      </material>
    </visual>
    <collision>
      <geometry>
        <box size="0.04 0.04 0.02"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="0.1"/>
      <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
    </inertial>
  </link>
  <gazebo reference="base_link">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Fixed joint to connect base_link to world -->
  <joint name="fixed_to_world" type="fixed">
    <parent link="world"/>
    <child link="base_link"/>
    <!-- <origin rpy="1.57 0 0" xyz="0 0 2"/> -->
    <origin rpy="1 0 0" xyz="0 0 2"/>
  </joint>
  <!-- Spherical joint -->
  <link name="segment_1_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="base_link_to_segment_1_sphere" type="revolute">
    <parent link="base_link"/>
    <child link="segment_1_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_1_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_1_sphere_to_cylinder" type="revolute">
    <parent link="segment_1_sphere"/>
    <child link="segment_1_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_1_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_1_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_2_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_1_cylinder_to_segment_2_sphere" type="revolute">
    <parent link="segment_1_cylinder"/>
    <child link="segment_2_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_2_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_2_sphere_to_cylinder" type="revolute">
    <parent link="segment_2_sphere"/>
    <child link="segment_2_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_2_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_2_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_3_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_2_cylinder_to_segment_3_sphere" type="revolute">
    <parent link="segment_2_cylinder"/>
    <child link="segment_3_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_3_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_3_sphere_to_cylinder" type="revolute">
    <parent link="segment_3_sphere"/>
    <child link="segment_3_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_3_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_3_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_4_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_3_cylinder_to_segment_4_sphere" type="revolute">
    <parent link="segment_3_cylinder"/>
    <child link="segment_4_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_4_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_4_sphere_to_cylinder" type="revolute">
    <parent link="segment_4_sphere"/>
    <child link="segment_4_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_4_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_4_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_5_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_4_cylinder_to_segment_5_sphere" type="revolute">
    <parent link="segment_4_cylinder"/>
    <child link="segment_5_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_5_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_5_sphere_to_cylinder" type="revolute">
    <parent link="segment_5_sphere"/>
    <child link="segment_5_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_5_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_5_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_6_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_5_cylinder_to_segment_6_sphere" type="revolute">
    <parent link="segment_5_cylinder"/>
    <child link="segment_6_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_6_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_6_sphere_to_cylinder" type="revolute">
    <parent link="segment_6_sphere"/>
    <child link="segment_6_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_6_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_6_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_7_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_6_cylinder_to_segment_7_sphere" type="revolute">
    <parent link="segment_6_cylinder"/>
    <child link="segment_7_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_7_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_7_sphere_to_cylinder" type="revolute">
    <parent link="segment_7_sphere"/>
    <child link="segment_7_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_7_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_7_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_8_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_7_cylinder_to_segment_8_sphere" type="revolute">
    <parent link="segment_7_cylinder"/>
    <child link="segment_8_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_8_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_8_sphere_to_cylinder" type="revolute">
    <parent link="segment_8_sphere"/>
    <child link="segment_8_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_8_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_8_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_9_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_8_cylinder_to_segment_9_sphere" type="revolute">
    <parent link="segment_8_cylinder"/>
    <child link="segment_9_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_9_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_9_sphere_to_cylinder" type="revolute">
    <parent link="segment_9_sphere"/>
    <child link="segment_9_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_9_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_9_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_10_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_9_cylinder_to_segment_10_sphere" type="revolute">
    <parent link="segment_9_cylinder"/>
    <child link="segment_10_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_10_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_10_sphere_to_cylinder" type="revolute">
    <parent link="segment_10_sphere"/>
    <child link="segment_10_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_10_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_10_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_11_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_10_cylinder_to_segment_11_sphere" type="revolute">
    <parent link="segment_10_cylinder"/>
    <child link="segment_11_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_11_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_11_sphere_to_cylinder" type="revolute">
    <parent link="segment_11_sphere"/>
    <child link="segment_11_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_11_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_11_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_12_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_11_cylinder_to_segment_12_sphere" type="revolute">
    <parent link="segment_11_cylinder"/>
    <child link="segment_12_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_12_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_12_sphere_to_cylinder" type="revolute">
    <parent link="segment_12_sphere"/>
    <child link="segment_12_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_12_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_12_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_13_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_12_cylinder_to_segment_13_sphere" type="revolute">
    <parent link="segment_12_cylinder"/>
    <child link="segment_13_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_13_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_13_sphere_to_cylinder" type="revolute">
    <parent link="segment_13_sphere"/>
    <child link="segment_13_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_13_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_13_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_14_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_13_cylinder_to_segment_14_sphere" type="revolute">
    <parent link="segment_13_cylinder"/>
    <child link="segment_14_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_14_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_14_sphere_to_cylinder" type="revolute">
    <parent link="segment_14_sphere"/>
    <child link="segment_14_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_14_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_14_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_15_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_14_cylinder_to_segment_15_sphere" type="revolute">
    <parent link="segment_14_cylinder"/>
    <child link="segment_15_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_15_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_15_sphere_to_cylinder" type="revolute">
    <parent link="segment_15_sphere"/>
    <child link="segment_15_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_15_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_15_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_16_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_15_cylinder_to_segment_16_sphere" type="revolute">
    <parent link="segment_15_cylinder"/>
    <child link="segment_16_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_16_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_16_sphere_to_cylinder" type="revolute">
    <parent link="segment_16_sphere"/>
    <child link="segment_16_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_16_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_16_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_17_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_16_cylinder_to_segment_17_sphere" type="revolute">
    <parent link="segment_16_cylinder"/>
    <child link="segment_17_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_17_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_17_sphere_to_cylinder" type="revolute">
    <parent link="segment_17_sphere"/>
    <child link="segment_17_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_17_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_17_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_18_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_17_cylinder_to_segment_18_sphere" type="revolute">
    <parent link="segment_17_cylinder"/>
    <child link="segment_18_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_18_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_18_sphere_to_cylinder" type="revolute">
    <parent link="segment_18_sphere"/>
    <child link="segment_18_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_18_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_18_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_19_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_18_cylinder_to_segment_19_sphere" type="revolute">
    <parent link="segment_18_cylinder"/>
    <child link="segment_19_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_19_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_19_sphere_to_cylinder" type="revolute">
    <parent link="segment_19_sphere"/>
    <child link="segment_19_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_19_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_19_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_20_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_19_cylinder_to_segment_20_sphere" type="revolute">
    <parent link="segment_19_cylinder"/>
    <child link="segment_20_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_20_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_20_sphere_to_cylinder" type="revolute">
    <parent link="segment_20_sphere"/>
    <child link="segment_20_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_20_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_20_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_21_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_20_cylinder_to_segment_21_sphere" type="revolute">
    <parent link="segment_20_cylinder"/>
    <child link="segment_21_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_21_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_21_sphere_to_cylinder" type="revolute">
    <parent link="segment_21_sphere"/>
    <child link="segment_21_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_21_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_21_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_22_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_21_cylinder_to_segment_22_sphere" type="revolute">
    <parent link="segment_21_cylinder"/>
    <child link="segment_22_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_22_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_22_sphere_to_cylinder" type="revolute">
    <parent link="segment_22_sphere"/>
    <child link="segment_22_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_22_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_22_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_23_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_22_cylinder_to_segment_23_sphere" type="revolute">
    <parent link="segment_22_cylinder"/>
    <child link="segment_23_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_23_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_23_sphere_to_cylinder" type="revolute">
    <parent link="segment_23_sphere"/>
    <child link="segment_23_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_23_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_23_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_24_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_23_cylinder_to_segment_24_sphere" type="revolute">
    <parent link="segment_23_cylinder"/>
    <child link="segment_24_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_24_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_24_sphere_to_cylinder" type="revolute">
    <parent link="segment_24_sphere"/>
    <child link="segment_24_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_24_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_24_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_25_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_24_cylinder_to_segment_25_sphere" type="revolute">
    <parent link="segment_24_cylinder"/>
    <child link="segment_25_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_25_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_25_sphere_to_cylinder" type="revolute">
    <parent link="segment_25_sphere"/>
    <child link="segment_25_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_25_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_25_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_26_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_25_cylinder_to_segment_26_sphere" type="revolute">
    <parent link="segment_25_cylinder"/>
    <child link="segment_26_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_26_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_26_sphere_to_cylinder" type="revolute">
    <parent link="segment_26_sphere"/>
    <child link="segment_26_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_26_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_26_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_27_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_26_cylinder_to_segment_27_sphere" type="revolute">
    <parent link="segment_26_cylinder"/>
    <child link="segment_27_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_27_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_27_sphere_to_cylinder" type="revolute">
    <parent link="segment_27_sphere"/>
    <child link="segment_27_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_27_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_27_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_28_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_27_cylinder_to_segment_28_sphere" type="revolute">
    <parent link="segment_27_cylinder"/>
    <child link="segment_28_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_28_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_28_sphere_to_cylinder" type="revolute">
    <parent link="segment_28_sphere"/>
    <child link="segment_28_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_28_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_28_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_29_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_28_cylinder_to_segment_29_sphere" type="revolute">
    <parent link="segment_28_cylinder"/>
    <child link="segment_29_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_29_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_29_sphere_to_cylinder" type="revolute">
    <parent link="segment_29_sphere"/>
    <child link="segment_29_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_29_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_29_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_30_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_29_cylinder_to_segment_30_sphere" type="revolute">
    <parent link="segment_29_cylinder"/>
    <child link="segment_30_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_30_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_30_sphere_to_cylinder" type="revolute">
    <parent link="segment_30_sphere"/>
    <child link="segment_30_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_30_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_30_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <!-- Spherical joint -->
  <link name="segment_31_sphere">
    <visual>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.0025"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="1e-06"/>
      <inertia ixx="1e-12" ixy="0" ixz="0" iyy="1e-12" iyz="0" izz="1e-12"/>
    </inertial>
  </link>
  <joint name="segment_30_cylinder_to_segment_31_sphere" type="revolute">
    <parent link="segment_30_cylinder"/>
    <child link="segment_31_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Cylinder segment -->
  <link name="segment_31_cylinder">
    <visual>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
      <material name="blue"/>
    </visual>
    <collision>
      <geometry>
        <cylinder length="0.01" radius="0.0025"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </collision>
    <inertial>
      <mass value="0.0001"/>
      <inertia ixx="2.5e-09" ixy="0" ixz="0" iyy="2.5e-09" iyz="0" izz="1.25e-09"/>
      <origin rpy="0 0 0" xyz="0 0 -0.0075"/>
    </inertial>
  </link>
  <joint name="segment_31_sphere_to_cylinder" type="revolute">
    <parent link="segment_31_sphere"/>
    <child link="segment_31_cylinder"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <axis xyz="1 0 0"/>
    <limit effort="20" lower="-1.0" upper="1.0" velocity="30"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
  <!-- Enable self-collision for this segment -->
  <gazebo reference="segment_31_sphere">
    <material>Gazebo/Gray</material>
    <selfCollide>true</selfCollide>
  </gazebo>
  <gazebo reference="segment_31_cylinder">
    <material>Gazebo/Blue</material>
    <selfCollide>true</selfCollide>
  </gazebo>

  <!-- add one sphere at the end -->
  <link name="end_sphere">
    <visual>
      <geometry>
        <sphere radius="0.01"/>
      </geometry>
      <material name="gray"/>
    </visual>
    <collision>
      <geometry>
        <sphere radius="0.01"/>
      </geometry>
    </collision>
    <inertial>
      <!-- <mass value="0.117"/> -->
      <mass value="0.068"/>
      <inertia ixx="0.00017655" ixy="0" ixz="0" iyy="0.00017655" iyz="0" izz="0.00017655"/>
    </inertial>
  </link>
  <joint name="joint_end_sphere" type="revolute">
    <parent link="segment_31_cylinder"/>
    <child link="end_sphere"/>
    <origin rpy="0 0 0" xyz="0 0 -0.015"/>
    <axis xyz="0 1 0"/>
    <limit effort="10" lower="-1.57" upper="1.57" velocity="3"/>
    <dynamics damping="0.001" friction="0.0"/>
  </joint>
</robot>
