UAV frames

I am unsure about the different frames for the PX4 messages
These are some snippets taken from the message definitions(VehicleLocalPosition (UORB message) | PX4 Guide (main) and VehicleOdometry (UORB message) | PX4 Guide (main))

uint8 POSE_FRAME_NED     = 1 # NED earth-fixed frame
uint8 POSE_FRAME_FRD     = 2 # FRD world-fixed frame, arbitrary heading reference
float32[4] q                # Quaternion rotation from FRD body frame to reference frame. First value NaN if invalid/unknown
uint8 VELOCITY_FRAME_NED      = 1 # NED earth-fixed frame
uint8 VELOCITY_FRAME_FRD      = 2 # FRD world-fixed frame, arbitrary heading reference
uint8 VELOCITY_FRAME_BODY_FRD = 3 # FRD body-fixed frame
float32[3] angular_velocity # Angular velocity in body-fixed frame (rad/s). NaN if invalid/unknown

Here are some doubts for each frame:

NED earth-fixed frame: Does this frame origin represent the starting position when the ekf module in px4 is initialised?

FRD world-fixed frame, arbitary heading reference: I am not sure about the arbitary heading reference and what is world-fixed frame

FRD body-fixed frame: Does this refer to the baselink of the flightcontroller in FRD convention?

body-fixed frame: Does this refer to the baselink of the flightcontroller in FLU convention?

1 Like

Yes

I suspect “Body” here means that the origin of the frame moves with the vehicle.

Not sure about this.

Might be worth looking at how the frames are mapped coming in from MAVLink in MAVLINK Common Message Set (common.xml) | MAVLink Guide

@bresch Is this something you can help with?

It’s a right-handed inertial frame similar to NED but where the x and y axes are NOT aligned to North and East (but z is still Down)

It’s attached to a fixed location on the vehicle and rotates with it. Normally a body frame is attached to the center of mass of the vehicle. One can then define the position of all components (IMU, GNSS, …) in body-frame coordinates.

In FRD (Forward-Right-Down). In PX4, everything is NED and FRD

@bresch I’d quite like to update PX4-Autopilot/msg/VehicleOdometry.msg at f8f8ddc101214a7123d0f276fed09edd215afbb7 · PX4/PX4-Autopilot · GitHub so we don’t have to ever go through this again, but I don’t fully get it.

uint8 POSE_FRAME_NED = 1 # NED earth-fixed frame

NED earth-fixed frame relative to EKF position at startup.

uint8 POSE_FRAME_FRD = 2 # FRD world-fixed frame, arbitrary heading reference

It’s a right-handed inertial frame similar to NED but where the x and y axes are NOT aligned to North and East (but z is still Down)

So origin is still world fixed to point of EKF startup.

So what are they aligned with? What does “arbitrary heading reference mean”?

My “guess” is that FRD means that X, Y are vehicle aligned, but since Z is always pointing down, it is more like “X, Y are vehicle aligned but only in the frame over ground”.

uint8 VELOCITY_FRAME_BODY_FRD = 3 # FRD body-fixed frame

Just what it says - it is a moving frame, centred on the vehicle, and aligned with the vehicle.

So if you were to use POSE_FRAME_FRD to go 2 m forward, you’d be moving 2 m over ground, while VELOCITY_FRAME_BODY_FRD would be 2 m forward aligned with the vehicle, and if the vehicle was facing down, that would be straight down.

Am I even close to understanding this?

correct

Arbitrary heading reference here means that the X axis has a fixed reference that is not North. It could be 42 degrees from north, it could be South or anything else. The frame is non-rotating and fixed at some location on the Earth.

Exactly

1 Like