<?xml version="1.0"?>
<robot name="kmr_iiwa" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <!-- Import Rviz colors -->
  <!-- <xacro:include filename="$(find kmr_iiwa_description)/urdf/materials.xacro" /> -->
  <!--Import the lbr iiwa macro -->
  <xacro:include filename="$(find iai_kmr_iiwa_description)/urdf/kmr_iiwa.xacro" />

  <xacro:arg name="hardware_interface" default="PositionJointInterface" />
  <xacro:arg name="robot_name" default="kmr_iiwa" />

  <!--iiwa-->
  <xacro:kmr_iiwa hardware_interface="$(arg hardware_interface)" robot_name="$(arg robot_name)">
  </xacro:kmr_iiwa>

  <link name="odom" />

  <joint name="odom_x_joint" type="prismatic">
    <parent link="odom" />
    <child link="odom_x_frame" />
    <axis xyz="1 0 0" />
    <!-- limits chosen heuristically
        lower/upper: +-1km to create a quasi limitless prismatic joint
        velocity: slow walking speed is 3-4km/hour ~= 1m/s
        effort: reach max speed within 1s, Boxy has a mass of 200kg, so Fmax=200kg*1m/s2 -->
    <limit lower="-1000" upper="1000" velocity="1" effort="200" />
  </joint>

  <link name="odom_x_frame" />

  <joint name="odom_y_joint" type="prismatic">
    <parent link="odom_x_frame" />
    <child link="odom_y_frame" />
    <axis xyz="0 1 0" />
    <!-- limits chosen heuristically
          lower/upper: +-1km to create a quasi limitless prismatic joint
          velocity: slow walking speed is 3-4km/hour ~= 1m/s
          effort: reach max speed within 1s, Boxy has a mass of 200kg, so Fmax=200kg*1m/s2 -->
    <limit lower="-1000" upper="1000" velocity="1" effort="200" />
  </joint>

  <link name="odom_y_frame" />

  <joint name="odom_z_joint" type="continuous">
    <parent link="odom_y_frame" />
    <child link="base_link" />
    <axis xyz="0 0 1" />
    <!-- limits chosen heuristically
          velocity: one slow complete turn around in 5-6s, so 6.2rad/6s ~= 1rad/s
          effort: reach max speed within 1s, Boxy has a mass of 200kg and a diagonale of 1m, so Fmax=200kg*1m*1m/s2 -->
    <limit velocity="1" effort="200" />
  </joint>
</robot>
