Adding a IMU to BebopS - gsilano/BebopS GitHub Wiki

Adding a IMU to BebopS

Namespace and parent link

namespace -> drone name parent_link --> ${namespace}/base_link

To choose the IMU parameters see the ROS package Kalibr. Compared to the RotorS IMU plugin, the measurment_delay and measurement_divisor entries have been added. These values allow you to enter a unit delay while generating data and to set a frequency response of the sensors.

Using the IMU Macro

Defined in component_snippets.xacro

  <xacro:macro name="crazyflie2_imu" params="namespace parent_link">
    <!-- Mount an MPU-9250 IMU. -->
    <xacro:imu_plugin_macro
      namespace="${namespace}"
      imu_suffix=""
      parent_link="${parent_link}"
      imu_topic="imu"
      measurement_delay="0"
      measurement_divisor="1"
      mass_imu_sensor="0.00001"
      gyroscope_noise_density="0.000175"
      gyroscope_random_walk="0.0105"
      gyroscope_bias_correlation_time="1000.0"
      gyroscope_turn_on_bias_sigma= "0.09" 
      accelerometer_noise_density="0.003"
      accelerometer_random_walk="0.18"
      accelerometer_bias_correlation_time="300.0"
      accelerometer_turn_on_bias_sigma="0.588">
      <inertia ixx="0.00001" ixy="0.0" ixz="0.0" iyy="0.00001" iyz="0.0" izz="0.00001" />
      <origin xyz="0 0 0" rpy="0 0 0" />
    </xacro:imu_plugin_macro>
  </xacro:macro>