# No IMU data in HITL simulation

**URL:** <https://discuss.px4.io/t/no-imu-data-in-hitl-simulation/26275>\
**Category:** PX4 Autopilot\
**Created:** [February 21, 2022, 1:19pm UTC](https://discuss.px4.io/t/no-imu-data-in-hitl-simulation/26275 "2022-02-21T13:19:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Mansfield](https://discuss.px4.io/user_avatar/discuss.px4.io/dave_mansfield/32/9220_2.png) [@Dave\_Mansfield](https://discuss.px4.io/u/Dave_Mansfield)\
**Post date:** [February 21, 2022, 1:19pm UTC](https://discuss.px4.io/t/no-imu-data-in-hitl-simulation/26275/1 "2022-02-21T13:19:34Z")

</div>

Hi

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:

```auto
<launch>
	<!-- 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)" />
	</include>
</launch>

```

data on /mavros/imu/data\_raw

Cheader:  
seq: 281  
stamp:  
secs: 12  
nsecs: 584000000  
frame\_id: “base\_link”  
orientation:  
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]  
angular\_velocity:  
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]  
linear\_acceleration:  
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

---

<div class="post-metadata">

**Author:** ![souvik0306](https://discuss.px4.io/user_avatar/discuss.px4.io/souvik0306/32/20369_2.png) [@souvik0306](https://discuss.px4.io/u/souvik0306)\
**Post date:** [October 17, 2025, 10:26am UTC](https://discuss.px4.io/t/no-imu-data-in-hitl-simulation/26275/2 "2025-10-17T10:26:05Z")

</div>

Hi Im faving the similar issue where Im not getting /mavros/imu/data in SITL mode. I wish to use that and pass it to an AI model → process it → send it to EKF2.

but the minute I switch from default vehicle\_imu, my /mavros/imu/data stops

did you manage to solve it?
