Gazebo Harmonic IMU sensor source code

Dears

I am working now on my drone project using Gazebo harmonic.

In my world, I added the plugin required for the drone, one of these is the IMU as follows:

<plugin name="gz::sim::systems::Imu" filename="gz-sim-imu-system"/>

I was able to launch the gazebo using ros2 launch and also reading the sensor data , or I mean printing them as a log in the console

My question is :
I have built and launched the gazebo from the source code, not binaries, so I am searching for the source code to calculate the IMU sensor values, such as the orientation and linear /angular velocities.

I found the imu.cc, but I guess this was used to read the SDF configuration, and I need your help to find the source code that calculated these readings please.

The code that performs the calculations is defined in the gz::sensors::ImuSensor in the gz-sensors project:

The file Imu.cc defines a system that manages instances of ImuSensor. For every SDFormat Specification sensor of type=imu in your SDF files, it creates one entity of ImuSensor.

1 Like

Thank you very much for your clarification, this is great thank you