<?xml version="1.0"?>
<robot name="mg-robot">


    <material name="red">
        <color rgba="1 0 0 1" />
    </material>

    <material name="gray">
        <color rgba="0.5 0.5 0.5 1" />
    </material>

    <link name="base-link">
        <visual>
            <geometry>
                <box size="0.24 0.32 0.12" color="yellow"/>
            </geometry>
            <origin xyz="0 0 0.12" rpy="0 0 0" />
            <material name="red" />
        </visual>
    </link>

    <link name="left-wheel">

        <visual>
            <geometry>
                <cylinder radius="0.075" length="0.05"/>
            </geometry>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <material name="gray" />
        </visual>
    </link>

    <link name="right-wheel">
        <visual>
            <geometry>
                <cylinder radius="0.075" length="0.05"/>
            </geometry>
            <origin xyz="0 0 0." rpy="0 0 0" />
            <material name="gray" />
        </visual>
    </link>
    <joint name="right_motor" type="continuous">
        <parent link="base-link"/>
        <child link="right-wheel"/>
        <origin xyz="0 -0.16 0.075" rpy="1.57 0 0" />
        <axis xyz="0 0 1"/>
    </joint>

    <joint name="left_motor" type="continuous">
        <parent link="base-link"/>
        <child link="left-wheel"/>
        <origin xyz="0 0.16 0.075" rpy="1.57 0 0" />
        <axis xyz="0 0 1"/>
    </joint>


    <ros2_control name="mg_base" type="system">
        <hardware>
            <plugin>mock_components/GenericSystem</plugin> 
            <param name="calculate_dynamics">true</param> 
        </hardware>
        <joint name="left_motor">
            <command_interface name="velocity"/>
            <state_interface name="position"/>
        </joint>
        <joint name="right_motor">
            <command_interface name="velocity"/>
            <state_interface name="position"/>
        </joint>
    </ros2_control>
</robot>