<?xml version="1.0"?>
<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
       xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
       xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
       xmlns:xacro="http://ros.org/wiki/xacro">

  <xacro:macro name="pr2_forearm_gazebo_v0" params="side">

    <gazebo reference="${side}_forearm_link">
      <turnGravityOff>true</turnGravityOff>
    </gazebo>

    <!-- Wrist flex -->

    <gazebo reference="${side}_wrist_flex_link">
      <turnGravityOff>true</turnGravityOff>
    </gazebo>
    <gazebo reference="${side}_wrist_flex_joint">
      <stopKd value="1.0" />
      <stopKp value="1000000.0" />
    </gazebo>

    <!-- Wrist roll -->

    <gazebo reference="${side}_wrist_roll_link">
      <turnGravityOff>true</turnGravityOff>
      <material value="PR2/RollLinks" />
    </gazebo>
    <gazebo reference="${side}_wrist_roll_joint">
      <fudgeFactor value="0.5" />
    </gazebo>

  </xacro:macro>

</robot>
