For our robot, we will be using the
GazeboRosImuSensor which is a SensorPlugin. A SensorPlugin must be attached to a link,
thus we will create an imu_link to which the IMU sensor will be attached. This link
will be referenced under the
Next, we will set /demo/imu as the topic to which the IMU will be publishing its information, and we will comply with REP145 by setting initalOrientationAsReference to false.
We will also add some noise to the sensor configuration using Gazebo's sensor noise model.
Note that if we have a lidar, we do not need IMU sensor: the nice thing about navigation packages of ROS2 is, they can merge sensors, when available, to increase accuracy, but can, if necessary, stick to a bare minimum.