<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from pioneer-lx.urdf.xacro          | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="pioneer-lx" xmlns:xacro="http://ros.org/wiki/xacro">
  <link name="base_link">
    <!-- base_link origin point is center of rotation, on the floor. -->
    <inertial>
      <mass value="57.8"/>
      <!-- 60 kg minus each wheel -->
      <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
    </inertial>
    <visual>
      <geometry name="base_link_visual_geom">
        <mesh filename="package://amr_robots_description/meshes/pioneer-lx/pioneer-lx_visual.stl" scale="0.001 0.001 0.001"/>
      </geometry>
      <origin rpy="0 0 1.570796" xyz="0 0 0.0"/>
    </visual>
    <collision name="base_link_collision">
      <geometry name="base_link_collision_geom">
        <box size="0.7 0.5 0.35"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0.2"/>
    </collision>
  </link>
  <!-- right wheel -->
  <link name="r_wheel">
    <inertial>
      <mass value="1.1"/>
      <!-- kg -->
      <inertia ixx="0.02" ixy="0" ixz="0" iyy="0.02" iyz="0" izz="0.01"/>
    </inertial>
    <!--
TODO separate out pioner lx wheels in visual model 
    <visual>
      <geometry name="r_wheel_dumb_visual_geom">
        <cylinder radius="0.100" length="0.05" />
      </geometry>
      <origin rpy="1.570796 0 0" />
    </visual>
   -->
    <collision name="r_wheel_collision">
      <geometry name="r_wheel_collision_geom">
        <cylinder length="0.05" radius="0.100"/>
      </geometry>
      <origin rpy="1.570796 0 0"/>
    </collision>
  </link>
  <!-- left wheel -->
  <link name="l_wheel">
    <inertial>
      <mass value="1.1"/>
      <!-- kg -->
      <inertia ixx="0.02" ixy="0" ixz="0" iyy="0.02" iyz="0" izz="0.01"/>
    </inertial>
    <!--
    <visual>
      <geometry name="l_wheel_dumb_visual_geom">
        <cylinder radius="0.100" length="0.05" />
      </geometry>
      <origin rpy="1.570796 0 0" />
    </visual>
   -->
    <collision name="l_wheel_collision">
      <geometry name="l_wheel_collision_geom">
        <cylinder length="0.05" radius="0.100"/>
      </geometry>
      <origin rpy="1.570796 0 0"/>
    </collision>
  </link>
  <!-- joints -->
  <joint name="r_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="0 0.2 0.1"/>
    <parent link="base_link"/>
    <child link="r_wheel"/>
  </joint>
  <joint name="l_wheel_joint" type="continuous">
    <origin rpy="0 0 0" xyz="0 -0.2 0.1"/>
    <parent link="base_link"/>
    <child link="l_wheel"/>
  </joint>
  <!-- pioneer lx deck -->
  <link name="deck">
    <visual>
      <geometry name="deck_visual_geom">
        <box size="0.407 0.437 0.076"/>
      </geometry>
      <material name="lx_deck_mat">
        <color rgba="0.1 0.1 0.1 1"/>
      </material>
    </visual>
    <collision name="deck_collision">
      <geometry name="deck_collision_geom">
        <box size="0.407 0.437 0.076"/>
      </geometry>
    </collision>
  </link>
  <joint name="deck_joint" type="fixed">
    <origin rpy="0 0 0" xyz="0.075 0 0.410"/>
    <parent link="base_link"/>
    <child link="deck"/>
  </joint>
  <gazebo>
    <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
      <alwaysOn>true</alwaysOn>
      <updateRate>100</updateRate>
      <leftJoint>l_wheel_joint</leftJoint>
      <rightJoint>r_wheel_joint</rightJoint>
      <wheelSeparation>0.4</wheelSeparation>
      <wheelDiameter>0.2</wheelDiameter>
      <torque>5</torque>
      <!-- interface:position name="position_iface_0"/ -->
      <commandTopic>cmd_vel</commandTopic>
      <robotBaseFrame>base_link</robotBaseFrame>
      <odometryTopic>odom</odometryTopic>
      <odometryFrame>odom</odometryFrame>
    </plugin>
    <!-- TODO include P3D (ground truth) plugin -->
  </gazebo>
</robot>

