Since the last report seven days ago, there has been significant activity in the PX4 Autopilot Software project:
EKF2 Module Enhancements:
Setup Tools Fixes:
requirements.txt
, ensuring that setup tools are using correct syntax.UAVCAN Driver Adjustments:
fix_type
instead of valid_pos_cov
, likely improving GNSS time synchronization accuracy.NuttX Backports for SoC Support:
Submodule Updates:
System Resource Checks:
DDS Client Topic Updates:
vehicle_land_detected
to DDS topics, enhancing communication capabilities within the DDS client module.Overall, the recent activities reflect a strong focus on enhancing system reliability through parameter management, improving hardware compatibility with optimized drivers, maintaining up-to-date dependencies, and expanding system checks for better resource management.
A critical bug where uploading an invalid mission during flight can cause a crash during Return-to-Launch (RTL), posing a significant safety risk. - Evidence: Issue #23340 details that an invalid mission upload can lead to a crash during RTL. - Reasoning: Crashes during RTL are critical as they occur during an emergency procedure, potentially leading to loss of the vehicle and endangering safety. - Next Steps: Prioritize fixing this bug immediately. Implement additional validation checks for mission uploads to prevent invalid missions from being accepted.
The failure of VTOL SITL tests on every pull request is a critical issue that disrupts the CI process, delaying development and integration of new features. - Evidence: Issue #23275 details that the RTL direct rally without approaches forced test is failing consistently on every PR. - Reasoning: Continuous integration failures can halt the development pipeline, preventing new code from being tested and merged, which can significantly slow down project progress. - Next Steps: Assign a dedicated team to investigate and resolve the root cause of the VTOL SITL test failures. Implement temporary workarounds or disable the failing test if necessary to unblock the CI pipeline while a permanent fix is developed.
There is evidence of multiple PRs being left open without resolution, indicating a potential decline in team velocity. - Evidence: Multiple PRs such as #23236, #23233, #23229, #23228, and #23227 have been open for several days without resolution. - Reasoning: While not critical, the accumulation of unresolved PRs can slow down development progress and indicate potential bottlenecks in the review process. - Next Steps: Assign dedicated reviewers to address the backlog of open PRs. Implement stricter timelines for PR reviews and merges to ensure timely progress.
The changes in PR #23236 regarding gimbal control logic adjustments suggest potential prolonged disagreements or complexities in achieving consensus on control mechanisms. - Evidence: The detailed changes in gimbal control logic and the need for extensive testing across different scenarios indicate potential areas of disagreement or complexity. - Reasoning: Disagreements or complexities in core control logic can delay feature releases and affect overall project stability. - Next Steps: Facilitate discussions among key stakeholders to reach a consensus on gimbal control logic. Conduct thorough testing and gather feedback from users to validate the changes.
The recent updates to EKF2 modules such as innovation sequence monitoring (#23233) and mag spikes preflight errors (#23229) indicate ambiguous specifications that may lead to implementation challenges. - Evidence: The issues and PRs related to EKF2 enhancements involve complex algorithms and state estimation logic, which may not be clearly defined. - Reasoning: Ambiguous specifications can lead to multiple rewrites and delays in achieving stable implementations. - Next Steps: Clarify specifications and acceptance criteria for EKF2 enhancements. Engage domain experts to review and refine the implementation details.
Matthias Grob's addition of high RAM usage checks indicates an increased focus on monitoring system resources. This proactive measure aims at preventing potential issues related to resource exhaustion during operation.
Bluedisk's fixes in requirements.txt
highlight ongoing efforts to streamline configuration management. Ensuring correct syntax in setup tools is crucial for maintaining system reliability across different environments.
Alex Klimaj's updates to UAVCAN GNSS drivers reflect continuous efforts towards enhancing hardware compatibility. Accurate time synchronization based on fix_type
rather than valid_pos_cov
improves overall GNSS performance.
Since the last report seven days ago, there has been significant activity in the PX4 Autopilot Software project:
EKF2 Module Enhancements:
Setup Tools Fixes:
requirements.txt
, ensuring that setup tools are using correct syntax.UAVCAN Driver Adjustments:
fix_type
instead of valid_pos_cov
, likely improving GNSS time synchronization accuracy.NuttX Backports for SoC Support:
Submodule Updates:
System Resource Checks:
DDS Client Topic Updates:
vehicle_land_detected
to DDS topics, enhancing communication capabilities within the DDS client module.Overall, the recent activities reflect a strong focus on enhancing system reliability through parameter management, improving hardware compatibility with optimized drivers, maintaining up-to-date dependencies, and expanding system checks for better resource management.
Issue #23342: ekf2: continue adding IMU bias process noise
Issue #23341: ekf2: remove legacy accel z bias checks
Issue #23340: Invalid mission with RTL causes crash
Issue #23338: [WIP] commander: remove multicopter nav test
Issue #23336: [Bug] make px4_sitl gazebo is not working
make px4_sitl gazebo
with PX4 v1.14.0.Issue #23335: ekf2: use bias corrected angular velocity
Issue #23334: Update aux_global_position.cpp
Issue #23332: Autostart: load all airframes IDs with priority ROMFS -> SD card
Issue #23331: [Bug] GotoControl: No yaw when drone is facing backward
Issue #23339 & #23337 & #23333
requirements.txt
and adding VehicleLandDetected to DDS topics configuration.The recent activity reflects ongoing efforts to enhance PX4's capabilities, address various bugs, and improve system stability and reliability. Notable improvements include better handling of IMU bias process noise, enhanced gimbal control reliability, improved innovation monitoring in EKF2, and expanded hardware support with new board additions like MRO Control Zero H7 OEM USART6 support.
Several critical bugs have been fixed, particularly those affecting continuous integration (CI) processes, ensuring that new changes do not introduce regressions or instability into the system. The project continues to show significant progress in expanding its capabilities across different domains, including new hardware support, marine vehicle integration, and space robotics applications.
Overall, these changes reflect an active maintenance effort aimed at improving PX4's versatility, reliability, and developer experience across various modules of the system.
This pull request introduces modifications to the EKF/covariance.cpp
file and updates two CSV test files. The primary change in the code is related to the handling of IMU bias process noise for accelerometers and gyroscopes. Specifically, the changes ensure that process noise is always added to the bias states, even if they are inhibited.
File: src/modules/ekf2/EKF/covariance.cpp
!_gyro_bias_inhibit[index]
and !_accel_bias_inhibit[index]
).P(i, i) < gyro_var
for gyro and P(i, i) < accel_var(index)
for accel).Files: src/modules/ekf2/test/change_indication/ekf_gsf_reset.csv
and src/modules/ekf2/test/change_indication/iris_gps.csv
Correctness:
Readability:
Maintainability:
Testing:
The changes introduced in this pull request enhance the handling of IMU bias process noise by ensuring that it is always added based on variance thresholds. This approach improves the robustness of state estimation in the EKF2 module. The modifications are minimal yet impactful, maintaining high code quality and readability. The updates to test files further validate the correctness of these changes.
Overall, this pull request represents a positive step towards improving sensor fusion accuracy and system performance in the PX4 Autopilot software.
Since the previous analysis 7 days ago, there has been significant activity in the PX4/PX4-Autopilot repository. Several new pull requests (PRs) have been created, and some notable PRs have been merged or closed. Below is a detailed analysis of the changes.
#23342: ekf2: continue adding IMU bias process noise
#23341: ekf2: remove legacy accel z bias checks
#23338: [WIP] commander: remove multicopter nav test
#23335: ekf2: use bias corrected angular velocity
#23334: Update aux_global_position.cpp
#23332: Autostart: load all airframes IDs with priority ROMFS -> SD card
#23326: ekf2 optical flow logic cleanup
#23317: Duplicate empty _node
check removed from Subscription.hpp (#23316)
#23315: ekf2: require valid filter vz for GPS vspeed check State: Open, created: Created, edited: Edited, Summary: Introduces a requirement for a valid filter vertical speed (vz) for GPS vertical speed check. Significance: Enhances the reliability of GPS vertical speed checks by ensuring valid filter data.
#23314: mavlink: with cmake policy CMP0118 verion 3.20 we can depend on the mavlink_c library State: Open, created: Created, edited: Edited, Summary: Updates CMake policy to version 3.20 to depend on the mavlink_c library instead of including its content in multiple places. Significance:** Simplifies build configuration and reduces redundancy in CMake files.
#23339: can gps set system time based on fix_type instead of valid_pos_cov State: Closed, created: Created, closed: Merged by Daniel Agar (dagar) Summary: Sets system time based on GPS fix type instead of position covariance validity. Significance: Ensures system time is set correctly even for certain CAN GPS without position covariance.
#23337: ekf2: more conservative clipping checks before declaring bad_acc_clipping fault status State: Closed, created: Created, closed: Merged by Daniel Agar (dagar) Summary: Implements more conservative clipping checks before declaring bad accelerometer clipping fault status. Significance:** Reduces unnecessary estimator selection switching due to brief clipping events.
#23333: Update NuttX State: Closed, created: Created, closed: Merged by Daniel Agar (dagar) Summary: Updates NuttX to include imxrt1170 SOC VDD fix. Significance: Enhances hardware compatibility and stability.
#23330: Fix the deprecated syntax in the "Tools/setup/requirements.txt"
State: Closed, created: Created, edited: Edited, closed: Merged by Daniel Agar (dagar)
Summary: Fixes deprecated syntax in Tools/setup/requirements.txt
.
Significance: Ensures compatibility with pip version 24.1 and above.
#23328: Update dds_topics.yaml
State: Closed, created: Created, closed: Merged by Daniel Agar (dagar)
Summary: Adds px4_msgs::msg::VehicleLandDetected
to dds_topics.yaml
.
Significance: Ensures proper handling of landing state information in DDS-based systems.
#23327: flight_mode_manager: delete unused avoidance waypoint State: Closed, created: Created, closed: Merged by Daniel Agar (dagar) Summary: Deletes unused avoidance waypoint in flight mode manager. Significance:** Cleans up codebase, improving maintainability.
#23325: Add check for high RAM usage State: Closed, created: Created, edited: Edited, closed: Merged by Matthias Grob (MaEtUgR) Summary: Extends existing CPU load check to also look at RAM usage. Significance: Improves system monitoring by checking RAM usage.
#23322: boards ark pi6x add vl53l0x State: Closed, created: Created, closed: Merged by Daniel Agar (dagar) Summary: Adds support for VL53L0X distance sensor on ARK Pi6X board. Significance: Enhances sensor support for ARK Pi6X board.
#23291: Update submodule libevents to latest Tue Jun 18 12:3940 UTC 2024 State: Closed, created: Created, edited: Edited, closed: Merged by Daniel Agar (dagar) Summary: Updates libevents submodule to the latest version. Significance: Ensures compatibility with the latest libevents updates.
#23263: EKF2 Terrain state State: Closed, created: Created, edited: Edited, closed: Merged by Silvan Fuhrer (sfuhrer) Summary: Integrates terrain estimator into EKF2. Significance: Improves accuracy and reliability of terrain height estimation.*
There has been significant activity in the PX4/PX4-Autopilot repository since the last report. Several new PRs have been created, addressing various enhancements and bug fixes across different modules. Notably, there have been additions related to new hardware support, improvements in existing functionalities, and updates to CI/CD pipelines.
The recently merged PRs include critical bug fixes and enhancements that improve system stability and functionality. The ongoing PRs indicate active development efforts towards expanding hardware compatibility, improving control algorithms, and enhancing developer tools.
Overall, the repository is seeing active contributions that are likely to enhance its robustness and feature set in the near future.
src/modules/ekf2/EKF/ekf.cpp
Initialization and Reset:
init
and reset
functions are well-defined, ensuring that the state variables are properly initialized and reset.#if defined(CONFIG_EKF2_*)
) allows for modular inclusion of various sensors, enhancing flexibility.Update Mechanism:
update
function is structured to check if the filter is initialized and if new IMU data is available before proceeding with state prediction and covariance updates.predictState
, predictCovariance
, and controlFusionModes
.Filter Initialization:
initialiseFilter
function ensures that the filter is only initialized when valid IMU data is available, preventing erroneous initialization.State Prediction:
predictState
function correctly applies bias corrections to IMU data and uses quaternion multiplication for orientation updates.Logging and Debugging:
print_status
function provides comprehensive logging of the EKF states, aiding in debugging and performance monitoring._control_status.flags.*
). This could be refactored into a helper function to reduce code duplication.src/modules/ekf2/EKF/height_control.cpp
Height Control Logic:
controlHeightFusion
function orchestrates the height fusion process by invoking specific control functions for each sensor type (e.g., barometer, GNSS, range finder).checkHeightSensorRefFallback
ensures robustness by switching to secondary height references when the primary reference fails.Bias and Health Checks:
checkVerticalAccelerationBias
function performs thorough checks on vertical acceleration bias, including conditions based on various sensor innovations.checkVerticalAccelerationHealth
function estimates the likelihood of inertial navigation falling based on vertical innovations, providing a robust mechanism for detecting accelerometer clipping.ekf.cpp
, there are repeated checks for different sensor types. Refactoring these into a common utility function would improve maintainability._params.vert_innov_test_min
, _params.vert_innov_test_lim
) are hardcoded. Consider making these configurable through parameters or macros.src/modules/commander/HealthAndArmingChecks/checks/cpuResourceCheck.cpp
CPU and RAM Usage Checks:
_high_cpu_load_hysteresis
prevents false positives by requiring sustained high CPU load before triggering a failure.Event Reporting:
reporter.healthFailure
) to log errors related to missing CPU/RAM load information or excessive usage, aiding in diagnostics.mavlink_log_critical
) ensures that critical issues are communicated effectively to ground control stations.src/modules/ekf2/EKF2.cpp
Verbose Logging Control:
EKF2_LOG_VERBOSE
enhances debugging capabilities by allowing detailed logging when needed.Parameter Management:
src/modules/logger/logged_topics.cpp
Topic Management:
Dynamic Topic Addition:
add_topics_from_file
allow dynamic addition of topics from external files, enhancing flexibility.Profile-Based Logging:
SDLogProfileMask
) enables selective logging based on different use cases (e.g., estimator replay, thermal calibration).Overall, the source code demonstrates good practices in terms of modularity, error handling, and configurability. However, there are opportunities for improvement in reducing code duplication, enhancing documentation, and improving error handling mechanisms.
Severity: High (3/3)
Rationale
A critical bug where uploading an invalid mission during flight can cause a crash during Return-to-Launch (RTL), posing a significant safety risk.
Next Steps
Severity: High (3/3)
Rationale
The failure of VTOL SITL tests on every pull request is a critical issue that disrupts the CI process, delaying development and integration of new features.
Next Steps
Severity: Medium (2/3)
Rationale
There is evidence of multiple PRs being left open without resolution, indicating a potential decline in team velocity.
Next Steps
Severity: Medium (2/3)
Rationale
The changes in PR #23236 regarding gimbal control logic adjustments suggest potential prolonged disagreements or complexities in achieving consensus on control mechanisms.
Next Steps
Severity: Medium (2/3)
Rationale
The recent updates to EKF2 modules such as innovation sequence monitoring (#23233) and mag spikes preflight errors (#23229) indicate ambiguous specifications that may lead to implementation challenges.
Next Steps