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

  <xacro:arg name="ns" default="" />
  <xacro:arg name="prefix" default="" />
  <xacro:arg name="color" default="none" />
  <xacro:arg name="trans_hw_iface" default="hardware_interface/PositionJointInterface" />

  <xacro:include filename="$(find tm_description)/xacro/macro.gazebo.xacro" />
  <xacro:include filename="$(find tm_description)/xacro/macro.transmission.xacro" />
  <xacro:include filename="$(find tm_description)/xacro/macro.materials.xacro" />


  <!-- tm7s -->
  <!-- If the user want to use newly generated named robot description file as user_defined.urdf.xacro, -->
  <!-- you must modify 'macro.tm7s-nominal.urdf.xacro' to 'user_defined.urdf.xacro'  -->
  <xacro:include filename="$(find tm_description)/xacro/user_defined.urdf.xacro" />


  <!--  -->
  <xacro:tmr_gazebo ns="$(arg ns)" prefix="$(arg prefix)" />
  <xacro:tmr_transmission prefix="$(arg prefix)" hw_iface="$(arg trans_hw_iface)" />
  <xacro:tmr_materials/>


  <!-- Arm -->
  <xacro:property name="color" value="$(arg color)"/>
  <xacro:if value="${color == 'none'}">
    <xacro:tm7s ns="$(arg ns)" prefix="$(arg prefix)" />
  </xacro:if>


  <!-- Arm.color.stl -->
  <xacro:unless value="${color == 'none'}">
    <xacro:tm7s ns="$(arg ns)" prefix="$(arg prefix)" color="${color}" format="obj" />
  </xacro:unless>


</robot>
