WP Index Out of Bounds for Missions

Hi everyone!

I’m currently trying to upload missions using the MAVLink protocol to a PX4 Gazebo simulator and I’ve been getting the error “ERROR: wp index out of bounds”.

I’ve uploaded mission items to the autopilot, and the autopilot seems to accept the entire mission. I’ve tested that the mission does run correctly, but the autopilot seems to spam the wp index out of bounds message. This spamming seems to occur on start up (when I run the simulator) and stops when I connect the autopilot to my ground station.

The index that is “out of bounds” is -1. I’m not entirely sure how that index is getting to -1 on start-up, and it looks like it corrects itself (to 0), after connecting to my ground station. Do you guys have any tips/ideas as to why this may occur?


1 Like

Having the same issue, I’ve described the reason why it happens there: https://github.com/PX4/Firmware/issues/15153

Note that accepting the mission or receiving MISSION_ACK of type “MAV_RESULT_ACCEPTED” doesn’t mean the mission is valid - PX4 seems to perform the feasibility checks later/separately (no idea why).

1 Like