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

  <xacro:macro name="toid_control" params="name:=toid_control use_mock_hardware:=^|true">

    <ros2_control name="${name}" type="system">
      <xacro:unless value="${use_mock_hardware}">
        <hardware>
            <plugin>toid_control/StepperInterface</plugin>
        </hardware>
      </xacro:unless>
      <xacro:if value="${use_mock_hardware}">
        <hardware>
          <plugin>mock_components/GenericSystem</plugin>
          <param name="calculate_dynamics">true</param>
        </hardware>
      </xacro:if>

      <joint name="drivewhl_l_joint">
        <command_interface name="velocity"/>
        <state_interface name="position"/>
      </joint>

      <joint name="drivewhl_r_joint">
        <command_interface name="velocity"/>
        <state_interface name="position"/>
      </joint>

    </ros2_control>

  </xacro:macro>

</robot>