<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
    <xacro:macro name="rasmt_single_control" params="prefix sim">
        <!-- arg for control mode -->
        <ros2_control name="rasmt_single_hi" type="system">

            <!-- <xacro:if value="${sim == 'gazebo'}">
                <hardware>
                    <plugin>gazebo_ros2_control/GazeboSystem</plugin>
                </hardware>
            </xacro:if> -->
            <xacro:if value="${sim == 'ignition'}">
                <hardware>
                    <plugin>ign_ros2_control/IgnitionSystem</plugin>
                </hardware>
            </xacro:if>

            <xacro:if value="${sim == 'fake'}">
                <hardware>
                    <plugin>fake_components/GenericSystem</plugin>
                </hardware>
            </xacro:if>

            <joint name="${prefix}_Rot_Z_1">
                <command_interface name="effort"/>
                <state_interface name="position"/>
                <state_interface name="velocity"/>
                <state_interface name="effort"/>
            </joint>

            <joint name="${prefix}_Rot_Y_1">
                <command_interface name="effort"/>
                <state_interface name="position"/>
                <state_interface name="velocity"/>
                <state_interface name="effort"/>
            </joint>

            <joint name="${prefix}_Rot_Z_2">
                <command_interface name="effort"/>
                <state_interface name="position"/>
                <state_interface name="velocity"/>
                <state_interface name="effort"/>
            </joint>

            <joint name="${prefix}_Rot_Y_2">
                <command_interface name="effort"/>
                <state_interface name="position"/>
                <state_interface name="velocity"/>
                <state_interface name="effort"/>
            </joint>

            <joint name="${prefix}_Rot_Z_3">
                <command_interface name="effort"/>
                <state_interface name="position"/>
                <state_interface name="velocity"/>
                <state_interface name="effort"/>
            </joint>

            <joint name="${prefix}_Rot_Y_4">
                <command_interface name="effort"/>
                <state_interface name="position"/>
                <state_interface name="velocity"/>
                <state_interface name="effort"/>
            </joint>
            
        </ros2_control>
    </xacro:macro>
</robot>