Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

The IMU data interval is unstable with high update frequency #3402

@Rubbishwang

Description

@Rubbishwang

I used Gazebo 9.19.0, ros noetic, mavros, mavlink and px4 in Ubuntu20.04 environment for co-simulation. Run the rosservice call /mavros/set_message_interval 31 100 command to set the IMU update frequency at 100 Hz. I expect the IMU to refresh at a constant 10ms interval, but in practice it always fluctuates between 8-12ms. I tried to modify max_step_size and real_time_update_rate in the world file, but the problem persisted.What can I do to keep the IMU update rate as stable as possible at 10ms?
Part of my world file is as follows:

<physics name='default_physics' default='0' type='ode'>
  <ode>
    <solver>
      <type>quick</type>
      <iters>200</iters>
      <sor>1.3</sor>
      <use_dynamic_moi_rescaling>0</use_dynamic_moi_rescaling>
    </solver>
    <constraints>
      <cfm>0</cfm>
      <erp>0.2</erp>
      <contact_max_correcting_vel>100</contact_max_correcting_vel>
      <contact_surface_layer>0.001</contact_surface_layer>
    </constraints>
  </ode>
  <max_step_size>0.0001</max_step_size>
  <real_time_factor>1</real_time_factor>
  <real_time_update_rate>10000</real_time_update_rate>
</physics>

<plugin name='rotors_gazebo_imu_plugin' filename='libgazebo_imu_plugin.so'>
    <robotNamespace/>
    <linkName>iris::/imu_link</linkName>
    <imuTopic>/imu</imuTopic>
    <gyroscopeNoiseDensity>0.0</gyroscopeNoiseDensity>
    <gyroscopeRandomWalk>0</gyroscopeRandomWalk>
    <gyroscopeBiasCorrelationTime>1000000.0</gyroscopeBiasCorrelationTime>
    <gyroscopeTurnOnBiasSigma>0.0</gyroscopeTurnOnBiasSigma>
    <accelerometerNoiseDensity>0.0</accelerometerNoiseDensity>
    <accelerometerRandomWalk>0.0</accelerometerRandomWalk>
    <accelerometerBiasCorrelationTime>1000000.0</accelerometerBiasCorrelationTime>
    <accelerometerTurnOnBiasSigma>0.0</accelerometerTurnOnBiasSigma>
  </plugin>

I have been puzzled by this question for a long time. I hope for your answer. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions