Clarify NED frame or body frame for accel and gyro sensor data inputs

Looking at sensor_accel.msg and sensor_gyro.msg:

sensor_accel.msg:

float32 x		# acceleration in the NED X board axis in m/s^2
float32 y		# acceleration in the NED Y board axis in m/s^2
float32 z		# acceleration in the NED Z board axis in m/s^2

sensor_gyro.msg:

float32 x		# angular velocity in the NED X board axis in rad/s
float32 y		# angular velocity in the NED Y board axis in rad/s
float32 z		# angular velocity in the NED Z board axis in rad/s

It’s ambiguous to me whether this means that the sensor data needs to be
provided from the driver in NED frame coordinates or body frame coordinates.
I’m attempting to integrate a new IMU with PX4.

Can you please clarify?

Thanks much!

1 Like

In PX4 the body frame is a NED frame with the origin on the center of mass of the vehicle.

Thanks for the response.
However, I’m still confused about this.

Normally, IMU sensor data is in body frame coordinates as the IMU has no knowledge of compass direction.
If the acceleration and angular velocity data have to be provided with respect to the NED frame with origin at center of mass of the vehicle, then that data has to be fused with magnetometer data somehow in advance.

Just want to confirm, is this really the requirement? Is this how, say the Pixhawk, works?
Thanks.

https://dev.px4.io/en/ros/external_position_estimation.html#asserting-on-reference-frames
In the Asserting on Reference Frames section you can see a nice diagram. Basically the PX4 body frame has the x axis pointing towards the front and the z axis pointing down. This is the frame that you have to use when publishing your sensor_gyro and sensor_accel messages from your IMU driver.