No IMU data in HITL simulation


So ive got a custom controller built and deployed on a pixhawk 4 mini. Im trying to implement a HITL test.
I use ROS and mavros to control the vehicle.

When i try to run HITL the simulated IMU doesn’t appear to work. I connect mavros to the simulation but there is no data published on /mavros/imu/data. I am using the iris_hitl model and world.

I really cant understand the issue as it works with default px4 firmware.

MAVROS launch file:

	<!-- vim: set ft=xml noet : -->
	<!-- example launch script for PX4 based FCU's -->

	<arg name="fcu_url" default="udp://:14540@localhost:14557" />
	<arg name="gcs_url" default="" />
	<arg name="tgt_system" default="1" />
	<arg name="tgt_component" default="1" />
	<arg name="log_output" default="screen" />
	<arg name="fcu_protocol" default="v2.0" />
	<arg name="respawn_mavros" default="false" />

	<include file="$(find mavros)/launch/node.launch">
		<arg name="pluginlists_yaml" value="$(find mavros)/launch/px4_pluginlists.yaml" />
		<arg name="config_yaml" value="$(find mavros)/launch/px4_config.yaml" />

		<arg name="fcu_url" value="$(arg fcu_url)" />
		<arg name="gcs_url" value="$(arg gcs_url)" />
		<arg name="tgt_system" value="$(arg tgt_system)" />
		<arg name="tgt_component" value="$(arg tgt_component)" />
		<arg name="log_output" value="$(arg log_output)" />
		<arg name="fcu_protocol" value="$(arg fcu_protocol)" />
		<arg name="respawn_mavros" default="$(arg respawn_mavros)" />

data on /mavros/imu/data_raw

seq: 281
secs: 12
nsecs: 584000000
frame_id: “base_link”
x: 0.0
y: 0.0
z: 0.0
w: 0.0
orientation_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
x: nan
y: nan
z: nan
angular_velocity_covariance: [1.2184696791468346e-07, 0.0, 0.0, 0.0, 1.2184696791468346e-07, 0.0, 0.0, 0.0, 1.2184696791468346e-07]
x: nan
y: nan
z: nan
linear_acceleration_covariance: [8.999999999999999e-08, 0.0, 0.0, 0.0, 8.999999999999999e-08, 0.0, 0.0, 0.0, 8.99

ive also tried connecting mavros to the pixhawk over serial but decided this wasnt the correct approach since the sensors arnet actually running on hardware and it returns the same response as stated above

thanks for your time