<?xml version="1.0"?>
<robot name="wheeltec" xmlns:xacro="http://www.ros.org/wiki/xacro" >
    <xacro:macro name="imu" params="prefix">
        <link name="${prefix}_link">
            <inertial>
                <mass value="0.001" /> 
                <origin xyz="0 0 0" />
                <inertia ixx="0.00001" ixy="0.0" ixz="0.0"
                         iyy="0.00001" iyz="0.0"
                         izz="0.00001" />
            </inertial>
            <visual>
                <origin xyz=" 0 0 0 " rpy="0 0 0" />
                <geometry>
                    <box size="0.01 0.01 0.01" />
                </geometry>
                <material name="black"/>
            </visual>
            <collision>
                <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
                <geometry>
                    <box size="0.02 0.02 0.01" />
                </geometry>
            </collision>
        </link>
        <gazebo reference="${prefix}_link">
            <material>Gazebo/Black</material>
        </gazebo>
        <gazebo reference="${prefix}_link">
            <gravity>true</gravity>
            <sensor name="imu_sensor" type="imu">
                <always_on>true</always_on>
                <update_rate>100</update_rate>
                <visualize>true</visualize>
                <topic>/imu</topic>
                <plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin">
                    <topicName>/imu</topicName>
                    <bodyName>imu_link</bodyName>
                    <updateRateHZ>0.0</updateRateHZ>
                    <gaussianNoise>0.0</gaussianNoise>
                    <xyzOffset>0 0 0</xyzOffset>
                    <rpyOffset>0 0 0</rpyOffset>
                    <frameName>imu_link</frameName>
                </plugin>
                <!--pose>0 0 0 0 0 0</pose-->
            </sensor>
        </gazebo>

    </xacro:macro>
</robot>

