<?xml version="1.0"?>

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

  <!-- Quadrotor Sensor Plugins -->
  <gazebo>
    <plugin name="quadrotor_imu_sim" filename="libhector_gazebo_ros_imu.so">
      <updateRate>100.0</updateRate>
      <bodyName>base_link</bodyName>
      <frameId>$(arg base_link_frame)</frameId>
      <topicName>raw_imu</topicName>
      <rpyOffsets>0 0 0</rpyOffsets> <!-- deprecated -->
      <gaussianNoise>0</gaussianNoise>  <!-- deprecated -->
      <accelDrift>0.5 0.5 0.5</accelDrift>
      <accelGaussianNoise>0.35 0.35 0.3</accelGaussianNoise>
      <rateDrift>0.1 0.1 0.1</rateDrift>
      <rateGaussianNoise>0.05 0.05 0.015</rateGaussianNoise>
    </plugin>

    <plugin name="quadrotor_baro_sim" filename="libhector_gazebo_ros_baro.so">
      <updateRate>10.0</updateRate>
      <bodyName>base_link</bodyName>
      <frameId>$(arg base_link_frame)</frameId>
      <topicName>pressure_height</topicName>
      <altimeterTopicName>altimeter</altimeterTopicName>
      <offset>0</offset>
      <drift>10.0</drift>
      <gaussianNoise>0.1</gaussianNoise>
    </plugin>

    <plugin name="quadrotor_magnetic_sim" filename="libhector_gazebo_ros_magnetic.so">
      <updateRate>10.0</updateRate>
      <bodyName>base_link</bodyName>
      <frameId>$(arg base_link_frame)</frameId>
      <topicName>magnetic</topicName>
      <offset>0 0 0</offset>
      <drift>0.0 0.0 0.0</drift>
      <gaussianNoise>1.3e-2 1.3e-2 1.3e-2</gaussianNoise>
    </plugin>

    <plugin name="quadrotor_gps_sim" filename="libhector_gazebo_ros_gps.so">
      <updateRate>4.0</updateRate>
      <bodyName>base_link</bodyName>
      <frameId>$(arg base_link_frame)</frameId>
      <topicName>fix</topicName>
      <velocityTopicName>fix_velocity</velocityTopicName>
      <referenceLatitude>49.860246</referenceLatitude>
      <referenceLongitude>8.687077</referenceLongitude>
      <drift>5.0 5.0 5.0</drift>
      <gaussianNoise>0.01 0.01 0.01</gaussianNoise>
      <velocityDrift>0 0 0</velocityDrift>
      <velocityGaussianNoise>0.05 0.05 0.05</velocityGaussianNoise>
    </plugin>

    <plugin name="quadrotor_groundtruth_sim" filename="libgazebo_ros_p3d.so">
      <updateRate>100.0</updateRate>
      <bodyName>base_link</bodyName>
      <topicName>ground_truth/state</topicName>
      <gaussianNoise>0.0</gaussianNoise>
      <frameName>$(arg world_frame)</frameName>
    </plugin>

  </gazebo>
</robot>
