Hi Anders, I dug through the code but I haven’t personally tested this workflow. I think I see what’s going on.
1. Parameter rename
The old EKF2_AGP_CTRL parameter was replaced with multi-instance variants: EKF2_AGP0_CTRL, EKF2_AGP1_CTRL, etc. Your startup script setting EKF2_AGP_CTRL 1 is likely being silently ignored in v1.17.
Try changing it to EKF2_AGP0_CTRL 1.
2. Origin-only vs continuous position
AuxGlobalPosition is designed for continuous position fusion — an external positioning system feeding the EKF ongoing updates. If you only need to set the initial origin, the right approach is to publish a VehicleCommand on /fmu/in/vehicle_command with:
command = 100000 # VEHICLE_CMD_SET_GPS_GLOBAL_ORIGIN
param5 = latitude # decimal degrees
param6 = longitude # decimal degrees
param7 = altitude # meters AMSL
This is the same internal path that QGC’s “Set Estimator Origin” button uses — QGC sends the MAVLink message SET_GPS_GLOBAL_ORIGIN (msg ID 48), and PX4’s MAVLink receiver translates it into an internal vehicle_command with command 100000. Via ROS2 you bypass the MAVLink layer, so you use the internal command ID directly.
3. On SET_GPS_GLOBAL_ORIGIN vs command 48
You’re right that the MAVLink command ID 48 doesn’t appear in PX4 code — that’s because SET_GPS_GLOBAL_ORIGIN is a dedicated MAVLink message (not a COMMAND_LONG), and PX4 handles it in its MAVLink receiver and translates it to the internal command 100000. Worth noting: MAVLink has a newer command MAV_CMD_DO_SET_GLOBAL_ORIGIN (command ID 611) in the development spec that supersedes the old message, but PX4 doesn’t support it yet (PR #24697 is open but stalled).
In short: for setting just the origin, try VehicleCommand with command = 100000. If you do want continuous AGP fusion, update the parameter to EKF2_AGP0_CTRL