‹ Reports
The Dispatch

OSS Watchlist: px4/PX4-Autopilot


Executive Summary

The PX4 Autopilot Software project is an advanced flight control system designed for drones and other unmanned vehicles, managed by the PX4 organization. It supports a variety of airframes and is compatible with multiple operating systems. The project is characterized by its active development and contributions from a global developer community, aiming at continuous improvement and expansion of features.

Recent Activity

Team Members and Contributions

Patterns and Collaborations

Risks

Plans

Conclusion

The PX4 Autopilot Software project is on a strong developmental trajectory with active contributions aimed at refining its capabilities. While the project demonstrates robust efforts towards system enhancement, it faces challenges related to safety issues and sensor integration that require immediate attention. Addressing these risks is crucial for maintaining the reliability and safety of the system in diverse operational environments.

Quantified Commit Activity Over 7 Days

Developer Avatar Branches PRs Commits Files Changes
Eric Katzfey 1 1/4/0 3 21 1123
vs. last report = -5/+1/= = +16 +1111
Daniel Agar 2 2/2/0 4 18 234
Hamish Willee 1 0/1/0 1 4 10
vs. last report -1 -1/=/= -4 -1 -18
Konrad 1 1/0/0 1 2 7
vs. last report = =/-1/= = = -25
Jaeyoung Lim 1 1/1/0 1 1 1
Beniamino Pozzan 1 1/1/0 1 1 1
Mathieu Bresciani (bresch) 0 0/2/0 0 0 0
vs. last report -1 =/+1/= -1 -1 -2
David Sidrane (davids5) 0 1/0/0 0 0 0
vs. last report = +1/-1/= = = =
Silvan Fuhrer (sfuhrer) 0 1/0/0 0 0 0
vs. last report -1 -1/-3/= -4 -4 -18
Jacob Dahl (dakejahl) 0 1/1/0 0 0 0
vs. last report -1 -1/=/= -2 -3 -3
murata,katsutoshi (muramura) 0 1/0/0 0 0 0
vs. last report = =/=/= = = =
None (asimopunov) 0 2/0/0 0 0 0
Tero Salminen (t-salminen) 0 1/0/0 0 0 0
Sergei Grichine (slgrobotics) 0 0/1/0 0 0 0
vs. last report = -1/+1/= = = =
None (chfriedrich98) 0 1/0/0 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Detailed Reports

Report On: Fetch commits



Project Overview

The PX4 Autopilot Software project, managed by the PX4 organization, is a versatile and sophisticated flight control system designed for drones and other unmanned vehicles. It supports a wide range of airframes and is compatible with multiple operating systems including Linux, NuttX, and MacOS. The project is under active development with contributions from a global community of developers focused on continuous improvement and feature expansion.

Recent Developer Activities

Summary of Changes Since Last Report

Since the last report 7 days ago, there has been a flurry of activity within the PX4 Autopilot Software project. Key developers such as Daniel Agar, Eric Katzfey, Hamish Willee, Beniamino Pozzan, Jaeyoung Lim, Konrad Rudin, and others have contributed to various aspects of the project. The changes include updates to drivers, enhancements in EKF2 modules, documentation updates, and improvements in logging and testing frameworks.

Detailed Activity by Developer

Daniel Agar

  • Commits: 4 commits with modifications primarily in EKF2 modules and optical flow drivers.
  • Features: Enhanced drag fusion as air data aiding and moved yaw estimator to a dedicated folder.
  • Collaborations: Worked on various branches including pr-ekf2_drag_fusion_wind_dead_reckon and add_minimum_position_change_required_for_changed_home.

Eric Katzfey

  • Commits: 3 commits focused on updating VOXL ESC drivers and improving Serial UART API.
  • Features: Updated VOXL ESC drivers to latest from ModalAI fork and ported over to new Serial UART API.
  • Collaborations: Contributed to branches like manual-setpoint-buttons focusing on integrating MAVLink buttons in manual control setpoint topic.

Hamish Willee

  • Commits: 1 commit with significant documentation updates.
  • Features: Updated markdown output scripts to support new documentation frameworks.
  • Collaborations: Engaged in documentation overhaul projects.

Beniamino Pozzan

  • Commits: 1 commit addressing logger updates.
  • Features: Added timesync_status to default logged topics.

Jaeyoung Lim

  • Commits: 1 commit enhancing vehicle attitude message documentation.
  • Features: Documented vehicle attitude message.

Konrad Rudin

  • Commits: 1 commit focused on home position updates.
  • Features: Added minimum position change needed to be recognised as new home position.

Conclusions and Future Directions

The recent activities in the PX4 Autopilot Software project demonstrate a robust effort towards refining the software's capabilities, particularly in enhancing platform compatibility and optimizing performance for new hardware support. The ongoing developments in areas such as real-time operating system support, sensor integration, flight control algorithms, and documentation indicate a strong trajectory towards advanced functionalities for unmanned aerial vehicles.

Future efforts will likely continue to focus on enhancing platform compatibility, optimizing performance for new sensor hardware, improving safety features in flight control algorithms, and updating documentation to reflect the latest changes in the software architecture.

Quantified Commit Activity Over 7 Days

Developer Avatar Branches PRs Commits Files Changes
Eric Katzfey 1 1/4/0 3 21 1123
vs. last report = -5/+1/= = +16 +1111
Daniel Agar 2 2/2/0 4 18 234
Hamish Willee 1 0/1/0 1 4 10
vs. last report -1 -1/=/= -4 -1 -18
Konrad 1 1/0/0 1 2 7
vs. last report = =/-1/= = = -25
Jaeyoung Lim 1 1/1/0 1 1 1
Beniamino Pozzan 1 1/1/0 1 1 1
Mathieu Bresciani (bresch) 0 0/2/0 0 0 0
vs. last report -1 =/+1/= -1 -1 -2
David Sidrane (davids5) 0 1/0/0 0 0 0
vs. last report = +1/-1/= = = =
Silvan Fuhrer (sfuhrer) 0 1/0/0 0 0 0
vs. last report -1 -1/-3/= -4 -4 -18
Jacob Dahl (dakejahl) 0 1/1/0 0 0 0
vs. last report -1 -1/=/= -2 -3 -3
murata,katsutoshi (muramura) 0 1/0/0 0 0 0
vs. last report = =/=/= = = =
None (asimopunov) 0 2/0/0 0 0 0
Tero Salminen (t-salminen) 0 1/0/0 0 0 0
Sergei Grichine (slgrobotics) 0 0/1/0 0 0 0
vs. last report = -1/+1/= = = =
None (chfriedrich98) 0 1/0/0 0 0 0

PRs: created by that dev and opened/merged/closed-unmerged during the period

Report On: Fetch issues



Summary of Recent Changes in PX4 Autopilot Project

Notable Open Issues

  1. Issue #23035 - RC signal lost results in actuators stuck at last commanded position, which is critical for safety during manual control loss scenarios.

  2. Issue #23034 - Random thrust issues when optical flow is enabled but not providing data, affecting vehicle behavior in Position mode.

  3. Issue #23033 - Tailsitter transitions cause throttle spikes and jumps, needing refinement for smoother transitions.

  4. Issue #23032 - EKF2 enhancements to consider drag fusion as aiding for wind dead reckoning, enhancing system robustness.

  5. Issue #23030 - Challenges with altitude control using only Tfmini, indicating potential integration or configuration issues.

  6. Issue #23029 - Mode switch from Hold to an unassigned mode triggers unwanted mode changes, potentially leading to crashes.

  7. Issue #23025 - Home position changes on ground after minimum displacement, improving the robustness of home position accuracy.

  8. Issue #23024 - Rover ackermann module added, enhancing control capabilities for specific vehicle configurations.

  9. Issue #23023 - New ST IIS2MDC Magnetometer driver integration, expanding hardware support.

  10. Issue #23021 - Testing NuttX with IMXRT DMA preflight Support, indicating ongoing improvements in system capabilities.

Recently Closed Issues

  • Issues related to system crashes and hardware integrations have been addressed, including fixes for UAVCAN node restarts on STM32 platforms and updates to GZ Bridge CMakeLists.txt for simulation environments.
  • Enhancements in logging and parameter management, such as high-rate logging categories for VOXL2 and removal of deprecated parameters.
  • Driver updates and bug fixes, including updates for VOXL ESC drivers and fixes for GPS auto configuration issues.
  • Improvements in mission handling and vehicle control logic, such as adjustments in RTL behavior and FW auto hand/catapult takeoff logic.

Summary

The recent activity in the PX4 Autopilot project includes significant bug fixes, feature additions, and enhancements aimed at improving hardware compatibility, system stability, and operational safety. Critical issues like actuator behavior on RC signal loss and unexpected mode changes due to unassigned modes are being addressed to enhance reliability and safety. The introduction of new modules like the Rover ackermann and updates to existing systems like EKF2 indicate ongoing efforts to refine the system’s capabilities and support a broader range of applications and hardware configurations.

Report On: Fetch PR 23033 For Assessment



Pull Request Analysis

Repository Overview:

  • Repository: PX4/PX4-Autopilot
  • Language: C++
  • License: BSD 3-Clause
  • Description: Autopilot software for various vehicle types including multicopters, fixed-wing, VTOL, and more.

Pull Request #23033: Tailsitter: remove thrust spikes around entering/leaving transition modes

Problem Addressed:

The pull request addresses the issue of thrust spikes during the transition modes of a tailsitter VTOL (Vertical Take-Off and Landing) aircraft. These spikes can destabilize the aircraft during critical phases of flight.

Changes Made:
  1. Throttle Spikes Fix:

    • Implemented a delay of 50ms before switching to a new controller output during transitions. This prevents immediate jumps to zero throttle output when the new controller has not yet published any data.
  2. Throttle Ramps:

    • Added throttle ramping similar to other VTOL types (tiltrotor and standard VTOL) to smooth out the transition between different flight modes.
  3. Differential Throttle Handling:

    • Added a control to wait for differential throttle adjustments in fixed-wing mode until after the initial 50ms of transition, ensuring smoother changes.
Code Quality Assessment:
  • Clarity and Maintainability:

    • The changes are well-documented with comments explaining the purpose of each modification which enhances readability and maintainability.
    • The use of constants like B_TRANS_THRUST_BLENDING_DURATION for time durations makes the code easier to modify and understand.
  • Robustness:

    • The solution includes handling edge cases where controller outputs are not available, which improves the robustness of the transition logic.
  • Testing:

    • Changes were tested in a simulation (SITL), and results show that the throttle spikes and jumps are effectively managed with these changes.
Overall Assessment:

The pull request is well-crafted with clear descriptions of the problem and solution. The changes are targeted and address the issue effectively without introducing unnecessary complexity. The addition of throttle ramping and careful handling of controller output transitions should significantly improve the stability and safety of tailsitter VTOL operations during mode transitions.

Recommendations:

  • Merge: The pull request should be merged as it provides crucial fixes to a significant issue affecting vehicle stability.
  • Follow-Up: Consider implementing similar strategies for other transition types or VTOL configurations if similar issues exist.
  • Refactor Suggestion: As noted in the PR, there's an opportunity to synchronize and simplify transition logic across different VTOL types which could be addressed in future work to enhance code reuse and maintainability.

Report On: Fetch pull requests



Recent Activity Analysis

Overview

In the past week, there has been a significant amount of activity in the PX4/PX4-Autopilot repository. A total of 14756 pull requests have been closed, with many addressing critical bug fixes, feature enhancements, and code maintenance tasks. Below is a detailed analysis of notable changes and their implications.

Notable Merged Pull Requests

  1. #23010: [flash savings] remove lis2mdl and pga460 from kconfig

    • Summary: Removed LIS2MDL from COMMON_MAGNETOMETER and PGA460 from COMMON_DISTANCE_SENSOR to save 7716 bytes.
    • Impact: Reduces firmware size, potentially allowing for additional features or maintaining compatibility with hardware with limited flash.
  2. #23002: Update NuttX

    • Summary: Updated NuttX to incorporate FlexIO changes.
    • Impact: Enhances hardware support and potentially improves performance and stability.
  3. #22997: Move Voxl from microdds client to uxrce dds client

    • Summary: Transitioned VOXL2 board from using the outdated microdds client to the newer uxrce dds client.
    • Impact: Ensures up-to-date technology usage which might enhance communication efficiency and reliability.
  4. #22996: Enabled voxl2-slpi dsp_sbus driver in build

    • Summary: Uncommented the dsp_sbus driver in the build script for voxl2-slpi.
    • Impact: Enables support for specific hardware features necessary for certain applications.
  5. #22990: drivers: broadcom AFBR fix close to ground false readings

    • Summary: Adjusted the Broadcom AFBR driver to fix false readings when the sensor is close to the ground.
    • Impact: Improves sensor accuracy and reliability, crucial for applications requiring precise distance measurements.
  6. #22988: Send mavlink manual control buttons field in manual control input topic

    • Summary: Included buttons data from MAVLink MANUAL_CONTROL messages into PX4's manual control input topic.
    • Impact: Enhances control capabilities by utilizing button inputs, which can be crucial for specific operational needs.
  7. #22987: drivers: rc_input fix auto scan

    • Summary: Fixed an issue in rc_input where auto scan was not functioning correctly.
    • Impact: Ensures reliable operation of RC input handling, which is critical for user interaction with the vehicle.

Notable Closed (Not Merged) Pull Requests

  1. #22965: VOXL ESC driver update
    • Summary: Proposed updates to the VOXL ESC driver were closed due to issues with ModalAI Flight Core compatibility.
    • Impact: Indicates ongoing development and refinement needs; users must wait for a stable update.

Summary

The recent activity in the PX4/PX4-Autopilot repository shows a robust effort towards improving system performance, reliability, and feature set. The updates span across various aspects of the system including hardware support, sensor accuracy enhancements, communication protocol updates, and more efficient resource usage.

The developers are actively addressing both new feature integrations and bug fixes, which is crucial for maintaining the reliability and performance expected by end-users. This activity also indicates a strong community and developer engagement aimed at continuously evolving the platform to meet emerging needs in drone technology.

Report On: Fetch PR 23032 For Assessment



Pull Request Analysis

Overview

The pull request (PR) under review is from the PX4/PX4-Autopilot repository, specifically addressing enhancements in the Extended Kalman Filter (EKF2) module. The PR aims to improve the dead reckoning capabilities of unmanned aerial vehicles (UAVs) by utilizing drag fusion as a form of air data aiding.

Description of Changes

Files Modified:

  1. src/modules/ekf2/EKF/ekf_helper.cpp

    • Modifications include updates to the logic for determining dead reckoning status based on various aiding sources like GPS, external vision (EV), optical flow, and now drag fusion.
    • The code introduces conditions to check if drag fusion can aid in dead reckoning by constraining the velocity estimate when other forms of position or velocity aiding are unavailable.
  2. src/modules/ekf2/test/test_EKF_gps.cpp

    • A minor change in a test case related to GPS fix loss, extending the simulation run time from 5 to 6 seconds to validate the behavior when transitioning to inertial dead reckoning.

Code Quality Assessment

  1. Clarity and Maintainability

    • The changes are well-commented and use descriptive variable names (vel_pos_aiding, opt_flow_aiding, air_data_aiding) which enhance readability and maintainability.
    • Conditional checks are clearly structured, making it easy to understand under what conditions different types of data aid the EKF.
  2. Functionality

    • By integrating drag fusion as an aiding source, the PR potentially improves the robustness of velocity estimates in scenarios where traditional sensors might fail or be unavailable, such as in environments with poor GPS visibility.
  3. Testing

    • The modification in the test file indicates consideration for ensuring that new changes do not break existing functionalities.
    • However, it would be beneficial to see more comprehensive tests specifically targeting the new functionality introduced by drag fusion aiding.
  4. Best Practices

    • The use of preprocessor directives (#if defined(...)) for optional features like optical flow and airspeed aids configurability and helps in maintaining platform-specific adaptations without cluttering the codebase.
  5. Documentation

    • Inline comments are used effectively to describe why certain code blocks are necessary, which aids future developers or reviewers in understanding the rationale behind changes.
  6. Robustness

    • The PR includes checks for recent data fusion from various sensors before considering them valid for aiding, which is crucial for maintaining the accuracy and reliability of the EKF's state estimates.

Conclusion

The PR introduces a meaningful enhancement to the EKF2 module by allowing drag fusion to contribute to dead reckoning capabilities. This change could significantly benefit UAV operations in challenging environments. The code modifications are implemented cleanly and thoughtfully with attention to detail in handling various data sources. Additional tests targeting the new functionality would further solidify confidence in these changes. Overall, this PR is a positive contribution to the PX4 Autopilot project.

Report On: Fetch Files For Assessment



Analysis of Source Code Structure and Quality

General Overview

The source code provided is part of the PX4 Autopilot project, specifically from the EKFGSF_yaw.cpp file which handles yaw estimation using an Extended Kalman Filter (EKF) with a Gaussian Sum Filter (GSF). This module is crucial for accurate heading estimation, which is fundamental for navigation and control in UAVs.

Code Structure

  1. Modularity and Clarity:

    • The code is well-structured into functions that handle specific tasks such as prediction, update, and initialization of the EKF models. This modular approach enhances readability and maintainability.
    • Functions like predict(), fuseVelocity(), ahrsPredict(), and updateEKF() clearly delineate different phases of the EKF processing pipeline.
  2. Naming Conventions:

    • The naming conventions are consistent and descriptive, which aids in understanding the purpose of variables and functions. For example, ahrsPredict() suggests it is related to AHRS (Attitude and Heading Reference System) predictions.
  3. Use of Data Structures:

    • The use of matrix operations provided by the Matrix library (matrix::) is extensive, facilitating complex mathematical operations involved in EKF computations. This use of specialized libraries for linear algebra operations ensures efficiency and correctness.

Code Quality

  1. Error Handling:

    • The code includes checks for division by zero and other potential errors due to unexpected input values (e.g., checking if delta_ang_dt is greater than a small epsilon before division).
    • Use of PX4_ISFINITE() for guarding against non-finite numbers in calculations shows attention to robust error handling.
  2. Efficiency:

    • The code avoids unnecessary computations by returning early from functions when conditions are not met for further processing (e.g., if not aligned or if acceleration magnitude is out of expected bounds).
    • In-place updates to matrices and vectors avoid additional memory allocations.
  3. Maintainability:

    • The use of constants like CONSTANTS_ONE_G for gravitational acceleration makes the code more readable and easier to modify, as these values are defined at the beginning of the file.
    • Inline comments explain critical steps in the computation, particularly where mathematical transformations or corrections are applied.
  4. Robustness:

    • The algorithm includes mechanisms to reset states when certain conditions are not met (e.g., all model weights collapsing), which enhances the robustness of the yaw estimation process against anomalies or sensor errors.
  5. Potential Areas for Improvement:

    • Unit Testing: The code would benefit from accompanying unit tests that verify each function's behavior, especially given the mathematical complexity of EKF algorithms.
    • Exception Handling: While basic error checks are present, more comprehensive exception handling could be implemented to manage unexpected runtime errors.
    • Documentation: Adding more detailed function headers describing inputs, outputs, and side effects would improve understandability for new developers or external contributors.

Conclusion

The EKFGSF_yaw.cpp file demonstrates a high standard of software engineering practices appropriate for critical systems like UAV flight control. It exhibits clear structuring, effective use of advanced programming constructs, and attention to detail in handling numerical computations securely and efficiently. However, like any complex system, continuous improvement in testing, error handling, and documentation would further enhance its robustness and maintainability.