Hello everyone, I continue to dive into Gazebo + SITL, I noticed a strange moment that while sitl is not running, the gazebo topic outputs the following imu frequency:
interval [0]: 0.00128104s
interval [1]: 0.00132531s
interval [2]: 0.00130436s
interval [3]: 0.00128077s
interval [4]: 0.0012758s
interval [5]: 0.00127371s
interval [6]: 0.0012682s
interval [7]: 0.00124611s
interval [8]: 0.00128635s
interval [9]: 0.00126324s
average rate: 780.951
min: 0.00124611s max: 0.00132531s std dev: 2.0767e-05s window: 10
When I run SITL, the frequency increases dramatically:
interval [0]: 0.00096508s
interval [1]: 0.00100307s
interval [2]: 0.000989035s
interval [3]: 0.00100942s
interval [4]: 0.000987515s
interval [5]: 0.0010056s
interval [6]: 0.00099632s
interval [7]: 0.0010031s
interval [8]: 0.000991505s
interval [9]: 0.00100838s
average rate: 1004.11
min: 0.00096508s max: 0.00100942s std dev: 1.27386e-05s window: 10
Parametrs in copter sdf:
<link name="imu_link">
<inertial>
<pose>0 0 0.1 0 0 0</pose>
<mass>0.015</mass>
<inertia>
<ixx>0.00001</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.00002</iyy>
<iyz>0</iyz>
<izz>0.00002</izz>
</inertia>
</inertial>
<sensor name="imu_sensor" type="imu">
<pose degrees="true">0 0 0 180 0 0</pose>
<always_on>1</always_on>
<update_rate>1000.0</update_rate>
</sensor>
<sensor name="mag_sensor" type="magnetometer">
<pose>0 0 0 0 0 0</pose>
<always_on>1</always_on>
<update_rate>400.0</update_rate>
<topic>/sensors/compass</topic>
</sensor>
<sensor name="baro_sensor" type="air_pressure">
<pose>0 0 0 0 0 0</pose>
<always_on>1</always_on>
<update_rate>400.0</update_rate>
<topic>/sensor/baro</topic>
</sensor>
</link>
Parametrs in world sdf:
<physics name="1ms" type="ode">
<max_step_size>0.001</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>
- What is the reason for this? and how does it work?
- How can I get an imu frequency greater than 1000? Or is it impossible?
@rhys I think you know the answers to these questions. Thank you in advance.