Linux PX4 Flight Controller Disscussion

Hi here is HumpbackLab.

We have done some works with PX4 on Linux, and made a dedicated Linux-based flight controller PowerFin(some more detailed introduction can refer:PowerFin | HumpbackLab):

As the old linux boards like BBB or Navio have no update for a long time, and we done some update for PX4 on linux:HumpbackLab/PX4-Autopilot: PX4 Autopilot Software

Hope the improvements or fixs could be merged to the upstream, here list some PRs and track the status:

Thank you! If you are interested in running PX4 directly on Linux or have any question, leave comments please!

Hi Ncerzzk,

Thanks for sharing PowerFin and your work on bringing PX4 support for Linux platforms forward.

I reviewed the upstream PRs you listed. The serial configuration fix in #28233 is a useful example of a platform-specific issue with a clear, observable effect on sensor data availability.

Two of the ongoing contributions are particularly interesting from a validation perspective.

For PR #29269, the CTS-based automatic flow-control fallback raises a few useful regression scenarios: CTS not asserted at startup, CTS changing state during operation, and an ioctl failure or unsupported modem-status query. It would be valuable to confirm that the expected behaviour is preserved in each case.

For PR #29238, the kernel IIO to PX4 interface introduces an important timing boundary. In addition to checking the received IMU values, I would be interested in how you validate timestamp consistency, FIFO overflow or missing samples, and recovery after userspace scheduling delays.

At PAMILANGA LTD, we work on evidence-based validation and reproducible fault analysis for autonomous systems, so both areas are relevant to our engineering interests.

Are you planning to publish a reproducible Linux test configuration or recorded sensor/serial traces alongside these contributions?

That could make independent regression validation easier and help establish a clear baseline for future Linux-based PX4 boards.

Best regards,
Yiğitcan Öztürk
PAMILANGA LTD

Thank you yigitcan-ozturk.

For iio-imu driver, now it checks the monotonic clock selection, timestamp ordering, sample age, and inter-sample gaps.It would report gap count to PX4. For FIFO overflow or missing samples, it should be guaranteed by kernel imu iio driver, the kernel iio driver must supply a buffer to stores the scans, so even there are jitters on PX4 userspace schedule, the data would not be lost. Of course, for practical implement, the kernel iio driver should has scheduling priority as high as possible.

As for recorded sensor traces, may be I can catch and provide later.

For CTS-based automatic flow-control fallback, the pr fix an unreachable automatic flow-control fallback on Linux, and as the case you refered, it would close flow-control when CTS not asserted at starup. This is current limitation as we do not want add too more changes or change the behavior of Nuttx.

For CTS changing state, it could fallback and recovery in timeout.

If TIOCMGET fails or is unsupported, the previous behavior is preserved.

Hi Ncerzzk,

Thank you for the detailed explanations of both PRs.

The monotonic clock validation, timestamp ordering, sample-age checks and inter-sample gap reporting in the IIO IMU driver are particularly useful safeguards.

I agree that kernel-side buffering is an important way to decouple IMU acquisition from PX4 userspace scheduling jitter.

One distinction worth validating is that buffering protects against temporary delays within the available capacity, but it does not necessarily guarantee loss-free operation under prolonged consumer stalls or buffer exhaustion.

A focused bench test could be useful here:

  1. Record a baseline with uninterrupted IIO IMU acquisition and PX4 consumption.

  2. Introduce a controlled delay in the PX4 userspace reader while kernel acquisition continues.

  3. Compare kernel buffer capacity and overrun indicators, where available, with PX4’s timestamp-gap and stale-sample counters.

  4. Resume normal reading and measure whether samples are preserved, dropped or delivered with excessive age.

This would help establish the operating limits of the buffering strategy without assuming that every missing sample can be attributed to the same cause.

Your clarification on the Linux CTS fallback is also helpful. I understand the intention is to keep the change narrowly scoped and preserve existing behaviour when TIOCMGET is unavailable.

For that PR, a small regression record covering CTS low at startup, a CTS state transition and ioctl failure would provide useful evidence for the intended behaviour.

If you publish recorded sensor traces later, I would be interested in reviewing them from a timestamp-integrity and reproducibility perspective.

Best regards,
Yiğitcan Öztürk
PAMILANGA LTD