<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="rbs_arm">
    <xacro:arg name="gripper_name" default="rbs_gripper" />
    <xacro:arg name="hardware" default="fake" />
    <xacro:arg name="simulation_controllers" default="" />
    <xacro:arg name="prefix" default="" />

    <xacro:property name="hardware" default="$(arg hardware)" />
    <xacro:property name="prefix" default="$(arg prefix)" />

    <xacro:include filename="$(find rbs_arm)/urdf/rbs_arm_macro.xacro" />
    
    <link name="world" />
    <!-- ROBOT-->
    <xacro:rbs_arm parent="world" hardware="$(arg hardware)" prefix="$(arg prefix)">
        <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
    </xacro:rbs_arm>
    <!-- GRIPPER-->

    <!-- ADDITION-->
    <xacro:if value="${hardware=='gazebo'}">
        <gazebo>
            <plugin filename="libign_ros2_control-system.so"
                name="ign_ros2_control::IgnitionROS2ControlPlugin">
                <parameters>$(arg simulation_controllers)</parameters>
                <controller_manager_node_name>${prefix}/controller_manager</controller_manager_node_name>
            </plugin>
        </gazebo>
    </xacro:if>
</robot>
