PX4-Autopilot: [v1.14 Release] beta regression: Failsafe Flight Task triggered after startup without Manual control

Describe the bug

After this commit https://github.com/PX4/PX4-Autopilot/commit/da4644c20adce8aeedd5be432fc88b1b115d7eb9, the Jenkins Hardware rack tests were all failing on the main branch, as the “Failsafe Flighttask activated” error was popping up.

To Reproduce

Checkout da4644c20adce8aeedd5be432fc88b1b115d7eb9 commit, then: make px4_sitl gazebo-classic -> Soon after startup, “Failsafe Flighttask activated” error will appear

Expected behavior

Failsafe flighttask error shouldn’t arise.

Diagnosis

As https://github.com/PX4/PX4-Autopilot/commit/da4644c20adce8aeedd5be432fc88b1b115d7eb9 introduced concept of invalidating Sticks object if there’s no manual control coming in (makes sense), the “ManualAcceleration” task started failing (as in HITL & SITL, no manual control is provided), and it then falls back to “ManualAltitudeSmoothVel” task:

https://github.com/PX4/PX4-Autopilot/blob/da4644c20adce8aeedd5be432fc88b1b115d7eb9/src/modules/flight_mode_manager/FlightModeManager.cpp#L226-L229

That somehow triggered the Failsafe task timeout. I learned a lot during debugging but still don’t understand fully to explain what’s going on. But @MaEtUgR I think you will be able to identify the root cause more efficiently! 🦾

Log Files and Screenshots

image

Additional context

@dagar I always ignored the Jenkins Hardware rack tests, but this one really showed me that it will actually catch the cases we shouldn’t ignore. Let’s make sure we catch these in the future before it getting merged as well!!

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

@MaEtUgR Btw I did some analysis (in comments above), feel free to reference them in case that helps as well! 🙌

What I found weird was that FlightTask was trying to activate 3 different tasks (trying to activate Auto, failing then falling back to ManualAcceleration, failing then falling back to ManualAltitudeSmoothVel, etc"

Is this how Flighttasks are supposed to operate? I was surprised by how many switchTask gets called!!

It’s because it goes through Altitude mode during boot even when there is no stick input and Altitude mode reports to fail 😕