<?xml version="1.0"?>

<!--
  Copyright (c) 2011, PAL Robotics, S.L.
  All rights reserved.

  This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
  To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or send a letter to
  Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
-->

<robot xmlns:xacro="http://ros.org/wiki/xacro">

  <xacro:macro name="bumper_gazebo" params="name ros_topic update_rate">
    <gazebo reference="${name}_link">
      <selfCollide>false</selfCollide>
      <sensor type="contact" name="${name}">
        <pose>0 0 0 0 0 0</pose>
        <update_rate>${update_rate}</update_rate>
        <visualize>false</visualize>
        <plugin filename="libgazebo_ros_bumper.so" name="gazebo_ros_bumper">
          <alwaysOn>true</alwaysOn>
          <updateRate>${update_rate}</updateRate>
          <topicName>${ros_topic}</topicName>
          <frameName>${name}_link</frameName>
        </plugin>
      </sensor>
    </gazebo>
  </xacro:macro>

</robot>
