Compare commits

...

125 Commits

Author SHA1 Message Date
Ramon Roche 885af949cb ci: replace 14 workflows with 4-tier orchestrator
Replaces 14 CI workflows with a single ci-orchestrator.yml that runs
jobs in a 4-tier waterfall. Tiers gate each other sequentially: if
formatting fails in 2 minutes, nothing else runs.

Every job carried over from the old workflows was optimized along the
way. Jobs use native container: blocks instead of the old
addnab/docker-run-action wrapper, cache scopes were split and tuned
(hit rates went from ~48% to 99%+), SITL tests run at 20x speed on
8cpu runners, clang-tidy got a dedicated 16cpu runner and cache, the
failsafe sim caches its emsdk, and flash analysis posts sticky PR
comments.

Forks can use this without AWS infrastructure. Copy
.github/ci-config.yml.example to .github/ci-config.yml to customize
runner labels, job toggles, and cache sizes. Alternatively, rename
.github/workflows/ci-simple.yml.example to ci-simple.yml for a
single-job workflow that finishes in under 15 minutes on ubuntu-latest.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-05 21:28:07 -08:00
Marco Hauswirth 7297364484 fix ros-test-config for multi-APG 2026-02-20 17:43:45 +01:00
Marco Hauswirth 9e796daee8 add translation for aux_global_position 2026-02-20 17:43:45 +01:00
Marco Hauswirth 17242bc1a4 simulation: update sensor_agp_sim for AuxGlobalPosition message
Update the AGP simulator to publish the new AuxGlobalPosition message
type with the required source ID field.
2026-02-20 17:43:45 +01:00
Marco Hauswirth 8a9be9a8f0 ekf2: update logger, mavlink, DDS, and replay for AuxGlobalPosition
Update integrations to use the new AuxGlobalPosition message instead
of the VehicleGlobalPosition-based aux_global_position topic.
2026-02-20 17:43:45 +01:00
Marco Hauswirth b346fcfa00 ekf2: implement multi-instance AGP fusion
Refactor auxiliary global position fusion to support multiple AGP
sources. Add AgpSourceControl manager class that routes AGP messages
to the correct AgpSource instance based on configured source IDs.
Only instantiate AgpSource slots that have a configured ID on boot.
Move AGP subscriptions to manager class for correct message routing.
2026-02-20 17:43:45 +01:00
Marco Hauswirth 1d852907a2 ekf2: add multi-instance AGP parameters
Add per-instance parameters for auxiliary global position sources,
allowing configuration of up to 4 AGP slots with individual source IDs.
2026-02-20 17:43:45 +01:00
Marco Hauswirth dd177ac8cf uorb: add AuxGlobalPosition message
Add dedicated AuxGlobalPosition uORB message to replace the previous
approach of reusing VehicleGlobalPosition for auxiliary global position
sources.
2026-02-20 17:43:45 +01:00
PX4BuildBot 68b533f79f docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-20 15:49:36 +00:00
Eric Katzfey 7daac63809 muorb: A couple of minor tweaks to make initialization reliable 2026-02-20 08:42:04 -07:00
PX4BuildBot 2ef5b0a20f docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-20 15:26:50 +00:00
Silvan Fuhrer 2e2067173a PCA9685: add PWM_CENTER to auto generated params (#26543)
Signed-off-by: Silvan <silvan@auterion.com>
2026-02-20 16:20:35 +01:00
PX4BuildBot 93f06f6a23 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-20 14:24:00 +00:00
Matthias Grob ca0dec5a33 uavcan esc handling review suggestions 2026-02-20 15:16:43 +01:00
ttechnick 790c2d3369 uavcan: optimization 2026-02-20 15:16:43 +01:00
ttechnick 8478503349 uavcan: remove redundant loop 2026-02-20 15:16:43 +01:00
ttechnick 6a18fd045f uavcan: cleanup & node_status fix
uavcan: esc fault handling review suggestions

uavcan: fix node status & cleanup
2026-02-20 15:16:43 +01:00
ttechnick 06942bbfcc add vendor specific error handling
Vendor specific failure handling: IQ_Motion
2026-02-20 15:16:43 +01:00
ttechnick 89c4980e55 get node health and info 2026-02-20 15:16:43 +01:00
ttechnick e756574420 use generic name for can devices
But still ensure backcompability of DeviceInformation (for now)
2026-02-20 15:16:43 +01:00
PX4BuildBot df00901bfa docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-20 13:59:20 +00:00
Balduin 918efc8f97 navigator: RTL: fix idle setpoint on activation (#26537)
When switching modes, navigator resets the position setpoint triplet to
idle. In the case of entering RTL, it is not replaced immediately by the
correct triplet, but published once and only corrected a split second
later. This causes zero thrust to come from control_idle in
FixedWingModeManager

Fix by calling run(true) on the appropriate sub-mode at the end of
RTL::on_activation(), same as in the on_active just below.

The submode is in inactive at that point, but run(true) triggers:
 - on_activation of the submode
 - set_rtl_item, which calls:
     - mission_item_to_position_setpoint
     - _navigator->set_position_setpoint_triplet_updated

and therefore the navigator publishes the position setpoint triplet
immediately (which was already being correctly set).

Navigator: RTL: also update subs on actiavation

Navigator: RTL: also disable mission RTL if direct RTL

matching the logic in on_active exactly
2026-02-20 14:51:51 +01:00
PX4BuildBot 8602849847 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-20 00:40:13 +00:00
Jacob Dahl d564c5b4c2 mag: calibration: bump default earth field strength from 0.2 to 0.4 (#26528) 2026-02-19 17:32:40 -07:00
PX4BuildBot 245ae58264 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-19 22:05:53 +00:00
Eric Katzfey 996060f581 muorb: Added statistics and status reporting. Improved aggregator send performance. 2026-02-19 14:57:17 -07:00
PX4BuildBot a120773793 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-19 21:01:07 +00:00
fakerror 6cf8d80bdd rover: guard computeMaxSpeedFromDistance against disabled decel/jerk limits (#26452)
Co-authored-by: Andrew Brahim <35986980+dirksavage88@users.noreply.github.com>
2026-02-19 15:52:41 -05:00
PX4BuildBot b4601278db docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-19 20:28:33 +00:00
Matthias Grob 0d66981dcc Remove MPC_USE_HTE and always use hover thrust for altitude control (#24751)
* Remove `MPC_USE_HTE` and always use hover thrust for altitude control

Note the separate module can still be not run but I have not seen a case where the hover thrust estimate is not useful for altitude control hence I don't expect anyone to have the parameter disabled or planning on not running the module.

This parameter was used to experimentally introduce the hover thrust estimator. First it was just logging its status and you could opt in to use it:
f9794e99f8
but soon after it became the default and you had to opt out of using it:
a8063ac948
AFAIK we haven't seen problems requiring to disable it in the last 5 years and hence I suggest to remove the parameter to reduce the configuration space.

* Update src/modules/land_detector/MulticopterLandDetector.cpp

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>

* undo docs changes

* change redundant update() calls to copy()

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-02-19 11:17:57 -09:00
Matthias Grob 62f5f5267e Land detector: Remove LNDMC_TRIG_TIME parameter (#25251)
* LandDetector: remove unused LNDMC_TRIG_TIME parameter

* LandDetector: remove unnecessarily complicated global set_hysteresis_factor() function

* Apply suggestions from code review

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

* Apply suggestions from code review

* remove param

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-02-19 11:17:03 -09:00
Hamish Willee fd7edaa4fe Minor tweak to markup instructions for docs (#26168) 2026-02-19 17:27:43 +11:00
PX4BuildBot b343eb6a11 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-19 03:28:23 +00:00
Alex Klimaj b8877c4cfc Battery add configurable filter params (#26524)
* ark fpv board_config: update battery ADC current filter time constant to 0.5s

* battery: add configurable voltage and current filter time constants

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-02-18 18:20:50 -09:00
Hamish Willee 64e996b475 docs: GNSS-Denied Configuration (#25955) 2026-02-19 14:14:12 +11:00
Alex Klimaj 1d45f699be boards: add arkv6x zenoh config (#25887)
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-02-18 17:56:52 -09:00
PX4BuildBot be126454c0 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-19 02:24:43 +00:00
Jacob Dahl ce3e62841f module_base: remove CRTP template pattern to reduce flash bloat (#26476)
* module_base: claude rewrite to remove CRTP bloat

* module_base: apply to all drivers/modules

* format

* fix build errors

* fix missing syntax

* remove reference to module.h in files that need module_base.h

* remove old ModuleBase<T>

* add module_base.cpp to px4_protected_layers.cmake

* fix IridiumSBD can_stop()

* fix IridiumSBD.cpp

* clang-tidy: downcast static cast

* get_instance() template accessor, revert clang-tidy global

* rename module_base.h to module.h

* revert changes in zenoh/Kconfig.topics
2026-02-19 15:17:17 +13:00
Jacob Dahl 657854ae1b ark boards: remove GPIO_FMU output init (default float) (#26525)
* ark boards: change GPIO_FMU output init from PULLDOWN to PULLUP

* remove fmu output gpio init
2026-02-18 16:43:48 -09:00
PX4BuildBot 5613313107 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-18 23:48:18 +00:00
Farhang eafb6c396b [Docs] macOS Dev environment installation (#25204)
* Initial changes

* index fix

* gz index fix2

* gz index fix 3

* updates

* Run prettier

* zsh env
removed gz classic

* Corrections 2

* Cleanups

* Update docs/en/dev_setup/dev_env_mac.md

* Apply suggestions from code review

* Minor subedit and prettier

* small correction

* cleanups gz harmonic brew formula

* fix(macos.sh): invert px4-sim install condition for --sim-tools

The condition checked if px4-sim WAS installed before running
brew install, meaning it would never install on a fresh system.
Add the missing negation so it installs when NOT already present.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* docs: rewrite macOS dev environment setup guide

- Add Xcode Command Line Tools as prerequisite
- Default to ~/.zshrc (macOS default since Catalina)
- Explain why ulimit change is needed and why in startup file
- Add reminder to open new terminal after shell config changes
- Remove broken pip3 alias workaround
- Split git clone into clone + submodule update (canonical form)
- Recommend --sim-tools flag since first build uses gz_x500
- Document what macos.sh installs and its --reinstall flag
- Clarify Gazebo comes from --sim-tools / px4-sim formula
- Add XQuartz requirement for Gazebo display
- Add verification section with key tool checks and smoke test
- Remove outdated video guide comment block

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* conventions

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2026-02-18 18:40:53 -05:00
PX4BuildBot 2ebfd40bba docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-18 20:07:32 +00:00
Eric Katzfey 368dd362c5 muorb: implemented a basic keepalive mechanism 2026-02-18 12:59:45 -07:00
PX4BuildBot 7332f264f0 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-18 18:57:21 +00:00
Silvan Fuhrer 06d6c31614 Allocation: fix flaperons and spoilerons (symmetric ailerons up/down) (#26514)
Signed-off-by: Silvan <silvan@auterion.com>
2026-02-18 10:49:26 -08:00
PX4BuildBot d9448f3e99 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-18 17:08:47 +00:00
Farhang 50a42680d7 Update GZ Plugin OpticalFlow CMake configuration for library paths (#25957)
* Update OpticalFlow CMake configuration for library paths
2026-02-18 11:53:52 -05:00
PX4BuildBot 70a84a0c1b docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-18 16:45:17 +00:00
Claudio Chies 05de941399 Add Traffic Avoidance System (ADSB/FLARM) Arming Check (#26390)
* Add traffic avoidance system checks

* Update msg/px4_msgs_old/msg/VehicleStatusV1.msg

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>

* docs: add arming check for traffic avoidance systems in ADS-B/FLARM documentation

* fix formating

* trafficAvoidanceCheck: switch case for configuration options

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-02-18 17:37:03 +01:00
Matthias Grob adc9a6d35d Report nav_state of mission executor via MAVLink 2026-02-18 17:37:03 +01:00
PX4BuildBot fe91ace0bb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-18 16:12:28 +00:00
Matthias Grob 977777f40a FlightTaskAuto: refactor triplet subscription naming 2026-02-18 17:05:03 +01:00
Matthias Grob 4afdf38378 FlightTaskAuto: remove second internall triplet states 2026-02-18 17:05:03 +01:00
Matthias Grob d0004403a3 FlightTaskAuto: remove offtrack logic
It was added at a time where the triplet target was directly fed as position setpoint to the controller.

Since the smoothing improvements to FlightTaskAuto(SmoothVel) and removing the previous "aggressive" FlightTaskAuto variant there should be no need anymore for this logic. It can sometimes lead to unexpected sideffects. E.g. the vehicle would suddenly change direction when exceeding some arbitrary threshold.
2026-02-18 17:05:03 +01:00
PX4BuildBot 2e651117e8 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-18 05:52:51 +00:00
PX4 Build Bot 18c176beef New Crowdin translations - ko (#26487)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-02-18 16:44:57 +11:00
PX4 Build Bot 602add3ec1 New Crowdin translations - uk (#26432)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-02-18 16:44:45 +11:00
PX4 Build Bot 47d5971f42 New Crowdin translations - zh-CN (#26488)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-02-18 16:44:34 +11:00
PX4BuildBot 7ef57f6262 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-18 00:23:31 +00:00
Victor Nan Fernandez-Ayala 2a0b795760 fix: set UXRCE_DDS_AG_IP in UUV airframe, remove from defaults (#26485) 2026-02-17 16:15:45 -08:00
PX4BuildBot 911fc81c59 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-17 23:17:55 +00:00
Jacob Dahl b2fc5993cc range_finder_consistency_check: fix consistency check timeout units (#26497)
* range_finder_consistency_check: fix consistency check timeout units

* explicit float

* format
2026-02-17 14:10:04 -09:00
Jacob Dahl d5ddc9135d clang-tidy: fix issues (#26498) 2026-02-17 14:09:43 -09:00
PX4BuildBot 6b67ccb0ad docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-17 20:02:19 +00:00
Alex Klimaj 0e6b904e80 LightwareLaser: add SF1XX rotation parameter (#26428)
* Add SF1XX rotation parameter and update orientation in LightwareLaser driver

* remove rotation opt arg, update docs about supported lightware

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-02-17 10:54:38 -09:00
Ramon Roche 864df9fc7b CI: disable VTOL and tailsitter SITL tests
Persistent flaky failures (timeouts, erratic transitions) make these
tests unreliable in CI. Commented out from the workflow matrix so they
can be re-enabled once the test infrastructure is stabilized. The test
definitions in sitl.json are preserved for local use.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-17 09:30:18 -08:00
PX4BuildBot d17a5b2c26 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-17 13:41:39 +00:00
Balduin d46a9266ce Failsafe docs: document COM_POS_LOW_EPH, COM_POS_LOW_ACT (#26508)
* Failsafe docs: document COM_POS_LOW_EPH, COM_POS_LOW_ACT

* Failsafe docs: address review
2026-02-17 14:34:44 +01:00
PX4BuildBot 3a6f566e80 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-17 09:15:19 +00:00
Jacob Dahl d84903d520 init.d-posix/airframes/4004_gz_standard_vtol: param set-default VT_PITCH_MIN -5 (#26507) 2026-02-17 00:06:29 -09:00
PX4BuildBot 4331f880f5 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-17 08:37:39 +00:00
Silvan Fuhrer 11007dc893 FW auto launch: Add option to lock selected surfaces before/during launch (#25799)
* FWModeManager: add option to set flag for disabling actuators during launch

Signed-off-by: Silvan <silvan@auterion.com>

* Allocation: add option to each control surface to be locked for launch

Signed-off-by: Silvan <silvan@auterion.com>

* FW rate control: reset integral while control surfaces are locked

Signed-off-by: Silvan <silvan@auterion.com>

---------

Signed-off-by: Silvan <silvan@auterion.com>
Co-authored-by: mahima-yoga <mahima@auterion.com>
2026-02-17 09:26:38 +01:00
Ramon Roche fd4b958790 ci: add geninfo negative error ignore to tests_coverage (#26506) 2026-02-16 20:04:18 -09:00
Ramon Roche a06f062bf7 nuttx: add nuttx_context dependency to jlink-nuttx build (#26505) 2026-02-16 20:04:06 -09:00
PX4BuildBot 79bf7810d4 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-16 21:41:55 +00:00
Aaron1356 066e8f7fea Adding Light Ware GRF Serial Driver (#26404)
* Creating a base for grf lidar

* Serial Drive is working, need to work out distance publish

* WIP Getting Range Data in cm

* Working Rand Distance Values for GRF 250 and GRF500

* Review Changes

* Compiler fixes

* Update to date

* small update

* Fix typo and remover unused libs

* removing unused enum

* Update to the Documentation

* Fiving scaling issue

* update to the logic

* [Feature] Adding I2C driver for the GRF250 and GRF500 models (#26425)

* Adding the GRF I2C driver

* I2C Driver Working

* Removing a lot of unnecessary code

* fixing names

* Changing the i2c Driver to be in the lightware laser

* remove the old driver

* formatting fix

* Adding Ligthware GRF to documentation

* Update to the Documentation

* Ensuring sample_perf ends

* Updating Docs

* uavcannode: implement hardpoint commands (#26334)

* implement cannode hardpoint commands

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* Update src/drivers/uavcannode/Subscribers/HardpointCommand.hpp

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

* Update src/drivers/uavcannode/Subscribers/HardpointCommand.hpp

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

* add hardpoint sub to ark cannode, simplify handling of hardpoint broadcast

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

---------

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

* voxl_esc: Limit frequency of UART passthru writes to 20Hz

* voxl2_io: Added UART passthru

* docs: update link for px4 ros2 interface lib python api docs

* estimator_interface: remove unused getter

* gnss_checks: always run strict checks on ground

With the goal to never take off if the GNSS solution is not fullfilling the configured requirements still not stopping to use it in case it degrades mid air.

* ekf2 unit-tests: adapt to strict GNSS checks on ground

* escCheck: rework online check to properly report offline ESCs

previous to this
09d79b221f
set `esc_online_flags` e.g. for UAVCAN ESCs which specific one is online and that then got compared to a mask where the first `esc_count` bits were set.

So if only ESC 5 is mapped and online you get the message "ESC 156 offline" because `esc_online_flags = 0b1000` gets compared to `online_bitmask = 0b1` based on `esc_count = 1` and the motor index is `esc[0].actuator_function = 0` wrapped using `0 - actuator_motors_s::ACTUATOR_FUNCTION_MOTOR1 + 1 = 156`.

* FailureDetector: consistent timestamp naming

* FailureDetector: rework motor status check

* FailureDetector: implement upper and lower current limit with offset

* Update src/modules/commander/failure_detector/FailureDetector.cpp

Prevent Buffer overflow

* Update Format

* Subedit

* Shrink and rename image

* Apply suggestion from @hamishwillee

Sounds good

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>

* Apply suggestion from @hamishwillee

More universal approach

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>

* Update to the Documentation

* FailureDetector: rework motor status check

* FailureDetector: implement upper and lower current limit with offset

* Subedit

* docs: update parameter reference metadata

* Remove pregenerated files - that should all be tidied up next time this runs

* remover GRF parameters

* Documentation updates

* Fixing Merge Conflicts

* remove @

* Undo Changes to parameter_reference

* remove the code that will be autogen-ed

* Update the Camake File

---------

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
Co-authored-by: Andrew Brahim <35986980+dirksavage88@users.noreply.github.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Eric Katzfey <eric.katzfey@modalai.com>
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
Co-authored-by: Marco Hauswirth <marco.hauswirth@auterion.com>
Co-authored-by: Nick <145654544+ttechnick@users.noreply.github.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2026-02-16 16:34:48 -05:00
PX4BuildBot 08dc2a776e docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-16 20:33:01 +00:00
ljarvela 061fe4806e uavcan: add warning about CAN error counter reading issue (#26492)
Add warning message in print_info() to alert users that CAN error counter
values may increase during the function call due to internal counter reading
implementation. Users should not fully trust these counters until the
underlying issue is fixed.

Co-authored-by: ljarvela <lasse.jarvela@iceye.com>
2026-02-16 11:25:30 -09:00
PX4BuildBot 4bebbbae93 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-16 17:47:30 +00:00
Claudio Chies e52ce5c43b UAVCAN: Configurable LED Light Control with Flexible Addressing (#26253)
* feat: implement UAVCAN LED control for individual light control and assignment

* uavcan led: nit-picks from review

* uavcan led: reduce maximum number of lights

to avoid unused parameters

* uavcan led: simplify anticolision on check

* uavcan led: correctly map 8-bit RGB to rgb565

* Trim param name character arrays to 17

16 characters + \0 termination

* uavcan led: final nit-picks

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-02-16 18:39:48 +01:00
Ramon Roche 32c94bd3b1 ci: fix S3 upload so tags don't overwrite stable firmware
Remove the step that uploaded every version tag to the stable/ S3
directory, which caused QGC users selecting "stable" to receive
pre-release firmware (#26340). The stable/ and beta/ directories
are now controlled exclusively by their respective branch pushes,
while version tags only upload to their versioned archive directory
(e.g., v1.16.1/). Pre-release tags are also correctly marked on
GitHub Releases.

Co-authored-by: Julian Oes <julian@oes.ch>

Fixes #26340

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-13 06:29:13 -08:00
PX4BuildBot b08fefa903 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-13 13:14:35 +00:00
nlsxp 302d0601bf Smoothen external flight mode GotoControl to Mission transitions (#26254) 2026-02-13 14:06:47 +01:00
PX4BuildBot c90811a277 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-13 12:49:48 +00:00
Balduin 79a7ef2869 RtlTimeEstimator: Consider minimum ground speed (#26405)
* RtlTimeEstimator: Consider minimum ground speed

This fixes an issue seen when the wind is faster than the trim airspeed,
but not faster than the max airspeed.

In that case the RTL time estimator currently assumes that we always fly
at trim airspeed and are thus unable to cover ground in the upwind
direction. The result is a very large RTL time estimate, resulting in
RTL if configured by COM_FLTT_LOW_ACT.

By considering the FW_GND_SPD_MIN parameter, we correct this wrong
assumption. The RTL remaining time estimate now becomes realistic in
this situation.

* RtlTimeEstimator: assume min ground speed of 5 if param unavailable
2026-02-13 13:42:17 +01:00
Jaeyoung Lim b9f4de0b51 Fix TECS throttle integrator runaway (#26472) 2026-02-13 04:41:27 -08:00
Matthias Grob 14cbcee49f CI: replace all usage of addnab/docker-run-action
It's unmaintained and the docker version it uses is not supported anymore.
2026-02-13 13:39:50 +01:00
cuav-chen2 f38aba3c5b cuav_fmu-v6x: Adjust the startup sequence of the sensors 2026-02-12 22:16:32 -08:00
PX4BuildBot 84933cfbdf docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-13 05:28:01 +00:00
Ramon Roche be3e1fb2ef fix(build): restore smbus/smbus_sbs for Linux board targets
The previous commit (6b8fd11) gated smbus and smbus_sbs behind
PX4_PLATFORM=="nuttx" to prevent clang-tidy errors on SITL, but these
libraries depend on device::I2C which has a POSIX implementation
(posix/I2C.cpp). Linux boards like bluerobotics_navigator (armhf) and
emlid_navio2 (aarch64) enable CONFIG_DRIVERS_BATT_SMBUS, which depends
on drivers__smbus — causing CMake to fail with "non-existent target".

Move smbus and smbus_sbs back to unconditional add_subdirectory() so
they are available on all platforms. Keep mcp_common gated behind NuttX
since it includes px4_platform/gpio/mcp.hpp (NuttX-only GPIO headers).

Re-add src/lib/drivers/smbus to the Makefile clang-tidy exclude list
since the SITL compilation database lacks the I2C platform headers
needed for analysis.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 82850cb149 clang-tidy: exclude emscripten Unity build path from analysis
The failsafe_test target uses CMake Unity Builds (UNITY_BUILD ON),
which merges emscripten.cpp, failsafe.cpp, and framework.cpp into a
single generated file at:
  build/.../failsafe_test.dir/Unity/unity_0_cxx.cxx

The run-clang-tidy.py exclude regex operates on compile_commands.json
paths, which reference this generated unity file — not the original
source path. The previous exclude (src/modules/commander/failsafe/
emscripten) only matched the source path and missed the unity file,
causing clang-diagnostic-error: 'emscripten/emscripten.h' not found.

Add failsafe_test\.dir to the exclude regex to catch the unity build
path in addition to the source path.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 3d457528d2 clang-tidy: gate NuttX-only driver libs by platform instead of exclude list
The clang-tidy CI target builds against the SITL (px4_sitl_default-clang)
compilation database. Three libraries in src/lib/drivers/ were
unconditionally added via add_subdirectory(), causing them to appear in
compile_commands.json despite requiring NuttX-only headers:

- mcp_common: includes px4_platform/gpio/mcp.hpp (NuttX platform GPIO)
- smbus: extends device::I2C which resolves to the NuttX I2C driver
- smbus_sbs: includes smbus/SMBus.hpp, same I2C dependency chain

When clang-tidy analyzed these files it failed on clang-diagnostic-error
(fatal: header not found) since the platform headers don't exist in SITL.

The previous commit worked around this by adding the paths to
CLANG_TIDY_EXCLUDE_EXTRA in the Makefile, but the proper fix is to prevent
these libraries from entering the compilation database at all.

Gate mcp_common, smbus, and smbus_sbs behind
if(PX4_PLATFORM STREQUAL "nuttx") in src/lib/drivers/CMakeLists.txt.
This follows the established pattern already used by the device/ library
in the same directory, which conditionally includes NuttX-specific sources
(CDev.cpp, I2C.cpp, SPI.cpp) while compiling posix stubs for SITL.

The other libraries in the directory (accelerometer, gyroscope, led,
magnetometer, rangefinder) are pure abstractions over uORB topics and
internal utilities with no platform-specific hardware dependencies, so
they compile fine on all platforms without any gating.

Remove the now-unnecessary mcp_common and smbus paths from
CLANG_TIDY_EXCLUDE_EXTRA, keeping only the emscripten failsafe exclusion
(requires the emscripten SDK, not a platform build issue).

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche d74007dc87 clang-tidy: exclude NuttX-only drivers and emscripten from SITL analysis
These files depend on platform headers (px4_platform/gpio/mcp.hpp,
device::I2C, emscripten/emscripten.h) that are unavailable in the
SITL/clang build, causing clang-tidy to report compiler errors:

- src/lib/drivers/mcp_common (NuttX GPIO)
- src/drivers/gpio (MCP23009, MCP23017)
- src/lib/drivers/smbus (I2C bus driver)
- src/modules/commander/failsafe/emscripten (emscripten SDK)

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 47b3f5f6f9 docker-entrypoint.sh: consolidate startup output into single useful line
Replace the two separate echo lines ("Starting" and "(arch)") with a
single line showing architecture and UTC timestamp:

  [docker-entrypoint.sh] aarch64 | 2026-02-09T15:23:45Z

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 6d8441dc89 docker_run.sh: modernize image and clean up stale CI references
Update the local Docker convenience script to use the unified
px4io/px4-dev image instead of the retired per-toolchain images
(px4-dev-clang, px4-dev-simulation-bionic).

Usage:
  ./Tools/docker_run.sh make px4_sitl_default
  ./Tools/docker_run.sh make tests TESTFILTER=ULogMessages
  PX4_DOCKER_REPO="px4io/px4-dev:custom" ./Tools/docker_run.sh make px4_fmu-v6x_default

Changes:
- Default to px4io/px4-dev:v1.17.0-beta1, remove conditional image
  guessing for clang/tests targets
- Remove stale env passthrough (Travis CI, AWS, Codecov, Coveralls)
- Keep CCACHE_DIR and sanitizer flags (PX4_ASAN/MSAN/TSAN/UBSAN)
- Fix $PWD shadowing by renaming to SCRIPT_DIR
- Use "$@" instead of "$1 $2 $3" for proper argument forwarding

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche f29afe1342 logger: expand ULog unit tests to cover all message types
Rename ULogMessageInfoTest to ULogMessagesTest and add struct-level
coverage for every message type in the ULog spec:

- File header: magic bytes, size, field offsets
- Flag Bits ('B'): size, field offsets, flag masks
- Format ('F'): size, serialization
- Info ('I'): string, int32_t, and float value layouts
- Info Multiple ('M'): string layout, continuation flag, field offsets
- Parameter ('P'): int32_t and float value layouts
- Default Parameter ('Q'): size, type bits, field offsets
- Subscription ('A'): size, field offsets, serialization
- Unsubscription ('R'): size, serialization
- Data ('D'): size, field offset
- Logging ('L'): size, field offsets, serialization
- Logging Tagged ('C'): size, field offsets
- Sync ('S'): size, magic bytes
- Dropout ('O'): size, default msg_size, serialization
- Message header: size, field offsets, ULOG_MSG_HEADER_LEN
- Enum values: all 13 ULogMessageType codes

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 9849d90877 gps: add null check for path in GPS constructor
Guard the strncpy call with a null check to prevent undefined behavior
if the constructor is ever called with a null path pointer.

Fixes clang-analyzer-core.NonNullParamChecker diagnostic.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 497704f3b9 fw_mode_manager: pass FigureEightPatternPoints by const reference
The 48-byte struct (6 Vector2f) is only read inside initializePattern,
so passing by value creates an unnecessary copy.

Fixes performance-unnecessary-value-param clang-tidy diagnostic.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche b60aa5dd2b ekf2, fw_mode_manager, fw_rate_control: remove unused using declarations
Remove using-declarations for math::constrain, math::max, and
math::min that are never used — all call sites use the fully-qualified
form (e.g. math::constrain()).

Fixes misc-unused-using-decls clang-tidy diagnostic.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 5d151c54a4 flight_mode_manager: call direct parent instead of grandparent
FlightTaskManualAcceleration and FlightTaskOrbit both inherit from
FlightTaskManualAltitudeSmoothVel but were calling FlightTask and
FlightTaskManualAltitude respectively, skipping the intermediate
parent's overrides (smoothing velocity init, parameter chain).

Fix the DEFINE_PARAMETERS_CUSTOM_PARENT macro argument and the
activate() call to use FlightTaskManualAltitudeSmoothVel.

Fixes bugprone-parent-virtual-call clang-tidy diagnostic.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 83a4d648e3 logger: copy null terminator in write_info memcpy
clang-tidy flags the memcpy of vlen bytes as
bugprone-not-null-terminated-result because the destination buffer
region is left unterminated in memory.

Copy vlen + 1 bytes (including the source null terminator) so the
buffer is null-terminated in memory. The ULog msg_size is not
incremented for the extra byte — the null sits in the struct's
key_value_str padding and is never written to the log file, preserving
the ULog wire format which does not include a null terminator for
string values.

The bounds check (vlen < sizeof(msg) - msg_size) guarantees at least
one byte of headroom beyond vlen, so vlen + 1 is always within the
struct.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 0646fa6c9d logger: add unit test for ULog INFO message serialization
Add a gtest that validates the exact binary layout of INFO and
INFO_MULTIPLE messages against the ULog spec. This exercises the same
packing logic as write_info/write_info_multiple and will catch any
accidental changes to the wire format (e.g. including a null terminator
in msg_size).

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche d9b3e48ec5 CI: improve clang-tidy workflow naming and use standard cache actions
Rename workflow to "Static Analysis" with job name "Clang-Tidy" for
clearer GitHub Checks UI. Use Title Case action-verb step names.
Switch from runs-on/cache to actions/cache since the runs-on Magic
Cache sidecar transparently handles S3 backing.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 29fefeeada CI: fix ccache key to use branch name instead of merge ref
github.ref_name resolves to '26367/merge' for pull_request events,
causing cache misses. Use github.head_ref (PR source branch) with
fallback to github.ref_name for push events.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 618a6aa98f CI: add explicit permissions block to clang-tidy workflow
Set minimal permissions (contents: read) as flagged by CodeQL.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 8a007d38e7 CI: split ccache into restore/save so cache persists on failure
Use separate cache/restore and cache/save steps with if: always()
on the save step, matching the build_all_targets pattern.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche e831c66ae1 CI: add ccache and S3 caching to clang-tidy workflow
- Switch from addnab/docker-run-action to native container directive
- Use runs-on 16-core runner with S3 cache (extras=s3-cache)
- Add ccache setup matching build_all_targets pattern
- Run clang-tidy with -j16 to leverage all cores

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 021eee0c5c CI: use 16-core runs-on runner for clang-tidy workflow
The free GitHub runner (4 vCPUs) takes ~22 minutes. Switch to a
16-core runs-on runner and bump parallelism to -j16 to reduce
clang-tidy analysis time.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 385450ca37 CI: pin clang-tidy workflow to px4-dev:v1.17.0-beta1 container
Pin the container image to v1.17.0-beta1 which includes clang-tidy 18
and all required clang dependencies pre-installed. This removes the
need to install clang-tidy via apt on each workflow run.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 23c9af20da clang-tidy: disable new checks for v18 compatibility
Update .clang-tidy configuration to maintain compatibility with
clang-tidy 18 in the new px4io/px4-dev:v1.17.0-alpha1 container.

The previous CI container used clang-tidy 6.0 (2018) with ~213 checks.
The new container has clang-tidy 18 (2024) with ~537 checks - adding
~324 new checks that would fail without configuration changes.

This commit disables the new checks to preserve the existing code
quality baseline. The disabled checks can be evaluated and enabled
incrementally in future PRs as the codebase is updated to comply.

New checks disabled (partial list):
- bugprone-assignment-in-if-condition
- bugprone-casting-through-void
- bugprone-multi-level-implicit-pointer-conversion
- cppcoreguidelines-avoid-do-while
- cppcoreguidelines-avoid-goto
- cppcoreguidelines-avoid-non-const-global-variables
- misc-definitions-in-headers
- misc-header-include-cycle
- misc-no-recursion
- modernize-macro-to-enum
- modernize-type-traits
- performance-enum-size
- readability-avoid-nested-conditional-operator
- readability-convert-member-functions-to-static
- readability-redundant-string-init
- readability-simplify-boolean-expr
- (and ~35 more)

See full list in .clang-tidy. Each check is prefixed with '-' to
disable it while keeping WarningsAsErrors: '*' active for enabled
checks.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche d196d37ef2 clang-tidy: auto-exclude submodules and third-party code
Automatically generate the clang-tidy exclusion list from .gitmodules
so new submodules are excluded without manual intervention.

Changes:
- Makefile: Generate CLANG_TIDY_SUBMODULES from .gitmodules paths
- Makefile: Add CLANG_TIDY_EXCLUDE_EXTRA for manual exclusions:
  - src/systemcmds/tests (test code, looser style allowed)
  - src/examples (educational code, not production)
  - src/modules/gyro_fft/CMSIS_5 (vendored ARM DSP library)
- Delete src/systemcmds/tests/.clang-tidy (stale since 2019)
- Delete src/modules/gyro_fft/CMSIS_5/.clang-tidy (redundant)

Rationale: Submodules and vendored code should be linted in their
upstream repositories, not here. This reduces noise and focuses
clang-tidy on code that PX4 maintainers actually edit.

Contributors adding vendored (non-submodule) third-party code should
add their path to CLANG_TIDY_EXCLUDE_EXTRA in the Makefile.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche dc4aa749d3 Tools/run-clang-tidy: add -exclude argument for file filtering
Add regex-based file exclusion to the clang-tidy runner script.
This allows excluding paths (submodules, vendored code, tests) from
static analysis without modifying .clang-tidy files in each directory.

The -exclude argument accepts a regex pattern that is matched against
file paths from the compilation database. Matching files are skipped.

Example: -exclude="src/lib/foo|src/modules/bar"

This prepares for the clang-tidy v6 to v18 migration where we need
to exclude external code that we consume but don't maintain.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche 767eb75662 gyro_fft: fix clang build error on Linux arm64
Extend the -Wno-asm-operand-widths workaround to include Linux aarch64
in addition to Apple Silicon. CMSIS DSP contains ARM Cortex-M specific
assembly that clang (but not gcc) warns about on 64-bit ARM platforms.

The assembly code is unused on POSIX builds - only the C fallback
implementations are executed in SITL.

This fixes clang-tidy CI failing on arm64 runners.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Marco Hauswirth c29630f6ae adjust clang-tidy checks and workflow 2026-02-12 21:20:27 -08:00
cuav-chen2 c511e72d4f cuav_nora: 5V power overcurrent detection pin default to pull-up 2026-02-12 19:57:37 -08:00
PX4BuildBot a235b5c87f docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-13 03:30:17 +00:00
Matthias Grob 87163c1578 uavcan esc: initializers cosmetics (#26470) 2026-02-12 18:22:19 -09:00
PX4BuildBot 841fccf6b9 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-02-13 02:35:53 +00:00
Ramon Roche 8a3e227dc0 docs: address review feedback on build docs
- Update "Failed to import Python packages" section to reference
  gz_x500 instead of jmavsim, and point to Tools/setup/requirements.txt
  instead of listing individual packages
- Fix :::info admonition spacing in Ubuntu dev env docs

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 18:28:49 -08:00
Hamish Willee ad0b6bdc6b Subedit 2026-02-12 18:28:49 -08:00
Ramon Roche aecd1461d7 docs: document px4-dev as the recommended container
The new px4-dev container replaces the old per-distro container
hierarchy from PX4/PX4-containers. It is:

- Multi-architecture (linux/amd64 + linux/arm64)
- Based on Ubuntu 24.04
- Built from the in-tree Dockerfile via GitHub Actions
- Published to both ghcr.io and Docker Hub
- Tagged with PX4 versions (e.g. px4-dev:v1.16.0)

Mark the legacy per-distro containers (px4-dev-nuttx-jammy,
px4-dev-ros2-humble, etc.) as deprecated, note that px4-sim
is planned for simulation workflows.

Update all examples to use px4-dev instead of legacy containers.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 18:28:49 -08:00
Ramon Roche 8017baa6e6 docs: remove outdated Ubuntu/Gazebo Classic references
docker.md:
- Update container hierarchy from focal to jammy
- Replace ROS Noetic/Foxy references with ROS 2 Humble
- Update docker run example to use humble container
- Update SITL example from gazebo-classic to gz_x500
- Update VM tested version from Ubuntu 14.04 to 22.04

vscode.md:
- Remove "Ubuntu 18.04" from inotify troubleshooting header
  (this issue is not Ubuntu-version-specific)

dev_env_linux_centos.md:
- Update GCC warning to reference current Ubuntu LTS toolchain
  instead of old Focal Docker file

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 18:28:49 -08:00
Ramon Roche 103a61450e docs: update Ubuntu dev env to reflect supported LTS versions
- Replace "older version" collapsible with info block stating
  supported versions: Ubuntu 24.04 (primary) and 22.04
- Remove Gazebo Classic references (Ubuntu 22.04 section, install step)
- Note that GCC version comes from Ubuntu package manager
- Clarify that GCC version depends on Ubuntu release

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 18:28:49 -08:00
Ramon Roche df242827d2 docs: remove outdated Ubuntu/GCC references from build instructions
- Remove Ubuntu 18.04 troubleshooting sections (compile errors,
  VSCode inotify) — Ubuntu 18.04 is no longer supported
- Remove Gazebo Classic SITL dropdown from first build section
- Update FMUv2 flash warning to reference gcc-arm-none-eabi from
  current Ubuntu LTS instead of vague "CI/docker" reference
- Update flash overflow guidance to point at Ubuntu LTS toolchain
- Simplify "too many open files" error example (remove old GCC 7.2.1
  path from 2017)

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 18:28:49 -08:00
Ramon Roche d9996742be setup: drop Ubuntu 18.04/20.04 support from ubuntu.sh
Remove Gazebo Classic installation branches for Ubuntu 18.04 and 20.04.
The script now only supports Ubuntu 22.04 and 24.04 with Gazebo Harmonic.

Supported Ubuntu LTS versions going forward:
- Ubuntu 24.04 (primary, used in CI and release builds)
- Ubuntu 22.04 (secondary, still supported)

When Ubuntu 26.04 LTS releases we will bump to 26.04/24.04.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 18:28:49 -08:00
1385 changed files with 45570 additions and 8623 deletions
+83
View File
@@ -105,6 +105,89 @@ Checks: '*,
-readability-redundant-declaration,
-readability-static-accessed-through-instance,
-readability-static-definition-in-anonymous-namespace,
-altera-struct-pack-align,
-bugprone-easily-swappable-parameters,
-concurrency-mt-unsafe,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-non-private-member-variables-in-classes,
-hicpp-uppercase-literal-suffix,
-llvm-qualified-auto,
-misc-non-private-member-variables-in-classes,
-misc-use-anonymous-namespace,
-modernize-concat-nested-namespaces,
-readability-const-return-type,
-readability-identifier-length,
-readability-isolate-declaration,
-readability-qualified-auto,
-readability-redundant-access-specifiers,
-cppcoreguidelines-avoid-do-while,
-misc-include-cleaner,
-misc-const-correctness,
-llvm-else-after-return,
-readability-function-cognitive-complexity,
-cppcoreguidelines-init-variables,
-bugprone-reserved-identifier,
-cert-dcl37-c,
-cert-dcl51-cpp,
-modernize-use-nodiscard,
-misc-confusable-identifiers,
-cert-err33-c,
-readability-redundant-inline-specifier,
-readability-uppercase-literal-suffix,
-bugprone-narrowing-conversions,
-cppcoreguidelines-narrowing-conversions,
-bugprone-switch-missing-default-case,
-cppcoreguidelines-avoid-goto,
-hicpp-avoid-goto,
-bugprone-branch-clone,
-bugprone-unhandled-self-assignment,
-cert-oop54-cpp,
-performance-enum-size,
-readability-avoid-nested-conditional-operator,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-explicit-virtual-functions,
-cppcoreguidelines-virtual-class-destructor,
-readability-convert-member-functions-to-static,
-readability-make-member-function-const,
-bugprone-assignment-in-if-condition,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-incorrect-roundings,
-bugprone-macro-parentheses,
-bugprone-multi-level-implicit-pointer-conversion,
-bugprone-signed-char-misuse,
-bugprone-too-small-loop-variable,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-use-default-member-init,
-hicpp-multiway-paths-covered,
-hicpp-named-parameter,
-misc-header-include-cycle,
-misc-no-recursion,
-performance-no-int-to-ptr,
-readability-avoid-return-with-void-value,
-readability-avoid-unconditional-preprocessor-if,
-readability-delete-null-pointer,
-readability-duplicate-include,
-readability-redundant-casting,
-readability-redundant-member-init,
-readability-reference-to-constructed-temporary,
-readability-simplify-boolean-expr,
-bugprone-unsafe-functions,
-cert-msc24-c,
-cert-msc32-c,
-cert-msc33-c,
-cert-msc51-cpp,
-cert-str34-c,
-cppcoreguidelines-macro-to-enum,
-modernize-macro-to-enum,
-abseil-string-find-str-contains,
-bugprone-suspicious-include,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-clang-analyzer-optin.core.EnumCastOutOfRange,
-modernize-type-traits,
-misc-definitions-in-headers,
-bugprone-casting-through-void,
-readability-redundant-string-init,
'
WarningsAsErrors: '*'
CheckOptions:
@@ -0,0 +1,21 @@
name: Build Gazebo Classic SITL
description: Build PX4 firmware and Gazebo Classic plugins with ccache stats
runs:
using: composite
steps:
- name: Build - PX4 Firmware (SITL)
shell: bash
run: make px4_sitl_default
- name: Cache - Stats after PX4 Firmware
shell: bash
run: ccache -s
- name: Build - Gazebo Classic Plugins
shell: bash
run: make px4_sitl_default sitl_gazebo-classic
- name: Cache - Stats after Gazebo Plugins
shell: bash
run: ccache -s
+22
View File
@@ -0,0 +1,22 @@
name: Save ccache
description: Print ccache stats and save to cache
inputs:
cache-primary-key:
description: Primary cache key from setup-ccache output
required: true
runs:
using: composite
steps:
- name: Cache - Stats
if: always()
shell: bash
run: ccache -s
- name: Cache - Save ccache
if: always()
uses: actions/cache/save@v4
with:
path: ~/.ccache
key: ${{ inputs.cache-primary-key }}
+56
View File
@@ -0,0 +1,56 @@
name: Setup ccache
description: Restore ccache from cache and configure ccache.conf
inputs:
cache-key-prefix:
description: Cache key prefix (e.g. ccache-sitl)
required: true
max-size:
description: Max ccache size (e.g. 300M)
required: false
default: '300M'
base-dir:
description: ccache base_dir value
required: false
default: '${GITHUB_WORKSPACE}'
install-ccache:
description: Install ccache via apt before configuring
required: false
default: 'false'
outputs:
cache-primary-key:
description: Primary cache key (pass to save-ccache)
value: ${{ steps.restore.outputs.cache-primary-key }}
runs:
using: composite
steps:
- name: Cache - Install ccache
if: inputs.install-ccache == 'true'
shell: bash
run: apt-get update && apt-get install -y ccache
- name: Cache - Restore ccache
id: restore
uses: actions/cache/restore@v4
with:
path: ~/.ccache
key: ${{ inputs.cache-key-prefix }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
${{ inputs.cache-key-prefix }}-${{ github.ref_name }}-
${{ inputs.cache-key-prefix }}-${{ github.base_ref || 'main' }}-
${{ inputs.cache-key-prefix }}-
- name: Cache - Configure ccache
shell: bash
run: |
mkdir -p ~/.ccache
echo "base_dir = ${{ inputs.base-dir }}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = ${{ inputs.max-size }}" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
echo "compiler_check = content" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
+67
View File
@@ -0,0 +1,67 @@
# PX4 CI Configuration for Forks
# Copy to .github/ci-config.yml and customize.
# All settings are optional — omit any key to use the upstream default.
#
# This example is tuned for GitHub-hosted runners.
# The upstream PX4 repo uses RunsOn/AWS for all jobs.
# Infrastructure hint — set to true when running on GitHub-hosted runners.
# The upstream PX4 repo uses RunsOn/AWS (is_gha: false by default).
# Jobs may use this flag to skip steps that require RunsOn-specific
# infrastructure (e.g. S3 cache access, spot instance features).
# No job behavior is gated on this today — it is wired for future use.
is_gha: true
# Runner labels — one label per size tier.
# For GitHub-hosted runners, all tiers can point to ubuntu-latest.
# For self-hosted runners, map each tier to the appropriate pool.
runners:
small: '["ubuntu-latest"]'
medium: '["ubuntu-latest"]'
large: '["ubuntu-latest"]'
utility: '["ubuntu-latest"]'
# Job toggles — enable only what your fork needs.
# Jobs marked false below are upstream-specific (hardware boards,
# platform-specific builds) and rarely useful for feature forks.
jobs:
# T1 — gate checks (disable only if you have a very good reason)
gate_checks: true # format, newlines, module config validation
shellcheck: true # shell script linting
mavsdk_checks: true # mypy + flake8 on MAVSDK Python scripts
# T2 — core checks (recommended for all forks)
sitl_build: true
clang_tidy: true
# T2 — upstream-specific, disable for most forks
gazebo_classic_build: false # only needed if running sitl_tests/mavros_tests
ubuntu_builds: false # verifies clean builds on bare Ubuntu images
macos_build: false # macOS platform verification
itcm_check: false # NuttX board ITCM placement, board-specific
flash_analysis: false # binary size diffing against PR base, repo-specific
failsafe_sim: false # Emscripten web simulation build
# T3 — integration tests (expensive, disable unless you need them)
sitl_tests: false # requires gazebo_classic_build
ros_integration: false # requires Galactic ROS container
mavros_tests: false # requires gazebo_classic_build
ros_translation_node: true # lightweight, runs on standard ROS images
# Cache sizes — adjust if you hit your cache storage limit.
# GitHub-hosted runners share a 10 GB per-repo native cache.
# With the job set above (~60% of jobs disabled), total warm footprint
# is roughly 15-20% of the 10 GB limit per concurrent PR.
# If you re-enable more jobs, total footprint scales up proportionally.
# Raise your repo's cache limit if needed:
# Settings → Actions → Caches (up to 10 TB configurable)
cache:
sitl: 300M # ~94% fill at current default — do not lower
sitl_gazebo_classic: 350M # only relevant if gazebo_classic_build: true
clang_tidy: 150M # ~40% fill, sized with headroom
ubuntu_builds: 200M # only relevant if ubuntu_builds: true
macos: 200M # only relevant if macos_build: true
itcm: 200M # only relevant if itcm_check: true, growing
flash: 200M # only relevant if flash_analysis: true
ros_integration: 400M # ~70% fill, trending up
ros_translation: 150M # ~35% fill, sized with headroom
+3 -1
View File
@@ -21,8 +21,10 @@ applyTo: "docs/en/**"
- Do not apply bold or italic styling inside a heading.
- **Formatting:**
- **Bold:** Only for UI elements (buttons, menu items).
- **Italics (Emphasis):** For tool names (e.g., *QGroundControl*).
- **Inline Code:** Use backticks for file paths, parameters, and CLI commands (e.g., `prettier`).
Backticks are optional for hyperlinked CLI commands and tool names.
- **Italics (Emphasis):** Use for application names (e.g., *QGroundControl*).
Emphasis is optional for hyperlinked applications.
- **Structure:** End every line at the end of a sentence (Semantic Line Breaks).
## Linking & Navigation
+84 -43
View File
@@ -2,25 +2,54 @@
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
# and comment the "runs-on: [runs-on,runner=..." lines.
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
#
# ===================================================================================
# RELEASE UPLOAD LOGIC
# ===================================================================================
# This workflow handles building firmware and uploading to S3 + GitHub Releases.
#
# S3 Bucket Structure (s3://px4-travis/Firmware/):
# - master/ <- Latest main branch build (for QGC compatibility)
# - stable/ <- Latest stable release, controlled by 'stable' branch
# - beta/ <- Latest pre-release, controlled by 'beta' branch
# - vX.Y.Z/ <- Archived stable release
# - vX.Y.Z-beta1/ <- Archived pre-release
#
# Trigger Behavior:
# - Tag v1.16.1 -> Upload to: v1.16.1/ only (versioned archive)
# - Tag v1.17.0-beta1 -> Upload to: v1.17.0-beta1/ only (versioned archive)
# - Branch main -> Upload to: master/ (for QGC compatibility)
# - Branch stable -> Upload to: stable/ (QGC stable firmware)
# - Branch beta -> Upload to: beta/ (QGC beta firmware)
# - Branch release/** -> Build only, no S3 upload (CI validation)
# - Pull requests -> Build only, no S3 upload (CI validation)
#
# GitHub Releases:
# - All version tags create a draft GitHub Release
# - Pre-releases (alpha/beta/rc suffixes) are automatically marked as such
#
# IMPORTANT: Version tags do NOT upload to stable/ or beta/. Only the
# corresponding branch pushes control those directories. This prevents
# pre-release tags from accidentally overwriting stable firmware (#26340)
# and avoids race conditions between tag and branch builds.
# ===================================================================================
name: Build all targets
on:
# Triggered by CI orchestrator for all branches/PRs (after all tiers pass)
workflow_run:
workflows: ["CI Pipeline (Orchestrator)"]
types: [completed]
branches: ['**']
# Direct trigger for tagged releases (orchestrator doesn't run on tags)
push:
tags:
- 'v*'
branches:
- 'main'
- 'stable'
- 'beta'
- 'release/**'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
# Manual trigger for debugging
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -34,14 +63,27 @@ permissions:
jobs:
group_targets:
name: Scan for Board Targets
# Only run if:
# 1. Direct push to tag (independent trigger for releases), OR
# 2. Orchestrator workflow_run completed successfully (for all branches/PRs), OR
# 3. Manual workflow_dispatch
if: |
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
permissions:
contents: read
actions: read
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
branchname: ${{ steps.set-branch.outputs.branchname }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
- name: Cache Python pip
uses: actions/cache@v4
@@ -71,12 +113,13 @@ jobs:
- id: set-branch
name: Save Current Branch Name
run: |
echo "branchname=${{
github.event_name == 'pull_request' &&
format('pr-{0}', github.event.pull_request.number) ||
github.head_ref ||
github.ref_name
}}" >> $GITHUB_OUTPUT
if [ "${{ github.event_name }}" = "workflow_run" ]; then
# For workflow_run events, get branch from the triggering workflow
echo "branchname=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
else
# For push/workflow_dispatch events
echo "branchname=${{ github.head_ref || github.ref_name }}" >> $GITHUB_OUTPUT
fi
- name: Debug Matrix Output
if: runner.debug == '1'
@@ -90,6 +133,9 @@ jobs:
# runs-on: ubuntu-latest
runs-on: [runs-on,"runner=8cpu-linux-${{ matrix.runner }}","image=ubuntu24-full-${{ matrix.runner }}","run-id=${{ github.run_id }}",spot=false]
needs: group_targets
permissions:
contents: read
packages: read
strategy:
matrix: ${{ fromJson(needs.group_targets.outputs.matrix) }}
fail-fast: false
@@ -102,6 +148,7 @@ jobs:
- uses: runs-on/action@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
fetch-depth: 0
- name: Git ownership workaround
@@ -163,12 +210,21 @@ jobs:
path: ~/.ccache
key: ${{ steps.cc_restore.outputs.cache-primary-key }}
# ===========================================================================
# ARTIFACT UPLOAD JOB
# ===========================================================================
# Uploads build artifacts to S3 and creates GitHub Releases.
# Runs for version tags (v*), main, stable, and beta branch pushes.
# See header comments for full upload logic documentation.
# ===========================================================================
artifacts:
name: Upload Artifacts
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
needs: [setup, group_targets]
if: startsWith(github.ref, 'refs/tags/v') || contains(fromJSON('["main","stable","beta"]'), needs.group_targets.outputs.branchname)
permissions:
contents: write
outputs:
uploadlocation: ${{ steps.upload-location.outputs.uploadlocation }}
steps:
@@ -181,31 +237,31 @@ jobs:
- name: Choose Upload Location
id: upload-location
run: |
# Determine upload location based on branch or tag with the following considerations:
# Destination: AWS S3 bucket px4-travis in folder Firmware/
# - If branch is main -> upload to master/
# - Older versions of QGC are hardocded to look for master/
# - If branch is stable or beta -> upload to stable/ or beta/
# - If a tag vX.Y.Z -> upload to vX.Y.Z/
# - Also update stable/ to point to the same version
#. - Older versions of QGC are hardocded to look for stable/
# - If a pull request -> do not upload
set -euo pipefail
ref="${GITHUB_REF}"
branch=${{ needs.group_targets.outputs.branchname }}
location="$branch"
is_prerelease="false"
# Main branch uploads to "master" for QGC backward compatibility
if [[ "$branch" == "main" ]]; then
location="master"
fi
# Version tags: upload to versioned directory (e.g., v1.16.1/)
if [[ "$ref" == refs/tags/v[0-9]* ]]; then
tag="${ref#refs/tags/}"
location="$tag"
# Pre-release tags contain -alpha, -beta, or -rc suffix
if [[ "$tag" =~ -(alpha|beta|rc) ]]; then
is_prerelease="true"
fi
fi
echo "uploadlocation=$location" >> $GITHUB_OUTPUT
echo "is_prerelease=$is_prerelease" >> $GITHUB_OUTPUT
- name: Uploading Artifacts to S3 [${{ steps.upload-location.outputs.uploadlocation }}]
uses: jakejarvis/s3-sync-action@master
@@ -219,28 +275,13 @@ jobs:
SOURCE_DIR: artifacts/
DEST_DIR: Firmware/${{ steps.upload-location.outputs.uploadlocation }}/
# if we are uploading artifacts to a versioned folder
# we should also update the stable folder in the s3 bucket
- name: Uploading Artifacts to S3 [stable]
uses: jakejarvis/s3-sync-action@master
if: startsWith(github.ref, 'refs/tags/v')
with:
args: --acl public-read
env:
AWS_S3_BUCKET: 'px4-travis'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: artifacts/
DEST_DIR: Firmware/stable/
# if build is a release triggered by a versioned tag then create a github release
# and upload the build artifacts. A draft release is created so that the release
# can be reviewed before publishing
# Create a draft GitHub Release for all version tags
# Pre-releases are automatically marked as such
- name: Upload Artifacts to GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
prerelease: ${{ steps.upload-location.outputs.is_prerelease == 'true' }}
files: artifacts/*.px4
name: ${{ steps.upload-location.outputs.uploadlocation }}
-59
View File
@@ -1,59 +0,0 @@
name: Checks
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
check: [
"check_format",
"check_newlines",
"tests",
"tests_coverage",
"px4_fmu-v2_default stack_check",
"validate_module_configs",
"shellcheck_all",
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
"NO_NINJA_BUILD=1 px4_sitl_default",
"px4_sitl_allyes",
"module_documentation",
]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Building [${{ matrix.check }}]
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
git config --global --add safe.directory /workspace
make ${{ matrix.check }}
- name: Uploading Coverage to Codecov.io
if: contains(matrix.check, 'coverage')
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
file: coverage/lcov.info
File diff suppressed because it is too large Load Diff
+41
View File
@@ -0,0 +1,41 @@
name: Simple CI (Fork-Friendly)
# Forks: This is a lightweight CI workflow for forks that don't need
# the full orchestrator pipeline. It builds PX4 SITL + one hardware
# target and runs unit tests + format checks.
#
# To use: rename this file from ci-simple.yml.example to ci-simple.yml
# and enable GitHub Actions in your fork settings.
# To customize: adjust the 'make' target or container image tag below.
on:
push:
branches: ['**']
pull_request:
branches: ['**']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
quick-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/px4/px4-dev:v1.17.0-beta1
steps:
- name: Configure git
run: git config --system --add safe.directory '*'
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Quick Check (SITL + FMUv5 + tests + format)
run: make quick_check
env:
RUNS_IN_DOCKER: true
-30
View File
@@ -1,30 +0,0 @@
name: Clang Tidy
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Testing (clang-tidy)
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev-clang:2021-09-08
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
git config --global --add safe.directory /workspace
make clang-tidy
-67
View File
@@ -1,67 +0,0 @@
name: MacOS build
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
config: [
px4_fmu-v5_default,
px4_sitl
]
steps:
- name: install Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/checkout@v4
- name: setup
run: |
./Tools/setup/macos.sh
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
file(APPEND "$ENV{GITHUB_OUTPUT}" "timestamp=${current_date}\n")
- name: ccache cache files
uses: actions/cache@v4
with:
path: ~/.ccache
key: macos_${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: macos_${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 40M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: make ${{matrix.config}}
run: |
ccache -z
make ${{matrix.config}}
ccache -s
-57
View File
@@ -1,57 +0,0 @@
name: Ubuntu environment build
on:
push:
branches:
- 'main'
- 'stable'
- 'beta'
- 'release/**'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
env:
RUNS_IN_DOCKER: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
name: Build and Test
strategy:
fail-fast: false
matrix:
version: ['ubuntu:22.04', 'ubuntu:24.04']
runs-on: [runs-on,runner=4cpu-linux-x64,"image=ubuntu24-full-x64","run-id=${{ github.run_id }}",spot=false]
container:
image: ${{ matrix.version }}
volumes:
- /github/workspace:/github/workspace
steps:
- name: Fix git in container
run: |
# we only need this because we are running the job in a container
# when checkout pulls git it does it in a shared volume
# and file ownership changes between steps
# first we install git since its missing from the base image
# then we mark the directory as safe for other instances
# of git to use.
apt update && apt install git -y
git config --global --add safe.directory $(realpath .)
- uses: actions/checkout@v4
- name: Install Deps, Build, and Make Quick Check
run: |
# we need to install dependencies and build on the same step
# given the stateless nature of docker images
./Tools/setup/ubuntu.sh
make quick_check
@@ -1,35 +0,0 @@
name: EKF Change Indicator
on:
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
# If two events are triggered within a short time in the same PR, cancel the run of the oldest event
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: main test
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
git config --global --add safe.directory /workspace
make tests TESTFILTER=EKF
- name: Check if there is a functional change
run: git diff --exit-code
working-directory: src/modules/ekf2/test/change_indication
@@ -1,47 +0,0 @@
name: EKF Update Change Indicator
on:
push:
paths-ignore:
- 'docs/**'
jobs:
unit_tests:
runs-on: ubuntu-latest
env:
GIT_COMMITTER_EMAIL: bot@px4.io
GIT_COMMITTER_NAME: PX4BuildBot
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: main test
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
git config --global --add safe.directory /workspace
make tests TESTFILTER=EKF
- name: Check if there exists diff and save result in variable
id: diff-check
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_OUTPUT
working-directory: src/modules/ekf2/test/change_indication
- name: auto-commit any changes to change indication
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: 'src/modules/ekf2/test/change_indication/*.csv'
commit_user_name: ${GIT_COMMITTER_NAME}
commit_user_email: ${GIT_COMMITTER_EMAIL}
commit_message: |
'[AUTO COMMIT] update change indication'
See .github/workflopws/ekf_update_change_indicator.yml for more details
- name: if there is a functional change, fail check
if: ${{ steps.diff-check.outputs.CHANGE_INDICATED }}
run: exit 1
-58
View File
@@ -1,58 +0,0 @@
name: Failsafe Simulator Build
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
check: [
"failsafe_web",
]
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- name: Install Node v20.18.0
uses: actions/setup-node@v4
with:
node-version: 20.18.0
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git ownership workaround
run: git config --system --add safe.directory '*'
- name: Install empscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk
cd _emscripten_sdk
git checkout 4.0.15
./emsdk install latest
./emsdk activate latest
- name: Testing [${{ matrix.check }}]
run: |
. ./_emscripten_sdk/emsdk_env.sh
make ${{ matrix.check }}
-154
View File
@@ -1,154 +0,0 @@
name: FLASH usage analysis
permissions:
contents: read
pull-requests: write
issues: write
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
env:
MIN_FLASH_POS_DIFF_FOR_COMMENT: 50
MIN_FLASH_NEG_DIFF_FOR_COMMENT: -50
jobs:
analyze_flash:
name: Analyzing ${{ matrix.target }}
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
strategy:
matrix:
target: [px4_fmu-v5x, px4_fmu-v6x]
outputs:
px4_fmu-v5x-bloaty-output: ${{ steps.gen-output.outputs.px4_fmu-v5x-bloaty-output }}
px4_fmu-v5x-bloaty-summary-map: ${{ steps.gen-output.outputs.px4_fmu-v5x-bloaty-summary-map }}
px4_fmu-v6x-bloaty-output: ${{ steps.gen-output.outputs.px4_fmu-v6x-bloaty-output }}
px4_fmu-v6x-bloaty-summary-map: ${{ steps.gen-output.outputs.px4_fmu-v6x-bloaty-summary-map }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Git ownership workaround
run: git config --system --add safe.directory '*'
- name: Build Target
run: make ${{ matrix.target }}_flash-analysis
- name: Store the ELF with the change
run: cp ./build/**/*.elf ./with-change.elf
- name: Clean previous build
run: |
make clean
make distclean
make submodulesclean
- name: If it's a PR checkout the base branch
if: ${{ github.event.pull_request }}
# As checkout creates a merge commit (merging the base branch into the PR branch), the base branch is the base for a diff of the PR changes.
run: git checkout ${{ github.event.pull_request.base.ref }}
- name: If it's a push checkout the previous commit
if: github.event_name == 'push'
run: git checkout ${{ github.event.before }}
- name: Update submodules
run: make submodulesupdate
- name: Build
run: make ${{ matrix.target }}_flash-analysis
- name: Store the ELF before the change
run: cp ./build/**/*.elf ./before-change.elf
- name: bloaty-action
uses: PX4/bloaty-action@v1.0.0
id: bloaty-step
with:
bloaty-file-args: ./with-change.elf -- ./before-change.elf
bloaty-additional-args: -d sections,symbols -s vm -n 20
output-to-summary: true
- name: Generate output
id: gen-output
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "${{ matrix.target }}-bloaty-output<<$EOF" >> $GITHUB_OUTPUT
echo "${{ steps.bloaty-step.outputs.bloaty-output-encoded }}" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
echo "${{ matrix.target }}-bloaty-summary-map<<$EOF" >> $GITHUB_OUTPUT
echo '${{ steps.bloaty-step.outputs.bloaty-summary-map }}' >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
# TODO:
# This part of the workflow is causing errors for forks. We should find a way to fix this and enable it again for forks.
# Track this issue https://github.com/PX4/PX4-Autopilot/issues/24408
post_pr_comment:
name: Publish Results
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}"]
needs: [analyze_flash]
env:
V5X-SUMMARY-MAP-ABS: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-summary-map).vm-absolute) }}
V5X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-summary-map).vm-percentage) }}
V6X-SUMMARY-MAP-ABS: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-absolute) }}
V6X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-percentage) }}
if: github.event.pull_request && github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Find Comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: FLASH Analysis
- name: Set Build Time
id: bt
run: |
echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT
- name: Create or update comment
# This can't be moved to the job-level conditions, as GH actions don't allow a job-level if condition to access the env.
if: |
steps.fc.outputs.comment-id != '' ||
env.V5X-SUMMARY-MAP-ABS >= fromJSON(env.MIN_FLASH_POS_DIFF_FOR_COMMENT) ||
env.V5X-SUMMARY-MAP-ABS <= fromJSON(env.MIN_FLASH_NEG_DIFF_FOR_COMMENT) ||
env.V6X-SUMMARY-MAP-ABS >= fromJSON(env.MIN_FLASH_POS_DIFF_FOR_COMMENT) ||
env.V6X-SUMMARY-MAP-ABS <= fromJSON(env.MIN_FLASH_NEG_DIFF_FOR_COMMENT)
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## 🔎 FLASH Analysis
<details>
<summary>px4_fmu-v5x [Total VM Diff: ${{ env.V5X-SUMMARY-MAP-ABS }} byte (${{ env.V5X-SUMMARY-MAP-PERC}} %)]</summary>
```
${{ needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-output }}
```
</details>
<details>
<summary>px4_fmu-v6x [Total VM Diff: ${{ env.V6X-SUMMARY-MAP-ABS }} byte (${{ env.V6X-SUMMARY-MAP-PERC }} %)]</summary>
```
${{ needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-output }}
```
</details>
**Updated: _${{ steps.bt.outputs.timestamp }}_**
edit-mode: replace
-67
View File
@@ -1,67 +0,0 @@
name: ITCM check
permissions:
contents: read
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_itcm:
name: Checking ${{ matrix.target }}
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
strategy:
fail-fast: false
matrix:
include:
- target: px4_fmu-v5x
scripts: >
boards/px4/fmu-v5x/nuttx-config/scripts/itcm_gen_functions.ld
boards/px4/fmu-v5x/nuttx-config/scripts/itcm_static_functions.ld
- target: px4_fmu-v6xrt
scripts: >
boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_functions_includes.ld
boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_static_functions.ld
- target: nxp_tropic-community
scripts: >
boards/nxp/tropic-community/nuttx-config/scripts/itcm_functions_includes.ld
boards/nxp/tropic-community/nuttx-config/scripts/itcm_static_functions.ld
- target: nxp_mr-tropic
scripts: >
boards/nxp/mr-tropic/nuttx-config/scripts/itcm_functions_includes.ld
boards/nxp/mr-tropic/nuttx-config/scripts/itcm_static_functions.ld
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Git ownership workaround
run: git config --system --add safe.directory '*'
- name: Build Target
run: make ${{ matrix.target }}
- name: Copy built ELF
run: cp ./build/**/*.elf ./built.elf
- name: Install itcm-check dependencies
run: pip3 install -r Tools/setup/optional-requirements.txt --break-system-packages
- name: Execute the itcm-check
run: python3 Tools/itcm_check.py --elf-file built.elf --script-files ${{ matrix.scripts }}
@@ -1,43 +0,0 @@
name: MAVROS Mission Tests
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {vehicle: "iris", mission: "MC_mission_box"}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build SITL and Run Tests
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev-ros-melodic:2021-09-08
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
git config --global --add safe.directory /workspace
make px4_sitl_default
make px4_sitl_default sitl_gazebo-classic
./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}}
@@ -1,45 +0,0 @@
name: MAVROS Offboard Tests
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
fail-fast: false
matrix:
config:
- {test_file: "mavros_posix_tests_offboard_posctl.test", vehicle: "iris"}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build PX4 and Run Tests
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev-ros-melodic:2021-09-08
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
git config --global --add safe.directory /workspace
make px4_sitl_default
make px4_sitl_default sitl_gazebo-classic
./test/rostest_px4_run.sh ${{matrix.config.test_file}} vehicle:=${{matrix.config.vehicle}}
-45
View File
@@ -1,45 +0,0 @@
name: Nuttx Target with extra env config
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
config: [
px4_fmu-v5_default,
]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build PX4 and Run Test [${{ matrix.config }}]
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
git config --global --add safe.directory /workspace
export PX4_EXTRA_NUTTX_CONFIG="CONFIG_NSH_LOGIN_PASSWORD=\"test\";CONFIG_NSH_CONSOLE_LOGIN=y"
echo "PX4_EXTRA_NUTTX_CONFIG: $PX4_EXTRA_NUTTX_CONFIG"
make ${{ matrix.config }} nuttx_context
echo "Check that the config option is set"
grep CONFIG_NSH_LOGIN_PASSWORD build/${{ matrix.config }}/NuttX/nuttx/.config
-33
View File
@@ -1,33 +0,0 @@
name: Python CI Checks
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python3
run: sudo apt-get install python3 python3-setuptools python3-pip -y
- name: Install tools
run: python3 -m pip install mypy types-requests flake8 --break-system-packages
- name: Check MAVSDK test scripts with mypy
run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py
- name: Check MAVSDK test scripts with flake8
run: $HOME/.local/bin/flake8 test/mavsdk_tests/*.py
-134
View File
@@ -1,134 +0,0 @@
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
# and comment the "runs-on: [runs-on,runner=..." lines.
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
name: ROS Integration Tests
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
container:
image: px4io/px4-dev-ros2-galactic:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git Ownership Workaround
run: git config --system --add safe.directory '*'
- name: Update ROS Keys
run: |
sudo rm /etc/apt/sources.list.d/ros2.list && \
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
- name: Install gazebo
run: |
apt update && apt install -y gazebo11 libgazebo11-dev gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly libgstreamer-plugins-base1.0-dev
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v4
with:
path: ~/.ccache
key: ros_integration_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ros_integration_tests-${{matrix.config.build_type}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 300M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: Get and build micro-xrce-dds-agent
run: |
cd /opt
git clone --recursive https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
cd Micro-XRCE-DDS-Agent
git checkout v2.2.1 # recent versions require cmake 3.22, but px4-dev-ros2-galactic:2021-09-08 is on 3.16
sed -i 's/_fastdds_tag 2.8.x/_fastdds_tag 2.8.2/g' CMakeLists.txt
mkdir build
cd build
cmake ..
make -j2
- name: ccache post-run micro-xrce-dds-agent
run: ccache -s
- name: Get and build the ros2 interface library
shell: bash
run: |
PX4_DIR="$(pwd)"
. /opt/ros/galactic/setup.bash
mkdir -p /opt/px4_ws/src
cd /opt/px4_ws/src
git clone --recursive https://github.com/Auterion/px4-ros2-interface-lib.git
# Ignore python packages due to compilation issue (can be enabled when updating ROS)
touch px4-ros2-interface-lib/px4_ros2_py/COLCON_IGNORE || true
touch px4-ros2-interface-lib/examples/python/COLCON_IGNORE || true
cd ..
# Copy messages to ROS workspace
"${PX4_DIR}/Tools/copy_to_ros_ws.sh" "$(pwd)"
rm -rf src/translation_node src/px4_msgs_old
colcon build --symlink-install
- name: ccache post-run ros workspace
run: ccache -s
- name: Build PX4
run: make px4_sitl_default
- name: ccache post-run px4/firmware
run: ccache -s
- name: Build SITL Gazebo
run: make px4_sitl_default sitl_gazebo-classic
- name: ccache post-run sitl_gazebo-classic
run: ccache -s
- name: Core dump settings
run: |
ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
- name: Run tests
shell: bash
run: |
. /opt/px4_ws/install/setup.bash
/opt/Micro-XRCE-DDS-Agent/build/MicroXRCEAgent udp4 localhost -p 8888 -v 0 &
test/ros_test_runner.py --verbose --model iris --upload --force-color
timeout-minutes: 45
- name: Upload failed logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: failed-logs.zip
path: |
logs/**/**/**/*.log
logs/**/**/**/*.ulg
build/px4_sitl_default/tmp_ros_tests/rootfs/log/**/*.ulg
@@ -1,61 +0,0 @@
name: ROS Translation Node Tests
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
name: Build and test
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
strategy:
fail-fast: false
matrix:
config:
- {ros_version: "humble", ubuntu: "jammy"}
- {ros_version: "jazzy", ubuntu: "noble"}
container:
image: rostooling/setup-ros-docker:ubuntu-${{ matrix.config.ubuntu }}-latest
steps:
- name: Setup ROS 2 (${{ matrix.config.ros_version }})
uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: ${{ matrix.config.ros_version }}
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# Workaround for https://github.com/actions/runner/issues/2033
- name: ownership workaround
run: git config --system --add safe.directory '*'
- name: Check .msg file versioning
if: github.event_name == 'pull_request'
run: |
./Tools/ci/check_msg_versioning.sh ${{ github.event.pull_request.base.sha }} ${{github.event.pull_request.head.sha}}
- name: Build and test
run: |
ros_ws=/ros_ws
mkdir -p $ros_ws/src
./Tools/copy_to_ros_ws.sh $ros_ws
cd $ros_ws
source /opt/ros/${{ matrix.config.ros_version }}/setup.sh
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install --event-handlers=console_cohesion+
source ./install/setup.sh
./build/translation_node/translation_node_unit_tests
-161
View File
@@ -1,161 +0,0 @@
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
# and comment the "runs-on: [runs-on,runner=..." lines.
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
name: SITL Tests
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Testing PX4 ${{ matrix.config.model }}
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
container:
image: px4io/px4-dev-simulation-focal:2021-09-08
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
strategy:
fail-fast: false
matrix:
config:
- {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska
- {model: "tailsitter" , latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo" } # Florida
- {model: "standard_vtol", latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage" } # Zurich
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git Ownership Workaround
run: git config --system --add safe.directory '*'
- id: set-timestamp
name: Set timestamp for cache
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
- name: Cache Key Config
uses: actions/cache@v4
with:
path: ~/.ccache
key: sitl-ccache-${{ steps.set-timestamp.outputs.timestamp }}
restore-keys: sitl-ccache-${{ steps.set-timestamp.outputs.timestamp }}
- name: Cache Conf Config
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 120M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: Build PX4
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: make px4_sitl_default
- name: Cache Post-Run [px4_sitl_default]
run: ccache -s
- name: Build SITL Gazebo
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: make px4_sitl_default sitl_gazebo-classic
- name: Cache Post-Run [sitl_gazebo-classic]
run: ccache -s
- name: Download MAVSDK
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Install MAVSDK
run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
- name: Check PX4 Environment Variables
env:
PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: |
export
ulimit -a
- name: Build PX4 / MAVSDK tests
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
DONT_RUN: 1
run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests
- name: Cache Post-Run [px4_sitl_default sitl_gazebo-classic mavsdk_tests]
run: ccache -s
- name: Core Dump Settings
run: |
ulimit -c unlimited
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
- name: Run SITL / MAVSDK Tests
env:
PX4_HOME_LAT: ${{matrix.config.latitude}}
PX4_HOME_LON: ${{matrix.config.longitude}}
PX4_HOME_ALT: ${{matrix.config.altitude}}
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 10 --abort-early --model ${{matrix.config.model}} test/mavsdk_tests/configs/sitl.json --verbose --force-color
timeout-minutes: 45
- name: Upload failed logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: failed-${{matrix.config.model}}-logs.zip
path: |
logs/**/**/**/*.log
logs/**/**/**/*.ulg
build/px4_sitl_default/tmp_mavsdk_tests/rootfs/log/**/*.ulg
- name: Look at Core files
if: failure() && ${{ hashFiles('px4.core') != '' }}
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload PX4 coredump
if: failure() && ${{ hashFiles('px4.core') != '' }}
uses: actions/upload-artifact@v4
with:
name: coredump
path: px4.core
- name: Setup & Generate Coverage Report
if: contains(matrix.config.build_type, 'Coverage')
run: |
git config --global credential.helper "" # disable the keychain credential helper
git config --global --add credential.helper store # enable the local store credential helper
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
mkdir -p coverage
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
- name: Upload Coverage Information to Codecov
if: contains(matrix.config.build_type, 'Coverage')
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: mavsdk
file: coverage/lcov.info
+19 -3
View File
@@ -412,7 +412,7 @@ tests:
$(call cmake-build,px4_sitl_test)
# work around lcov bug #316; remove once lcov is fixed (see https://github.com/linux-test-project/lcov/issues/316)
LCOBUG = --ignore-errors mismatch
LCOBUG = --ignore-errors mismatch,negative
tests_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory tests PX4_CMAKE_BUILD_TYPE=Coverage
@@ -492,13 +492,29 @@ px4_sitl_default-clang:
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/px4_sitl_default-clang
# Paths to exclude from clang-tidy (auto-generated from .gitmodules + manual additions):
# - All submodules (external code we consume, not edit)
# - Test code (allowed looser style)
# - Example code (educational, not production)
# - Vendored third-party code (e.g., CMSIS_5)
# - NuttX-only drivers excluded at CMake level (mcp_common); I2C-dependent libs excluded here (smbus)
# - GPIO excluded here (NuttX platform headers)
# - Emscripten failsafe web build: source path + Unity build path (failsafe_test.dir)
# because CMake Unity Builds merge sources into a generated .cxx under build/
#
# To add manual exclusions, append to CLANG_TIDY_EXCLUDE_EXTRA below.
# Submodules are automatically excluded - no action needed when adding new ones.
CLANG_TIDY_SUBMODULES := $(shell git config --file .gitmodules --get-regexp path | awk '{print $$2}' | tr '\n' '|' | sed 's/|$$//')
CLANG_TIDY_EXCLUDE_EXTRA := src/systemcmds/tests|src/examples|src/modules/gyro_fft/CMSIS_5|src/lib/drivers/smbus|src/drivers/gpio|src/modules/commander/failsafe/emscripten|failsafe_test\.dir|\.pb\.cc
CLANG_TIDY_EXCLUDE := $(CLANG_TIDY_SUBMODULES)|$(CLANG_TIDY_EXCLUDE_EXTRA)
clang-tidy: px4_sitl_default-clang
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j_clang_tidy) -p .
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j_clang_tidy) -exclude="$(CLANG_TIDY_EXCLUDE)" -p .
# to automatically fix a single check at a time, eg modernize-redundant-void-arg
# % run-clang-tidy-4.0.py -fix -j4 -checks=-\*,modernize-redundant-void-arg -p .
clang-tidy-fix: px4_sitl_default-clang
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j_clang_tidy) -fix -p .
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j_clang_tidy) -exclude="$(CLANG_TIDY_EXCLUDE)" -fix -p .
# TODO: Fix cppcheck errors then try --enable=warning,performance,portability,style,unusedFunction or --enable=all
cppcheck: px4_sitl_default
@@ -101,6 +101,7 @@ param set-default NAV_ACC_RAD 5
param set-default NAV_DLL_ACT 2
param set-default VT_FWD_THRUST_EN 4
param set-default VT_PITCH_MIN -5
param set-default VT_F_TRANS_THR 1
param set-default VT_TYPE 2
param set-default FD_ESCS_EN 0
@@ -22,6 +22,9 @@
. ${R}etc/init.d/rc.uuv_defaults
# Overwrite DDS AG IP to `192.168.0.1`
param set-default UXRCE_DDS_AG_IP -1062731775
# param set-default MAV_1_CONFIG 102
param set-default BAT1_A_PER_V 37.8798
@@ -10,9 +10,6 @@ set VEHICLE_TYPE uuv
# MAV_TYPE_SUBMARINE 12
param set-default MAV_TYPE 12
# Set micro-dds-client to use ethernet and IP-address 192.168.0.1
param set-default UXRCE_DDS_AG_IP -1062731775
# Disable preflight disarm to not interfere with external launching
param set-default COM_DISARM_PRFLT -1
param set-default CBRK_SUPPLY_CHK 894281
+147
View File
@@ -0,0 +1,147 @@
#!/usr/bin/env python3
"""
Run clang-tidy incrementally on files changed in a PR.
Usage: run-clang-tidy-pr.py <base-ref>
base-ref: e.g. origin/main
Computes the set of translation units (TUs) affected by the PR diff,
then invokes Tools/run-clang-tidy.py on that subset only.
Exits 0 silently when no C++ files were changed.
"""
import argparse
import json
import os
import subprocess
import sys
EXTENSIONS_CPP = {'.cpp', '.c'}
EXTENSIONS_HDR = {'.hpp', '.h'}
# Manual exclusions from Makefile:508
EXCLUDE_EXTRA = '|'.join([
'src/systemcmds/tests',
'src/examples',
'src/modules/gyro_fft/CMSIS_5',
'src/lib/drivers/smbus',
'src/drivers/gpio',
r'src/modules/commander/failsafe/emscripten',
r'failsafe_test\.dir',
])
def repo_root():
try:
return subprocess.check_output(
['git', 'rev-parse', '--show-toplevel'], text=True).strip()
except subprocess.CalledProcessError:
print('error: not inside a git repository', file=sys.stderr)
sys.exit(1)
def changed_files(base_ref, root):
try:
out = subprocess.check_output(
['git', 'diff', '--name-only', f'{base_ref}...HEAD',
'--', '*.cpp', '*.hpp', '*.h', '*.c'],
text=True, cwd=root).strip()
return out.splitlines() if out else []
except subprocess.CalledProcessError:
print(f'error: could not diff against "{base_ref}"'
'is the ref valid and fetched?', file=sys.stderr)
sys.exit(1)
def submodule_paths(root):
# Returns [] if .gitmodules is absent or has no paths — both valid
try:
out = subprocess.check_output(
['git', 'config', '--file', '.gitmodules',
'--get-regexp', 'path'],
text=True, cwd=root).strip()
return [line.split()[1] for line in out.splitlines()]
except subprocess.CalledProcessError:
return []
def build_exclude(root):
submodules = '|'.join(submodule_paths(root))
return f'{submodules}|{EXCLUDE_EXTRA}' if submodules else EXCLUDE_EXTRA
def load_db(build_dir):
db_path = os.path.join(build_dir, 'compile_commands.json')
if not os.path.isfile(db_path):
print(f'error: {db_path} not found', file=sys.stderr)
print('Run "make px4_sitl_default-clang" first to generate '
'the compilation database', file=sys.stderr)
sys.exit(1)
try:
with open(db_path) as f:
return json.load(f)
except json.JSONDecodeError as e:
print(f'error: compile_commands.json is malformed: {e}', file=sys.stderr)
sys.exit(1)
def find_tus(changed, db, root):
db_files = {e['file'] for e in db}
result = set()
for f in changed:
abs_path = os.path.join(root, f)
ext = os.path.splitext(f)[1]
if ext in EXTENSIONS_CPP:
if abs_path in db_files:
result.add(abs_path)
elif ext in EXTENSIONS_HDR:
hdr = os.path.basename(f)
for e in db:
try:
if hdr in open(e['file']).read():
result.add(e['file'])
except OSError:
pass # file deleted in PR — skip
return sorted(result)
def main():
parser = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('base_ref',
help='Git ref to diff against, e.g. origin/main')
args = parser.parse_args()
root = repo_root()
build_dir = os.path.join(root, 'build', 'px4_sitl_default-clang')
run_tidy = os.path.join(root, 'Tools', 'run-clang-tidy.py')
if not os.path.isfile(run_tidy):
print(f'error: {run_tidy} not found', file=sys.stderr)
sys.exit(1)
changed = changed_files(args.base_ref, root)
if not changed:
print('No C++ files changed — skipping clang-tidy')
sys.exit(0)
db = load_db(build_dir)
tus = find_tus(changed, db, root)
if not tus:
print('No matching TUs in compile_commands.json — skipping clang-tidy')
sys.exit(0)
print(f'Running clang-tidy on {len(tus)} translation unit(s)')
result = subprocess.run(
[sys.executable, run_tidy,
'-header-filter=.*\\.hpp',
'-j0',
f'-exclude={build_exclude(root)}',
'-p', build_dir] + tus
)
sys.exit(result.returncode)
if __name__ == '__main__':
main()
+4 -24
View File
@@ -1,47 +1,27 @@
#! /bin/bash
if [ -z ${PX4_DOCKER_REPO+x} ]; then
echo "guessing PX4_DOCKER_REPO based on input";
if [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
# clang tools
PX4_DOCKER_REPO="px4io/px4-dev-clang:2021-02-04"
elif [[ $@ =~ .*tests* ]]; then
# run all tests with simulation
PX4_DOCKER_REPO="px4io/px4-dev-simulation-bionic:2021-12-11"
fi
PX4_DOCKER_REPO="px4io/px4-dev:v1.17.0-beta1"
else
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
fi
# otherwise default to nuttx
if [ -z ${PX4_DOCKER_REPO+x} ]; then
PX4_DOCKER_REPO="px4io/px4-dev:v1.16.0-rc1-258-g0369abd556"
fi
echo "PX4_DOCKER_REPO: $PX4_DOCKER_REPO";
PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
SRC_DIR=$PWD/../
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
SRC_DIR=${SCRIPT_DIR}/../
CCACHE_DIR=${HOME}/.ccache
mkdir -p "${CCACHE_DIR}"
docker run -it --rm -w "${SRC_DIR}" \
--user="$(id -u):$(id -g)" \
--env=AWS_ACCESS_KEY_ID \
--env=AWS_SECRET_ACCESS_KEY \
--env=BRANCH_NAME \
--env=CCACHE_DIR="${CCACHE_DIR}" \
--env=CI \
--env=CODECOV_TOKEN \
--env=COVERALLS_REPO_TOKEN \
--env=PX4_ASAN \
--env=PX4_MSAN \
--env=PX4_TSAN \
--env=PX4_UBSAN \
--env=TRAVIS_BRANCH \
--env=TRAVIS_BUILD_ID \
--publish 14556:14556/udp \
--volume=${CCACHE_DIR}:${CCACHE_DIR}:rw \
--volume=${SRC_DIR}:${SRC_DIR}:rw \
${PX4_DOCKER_REPO} /bin/bash -c "$1 $2 $3"
${PX4_DOCKER_REPO} /bin/bash -c "$@"
+5
View File
@@ -144,6 +144,8 @@ def main():
help='number of tidy instances to be run in parallel.')
parser.add_argument('files', nargs='*', default=['.*'],
help='files to be processed (regex on path)')
parser.add_argument('-exclude', dest='exclude', default=None,
help='regular expression matching files to exclude')
parser.add_argument('-fix', action='store_true', help='apply fix-its')
parser.add_argument('-format', action='store_true', help='Reformat code '
'after applying fixes')
@@ -192,6 +194,7 @@ def main():
# Build up a big regexy filter from all command line arguments.
file_name_re = re.compile('(' + ')|('.join(args.files) + ')')
exclude_re = re.compile(args.exclude) if args.exclude else None
try:
# Spin up a bunch of tidy-launching threads.
@@ -205,6 +208,8 @@ def main():
# Fill the queue with files.
for name in files:
if file_name_re.search(name):
if exclude_re and exclude_re.search(name):
continue
queue.put(name)
# Wait for all threads to be done.
+1 -3
View File
@@ -4,7 +4,7 @@ GREEN='\033[0;32m'
NO_COLOR='\033[0m' # No Color
SCRIPTID="${GREEN}[docker-entrypoint.sh]${NO_COLOR}"
echo -e "$SCRIPTID Starting"
echo -e "$SCRIPTID $( uname -m ) | $(date -u +%FT%TZ)"
# Start virtual X server in the background
# - DISPLAY default is :99, set in dockerfile
@@ -22,6 +22,4 @@ if [ -n "${ROS_DISTRO}" ]; then
source "/opt/ros/$ROS_DISTRO/setup.bash"
fi
echo -e "$SCRIPTID ($( uname -m ))"
exec "$@"
+1 -1
View File
@@ -74,7 +74,7 @@ python3 -m pip install --user -r ${DIR}/requirements.txt
# Optional, but recommended additional simulation tools:
if [[ $INSTALL_SIM == "--sim-tools" ]]; then
if brew ls --versions px4-sim > /dev/null; then
if ! brew ls --versions px4-sim > /dev/null; then
brew install px4-sim
elif [[ $REINSTALL_FORMULAS == "--reinstall" ]]; then
brew reinstall px4-sim
+12 -31
View File
@@ -6,9 +6,9 @@ set -e
## Can also be used in docker.
##
## Installs:
## - Common dependencies and tools for nuttx, jMAVSim, Gazebo
## - Common dependencies and tools for nuttx, Gazebo
## - NuttX toolchain (omit with arg: --no-nuttx)
## - jMAVSim and Gazebo9 simulator (omit with arg: --no-sim-tools)
## - Gazebo Harmonic simulator (omit with arg: --no-sim-tools)
##
INSTALL_NUTTX="true"
@@ -207,37 +207,18 @@ if [[ $INSTALL_SIM == "true" ]]; then
bc \
;
# Gazebo / Gazebo classic installation
if [[ "${UBUNTU_RELEASE}" == "18.04" || "${UBUNTU_RELEASE}" == "20.04" ]]; then
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
# Update list, since new gazebo-stable.list has been added
sudo apt-get update -y --quiet
# Gazebo Harmonic installation (Ubuntu 22.04+)
echo "[ubuntu.sh] Gazebo (Harmonic) will be installed"
# Add Gazebo binary repository
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt-get update -y --quiet
# Install Gazebo classic
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
gazebo_classic_version=9
gazebo_packages="gazebo$gazebo_classic_version libgazebo$gazebo_classic_version-dev"
else
# default and Ubuntu 20.04
gazebo_classic_version=11
gazebo_packages="gazebo$gazebo_classic_version libgazebo$gazebo_classic_version-dev"
fi
else
# Expects Ubuntu 22.04 > by default
echo "[ubuntu.sh] Gazebo (Harmonic) will be installed"
echo "[ubuntu.sh] Earlier versions will be removed"
# Add Gazebo binary repository
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt-get update -y --quiet
# Install Gazebo
gazebo_packages="gz-harmonic libunwind-dev"
# Install Gazebo
gazebo_packages="gz-harmonic libunwind-dev"
if [[ "${UBUNTU_RELEASE}" == "24.04" ]]; then
gazebo_packages="$gazebo_packages cppzmq-dev"
fi
if [[ "${UBUNTU_RELEASE}" == "24.04" ]]; then
gazebo_packages="$gazebo_packages cppzmq-dev"
fi
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
-17
View File
@@ -243,15 +243,6 @@
*/
#define DIRECT_PWM_OUTPUT_CHANNELS 9
#define GPIO_FMU_CH1 /* PI0 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN0)
#define GPIO_FMU_CH2 /* PH12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN12)
#define GPIO_FMU_CH3 /* PH11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN11)
#define GPIO_FMU_CH4 /* PH10 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN10)
#define GPIO_FMU_CH5 /* PD13 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN13)
#define GPIO_FMU_CH6 /* PD14 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN14)
#define GPIO_FMU_CH7 /* PH6 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN6)
#define GPIO_FMU_CH8 /* PH9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN9)
#define GPIO_FMU_CAP /* PE11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN11)
#define GPIO_SPIX_SYNC /* PE9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN9)
@@ -465,14 +456,6 @@
GPIO_SAFETY_SWITCH_IN, \
GPIO_PG6, \
GPIO_nARMED_INIT, \
GPIO_FMU_CH1, \
GPIO_FMU_CH2, \
GPIO_FMU_CH3, \
GPIO_FMU_CH4, \
GPIO_FMU_CH5, \
GPIO_FMU_CH6, \
GPIO_FMU_CH7, \
GPIO_FMU_CH8, \
GPIO_FMU_CAP, \
GPIO_SPIX_SYNC \
}
+5
View File
@@ -0,0 +1,5 @@
# CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE is not set
CONFIG_BOARD_CONSTRAINED_FLASH=y
CONFIG_BOARD_CONSTRAINED_MEMORY=y
CONFIG_MODULES_UXRCE_DDS_CLIENT=n
CONFIG_MODULES_ZENOH=y
+2
View File
@@ -26,6 +26,8 @@ then
fi
param set-default BAT1_V_DIV 21.0
param set-default BAT1_V_FILT 0.075
param set-default BAT1_I_FILT 0.5
param set-default RC_CRSF_PRT_CFG 300
param set-default RC_SBUS_PRT_CFG 0
-22
View File
@@ -176,9 +176,6 @@
#define BOARD_BATTERY1_V_DIV (21.0f) // (20k + 1k) / 1k = 21
#define BOARD_BATTERY_ADC_VOLTAGE_FILTER_S 0.075f
#define BOARD_BATTERY_ADC_CURRENT_FILTER_S 0.125f
#define ADC_SCALED_PAYLOAD_SENSE ADC_SCALED_12V_CHANNEL
/* HW has to large of R termination on ADC todo:change when HW value is chosen */
@@ -226,16 +223,6 @@
*/
#define DIRECT_PWM_OUTPUT_CHANNELS 9
#define GPIO_FMU_CH1 /* PI0 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN0)
#define GPIO_FMU_CH2 /* PH12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN12)
#define GPIO_FMU_CH3 /* PH11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN11)
#define GPIO_FMU_CH4 /* PH10 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN10)
#define GPIO_FMU_CH5 /* PI5 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN5)
#define GPIO_FMU_CH6 /* PI6 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN6)
#define GPIO_FMU_CH7 /* PI7 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN7)
#define GPIO_FMU_CH8 /* PI2 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN2)
#define GPIO_FMU_CH9 /* PD12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN12)
#define GPIO_SPIX_SYNC /* PE9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN9)
/* Power supply control and monitoring GPIOs */
@@ -339,15 +326,6 @@
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_nARMED_INIT, \
SPI6_nRESET_EXTERNAL1, \
GPIO_FMU_CH1, \
GPIO_FMU_CH2, \
GPIO_FMU_CH3, \
GPIO_FMU_CH4, \
GPIO_FMU_CH5, \
GPIO_FMU_CH6, \
GPIO_FMU_CH7, \
GPIO_FMU_CH8, \
GPIO_FMU_CH9, \
GPIO_SPIX_SYNC \
}
-17
View File
@@ -206,15 +206,6 @@
*/
#define DIRECT_PWM_OUTPUT_CHANNELS 8
#define GPIO_FMU_CH1 /* PI0 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN0)
#define GPIO_FMU_CH2 /* PH12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN12)
#define GPIO_FMU_CH3 /* PH11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN11)
#define GPIO_FMU_CH4 /* PH10 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN10)
#define GPIO_FMU_CH5 /* PD13 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN13)
#define GPIO_FMU_CH6 /* PD14 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN14)
#define GPIO_FMU_CH7 /* PH6 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN6)
#define GPIO_FMU_CH8 /* PH9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN9)
#define GPIO_FMU_CAP /* PE11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN11)
#define GPIO_SPIX_SYNC /* PE9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN9)
@@ -341,14 +332,6 @@
GPIO_NFC_GPIO, \
GPIO_TONE_ALARM_IDLE, \
GPIO_nARMED_INIT, \
GPIO_FMU_CH1, \
GPIO_FMU_CH2, \
GPIO_FMU_CH3, \
GPIO_FMU_CH4, \
GPIO_FMU_CH5, \
GPIO_FMU_CH6, \
GPIO_FMU_CH7, \
GPIO_FMU_CH8, \
GPIO_FMU_CAP, \
GPIO_SPIX_SYNC \
}
+2 -2
View File
@@ -66,15 +66,15 @@ then
fi
fi
iim42652 -R 6 -s -C 32768 start
bmi088 -A -R 4 -s start
bmi088 -G -R 4 -s start
iim42652 -R 6 -s -C 32768 start
icm45686 -R 2 -s start
rm3100 -I -b 4 start
icp201xx -I -a 0x64 start
bmp581 -b 2 -X -a 0x47 start
icp201xx -I -a 0x64 start
# External compass on GPS1/I2C1 (the 3rd external bus): standard Holybro Pixhawk 4 or CUAV V5 GPS/compass puck (with lights, safety button, and buzzer)
ist8310 -X -b 1 -R 10 start
+2 -2
View File
@@ -127,8 +127,8 @@
#define GPIO_VDD_5V_RC_EN /* PG5 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN5)
#define GPIO_VDD_3V3_SD_CARD_EN /* PG7 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN7)
#define GPIO_VDD_5V_HIPOWER_OC /* PJ3 */ (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTJ|GPIO_PIN3)
#define GPIO_nVDD_5V_PERIPH_OC /* PJ4 */ (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTJ|GPIO_PIN4)
#define GPIO_VDD_5V_HIPOWER_OC /* PJ3 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTJ|GPIO_PIN3)
#define GPIO_nVDD_5V_PERIPH_OC /* PJ4 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTJ|GPIO_PIN4)
/* Power switch controls ******************************************************/
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_nVDD_5V_PERIPH_EN, (on_true))
@@ -43,6 +43,8 @@
#include <drivers/drv_hrt.h>
#include <drivers/drv_io_heater.h>
ModuleBase::Descriptor Core_Heater::desc{task_spawn, custom_command, print_usage};
# ifndef GPIO_CORE_HEATER_OUTPUT
# error "To use the heater driver, the board_config.h must define and initialize GPIO_CORE_HEATER_OUTPUT"
# endif
@@ -62,7 +64,7 @@ Core_Heater::~Core_Heater()
int Core_Heater::custom_command(int argc, char *argv[])
{
// Check if the driver is running.
if (!is_running()) {
if (!is_running(desc)) {
PX4_INFO("not running");
return PX4_ERROR;
}
@@ -117,7 +119,7 @@ bool Core_Heater::initialize_topics()
void Core_Heater::Run()
{
if (should_exit()) {
exit_and_cleanup();
exit_and_cleanup(desc);
return;
}
@@ -216,8 +218,8 @@ int Core_Heater::task_spawn(int argc, char *argv[])
return PX4_ERROR;
}
_object.store(core_heater);
_task_id = task_id_is_work_queue;
desc.object.store(core_heater);
desc.task_id = task_id_is_work_queue;
core_heater->start();
return 0;
@@ -257,5 +259,5 @@ Background process running periodically on the LP work queue to regulate IMU tem
extern "C" __EXPORT int core_heater_main(int argc, char *argv[])
{
return Core_Heater::main(argc, argv);
return ModuleBase::main(Core_Heater::desc, argc, argv);
}
@@ -56,9 +56,11 @@ using namespace time_literals;
#define CONTROLLER_PERIOD_DEFAULT 10000
#define TEMPERATURE_TARGET_THRESHOLD 2.5f
class Core_Heater : public ModuleBase<Core_Heater>, public ModuleParams, public px4::ScheduledWorkItem
class Core_Heater : public ModuleBase, public ModuleParams, public px4::ScheduledWorkItem
{
public:
static Descriptor desc;
Core_Heater();
virtual ~Core_Heater();
@@ -33,6 +33,8 @@
#include "NavioRGBLed.hpp"
ModuleBase::Descriptor NavioRGBLed::desc{task_spawn, custom_command, print_usage};
NavioRGBLed::NavioRGBLed() :
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::lp_default)
{
@@ -130,8 +132,8 @@ int NavioRGBLed::task_spawn(int argc, char *argv[])
NavioRGBLed *instance = new NavioRGBLed();
if (instance) {
_object.store(instance);
_task_id = task_id_is_work_queue;
desc.object.store(instance);
desc.task_id = task_id_is_work_queue;
if (instance->init() == PX4_OK) {
return PX4_OK;
@@ -142,8 +144,8 @@ int NavioRGBLed::task_spawn(int argc, char *argv[])
}
delete instance;
_object.store(nullptr);
_task_id = -1;
desc.object.store(nullptr);
desc.task_id = -1;
return PX4_ERROR;
}
@@ -170,5 +172,5 @@ Emlid Navio2 RGB LED driver.
extern "C" __EXPORT int navio_rgbled_main(int argc, char *argv[])
{
return NavioRGBLed::main(argc, argv);
return ModuleBase::main(NavioRGBLed::desc, argc, argv);
}
@@ -40,9 +40,11 @@
#include <lib/led/led.h>
class NavioRGBLed : public ModuleBase<NavioRGBLed>, public px4::ScheduledWorkItem
class NavioRGBLed : public ModuleBase, public px4::ScheduledWorkItem
{
public:
static Descriptor desc;
NavioRGBLed();
~NavioRGBLed() override;
@@ -49,6 +49,8 @@
using namespace time_literals;
ModuleBase::Descriptor GhstRc::desc{task_spawn, custom_command, print_usage};
uint32_t GhstRc::baudrate = GHST_BAUDRATE;
GhstRc::GhstRc(const char *device) :
@@ -114,8 +116,8 @@ int GhstRc::task_spawn(int argc, char *argv[])
return PX4_ERROR;
}
_object.store(instance);
_task_id = task_id_is_work_queue;
desc.object.store(instance);
desc.task_id = task_id_is_work_queue;
instance->ScheduleNow();
@@ -174,7 +176,7 @@ void GhstRc::Run()
if (should_exit()) {
ScheduleClear();
_rc_fd = -1;
exit_and_cleanup();
exit_and_cleanup(desc);
return;
}
@@ -308,5 +310,5 @@ This module parses the GHST RC uplink protocol and can generate GHST downlink te
extern "C" __EXPORT int ghst_rc_main(int argc, char *argv[])
{
return GhstRc::main(argc, argv);
return ModuleBase::main(GhstRc::desc, argc, argv);
}
@@ -54,9 +54,11 @@
#define GHST_MAX_NUM_CHANNELS (16)
class GhstRc : public ModuleBase<GhstRc>, public ModuleParams, public px4::ScheduledWorkItem
class GhstRc : public ModuleBase, public ModuleParams, public px4::ScheduledWorkItem
{
public:
static Descriptor desc;
GhstRc(const char *device);
~GhstRc() override;
@@ -59,6 +59,8 @@
#include "rc_controller.hpp"
ModuleBase::Descriptor RC_ControllerModule::desc{task_spawn, custom_command, print_usage};
int RC_ControllerModule::print_status()
{
PX4_INFO("Running");
@@ -69,35 +71,35 @@ int RC_ControllerModule::print_status()
int RC_ControllerModule::custom_command(int argc, char *argv[])
{
if (!is_running()) {
if (!is_running(desc)) {
print_usage("not running");
return 1;
}
if (!strcmp(argv[0], "throttle")) {
uint16_t val = atoi(argv[1]);
get_instance()->set_throttle(val);
get_instance<RC_ControllerModule>(desc)->set_throttle(val);
PX4_INFO("Setting throttle to %u", val);
return 0;
}
if (!strcmp(argv[0], "yaw")) {
uint16_t val = atoi(argv[1]);
get_instance()->set_yaw(val);
get_instance<RC_ControllerModule>(desc)->set_yaw(val);
PX4_INFO("Setting yaw to %u", val);
return 0;
}
if (!strcmp(argv[0], "pitch")) {
uint16_t val = atoi(argv[1]);
get_instance()->set_pitch(val);
get_instance<RC_ControllerModule>(desc)->set_pitch(val);
PX4_INFO("Setting pitch to %u", val);
return 0;
}
if (!strcmp(argv[0], "roll")) {
uint16_t val = atoi(argv[1]);
get_instance()->set_roll(val);
get_instance<RC_ControllerModule>(desc)->set_roll(val);
PX4_INFO("Setting roll to %u", val);
return 0;
}
@@ -106,17 +108,24 @@ int RC_ControllerModule::custom_command(int argc, char *argv[])
}
int RC_ControllerModule::run_trampoline(int argc, char *argv[])
{
return ModuleBase::run_trampoline_impl(desc, [](int ac, char *av[]) -> ModuleBase * {
return RC_ControllerModule::instantiate(ac, av);
}, argc, argv);
}
int RC_ControllerModule::task_spawn(int argc, char *argv[])
{
_task_id = px4_task_spawn_cmd("RC_ControllerModule",
SCHED_DEFAULT,
SCHED_PRIORITY_MAX,
1024,
(px4_main_t)&run_trampoline,
(char *const *)argv);
desc.task_id = px4_task_spawn_cmd("RC_ControllerModule",
SCHED_DEFAULT,
SCHED_PRIORITY_MAX,
1024,
(px4_main_t)&run_trampoline,
(char *const *)argv);
if (_task_id < 0) {
_task_id = -1;
if (desc.task_id < 0) {
desc.task_id = -1;
return -errno;
}
@@ -252,5 +261,5 @@ int RC_ControllerModule::print_usage(const char *reason)
int rc_controller_main(int argc, char *argv[])
{
return RC_ControllerModule::main(argc, argv);
return ModuleBase::main(RC_ControllerModule::desc, argc, argv);
}
@@ -41,9 +41,11 @@
extern "C" __EXPORT int rc_controller_main(int argc, char *argv[]);
class RC_ControllerModule : public ModuleBase<RC_ControllerModule>, public ModuleParams
class RC_ControllerModule : public ModuleBase, public ModuleParams
{
public:
static Descriptor desc;
RC_ControllerModule();
virtual ~RC_ControllerModule() = default;
@@ -51,6 +53,9 @@ public:
/** @see ModuleBase */
static int task_spawn(int argc, char *argv[]);
/** @see ModuleBase */
static int run_trampoline(int argc, char *argv[]);
/** @see ModuleBase */
static RC_ControllerModule *instantiate(int argc, char *argv[]);
@@ -41,6 +41,8 @@
using namespace std;
ModuleBase::Descriptor VoxlSaveCalParams::desc{task_spawn, custom_command, print_usage};
static bool debug = false;
VoxlSaveCalParams::VoxlSaveCalParams() :
@@ -145,7 +147,7 @@ VoxlSaveCalParams::Run()
{
if (should_exit()) {
_parameter_primary_set_value_request_sub.unregisterCallback();
exit_and_cleanup();
exit_and_cleanup(desc);
return;
}
@@ -186,8 +188,8 @@ int VoxlSaveCalParams::task_spawn(int argc, char *argv[])
VoxlSaveCalParams *instance = new VoxlSaveCalParams();
if (instance) {
_object.store(instance);
_task_id = task_id_is_work_queue;
desc.object.store(instance);
desc.task_id = task_id_is_work_queue;
if (instance->init()) {
return PX4_OK;
@@ -198,8 +200,8 @@ int VoxlSaveCalParams::task_spawn(int argc, char *argv[])
}
delete instance;
_object.store(nullptr);
_task_id = -1;
desc.object.store(nullptr);
desc.task_id = -1;
return PX4_ERROR;
}
@@ -230,5 +232,5 @@ This implements autosaving of calibration parameters on VOXL2 platform.
extern "C" __EXPORT int voxl_save_cal_params_main(int argc, char *argv[])
{
return VoxlSaveCalParams::main(argc, argv);
return ModuleBase::main(VoxlSaveCalParams::desc, argc, argv);
}
@@ -46,10 +46,12 @@
using namespace time_literals;
class VoxlSaveCalParams : public ModuleBase<VoxlSaveCalParams>, public ModuleParams,
class VoxlSaveCalParams : public ModuleBase, public ModuleParams,
public px4::WorkItem
{
public:
static Descriptor desc;
VoxlSaveCalParams();
~VoxlSaveCalParams() = default;
@@ -269,7 +269,6 @@
*(.text.udp_pollsetup)
*(.text._ZL14timer_callbackPv)
*(.text._ZN3Ekf4fuseERKN6matrix6VectorIfLj24EEEf)
*(.text._ZN13land_detector23MulticopterLandDetector22_set_hysteresis_factorEi)
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text.MEM_LongCopyEnd)
@@ -432,7 +431,7 @@
*(.text._ZN23MavlinkStreamStatustext8get_sizeEv)
*(.text._ZN11calibration13Accelerometer13set_device_idEm)
*(.text._ZN3px46logger6Logger18start_stop_loggingEv)
*(.text._ZN14FlightTaskAuto17_evaluateTripletsEv)
*(.text._ZN14FlightTaskAuto32_evaluatePositionSetpointTripletEv)
*(.text._ZN11calibration9Gyroscope23SensorCorrectionsUpdateEb)
*(.text._ZN25MavlinkStreamMagCalReport4sendEv)
*(.text.imxrt_config_gpio)
@@ -573,7 +572,6 @@
*(.text._ZN4uORB12SubscriptionaSEOS0_)
*(.text._ZN15TakeoffHandling18updateTakeoffStateEbbbfbRKy)
*(.text._ZN10ModeChecks14checkAndReportERK7ContextR6Report)
*(.text._ZN14FlightTaskAuto24_updateInternalWaypointsEv)
*(.text._ZN8Failsafe17updateArmingStateERKybRK16failsafe_flags_s)
*(.text.imxrt_lpi2c_modifyreg)
*(.text.up_flush_dcache)
@@ -269,7 +269,6 @@
*(.text.udp_pollsetup)
*(.text._ZL14timer_callbackPv)
*(.text._ZN3Ekf4fuseERKN6matrix6VectorIfLj24EEEf)
*(.text._ZN13land_detector23MulticopterLandDetector22_set_hysteresis_factorEi)
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text.MEM_LongCopyEnd)
@@ -432,7 +431,7 @@
*(.text._ZN23MavlinkStreamStatustext8get_sizeEv)
*(.text._ZN11calibration13Accelerometer13set_device_idEm)
*(.text._ZN3px46logger6Logger18start_stop_loggingEv)
*(.text._ZN14FlightTaskAuto17_evaluateTripletsEv)
*(.text._ZN14FlightTaskAuto32_evaluatePositionSetpointTripletEv)
*(.text._ZN11calibration9Gyroscope23SensorCorrectionsUpdateEb)
*(.text._ZN25MavlinkStreamMagCalReport4sendEv)
*(.text.imxrt_config_gpio)
@@ -573,7 +572,6 @@
*(.text._ZN4uORB12SubscriptionaSEOS0_)
*(.text._ZN15TakeoffHandling18updateTakeoffStateEbbbfbRKy)
*(.text._ZN10ModeChecks14checkAndReportERK7ContextR6Report)
*(.text._ZN14FlightTaskAuto24_updateInternalWaypointsEv)
*(.text._ZN8Failsafe17updateArmingStateERKybRK16failsafe_flags_s)
*(.text.imxrt_lpi2c_modifyreg)
*(.text.up_flush_dcache)
+1
View File
@@ -19,6 +19,7 @@ CONFIG_COMMON_DIFFERENTIAL_PRESSURE=y
CONFIG_DRIVERS_DIFFERENTIAL_PRESSURE_AUAV=y
CONFIG_COMMON_DISTANCE_SENSOR=y
CONFIG_DRIVERS_DISTANCE_SENSOR_LIGHTWARE_SF45_SERIAL=y
CONFIG_DRIVERS_DISTANCE_SENSOR_LIGHTWARE_GRF_SERIAL=y
CONFIG_DRIVERS_DSHOT=y
CONFIG_DRIVERS_GNSS_SEPTENTRIO=y
CONFIG_DRIVERS_GPS=y
@@ -273,7 +273,6 @@
*(.text.udp_pollsetup)
*(.text._ZL14timer_callbackPv)
*(.text._ZN3Ekf4fuseERKN6matrix6VectorIfLj24EEEf)
*(.text._ZN13land_detector23MulticopterLandDetector22_set_hysteresis_factorEi)
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text.MEM_LongCopyEnd)
@@ -440,7 +439,7 @@
*(.text._ZN23MavlinkStreamStatustext8get_sizeEv)
*(.text._ZN11calibration13Accelerometer13set_device_idEm)
*(.text._ZN3px46logger6Logger18start_stop_loggingEv)
*(.text._ZN14FlightTaskAuto17_evaluateTripletsEv)
*(.text._ZN14FlightTaskAuto32_evaluatePositionSetpointTripletEv)
*(.text._ZN11calibration9Gyroscope23SensorCorrectionsUpdateEb)
*(.text._ZN25MavlinkStreamMagCalReport4sendEv)
*(.text.imxrt_config_gpio)
@@ -586,7 +585,6 @@
*(.text._ZN4uORB12SubscriptionaSEOS0_)
*(.text._ZN15TakeoffHandling18updateTakeoffStateEbbbfbRKy)
*(.text._ZN10ModeChecks14checkAndReportERK7ContextR6Report)
*(.text._ZN14FlightTaskAuto24_updateInternalWaypointsEv)
*(.text._ZN8Failsafe17updateArmingStateERKybRK16failsafe_flags_s)
*(.text.imxrt_lpi2c_modifyreg)
*(.text.up_flush_dcache)
@@ -1,8 +1,8 @@
# Onboard parameters for Vehicle 1
#
# Stack: PX4 Pro
# Vehicle: Multi-Rotor
# Version: 1.15.4
# Vehicle: Amovlab F410
# Version: 1.15.4
# Git Revision: 99c40407ff000000
#
# Vehicle-Id Component-Id Name Value Type
@@ -546,7 +546,6 @@
1 1 IMU_INTEG_RATE 200 6
1 1 LNDMC_ALT_GND 2.000000000000000000 9
1 1 LNDMC_ROT_MAX 20.000000000000000000 9
1 1 LNDMC_TRIG_TIME 1.000000000000000000 9
1 1 LNDMC_XY_VEL_MAX 1.500000000000000000 9
1 1 LNDMC_Z_VEL_MAX 0.250000000000000000 9
1 1 LND_FLIGHT_T_HI 5 6
@@ -1056,9 +1055,6 @@
1 1 UAVCAN_EC_REV 0 6
1 1 UAVCAN_ENABLE 2 6
1 1 UAVCAN_LGT_ANTCL 2 6
1 1 UAVCAN_LGT_LAND 0 6
1 1 UAVCAN_LGT_NAV 3 6
1 1 UAVCAN_LGT_STROB 1 6
1 1 UAVCAN_NODE_ID 1 6
1 1 UAVCAN_PUB_ARM 0 6
1 1 UAVCAN_PUB_MBD 0 6
Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

+2
View File
@@ -255,6 +255,7 @@
- [Lidar-Lite](sensor/lidar_lite.md)
- [Lightware Lidars (SF/LW/GRF)](sensor/sfxx_lidar.md)
- [Lightware SF45 Rotary Lidar](sensor/sf45_rotating_lidar.md)
- [Lightware GRF250/GRF500 Gimbal Lidar](sensor/grf_lidar.md)
- [TeraRanger](sensor/teraranger.md)
- [✘ Lanbao PSK-CM8JL65-CC5](sensor/cm8jl65_ir_distance_sensor.md)
- [Avionics Anonymous Laser Altimeter UAVCAN Interface (CAN)](dronecan/avanon_laser_interface.md)
@@ -417,6 +418,7 @@
- [Standard Configuration](config/index.md)
- [Advanced Configuration](advanced_config/index.md)
- [Using PX4's Navigation Filter (EKF2)](advanced_config/tuning_the_ecl_ekf.md)
- [GNSS-Denied & Degraded Flight](advanced_config/gnss_degraded_or_denied_flight.md)
- [Finding/Updating Parameters](advanced_config/parameters.md)
- [Full Parameter Reference](advanced_config/parameter_reference.md)
@@ -0,0 +1,77 @@
# GNSS-Degraded & Denied Flight ("Dead-Reckoning" Mode)
<Badge type="tip" text="PX4 v1.17" /> <Badge type="warning" text="Experimental" />
::: warning Experimental
This is a new feature with limited real-world testing.
It is intended for GNSS dropout scenarios (not pure GNSS-denied from takeoff), and requires that alternative velocity/position sensors are available.
Please [share your related test logs](../getting_started/flight_reporting.md#sharing-the-log-files-for-review-by-px4-developers) to help us verify and harden it.
:::
PX4 is default-configured for outdoor flight with a reliable GNSS signal, but it can also be set up in "dead-reckoning mode" to more gracefully handle environments where GNSS is intermittently degraded or denied during flight.
This section describes the differences between automatic and dead-reckoning modes, the circumstances in which each should be used, and how dead-reckoning is configured.
## Overview
PX4's EKF2 navigation has two modes for handling when GNSS data is determined to be unreliable:
- **Automatic mode** (the default): Used for flying outdoors in environments where a GNSS signal is expected to be largely reliable.
- **Dead-reckoning mode**: Recommended when you want to fly missions or other position controlled modes when there is intermittent GNSS loss, such as when flying under a bridge, from outdoors into an indoor setting, or when there is GNSS jamming (it is not suitable for pure-indoor use, as a GNSS signal is required before arming).
::: info
Dead-reckoning mode helps for both Fixed-Wing and Multicopter vehicles.
MC vehicles benefit more because they can hover when transitioning between sensor regimes.
FW needs continuous accurate velocity/position during the entire mission arc, making sensor transitions trickier.
:::
## Mode Comparison
The following sections provide more detail about each of the modes and when they should be used.
### Automatic Mode
In Automatic mode the EKF2 resets if GNSS is lost and no other sources of position are available.
This can result in a [position loss failsafe](../config/safety.md#position-loss-failsafe) and may trigger a shift into a mode that does not require global position, including stopping missions.
This is desirable if the GNSS signal is likely to be recovered quickly and there are no mechanisms to estimate position when GNSS is unavailable.
Use Automatic (default) when:
- Flying in open sky with reliable GNSS throughout the mission.
- You want the EKF to reset to GNSS when it becomes available again.
- Operating in environments where GNSS is either good or completely unavailable (binary state).
### Dead-Reckoning Mode
In dead-reckoning mode, EKF2 stops fusing GNSS data when it becomes unreliable and prevents EKF2 resets — provided there are other sources of position or velocity data that can be fused.
This ensures that the vehicle can continue flying missions and other position controlled modes when GNSS is lost.
When GNSS is recovered it will be fused with other measurements when tests indicate it can be trusted.
This may cause jerky movements in position controlled modes if the estimate has drifted.
This mode relies on having additional position or velocity sensors and must also have a reliable GNSS signal at boot.
Use Dead-Reckoning when:
- **Transitioning between GNSS and non-GNSS environments** (flying into buildings, under bridges, through tree cover).
- You have **redundant sensors** (optical flow, VIO, rangefinder, quality baro) that can maintain position estimation.
- Flying **missions that cross GPS-denied areas** where you want continuous operation rather than failsafe.
- **Urban environments** or other areas with intermittent GNSS quality.
- You want to **avoid EKF resets and jumps** when GNSS recovers (smoother transitions).
## Configuration
To use dead-reckoning mode, the vehicle must have an alternative source of position or velocity information, such as an [Optical Flow](../sensor/optical_flow.md) sensor or [VIO](../computer_vision/visual_inertial_odometry.md) setup.
To enable the mode:
1. Set [EKF2_GPS_MODE](../advanced_config/parameter_reference.md#EKF2_GPS_MODE) to `1`.
2. Ensure that GNSS arming checks are enabled (a reliable GNSS signal is required before arming):
- [COM_ARM_WO_GPS](../advanced_config/parameter_reference.md#COM_ARM_WO_GPS) - set to `0`
- [EKF2_GPS_CHECK](../advanced_config/parameter_reference.md#EKF2_GPS_CHECK) - set to default.
## See Also
- [GNSS Fault Detection](../advanced_config/tuning_the_ecl_ekf.md#gnss-fault-detection) in _Using PX4's Navigation Filter (EKF2)_
- [Fuse, Reset, or Reject? Handling Various Data-sources in EKF2](https://www.youtube.com/watch?v=CMGQJNPiTJg) - _PX4 Developer Summit 2025_, Marco Hauswirth, Auterion AG
+1
View File
@@ -10,6 +10,7 @@ This topic lists configuration topics that are not particularly vehicle specific
## Feature configuration
- [Using PX4's Navigation Filter (EKF2)](../advanced_config/tuning_the_ecl_ekf.md)
- [GNSS-Denied and Degraded Flight](../advanced_config/gnss_degraded_or_denied_flight.md)
- [Flight Termination Configuration](../advanced_config/flight_termination.md)
- [Land Detector Configuration](../advanced_config/land_detector.md)
- [Prearm/Arm/Disarm Configuration](../advanced_config/prearm_arm_disarm.md)
+1 -1
View File
@@ -38,7 +38,7 @@ In order to detect landing, the multicopter first has to go through three differ
If a condition cannot be reached because of missing sensors, then the condition is true by default.
For instance, in [Acro mode](../flight_modes_mc/acro.md) and no sensor is active except for the gyro sensor, then the detection solely relies on thrust output and time.
In order to proceed to the next state, each condition has to be true for a third of the configured total land detector trigger time [LNDMC_TRIG_TIME](../advanced_config/parameter_reference.md#LNDMC_TRIG_TIME).
In order to proceed to the next state, each condition has to be true for 300ms.
If the vehicle is equipped with a distance sensor, but the distance to ground is currently not measurable (usually because it is too large), the trigger time is increased by a factor of 3.
If one condition fails, the land detector drops out of the current state immediately.
+419 -69
View File
@@ -266,6 +266,166 @@ This parameter defines the squawk code. Value should be between 0000 and 7777.
## Actuator Outputs
### PCA9685_CENT1 (`INT32`) {#PCA9685_CENT1}
PCA9685 Output Channel 1 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT10 (`INT32`) {#PCA9685_CENT10}
PCA9685 Output Channel 10 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT11 (`INT32`) {#PCA9685_CENT11}
PCA9685 Output Channel 11 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT12 (`INT32`) {#PCA9685_CENT12}
PCA9685 Output Channel 12 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT13 (`INT32`) {#PCA9685_CENT13}
PCA9685 Output Channel 13 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT14 (`INT32`) {#PCA9685_CENT14}
PCA9685 Output Channel 14 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT15 (`INT32`) {#PCA9685_CENT15}
PCA9685 Output Channel 15 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT16 (`INT32`) {#PCA9685_CENT16}
PCA9685 Output Channel 16 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT2 (`INT32`) {#PCA9685_CENT2}
PCA9685 Output Channel 2 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT3 (`INT32`) {#PCA9685_CENT3}
PCA9685 Output Channel 3 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT4 (`INT32`) {#PCA9685_CENT4}
PCA9685 Output Channel 4 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT5 (`INT32`) {#PCA9685_CENT5}
PCA9685 Output Channel 5 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT6 (`INT32`) {#PCA9685_CENT6}
PCA9685 Output Channel 6 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT7 (`INT32`) {#PCA9685_CENT7}
PCA9685 Output Channel 7 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT8 (`INT32`) {#PCA9685_CENT8}
PCA9685 Output Channel 8 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_CENT9 (`INT32`) {#PCA9685_CENT9}
PCA9685 Output Channel 9 Center Value.
Servo Center output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 2200 | | -1 |
### PCA9685_DIS1 (`INT32`) {#PCA9685_DIS1}
PCA9685 Output Channel 1 Disarmed Value.
@@ -15405,6 +15565,18 @@ A value of -1 means to use the board default.
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | -1 |
### BAT1_I_FILT (`FLOAT`) {#BAT1_I_FILT}
Battery 1 current filter time constant.
Low-pass filter time constant for the battery current ADC reading (in seconds).
A higher value results in more smoothing and less noise, but slower response.
A value of 0 disables the filter.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 5.0 | | 0.0 | s |
### BAT1_I_OVERWRITE (`FLOAT`) {#BAT1_I_OVERWRITE}
Battery 1 idle current overwrite.
@@ -15537,6 +15709,18 @@ it drops off to a voltage level damaging the cells.
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | 0.01 | 3.6 | V |
### BAT1_V_FILT (`FLOAT`) {#BAT1_V_FILT}
Battery 1 voltage filter time constant.
Low-pass filter time constant for the battery voltage ADC reading (in seconds).
A higher value results in more smoothing and less noise, but slower response.
A value of 0 disables the filter.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 5.0 | | 0.0 | s |
### BAT2_A_PER_V (`FLOAT`) {#BAT2_A_PER_V}
Battery 2 current per volt (A/V).
@@ -15570,6 +15754,18 @@ A value of -1 means to use the board default.
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | -1 |
### BAT2_I_FILT (`FLOAT`) {#BAT2_I_FILT}
Battery 2 current filter time constant.
Low-pass filter time constant for the battery current ADC reading (in seconds).
A higher value results in more smoothing and less noise, but slower response.
A value of 0 disables the filter.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 5.0 | | 0.0 | s |
### BAT2_I_OVERWRITE (`FLOAT`) {#BAT2_I_OVERWRITE}
Battery 2 idle current overwrite.
@@ -15702,6 +15898,18 @@ it drops off to a voltage level damaging the cells.
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | 0.01 | 3.6 | V |
### BAT2_V_FILT (`FLOAT`) {#BAT2_V_FILT}
Battery 2 voltage filter time constant.
Low-pass filter time constant for the battery voltage ADC reading (in seconds).
A higher value results in more smoothing and less noise, but slower response.
A value of 0 disables the filter.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 5.0 | | 0.0 | s |
### BAT3_CAPACITY (`FLOAT`) {#BAT3_CAPACITY}
Battery 3 capacity.
@@ -16365,6 +16573,25 @@ Arm switch is a momentary button.
| ------ | -------- | -------- | --------- | ------------ | ---- |
| &nbsp; | | | | Disabled (0) |
### COM_ARM_TRAFF (`INT32`) {#COM_ARM_TRAFF}
Enable Traffic Avoidance system detection check.
This check detects if a traffic avoidance system (ADSB/FLARM transponder)
is missing. Depending on the value of the parameter, the check can be
disabled, warn only, or deny arming.
**Values:**
- `0`: Disabled
- `1`: Warning only
- `2`: Enforce for all modes
- `3`: Enforce for mission modes only
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### COM_ARM_WO_GPS (`INT32`) {#COM_ARM_WO_GPS}
Arming without GNSS configuration.
@@ -19596,6 +19823,18 @@ Launch is detected when acceleration in body forward direction is above FW_LAUN_
| ------ | -------- | -------- | --------- | ------- | ----- |
| &nbsp; | 0 | | 0.5 | 30.0 | m/s^2 |
### FW_LAUN_CS_LK_DY (`FLOAT`) {#FW_LAUN_CS_LK_DY}
Control surface launch delay.
Locks control surfaces during pre-launch (armed) and until this time since launch has passed.
Only affects control surfaces that have corresponding flag set, and not active for runway takeoff.
Set to 0 to disable any surface locking after arming.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | | 0.1 | 0. | s |
### FW_LAUN_DETCN_ON (`INT32`) {#FW_LAUN_DETCN_ON}
Fixed-wing launch detection.
@@ -21325,6 +21564,27 @@ Some are generic, while others are specifically fit to a certain vehicle with a
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### CA_CS_LAUN_LK (`INT32`) {#CA_CS_LAUN_LK}
Control surface launch lock enabled.
If actuator launch lock is enabled, this surface is kept at the disarmed value.
**Bitmask:**
- `0`: Control Surface 1
- `1`: Control Surface 2
- `2`: Control Surface 3
- `3`: Control Surface 4
- `4`: Control Surface 5
- `5`: Control Surface 6
- `6`: Control Surface 7
- `7`: Control Surface 8
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 255 | | 0 |
### CA_FAILURE_MODE (`INT32`) {#CA_FAILURE_MODE}
Motor failure handling mode.
@@ -24530,18 +24790,6 @@ Maximum allowed norm of the angular velocity (roll, pitch) in the landed state.
| ------ | -------- | -------- | --------- | ------- | ----- |
| &nbsp; | | | | 20.0 | deg/s |
### LNDMC_TRIG_TIME (`FLOAT`) {#LNDMC_TRIG_TIME}
Multicopter land detection trigger time.
Total time it takes to go through all three land detection stages:
ground contact, maybe landed, landed
when all necessary conditions are constantly met.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.1 | 10.0 | | 1.0 | s |
### LNDMC_XY_VEL_MAX (`FLOAT`) {#LNDMC_XY_VEL_MAX}
Multicopter max horizontal velocity.
@@ -26892,7 +27140,7 @@ With MPC_THR_HOVER 0.5 it's equivalent to No rescale.
Vertical thrust required to hover.
Mapped to center throttle stick in Stabilized mode (see MPC_THR_CURVE).
Used for initialization of the hover thrust estimator (see MPC_USE_HTE).
Used for initialization of the hover thrust estimator.
The estimated hover thrust is used as base for zero vertical acceleration in altitude control.
The hover thrust is important for land detection to work correctly.
@@ -26974,17 +27222,6 @@ Takeoff climb rate.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 1 | 5 | | 1.5 | m/s |
### MPC_USE_HTE (`INT32`) {#MPC_USE_HTE}
Use hover thrust estimate for altitude control.
Disable to use the fixed parameter MPC_THR_HOVER instead of the hover thrust estimate in the position controller.
This parameter does not influence Stabilized mode throttle curve (see MPC_THR_CURVE).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ----------- | ---- |
| &nbsp; | | | | Enabled (1) |
### MPC_VELD_LP (`FLOAT`) {#MPC_VELD_LP}
Velocity derivative low pass cutoff frequency.
@@ -33078,6 +33315,44 @@ Use SENS_MAG_SIDES instead
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 63 |
### GRF_RATE_CFG (`INT32`) {#GRF_RATE_CFG}
Lightware GRF lidar update rate.
The Lightware GRF distance sensor can increase the update rate to enable greater resolution.
**Values:**
- `1`: 1 Hz
- `2`: 2 Hz
- `3`: 4 Hz
- `4`: 5 Hz
- `5`: 10 Hz
- `6`: 20 Hz
- `7`: 30 Hz
- `8`: 40 Hz
- `9`: 50 Hz
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 4 |
### GRF_SENS_MODEL (`INT32`) {#GRF_SENS_MODEL}
GRF Sensor model.
GRF Sensor Model used to distinush between the GRF250 and GRF500 since both have different max distance range.
**Values:**
- `0`: disable
- `1`: GRF250
- `2`: GRF500
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 0 |
### ILABS_MODE (`INT32`) {#ILABS_MODE}
InertialLabs INS sensor mode configuration.
@@ -34286,6 +34561,31 @@ Enable simulated GPS sinstance.
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 1 | | 0 |
### SENS_EN_GRF_CFG (`INT32`) {#SENS_EN_GRF_CFG}
Serial Configuration for Lightware GRF Rangefinder (serial).
Configure on which serial port to run Lightware GRF Rangefinder (serial).
**Values:**
- `0`: Disabled
- `6`: UART 6
- `101`: TELEM 1
- `102`: TELEM 2
- `103`: TELEM 3
- `104`: TELEM/SERIAL 4
- `201`: GPS 1
- `202`: GPS 2
- `203`: GPS 3
- `300`: Radio Controller
- `301`: Wifi Port
- `401`: EXT2
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 0 |
### SENS_EN_INA220 (`INT32`) {#SENS_EN_INA220}
Enable INA220 Power Monitor.
@@ -34511,7 +34811,7 @@ Lightware Laser Rangefinder hardware model (serial).
### SENS_EN_SF1XX (`INT32`) {#SENS_EN_SF1XX}
Lightware SF1xx/SF20/LW20 laser rangefinder (i2c).
Lightware laser rangefinder (i2c).
**Values:**
@@ -35686,6 +35986,26 @@ Configure on which serial port to run VectorNav (VN-100, VN-200, VN-300).
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 0 |
### SF1XX_ROT (`INT32`) {#SF1XX_ROT}
Lightware laser rangefinder Rotation.
Distance sensor orientation as MAV_SENSOR_ORIENTATION enum.
Applies to all models supported by SENS_EN_SF1XX.
**Values:**
- `0`: Forward
- `2`: Right
- `4`: Backward
- `6`: Left
- `24`: Upward
- `25`: Downward
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 25 | | 25 |
### SF45_ORIENT_CFG (`INT32`) {#SF45_ORIENT_CFG}
Orientation upright or facing downward.
@@ -40288,7 +40608,7 @@ starve other nodes on the bus.
UAVCAN ANTI_COLLISION light operating mode.
This parameter defines the minimum condition under which the system will command
the ANTI_COLLISION lights on
lights with anti-collision function to turn on (white).
0 - Always off
1 - When autopilot is armed
2 - When autopilot is prearmed
@@ -40305,67 +40625,97 @@ the ANTI_COLLISION lights on
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 3 | | 2 |
### UAVCAN_LGT_LAND (`INT32`) {#UAVCAN_LGT_LAND}
### UAVCAN_LGT_FN0 (`INT32`) {#UAVCAN_LGT_FN0}
UAVCAN LIGHT_ID_LANDING light operating mode.
Light 0 function.
This parameter defines the minimum condition under which the system will command
the LIGHT_ID_LANDING lights on
0 - Always off
1 - When autopilot is armed
2 - When autopilot is prearmed
3 - Always on
Function assigned to light 0.
0: Status - displays system status colors
1: Anti-collision - white beacon controlled by LGT_ANTCL parameter
**Values:**
- `0`: Always off
- `1`: When autopilot is armed
- `2`: When autopilot is prearmed
- `3`: Always on
- `0`: Status Light
- `1`: Anti-collision Light
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 3 | | 0 |
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1 | | 0 |
### UAVCAN_LGT_NAV (`INT32`) {#UAVCAN_LGT_NAV}
### UAVCAN_LGT_FN1 (`INT32`) {#UAVCAN_LGT_FN1}
UAVCAN RIGHT_OF_WAY light operating mode.
Light 1 function.
This parameter defines the minimum condition under which the system will command
the RIGHT_OF_WAY lights on
0 - Always off
1 - When autopilot is armed
2 - When autopilot is prearmed
3 - Always on
Function assigned to light 1.
0: Status - displays system status colors
1: Anti-collision - white beacon controlled by LGT_ANTCL parameter
**Values:**
- `0`: Always off
- `1`: When autopilot is armed
- `2`: When autopilot is prearmed
- `3`: Always on
- `0`: Status Light
- `1`: Anti-collision Light
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 3 | | 3 |
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1 | | 0 |
### UAVCAN_LGT_STROB (`INT32`) {#UAVCAN_LGT_STROB}
### UAVCAN_LGT_FN2 (`INT32`) {#UAVCAN_LGT_FN2}
UAVCAN STROBE light operating mode.
Light 2 function.
This parameter defines the minimum condition under which the system will command
the STROBE lights on
0 - Always off
1 - When autopilot is armed
2 - When autopilot is prearmed
3 - Always on
Function assigned to light 2.
0: Status - displays system status colors
1: Anti-collision - white beacon controlled by LGT_ANTCL parameter
**Values:**
- `0`: Always off
- `1`: When autopilot is armed
- `2`: When autopilot is prearmed
- `3`: Always on
- `0`: Status Light
- `1`: Anti-collision Light
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1 | | 0 |
### UAVCAN_LGT_ID0 (`INT32`) {#UAVCAN_LGT_ID0}
Light 0 ID.
specifies the light_id value for light 0 in UAVCAN LightsCommand messages.
This determines which physical LED responds to commands for this light slot.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 255 | | 0 |
### UAVCAN_LGT_ID1 (`INT32`) {#UAVCAN_LGT_ID1}
Light 1 ID.
specifies the light_id value for light 1 in UAVCAN LightsCommand messages.
This determines which physical LED responds to commands for this light slot.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 255 | | 0 |
### UAVCAN_LGT_ID2 (`INT32`) {#UAVCAN_LGT_ID2}
Light 2 ID.
specifies the light_id value for light 2 in UAVCAN LightsCommand messages.
This determines which physical LED responds to commands for this light slot.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 255 | | 0 |
### UAVCAN_LGT_NUM (`INT32`) {#UAVCAN_LGT_NUM}
Number of UAVCAN lights to configure.
Number of lights to control via UAVCAN LightsCommand messages.
Set to 0 to disable UAVCAN light control.
Each light uses two parameters: LGT_IDx for the light_id and LGT_FNx for the function.
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
@@ -42484,7 +42834,7 @@ Gyro filter settings.
### SF1XX_MODE (`INT32`) {#SF1XX_MODE}
Lightware SF1xx/SF20/LW20 Operation Mode.
Lightware laser rangefinder Operation Mode.
**Values:**
@@ -361,6 +361,10 @@ The mode is set using the [EKF2_GPS_MODE](../advanced_config/parameter_reference
EKF2 may reset if no other sources of position or velocity are available.
If GNSS altitude OR horizontal position data drifts, the system disables fusion of both measurements simultaneously (even if one would still pass validation) and avoids performing resets.
::: tip
See also [Fault Detection](https://youtu.be/CMGQJNPiTJg?si=sFtdf4AQbcOH8-u8) in "Fuse, Reset, or Reject? Handling Various Data-sources in EKF2" _PX4 Developer Summit 2025_, Marco Hauswirth, Auterion AG
:::
##### Detection Logic
Horizontal Position:
@@ -892,3 +896,4 @@ If no terrain estimate is available this parameter will have no effect and the s
## Further Information
- [PX4 State Estimation Overview](https://youtu.be/HkYRJJoyBwQ), _PX4 Developer Summit 2019_, Dr. Paul Riseborough): Overview of the estimator, and major changes from 2018/19, and the expected improvements through 2019/20.
- [Fuse, Reset, or Reject? Handling Various Data-sources in EKF2](https://www.youtube.com/watch?v=CMGQJNPiTJg) - _PX4 Developer Summit 2025_, Marco Hauswirth, Auterion AG
+26 -11
View File
@@ -181,17 +181,22 @@ The following settings also apply, but are not displayed in the QGC UI.
| <a id="GF_PREDICT"></a>Preemptive geofence triggering | [GF_PREDICT](../advanced_config/parameter_reference.md#GF_PREDICT) | (Experimental) Trigger geofence if current motion of the vehicle is predicted to trigger the breach (rather than late triggering after the breach). |
| <a id="CBRK_FLIGHTTERM"></a>Circuit breaker for flight termination | [CBRK_FLIGHTTERM](../advanced_config/parameter_reference.md#CBRK_FLIGHTTERM) | Enables/Disables flight termination action (disabled by default). |
## Position (GNSS) Loss Failsafe
## Position Estimation Failsafes
This section describes failsafes related to the quality of the vehicle's position estimate.
### Position Loss Failsafe
The _Position Loss Failsafe_ is triggered if the quality of the PX4 position estimate falls below acceptable levels (this might be caused by GPS loss) while in a mode that requires an acceptable position estimate.
The sections below cover first the trigger and then the failsafe action taken by the controller.
### Position Loss Failsafe Trigger
There are basically two mechanisms in PX4 to trigger position failsafes:
The position loss failsafe triggers if the position estimate becomes _invalid_. There are two mechanisms in PX4 to invalidate the position estimate:
- A timeout since the last sensor data was fused that provides direct speed or horizontal position measurements. Sensors that fall into that category are: GNSS, optical flow, airspeed, VIO, auxiliary global position.
- The estimated horizontal position accuracy exceeds a certain threshold. This check is only done on hovering systems (rotary wing vehicles or VTOLs in hover phase).
- A timeout since the last sensor data was fused that provides direct speed or horizontal position measurements.
- Sensors that fall into that category are: GNSS, optical flow, airspeed, VIO, auxiliary global position.
- The estimated horizontal position inaccuracy exceeds the threshold [COM_POS_LOW_EPH](../advanced_config/parameter_reference.md#COM_POS_LOW_EPH)
- This check is only done on hovering systems (rotary-wing vehicles or VTOLs in hover phase). For fixed-wing vehicles, refer to the [Position Accuracy Low](#position-accuracy-low-failsafe) section.
The relevant parameters shown below.
@@ -207,14 +212,24 @@ Multicopters will switch to [Altitude mode](../flight_modes_mc/altitude.md) if a
Fixed-wing planes, and VTOLs not configured to land in hover ([NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT)), have a parameter ([FW_GPSF_LT](../advanced_config/parameter_reference.md#FW_GPSF_LT)) that defines how long they will loiter (circle with a constant roll angle ([FW_GPSF_R](../advanced_config/parameter_reference.md#FW_GPSF_R)) at the current altitude) after losing position before attempting to land.
If VTOLs have are configured to switch to hover for landing ([NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT)) then they will first transition and then descend.
The relevant parameters for all vehicles shown below.
The relevant parameters are:
Parameters that only affect Fixed-wing vehicles:
| Parameter | Description |
| ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="FW_GPSF_LT"></a>[FW_GPSF_LT](../advanced_config/parameter_reference.md#FW_GPSF_LT) | Fixed-wing only: Loiter time (waiting at current altitude for position estimation recovery before starting to descend). Set to 0 to disable. |
| <a id="FW_GPSF_R"></a>[FW_GPSF_R](../advanced_config/parameter_reference.md#FW_GPSF_R) | Fixed roll/bank angle while circling. |
| <a id="NAV_FORCE_VT"></a>[NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT) | If true, force VTOL takeoff and landing, even in `Descend` failsafe. |
| Parameter | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| <a id="FW_GPSF_LT"></a>[FW_GPSF_LT](../advanced_config/parameter_reference.md#FW_GPSF_LT) | Loiter time (waiting for GPS recovery before it goes into land or flight termination). Set to 0 to disable. |
| <a id="FW_GPSF_R"></a>[FW_GPSF_R](../advanced_config/parameter_reference.md#FW_GPSF_R) | Fixed roll/bank angle while circling. |
### Position Accuracy Low Failsafe
In Fixed-wing, the position estimate is never strictly invalidated as long as we have a horizontal aiding source, such as an airspeed sensor. In that case, a separate failsafe can be configured that triggers if the position estimate inacuraccy exceeds the threshold [COM_POS_LOW_EPH](../advanced_config/parameter_reference.md#COM_POS_LOW_EPH). The failsafe action is taken if the vehicle is in mission or hold mode, otherwise it is only a warning. The relevant parameters are:
| Parameter | Description |
| -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| <a id="COM_POS_LOW_EPH"></a>[COM_POS_LOW_EPH](../advanced_config/parameter_reference.md#COM_POS_LOW_EPH) | Position inaccuracy threshold above which COM_POS_LOW_ACT is taken. |
| <a id="COM_POS_LOW_ACT"></a>[COM_POS_LOW_ACT](../advanced_config/parameter_reference.md#COM_POS_LOW_ACT) | Failsafe action taken when position inaccuracy is above configured threshold. |
Note that if there is no horizontal aiding source anymore, the position estimate is invalidated after `EKF2_NOAID_TOUT`, and the standard position loss failsafe applies.
## Offboard Loss Failsafe
+18 -41
View File
@@ -39,15 +39,6 @@ Navigate into the **PX4-Autopilot** directory and start [Gazebo SITL](../sim_gaz
make px4_sitl gz_x500
```
::: details If you installed Gazebo Classic
Start [Gazebo Classic SITL](../sim_gazebo_classic/index.md) using the following command:
```sh
make px4_sitl gazebo-classic
```
:::
This will bring up the PX4 console:
![PX4 Console](../../assets/toolchain/console_gazebo.png)
@@ -88,6 +79,16 @@ cd PX4-Autopilot
make px4_fmu-v5_default
```
:::tip
You can also build using the [px4-dev Docker container](../test_and_ci/docker.md) without installing the toolchain locally.
From the PX4-Autopilot directory:
```sh
./Tools/docker_run.sh 'make px4_fmu-v5_default'
```
:::
A successful run will end with similar output to:
```sh
@@ -126,7 +127,8 @@ The following list shows the build commands for the [Pixhawk standard](../flight
- [Pixhawk 1 (FMUv2)](../flight_controller/pixhawk.md): `make px4_fmu-v2_default`
:::warning
You **must** use a supported version of GCC to build this board (e.g. the same as used by [CI/docker](../test_and_ci/docker.md)) or remove modules from the build. Building with an unsupported GCC may fail, as PX4 is close to the board's 1MB flash limit.
You **must** use a supported version of GCC to build this board (e.g. the `gcc-arm-none-eabi` package from the current Ubuntu LTS, which is the same toolchain used by CI) or remove modules from the build.
Building with an unsupported GCC may fail, as PX4 is close to the board's 1MB flash limit.
:::
- Pixhawk 1 with 2 MB flash: `make px4_fmu-v3_default`
@@ -191,7 +193,7 @@ The `region 'flash' overflowed by XXXX bytes` error indicates that the firmware
This is common for `make px4_fmu-v2_default` builds, where the flash size is limited to 1MB.
If you're building the _vanilla_ master branch, the most likely cause is using an unsupported version of GCC.
In this case, install the version specified in the [Developer Toolchain](../dev_setup/dev_env.md) instructions.
In this case, install the `gcc-arm-none-eabi` package from the current Ubuntu LTS as described in the [Developer Toolchain](../dev_setup/dev_env.md) instructions.
If building your own branch, it is possible that you have increased the firmware size over the 1MB limit.
In this case you will need to remove any drivers/modules that you don't need from the build.
@@ -204,7 +206,7 @@ The PX4 build system opens a large number of files, so you may exceed this numbe
The build toolchain will then report `Too many open files` for many files, as shown below:
```sh
/usr/local/Cellar/gcc-arm-none-eabi/20171218/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: cannot find NuttX/nuttx/fs/libfs.a: Too many open files
arm-none-eabi-ld: cannot find NuttX/nuttx/fs/libfs.a: Too many open files
```
The solution is to increase the maximum allowed number of open files (e.g. to 300).
@@ -227,34 +229,9 @@ xcode-select --install
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/
```
### Ubuntu 18.04: Compile errors involving arm_none_eabi_gcc
Build issues related to `arm_none_eabi_gcc`may be due to a broken g++ toolchain installation.
You can verify that this is the case by checking for missing dependencies using:
```sh
arm-none-eabi-gcc --version
arm-none-eabi-g++ --version
arm-none-eabi-gdb --version
arm-none-eabi-size --version
```
Example of bash output with missing dependencies:
```sh
arm-none-eabi-gdb --version
arm-none-eabi-gdb: command not found
```
This can be resolved by removing and [reinstalling the compiler](https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa).
### Ubuntu 18.04: Visual Studio Code is unable to watch for file changes in this large workspace
See [Visual Studio Code IDE (VSCode) > Troubleshooting](../dev_setup/vscode.md#troubleshooting).
### Failed to import Python packages
"Failed to import" errors when running the `make px4_sitl jmavsim` command indicates that some Python packages are not installed (where expected).
"Failed to import" errors when running the `make px4_sitl gz_x500` command indicates that some Python packages are not installed (where expected).
```sh
Failed to import jinja2: No module named 'jinja2'
@@ -262,12 +239,12 @@ You may need to install it using:
pip3 install --user jinja2
```
If you have already installed these dependencies this may be because there is more than one Python version on the computer (e.g. Python 2.7.16 Python 3.8.3), and the module is not present in the version used by the build toolchain.
If you have already installed these dependencies this may be because there is more than one Python version on the computer (e.g. Python 2.7.16 and Python 3.8.3), and the module is not present in the version used by the build toolchain.
You should be able to fix this by explicitly installing the dependencies as shown:
You should be able to fix this by installing the dependencies from the repository's requirements file:
```sh
pip3 install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging
pip3 install --user -r Tools/setup/requirements.txt
```
## PX4 Make Build Targets
+4 -4
View File
@@ -20,7 +20,7 @@ The equipment below is highly recommended:
:::
- Lenovo Thinkpad with i5-core running Windows 11
- MacBook Pro (early 2015 and later) with macOS 10.15 or later
- Lenovo Thinkpad i5 with Ubuntu Linux 20.04 or later
- Lenovo Thinkpad i5 with Ubuntu Linux 22.04 or later
- **Ground control station** (computer or tablet):
- iPad (may require Wifi telemetry adapter)
@@ -39,9 +39,9 @@ Install the [QGroundControl Daily Build](../dev_setup/qgc_daily_build.md) for a
To configure the vehicle:
1. [Install PX4 firmware](../config/firmware.md#installing-px4-main-beta-or-custom-firmware) (including "custom" firmware with your own changes).
1. [Start with the airframe](../config/airframe.md) that best-matches your vehicle from the [airframe reference](../airframes/airframe_reference.md).
1. [Basic Configuration](../config/index.md) explains how to perform basic configuration.
1. [Parameter Configuration](../advanced_config/parameters.md) explains how you can find and modify individual parameters.
2. [Start with the airframe](../config/airframe.md) that best-matches your vehicle from the [airframe reference](../airframes/airframe_reference.md).
3. [Basic Configuration](../config/index.md) explains how to perform basic configuration.
4. [Parameter Configuration](../advanced_config/parameters.md) explains how you can find and modify individual parameters.
::: info
+3 -3
View File
@@ -2,7 +2,7 @@
The _supported platforms_ for PX4 development are:
- [Ubuntu Linux (24.04/22.04)](../dev_setup/dev_env_linux_ubuntu.md) — Recommended
- [Ubuntu Linux (24.04/22.04)](../dev_setup/dev_env_linux_ubuntu.md)
- [Windows (10/11)](../dev_setup/dev_env_windows_wsl.md) — via WSL2
- [macOS](../dev_setup/dev_env_mac.md)
@@ -15,9 +15,9 @@ The table below shows what PX4 targets you can build on each OS.
| **NuttX based hardware:** [Pixhawk Series](../flight_controller/pixhawk_series.md), [Crazyflie](../complete_vehicles_mc/crazyflie2.md) | ✓ | ✓ | ✓ |
| **Linux-based hardware:** [Raspberry Pi 2/3](../flight_controller/raspberry_pi_navio2.md) | ✓ | | |
| **Simulation:** [Gazebo SITL](../sim_gazebo_gz/index.md) | ✓ | ✓ | ✓ |
| **Simulation:** [Gazebo Classic SITL](../sim_gazebo_classic/index.md) | ✓ | ✓ | ✓ |
| **Simulation:** [ROS with Gazebo Classic](../simulation/ros_interface.md) | ✓ | | ✓ |
| **Simulation:** ROS 2 with Gazebo | ✓ | | ✓ |
| **Simulation:** [Gazebo Classic SITL](../sim_gazebo_classic/index.md) | | ✓ | ✓ |
| **Simulation:** [ROS with Gazebo Classic](../simulation/ros_interface.md) | | | ✓ |
Experienced Docker users can also build with the containers used by our continuous integration system: [Docker Containers](../test_and_ci/docker.md)
+3 -2
View File
@@ -39,8 +39,9 @@ You may want to also install `python-pip` and `screen`.
Execute the script below to install GCC 7-2017-q4:
:::warning
This version of GCC is out of date.
At time of writing the current version on Ubuntu is `9-2020-q2-update` (see [focal nuttx docker file](https://github.com/PX4/PX4-containers/blob/master/docker/Dockerfile_nuttx-focal#L28))
This version of GCC is very outdated.
PX4 now uses the `gcc-arm-none-eabi` package from the current Ubuntu LTS (GCC 13.2.1 on Ubuntu 24.04).
This CentOS guide is community-maintained and may not produce working builds.
:::
```sh
+9 -16
View File
@@ -4,20 +4,14 @@ The following instructions use a bash script to set up the PX4 development envir
The environment includes:
- [Gazebo Simulator](../sim_gazebo_gz/index.md) ("Harmonic")
- [Build toolchain for Pixhawk (and other NuttX-based hardware)](../dev_setup/building_px4.md#nuttx-pixhawk-based-boards).
On Ubuntu 22.04:
- [Gazebo Classic Simulator](../sim_gazebo_classic/index.md) can be used instead of Gazebo.
Gazebo is nearing feature-parity with Gazebo-Classic on PX4, and will soon replace it for all use cases.
- [Gazebo Simulator](../sim_gazebo_gz/index.md) (Gazebo Harmonic)
- [Build toolchain for Pixhawk (and other NuttX-based hardware)](../dev_setup/building_px4.md#nuttx-pixhawk-based-boards) using the `gcc-arm-none-eabi` compiler from the Ubuntu package manager.
The build toolchain for other flight controllers, simulators, and working with ROS are discussed in the [Other Targets](#other-targets) section below.
::: details Can I use an older version of Ubuntu?
PX4 supports the current and last Ubuntu LTS release where possible.
Older releases are not supported (so you can't raise defects against them), but may still work.
For example, Gazebo Classic setup is included in our standard build instructions for macOS, Ubuntu 18.04 and 20.04, and Windows on WSL2 for the same hosts.
::: info
PX4 targets the **current Ubuntu LTS** (24.04) for CI and release builds, with the **previous LTS** (22.04) also supported.
Older Ubuntu versions are not supported and may not work.
:::
## Simulation and NuttX (Pixhawk) Targets
@@ -50,19 +44,18 @@ To install the toolchain:
- Acknowledge any prompts as the script progress.
- You can use the `--no-nuttx` and `--no-sim-tools` options to omit the NuttX and/or simulation tools.
3. If you need Gazebo Classic (Ubuntu 22.04 only) then you can manually remove Gazebo and install it by following the instructions in [Gazebo Classic > Installation](../sim_gazebo_classic/index.md#installation).
4. Restart the computer on completion.
3. Restart the computer on completion.
:::details Additional notes
These notes are provided "for information only":
- This setup is supported by the PX4 Dev Team.
The instructions may also work on other Debian Linux based systems.
- You can verify the NuttX installation by confirming the `gcc` version as shown:
- You can verify the NuttX installation by confirming `gcc` is available.
The version depends on your Ubuntu release (e.g. GCC 13.2.1 on Ubuntu 24.04):
```sh
$arm-none-eabi-gcc --version
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009
Copyright (C) 2023 Free Software Foundation, Inc.
+84 -76
View File
@@ -1,111 +1,119 @@
# macOS Development Environment
The following instructions set up a PX4 development environment for macOS.
The following instructions set up a PX4 development environment on macOS.
This environment can be used to build PX4 for:
- Pixhawk and other NuttX-based hardware
- [Gazebo Classic Simulation](../sim_gazebo_classic/index.md)
- [Gazebo Simulation](../sim_gazebo_gz/index.md) (Gazebo Harmonic)
It works on both Intel and Apple Silicon Macs.
:::tip
This setup is supported by the PX4 dev team.
To build other targets you will need to use a [different OS](../dev_setup/dev_env.md#supported-targets) (or an [unsupported development environment](../advanced/community_supported_dev_env.md)).
To build for [other targets](../dev_setup/dev_env.md#supported-targets) you will need to use a [different OS](../dev_setup/dev_env.md#supported-targets) or an [unsupported development environment](../advanced/community_supported_dev_env.md).
:::
## Video Guide
## Development Environment Setup
<lite-youtube videoid="tMbMGiMs1cQ" title="Setting up your PX4 development environment on macOS"/>
### Prerequisites
## Base Setup
The "base" macOS setup installs the tools needed for building firmware, and includes the common tools that will be needed for installing/using the simulators.
### Environment Setup
:::details Apple Silicon MacBook users!
If you have an Apple M1, M2 etc. MacBook, make sure to run the terminal as x86 by setting up an x86 terminal:
1. Locate the Terminal application within the Utilities folder (**Finder > Go menu > Utilities**)
2. Select _Terminal.app_ and right-click on it, then choose **Duplicate**.
3. Rename the duplicated Terminal app, e.g. to _x86 Terminal_
4. Now select the renamed _x86 Terminal_ app and right-click and choose \*_Get Info_
5. Check the box for **Open using Rosetta**, then close the window
6. Run the _x86 Terminal_ as usual, which will fully support the current PX4 toolchain
:::
First set up the environment
1. Enable more open files by appending the following line to the `~/.zshenv` file (creating it if necessary):
1. **Install Xcode Command Line Tools** — provides `git`, `make`, and the Apple `clang` compiler:
```sh
echo ulimit -S -n 2048 >> ~/.zshenv
xcode-select --install
```
2. **Install Homebrew** by following the [installation instructions](https://brew.sh).
3. **Increase the open-file limit.** The PX4 build opens many files simultaneously and the macOS default limit (256) is too low — you may see `"LD: too many open files"` errors without this.
Add the following line to your shell startup file so it applies to every new terminal session.
macOS defaults to **zsh** since Catalina, so add it to `~/.zshrc` (use `~/.bashrc` if you use bash):
```sh
echo "ulimit -S -n 2048" >> ~/.zshrc
```
Then **open a new terminal** (or run `source ~/.zshrc`) for the change to take effect.
4. **Ensure Python 3 is available.** Some PX4 build scripts require `python3` and `pip3` to be in your `PATH`. The Xcode Command Line Tools include Python 3 by default.
:::tip
If you need to install or manage a different Python version, we recommend [pyenv](https://github.com/pyenv/pyenv), which lets you set global and per-directory Python versions.
:::
### Install Development Tools
1. **Download PX4 Source Code:**
```sh
git clone https://github.com/PX4/PX4-Autopilot.git
cd PX4-Autopilot
git submodule update --init --recursive --force
```
2. **Install development environment libraries** from the [macos.sh](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/setup/macos.sh) helper script:
```sh
./Tools/setup/macos.sh --sim-tools
```
This installs:
- **`px4-dev`** — ARM cross-compiler (`arm-gcc-bin@13`), `cmake`, `ninja`, `ccache`, and other build tools
- **Python packages** from `requirements.txt`
- **`px4-sim`** (via `--sim-tools`) — Gazebo Harmonic simulation (`gz-harmonic`) and related tools
::: info
If you don't do this, the build toolchain may report the error: `"LD: too many open files"`
Omit `--sim-tools` if you only need to build for NuttX hardware and don't need simulation.
Use `--reinstall` to force reinstallation of all Homebrew formulas (useful if something is broken).
:::
1. Enforce Python 3 by appending the following lines to `~/.zshenv`
### Gazebo Simulation
```sh
# Point pip3 to macOS system python 3 pip
alias pip3=/usr/bin/pip3
```
The `--sim-tools` flag installs the `px4-sim` Homebrew formula, which pulls in Gazebo Harmonic.
### Common Tools
If you skipped `--sim-tools` during initial setup and want to add simulation later:
To setup the environment to be able to build for Pixhawk/NuttX hardware (and install the common tools for using simulators):
```sh
brew tap PX4/px4
brew install px4-sim
```
1. Install Homebrew by following these [installation instructions](https://brew.sh).
1. Run these commands in your shell to install the common tools:
::: info
Gazebo requires **XQuartz** for display on macOS.
If you don't already have it installed:
```sh
brew tap PX4/px4
brew install px4-dev
```
```sh
brew install --cask xquartz
```
1. Install the required Python packages:
You may need to log out and back in after installing XQuartz.
:::
```sh
# install required packages using pip3
python3 -m pip install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging kconfiglib future jsonschema
# if this fails with a permissions error, your Python install is in a system path - use this command instead:
sudo -H python3 -m pip install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging kconfiglib future jsonschema
```
### Verify Installation
## Gazebo Classic Simulation
After installation, verify the key tools are available:
To setup the environment for [Gazebo Classic](../sim_gazebo_classic/index.md) simulation:
```sh
# NuttX cross-compiler (from arm-gcc-bin@13)
arm-none-eabi-gcc --version
1. Run the following commands in your shell:
# Build tools
cmake --version
ninja --version
```sh
brew unlink tbb
sed -i.bak '/disable! date:/s/^/ /; /disable! date:/s/./#/3' $(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula/tbb@2020.rb
brew install tbb@2020
brew link tbb@2020
```
# Gazebo (if --sim-tools was used)
gz sim --versions
```
::: info
September 2021: The commands above are a workaround to this bug: [PX4-Autopilot#17644](https://github.com/PX4/PX4-Autopilot/issues/17644).
They can be removed once it is fixed (along with this note).
:::
Quick smoke test — build and run a simulation target:
1. To install SITL simulation with Gazebo Classic:
```sh
make px4_sitl gz_x500
```
```sh
brew install --cask temurin
brew install --cask xquartz
brew install px4-sim-gazebo
```
1. Run the macOS setup script: `PX4-Autopilot/Tools/setup/macos.sh`
The easiest way to do this is to clone the PX4 source, and then run the script from the directory, as shown:
```sh
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot/Tools/setup
sh macos.sh
```
If everything is set up correctly, this will build PX4 SITL and launch a Gazebo simulation with the x500 quadcopter.
## Next Steps
@@ -114,7 +122,7 @@ Once you have finished setting up the command-line toolchain:
- Install [VSCode](../dev_setup/vscode.md) (if you prefer using an IDE to the command line).
- Install the [QGroundControl Daily Build](../dev_setup/qgc_daily_build.md)
:::tip
::: tip
The _daily build_ includes development tools that are hidden in release builds.
It may also provide access to new PX4 features that are not yet supported in release builds.
:::
+8 -8
View File
@@ -58,20 +58,20 @@ To install WSL2 with Ubuntu on a new installation of Windows 10 or 11:
wsl --install
```
- Ubuntu 20.04 ([Gazebo-Classic Simulation](../sim_gazebo_classic/index.md))
```sh
wsl --install -d Ubuntu-20.04
```
- Ubuntu 22.04 ([Gazebo Simulation](../sim_gazebo_gz/index.md))
```sh
wsl --install -d Ubuntu-22.04
```
- Ubuntu 24.04 ([Gazebo Simulation](../sim_gazebo_gz/index.md))
```sh
wsl --install -d Ubuntu-24.04
```
::: info
You can also install[Ubuntu 20.04](https://www.microsoft.com/store/productId/9MTTCL66CPXJ) and [Ubuntu 22.04](https://www.microsoft.com/store/productId/9PN20MSR04DW) from the store, which allows you to delete the application using the normal Windows Add/Remove settings:
You can also [Ubuntu 24.04](https://www.microsoft.com/store/productId/9nz3klhxdjp5) or [Ubuntu 22.04](https://www.microsoft.com/store/productId/9PN20MSR04DW) from Microsoft Store, which allows you to delete the application using the normal Windows Add/Remove settings.
:::
1. WSL will prompt you for a user name and password for the Ubuntu installation.
@@ -106,7 +106,7 @@ To open a WSL shell using a command prompt:
```
```sh
wsl -d Ubuntu-20.04
wsl -d Ubuntu-24.04
```
If you only have one version of Ubuntu, you can just use `wsl`.
+2 -2
View File
@@ -124,10 +124,10 @@ Once that is done you don't need to do anything else; the toolchain will automat
This section includes guidance on setup and build errors.
### Ubuntu 18.04: "Visual Studio Code is unable to watch for file changes in this large workspace"
### "Visual Studio Code is unable to watch for file changes in this large workspace"
This error surfaces on startup.
On some systems, there is an upper-limit of 8192 file handles imposed on applications, which means that VSCode might not be able to detect file modifications in `/PX4-Autopilot`.
On some systems, there is an upper-limit on file handles imposed on applications, which means that VSCode might not be able to detect file modifications in `/PX4-Autopilot`.
You can increase this limit to avoid the error, at the expense of memory consumption.
Follow the [instructions here](https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc).
+13
View File
@@ -281,6 +281,19 @@ PX4 DroneCAN parameters:
Select the specific CAN interface(s) used for ESC data output using the [UAVCAN_ESC_IFACE](../advanced_config/parameter_reference.md#UAVCAN_ESC_IFACE) parameter (all that all interfaces are selected by default).
Note that DroneCAN ESCs should be on their own dedicated CAN interface(s) because ESC messages can saturate the bus and starve other nodes of bandwidth.
### Lights
PX4 can control LEDs via DroneCAN [LightsCommand](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#lightscommand) messages.
Configuration:
1. Set [UAVCAN_LGT_NUM](../advanced_config/parameter_reference.md#UAVCAN_LGT_NUM) to the number of lights (0 disables). You might need to reopen the ground station to have parameters for new instances available.
2. For each light slot (0 to NUM-1), set:
- `UAVCAN_LGT_IDx`: The `light_id` matching your peripheral.
- `UAVCAN_LGT_FNx`: `Status` for system status colours, or `Anti-collision` for white beacon.
3. For anti-collision lights, [UAVCAN_LGT_ANTCL](../advanced_config/parameter_reference.md#UAVCAN_LGT_ANTCL) controls when they illuminate (off, armed, prearmed, always on).
4. Reboot for any changes to take effect.
## QGC CANNODE Parameter Configuration
QGroundControl can inspect and modify parameters belonging to CAN devices attached to the flight controller, provided the device are connected to the flight controller before QGC is started.
+3
View File
@@ -85,6 +85,7 @@ The vehicle always respects normal FW max/min throttle settings during takeoff (
In _catapult/hand-launch mode_ the vehicle waits to detect launch (based on acceleration trigger).
On launch it enables the motor(s) and climbs with the maximum climb rate [FW_T_CLMB_MAX](#FW_T_CLMB_MAX) while keeping the pitch setpoint above [FW_TKO_PITCH_MIN](#FW_TKO_PITCH_MIN).
Once it reaches [MIS_TAKEOFF_ALT](#MIS_TAKEOFF_ALT) it will automatically switch to [Hold mode](../flight_modes_fw/hold.md) and loiter.
It is possible to delay the activation of the motors and control surfaces separately, see parameters [FW_LAUN_MOT_DEL](#FW_LAUN_MOT_DEL), [FW_LAUN_CS_LK_DY](#FW_LAUN_CS_LK_DY) and [CA_CS_LAUN_LK](#CA_CS_LAUN_LK). The later is also exposed in the actuator configuration page under the advanced view.
All RC stick movement is ignored during the full takeoff sequence.
@@ -105,6 +106,8 @@ The _launch detector_ is affected by the following parameters:
| <a id="FW_LAUN_AC_THLD"></a>[FW_LAUN_AC_THLD](../advanced_config/parameter_reference.md#FW_LAUN_AC_THLD) | Acceleration threshold (acceleration in body-forward direction must be above this value) |
| <a id="FW_LAUN_AC_T"></a>[FW_LAUN_AC_T](../advanced_config/parameter_reference.md#FW_LAUN_AC_T) | Trigger time (acceleration must be above threshold for this amount of seconds) |
| <a id="FW_LAUN_MOT_DEL"></a>[FW_LAUN_MOT_DEL](../advanced_config/parameter_reference.md#FW_LAUN_MOT_DEL) | Delay from launch detection to motor spin up |
| <a id="FW_LAUN_CS_LK_DY"></a>[FW_LAUN_CS_LK_DY](../advanced_config/parameter_reference.md#FW_LAUN_CS_LK_DY) | Delay from launch detection to unlocking the control surfaces |
| <a id="CA_CS_LAUN_LK"></a>[CA_CS_LAUN_LK](../advanced_config/parameter_reference.md#CA_CS_LAUN_LK) | Bitmask to select which control surfaces are to be locked during launch |
## Runway Takeoff {#runway_launch}
+7 -3
View File
@@ -126,7 +126,11 @@ The following parameters also affect preflight checks.
#### COM_ARM_WO_GPS
The [COM_ARM_WO_GPS](../advanced_config/parameter_reference.md#COM_ARM_WO_GPS) parameter controls whether or not arming is allowed without a global position estimate.
The [COM_ARM_WO_GPS](../advanced_config/parameter_reference.md#COM_ARM_WO_GPS) parameter controls whether or not arming is allowed in modes that require a valid global position estimate when EKF2 GNSS quality checks are failing.
- `1` (default): Arming _is_ allowed without a position estimate for flight modes that do not require position information (only).
- `0`: Arming is allowed only if EKF is providing a global position estimate and EFK GPS quality checks are passing
The values are:
- `0`: Deny arming.
- `1`: Arming allowed with warning (default).
This might be used to provide a warning that the GNSS is unhealthy even when there is another source of valid position estimate, such as VIO or optical flow.
- `2`: Arming allowed without warnings.
+185 -184
View File
@@ -94,199 +94,200 @@ They are not build into the module, and hence are neither published or subscribe
::: details See messages
- [GpioIn](../msg_docs/GpioIn.md)
- [SystemPower](../msg_docs/SystemPower.md)
- [LandingTargetInnovations](../msg_docs/LandingTargetInnovations.md)
- [VehicleOpticalFlow](../msg_docs/VehicleOpticalFlow.md)
- [LandingTargetPose](../msg_docs/LandingTargetPose.md)
- [EstimatorGpsStatus](../msg_docs/EstimatorGpsStatus.md)
- [EstimatorBias](../msg_docs/EstimatorBias.md)
- [ParameterSetValueResponse](../msg_docs/ParameterSetValueResponse.md)
- [LogMessage](../msg_docs/LogMessage.md)
- [PowerMonitor](../msg_docs/PowerMonitor.md)
- [VehicleConstraints](../msg_docs/VehicleConstraints.md)
- [SensorAirflow](../msg_docs/SensorAirflow.md)
- [ArmingCheckRequestV0](../msg_docs/ArmingCheckRequestV0.md)
- [ActuatorArmed](../msg_docs/ActuatorArmed.md)
- [HoverThrustEstimate](../msg_docs/HoverThrustEstimate.md)
- [LaunchDetectionStatus](../msg_docs/LaunchDetectionStatus.md)
- [DifferentialPressure](../msg_docs/DifferentialPressure.md)
- [MagnetometerBiasEstimate](../msg_docs/MagnetometerBiasEstimate.md)
- [PwmInput](../msg_docs/PwmInput.md)
- [OrbTestMedium](../msg_docs/OrbTestMedium.md)
- [QshellReq](../msg_docs/QshellReq.md)
- [GeofenceStatus](../msg_docs/GeofenceStatus.md)
- [RcChannels](../msg_docs/RcChannels.md)
- [Cpuload](../msg_docs/Cpuload.md)
- [DebugArray](../msg_docs/DebugArray.md)
- [FlightPhaseEstimation](../msg_docs/FlightPhaseEstimation.md)
- [Mission](../msg_docs/Mission.md)
- [Airspeed](../msg_docs/Airspeed.md)
- [LedControl](../msg_docs/LedControl.md)
- [HealthReport](../msg_docs/HealthReport.md)
- [FixedWingLateralGuidanceStatus](../msg_docs/FixedWingLateralGuidanceStatus.md)
- [FigureEightStatus](../msg_docs/FigureEightStatus.md)
- [EstimatorInnovations](../msg_docs/EstimatorInnovations.md)
- [VehicleImuStatus](../msg_docs/VehicleImuStatus.md)
- [VehicleLocalPositionSetpoint](../msg_docs/VehicleLocalPositionSetpoint.md)
- [InputRc](../msg_docs/InputRc.md)
- [UavcanParameterRequest](../msg_docs/UavcanParameterRequest.md)
- [FixedWingRunwayControl](../msg_docs/FixedWingRunwayControl.md)
- [SensorCorrection](../msg_docs/SensorCorrection.md)
- [ControlAllocatorStatus](../msg_docs/ControlAllocatorStatus.md)
- [AirspeedValidatedV0](../msg_docs/AirspeedValidatedV0.md)
- [CanInterfaceStatus](../msg_docs/CanInterfaceStatus.md)
- [SensorSelection](../msg_docs/SensorSelection.md)
- [DeviceInformation](../msg_docs/DeviceInformation.md)
- [CameraTrigger](../msg_docs/CameraTrigger.md)
- [SensorAccel](../msg_docs/SensorAccel.md)
- [ActuatorServosTrim](../msg_docs/ActuatorServosTrim.md)
- [SensorsStatusImu](../msg_docs/SensorsStatusImu.md)
- [EstimatorBias3d](../msg_docs/EstimatorBias3d.md)
- [GimbalManagerStatus](../msg_docs/GimbalManagerStatus.md)
- [BatteryStatusV0](../msg_docs/BatteryStatusV0.md)
- [OpenDroneIdSelfId](../msg_docs/OpenDroneIdSelfId.md)
- [VehicleImu](../msg_docs/VehicleImu.md)
- [MissionResult](../msg_docs/MissionResult.md)
- [SensorAccelFifo](../msg_docs/SensorAccelFifo.md)
- [DistanceSensorModeChangeRequest](../msg_docs/DistanceSensorModeChangeRequest.md)
- [SensorPreflightMag](../msg_docs/SensorPreflightMag.md)
- [OrbTest](../msg_docs/OrbTest.md)
- [PositionControllerLandingStatus](../msg_docs/PositionControllerLandingStatus.md)
- [FuelTankStatus](../msg_docs/FuelTankStatus.md)
- [OpenDroneIdSystem](../msg_docs/OpenDroneIdSystem.md)
- [OrbitStatus](../msg_docs/OrbitStatus.md)
- [Px4ioStatus](../msg_docs/Px4ioStatus.md)
- [RtlStatus](../msg_docs/RtlStatus.md)
- [ButtonEvent](../msg_docs/ButtonEvent.md)
- [VehicleLocalPositionV0](../msg_docs/VehicleLocalPositionV0.md)
- [DebugValue](../msg_docs/DebugValue.md)
- [ParameterSetUsedRequest](../msg_docs/ParameterSetUsedRequest.md)
- [RoverSpeedStatus](../msg_docs/RoverSpeedStatus.md)
- [SensorHygrometer](../msg_docs/SensorHygrometer.md)
- [OpenDroneIdOperatorId](../msg_docs/OpenDroneIdOperatorId.md)
- [InternalCombustionEngineStatus](../msg_docs/InternalCombustionEngineStatus.md)
- [GpioOut](../msg_docs/GpioOut.md)
- [ActuatorTest](../msg_docs/ActuatorTest.md)
- [SensorBaro](../msg_docs/SensorBaro.md)
- [PositionControllerStatus](../msg_docs/PositionControllerStatus.md)
- [PurePursuitStatus](../msg_docs/PurePursuitStatus.md)
- [RoverRateStatus](../msg_docs/RoverRateStatus.md)
- [TecsStatus](../msg_docs/TecsStatus.md)
- [PpsCapture](../msg_docs/PpsCapture.md)
- [RaptorStatus](../msg_docs/RaptorStatus.md)
- [EventV0](../msg_docs/EventV0.md)
- [GpioRequest](../msg_docs/GpioRequest.md)
- [FollowTargetEstimator](../msg_docs/FollowTargetEstimator.md)
- [MagWorkerData](../msg_docs/MagWorkerData.md)
- [FollowTarget](../msg_docs/FollowTarget.md)
- [EstimatorAidSource1d](../msg_docs/EstimatorAidSource1d.md)
- [GimbalDeviceSetAttitude](../msg_docs/GimbalDeviceSetAttitude.md)
- [SensorGnssRelative](../msg_docs/SensorGnssRelative.md)
- [ActionRequest](../msg_docs/ActionRequest.md)
- [NavigatorMissionItem](../msg_docs/NavigatorMissionItem.md)
- [GpsInjectData](../msg_docs/GpsInjectData.md)
- [VehicleStatusV0](../msg_docs/VehicleStatusV0.md)
- [DronecanNodeStatus](../msg_docs/DronecanNodeStatus.md)
- [UlogStream](../msg_docs/UlogStream.md)
- [DebugKeyValue](../msg_docs/DebugKeyValue.md)
- [NavigatorStatus](../msg_docs/NavigatorStatus.md)
- [MountOrientation](../msg_docs/MountOrientation.md)
- [RcParameterMap](../msg_docs/RcParameterMap.md)
- [AdcReport](../msg_docs/AdcReport.md)
- [EstimatorSensorBias](../msg_docs/EstimatorSensorBias.md)
- [InternalCombustionEngineControl](../msg_docs/InternalCombustionEngineControl.md)
- [MavlinkLog](../msg_docs/MavlinkLog.md)
- [VehicleMagnetometer](../msg_docs/VehicleMagnetometer.md)
- [GpioConfig](../msg_docs/GpioConfig.md)
- [GainCompression](../msg_docs/GainCompression.md)
- [DebugVect](../msg_docs/DebugVect.md)
- [ArmingCheckReplyV0](../msg_docs/ArmingCheckReplyV0.md)
- [VehicleAttitudeSetpointV0](../msg_docs/VehicleAttitudeSetpointV0.md)
- [FollowTargetStatus](../msg_docs/FollowTargetStatus.md)
- [RtlTimeEstimate](../msg_docs/RtlTimeEstimate.md)
- [RoverAttitudeStatus](../msg_docs/RoverAttitudeStatus.md)
- [SensorUwb](../msg_docs/SensorUwb.md)
- [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md)
- [VelocityLimits](../msg_docs/VelocityLimits.md)
- [TrajectorySetpoint6dof](../msg_docs/TrajectorySetpoint6dof.md)
- [OpenDroneIdArmStatus](../msg_docs/OpenDroneIdArmStatus.md)
- [EscStatus](../msg_docs/EscStatus.md)
- [GimbalManagerInformation](../msg_docs/GimbalManagerInformation.md)
- [HeaterStatus](../msg_docs/HeaterStatus.md)
- [EstimatorSelectorStatus](../msg_docs/EstimatorSelectorStatus.md)
- [GeofenceResult](../msg_docs/GeofenceResult.md)
- [PowerButtonState](../msg_docs/PowerButtonState.md)
- [Rpm](../msg_docs/Rpm.md)
- [WheelEncoders](../msg_docs/WheelEncoders.md)
- [LoggerStatus](../msg_docs/LoggerStatus.md)
- [CellularStatus](../msg_docs/CellularStatus.md)
- [TuneControl](../msg_docs/TuneControl.md)
- [ConfigOverridesV0](../msg_docs/ConfigOverridesV0.md)
- [GimbalManagerSetAttitude](../msg_docs/GimbalManagerSetAttitude.md)
- [OrbTestLarge](../msg_docs/OrbTestLarge.md)
- [BatteryInfo](../msg_docs/BatteryInfo.md)
- [CameraStatus](../msg_docs/CameraStatus.md)
- [QshellRetval](../msg_docs/QshellRetval.md)
- [SensorMag](../msg_docs/SensorMag.md)
- [RateCtrlStatus](../msg_docs/RateCtrlStatus.md)
- [TaskStackInfo](../msg_docs/TaskStackInfo.md)
- [EstimatorAidSource2d](../msg_docs/EstimatorAidSource2d.md)
- [AirspeedWind](../msg_docs/AirspeedWind.md)
- [AutotuneAttitudeControlStatus](../msg_docs/AutotuneAttitudeControlStatus.md)
- [GimbalDeviceInformation](../msg_docs/GimbalDeviceInformation.md)
- [GpsDump](../msg_docs/GpsDump.md)
- [PwmInput](../msg_docs/PwmInput.md)
- [SensorTemp](../msg_docs/SensorTemp.md)
- [ParameterResetRequest](../msg_docs/ParameterResetRequest.md)
- [BatteryStatusV0](../msg_docs/BatteryStatusV0.md)
- [TiltrotorExtraControls](../msg_docs/TiltrotorExtraControls.md)
- [SensorsStatus](../msg_docs/SensorsStatus.md)
- [EstimatorStatus](../msg_docs/EstimatorStatus.md)
- [FailureDetectorStatus](../msg_docs/FailureDetectorStatus.md)
- [VehicleAirData](../msg_docs/VehicleAirData.md)
- [RcChannels](../msg_docs/RcChannels.md)
- [ActuatorOutputs](../msg_docs/ActuatorOutputs.md)
- [MountOrientation](../msg_docs/MountOrientation.md)
- [HoverThrustEstimate](../msg_docs/HoverThrustEstimate.md)
- [SensorAccel](../msg_docs/SensorAccel.md)
- [ParameterUpdate](../msg_docs/ParameterUpdate.md)
- [SatelliteInfo](../msg_docs/SatelliteInfo.md)
- [DatamanRequest](../msg_docs/DatamanRequest.md)
- [AirspeedWind](../msg_docs/AirspeedWind.md)
- [EstimatorGpsStatus](../msg_docs/EstimatorGpsStatus.md)
- [VelocityLimits](../msg_docs/VelocityLimits.md)
- [Vtx](../msg_docs/Vtx.md)
- [PowerMonitor](../msg_docs/PowerMonitor.md)
- [Mission](../msg_docs/Mission.md)
- [SensorGnssRelative](../msg_docs/SensorGnssRelative.md)
- [AdcReport](../msg_docs/AdcReport.md)
- [FollowTargetStatus](../msg_docs/FollowTargetStatus.md)
- [RoverSpeedStatus](../msg_docs/RoverSpeedStatus.md)
- [ParameterSetUsedRequest](../msg_docs/ParameterSetUsedRequest.md)
- [VehicleImuStatus](../msg_docs/VehicleImuStatus.md)
- [MagWorkerData](../msg_docs/MagWorkerData.md)
- [RoverRateStatus](../msg_docs/RoverRateStatus.md)
- [ActuatorControlsStatus](../msg_docs/ActuatorControlsStatus.md)
- [TakeoffStatus](../msg_docs/TakeoffStatus.md)
- [GeneratorStatus](../msg_docs/GeneratorStatus.md)
- [SensorGyroFifo](../msg_docs/SensorGyroFifo.md)
- [OrbTestMedium](../msg_docs/OrbTestMedium.md)
- [BatteryInfo](../msg_docs/BatteryInfo.md)
- [Event](../msg_docs/Event.md)
- [DeviceInformation](../msg_docs/DeviceInformation.md)
- [LoggerStatus](../msg_docs/LoggerStatus.md)
- [AirspeedValidatedV0](../msg_docs/AirspeedValidatedV0.md)
- [CameraTrigger](../msg_docs/CameraTrigger.md)
- [FixedWingLateralStatus](../msg_docs/FixedWingLateralStatus.md)
- [DebugValue](../msg_docs/DebugValue.md)
- [GpioOut](../msg_docs/GpioOut.md)
- [RtlTimeEstimate](../msg_docs/RtlTimeEstimate.md)
- [SensorBaro](../msg_docs/SensorBaro.md)
- [Rpm](../msg_docs/Rpm.md)
- [ConfigOverridesV0](../msg_docs/ConfigOverridesV0.md)
- [VehicleOpticalFlow](../msg_docs/VehicleOpticalFlow.md)
- [GimbalManagerInformation](../msg_docs/GimbalManagerInformation.md)
- [LogMessage](../msg_docs/LogMessage.md)
- [EventV0](../msg_docs/EventV0.md)
- [TrajectorySetpoint6dof](../msg_docs/TrajectorySetpoint6dof.md)
- [FollowTarget](../msg_docs/FollowTarget.md)
- [UavcanParameterValue](../msg_docs/UavcanParameterValue.md)
- [OrbTest](../msg_docs/OrbTest.md)
- [OrbitStatus](../msg_docs/OrbitStatus.md)
- [MavlinkTunnel](../msg_docs/MavlinkTunnel.md)
- [IrlockReport](../msg_docs/IrlockReport.md)
- [Cpuload](../msg_docs/Cpuload.md)
- [VehicleAirData](../msg_docs/VehicleAirData.md)
- [NeuralControl](../msg_docs/NeuralControl.md)
- [OrbTestLarge](../msg_docs/OrbTestLarge.md)
- [ArmingCheckReplyV0](../msg_docs/ArmingCheckReplyV0.md)
- [EstimatorStatus](../msg_docs/EstimatorStatus.md)
- [OpenDroneIdOperatorId](../msg_docs/OpenDroneIdOperatorId.md)
- [Ping](../msg_docs/Ping.md)
- [PositionControllerStatus](../msg_docs/PositionControllerStatus.md)
- [CameraCapture](../msg_docs/CameraCapture.md)
- [EstimatorAidSource2d](../msg_docs/EstimatorAidSource2d.md)
- [ParameterSetValueResponse](../msg_docs/ParameterSetValueResponse.md)
- [QshellReq](../msg_docs/QshellReq.md)
- [GainCompression](../msg_docs/GainCompression.md)
- [OpenDroneIdSelfId](../msg_docs/OpenDroneIdSelfId.md)
- [PowerButtonState](../msg_docs/PowerButtonState.md)
- [RcParameterMap](../msg_docs/RcParameterMap.md)
- [RadioStatus](../msg_docs/RadioStatus.md)
- [FlightPhaseEstimation](../msg_docs/FlightPhaseEstimation.md)
- [RtlStatus](../msg_docs/RtlStatus.md)
- [GpsDump](../msg_docs/GpsDump.md)
- [UlogStream](../msg_docs/UlogStream.md)
- [RegisterExtComponentReplyV0](../msg_docs/RegisterExtComponentReplyV0.md)
- [PositionSetpoint](../msg_docs/PositionSetpoint.md)
- [SensorGyro](../msg_docs/SensorGyro.md)
- [SensorAccelFifo](../msg_docs/SensorAccelFifo.md)
- [EstimatorSelectorStatus](../msg_docs/EstimatorSelectorStatus.md)
- [NormalizedUnsignedSetpoint](../msg_docs/NormalizedUnsignedSetpoint.md)
- [EstimatorEventFlags](../msg_docs/EstimatorEventFlags.md)
- [ManualControlSwitches](../msg_docs/ManualControlSwitches.md)
- [HealthReport](../msg_docs/HealthReport.md)
- [GimbalDeviceSetAttitude](../msg_docs/GimbalDeviceSetAttitude.md)
- [FuelTankStatus](../msg_docs/FuelTankStatus.md)
- [ActionRequest](../msg_docs/ActionRequest.md)
- [EscStatus](../msg_docs/EscStatus.md)
- [VehicleAngularVelocity](../msg_docs/VehicleAngularVelocity.md)
- [InternalCombustionEngineControl](../msg_docs/InternalCombustionEngineControl.md)
- [EscReport](../msg_docs/EscReport.md)
- [VehicleMagnetometer](../msg_docs/VehicleMagnetometer.md)
- [UavcanParameterRequest](../msg_docs/UavcanParameterRequest.md)
- [VehicleRoi](../msg_docs/VehicleRoi.md)
- [EstimatorStates](../msg_docs/EstimatorStates.md)
- [OpenDroneIdSystem](../msg_docs/OpenDroneIdSystem.md)
- [ControlAllocatorStatus](../msg_docs/ControlAllocatorStatus.md)
- [GeneratorStatus](../msg_docs/GeneratorStatus.md)
- [InternalCombustionEngineStatus](../msg_docs/InternalCombustionEngineStatus.md)
- [HomePositionV0](../msg_docs/HomePositionV0.md)
- [Gripper](../msg_docs/Gripper.md)
- [PpsCapture](../msg_docs/PpsCapture.md)
- [EstimatorSensorBias](../msg_docs/EstimatorSensorBias.md)
- [EstimatorBias](../msg_docs/EstimatorBias.md)
- [EstimatorAidSource3d](../msg_docs/EstimatorAidSource3d.md)
- [Px4ioStatus](../msg_docs/Px4ioStatus.md)
- [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md)
- [InputRc](../msg_docs/InputRc.md)
- [VehicleStatusV0](../msg_docs/VehicleStatusV0.md)
- [VehicleAngularAccelerationSetpoint](../msg_docs/VehicleAngularAccelerationSetpoint.md)
- [HeaterStatus](../msg_docs/HeaterStatus.md)
- [VehicleOpticalFlowVel](../msg_docs/VehicleOpticalFlowVel.md)
- [EstimatorInnovations](../msg_docs/EstimatorInnovations.md)
- [RaptorStatus](../msg_docs/RaptorStatus.md)
- [TecsStatus](../msg_docs/TecsStatus.md)
- [RateCtrlStatus](../msg_docs/RateCtrlStatus.md)
- [RegisterExtComponentRequestV0](../msg_docs/RegisterExtComponentRequestV0.md)
- [GpioIn](../msg_docs/GpioIn.md)
- [SensorGyroFifo](../msg_docs/SensorGyroFifo.md)
- [CanInterfaceStatus](../msg_docs/CanInterfaceStatus.md)
- [MagnetometerBiasEstimate](../msg_docs/MagnetometerBiasEstimate.md)
- [GimbalManagerSetManualControl](../msg_docs/GimbalManagerSetManualControl.md)
- [SensorGyroFft](../msg_docs/SensorGyroFft.md)
- [SensorMag](../msg_docs/SensorMag.md)
- [DatamanResponse](../msg_docs/DatamanResponse.md)
- [DebugVect](../msg_docs/DebugVect.md)
- [GimbalDeviceInformation](../msg_docs/GimbalDeviceInformation.md)
- [LaunchDetectionStatus](../msg_docs/LaunchDetectionStatus.md)
- [MissionResult](../msg_docs/MissionResult.md)
- [NavigatorMissionItem](../msg_docs/NavigatorMissionItem.md)
- [RoverAttitudeStatus](../msg_docs/RoverAttitudeStatus.md)
- [DronecanNodeStatus](../msg_docs/DronecanNodeStatus.md)
- [GimbalManagerSetAttitude](../msg_docs/GimbalManagerSetAttitude.md)
- [NavigatorStatus](../msg_docs/NavigatorStatus.md)
- [SensorUwb](../msg_docs/SensorUwb.md)
- [RaptorInput](../msg_docs/RaptorInput.md)
- [VehicleConstraints](../msg_docs/VehicleConstraints.md)
- [MavlinkLog](../msg_docs/MavlinkLog.md)
- [GpioRequest](../msg_docs/GpioRequest.md)
- [SensorSelection](../msg_docs/SensorSelection.md)
- [VehicleAttitudeSetpointV0](../msg_docs/VehicleAttitudeSetpointV0.md)
- [EstimatorAidSource1d](../msg_docs/EstimatorAidSource1d.md)
- [UlogStreamAck](../msg_docs/UlogStreamAck.md)
- [ParameterResetRequest](../msg_docs/ParameterResetRequest.md)
- [SensorPreflightMag](../msg_docs/SensorPreflightMag.md)
- [DebugKeyValue](../msg_docs/DebugKeyValue.md)
- [ActuatorTest](../msg_docs/ActuatorTest.md)
- [FollowTargetEstimator](../msg_docs/FollowTargetEstimator.md)
- [AutotuneAttitudeControlStatus](../msg_docs/AutotuneAttitudeControlStatus.md)
- [LandingTargetPose](../msg_docs/LandingTargetPose.md)
- [FailureDetectorStatus](../msg_docs/FailureDetectorStatus.md)
- [TaskStackInfo](../msg_docs/TaskStackInfo.md)
- [QshellRetval](../msg_docs/QshellRetval.md)
- [SensorAirflow](../msg_docs/SensorAirflow.md)
- [VehicleLocalPositionSetpoint](../msg_docs/VehicleLocalPositionSetpoint.md)
- [GeofenceStatus](../msg_docs/GeofenceStatus.md)
- [ButtonEvent](../msg_docs/ButtonEvent.md)
- [LedControl](../msg_docs/LedControl.md)
- [EstimatorBias3d](../msg_docs/EstimatorBias3d.md)
- [LandingGearWheel](../msg_docs/LandingGearWheel.md)
- [ParameterSetValueRequest](../msg_docs/ParameterSetValueRequest.md)
- [RegisterExtComponentReplyV0](../msg_docs/RegisterExtComponentReplyV0.md)
- [RaptorInput](../msg_docs/RaptorInput.md)
- [SensorGyro](../msg_docs/SensorGyro.md)
- [ParameterUpdate](../msg_docs/ParameterUpdate.md)
- [NormalizedUnsignedSetpoint](../msg_docs/NormalizedUnsignedSetpoint.md)
- [PositionSetpoint](../msg_docs/PositionSetpoint.md)
- [EstimatorStates](../msg_docs/EstimatorStates.md)
- [ActuatorOutputs](../msg_docs/ActuatorOutputs.md)
- [ManualControlSwitches](../msg_docs/ManualControlSwitches.md)
- [UavcanParameterValue](../msg_docs/UavcanParameterValue.md)
- [VehicleAngularAccelerationSetpoint](../msg_docs/VehicleAngularAccelerationSetpoint.md)
- [EstimatorEventFlags](../msg_docs/EstimatorEventFlags.md)
- [SensorGnssStatus](../msg_docs/SensorGnssStatus.md)
- [GimbalManagerSetManualControl](../msg_docs/GimbalManagerSetManualControl.md)
- [HomePositionV0](../msg_docs/HomePositionV0.md)
- [FixedWingLateralStatus](../msg_docs/FixedWingLateralStatus.md)
- [SatelliteInfo](../msg_docs/SatelliteInfo.md)
- [IrlockReport](../msg_docs/IrlockReport.md)
- [Ping](../msg_docs/Ping.md)
- [CameraCapture](../msg_docs/CameraCapture.md)
- [Vtx](../msg_docs/Vtx.md)
- [PurePursuitStatus](../msg_docs/PurePursuitStatus.md)
- [VehicleImu](../msg_docs/VehicleImu.md)
- [CellularStatus](../msg_docs/CellularStatus.md)
- [ArmingCheckRequestV0](../msg_docs/ArmingCheckRequestV0.md)
- [DistanceSensorModeChangeRequest](../msg_docs/DistanceSensorModeChangeRequest.md)
- [WheelEncoders](../msg_docs/WheelEncoders.md)
- [Ekf2Timestamps](../msg_docs/Ekf2Timestamps.md)
- [RegisterExtComponentRequestV0](../msg_docs/RegisterExtComponentRequestV0.md)
- [EscReport](../msg_docs/EscReport.md)
- [Gripper](../msg_docs/Gripper.md)
- [UlogStreamAck](../msg_docs/UlogStreamAck.md)
- [SensorGyroFft](../msg_docs/SensorGyroFft.md)
- [VehicleRoi](../msg_docs/VehicleRoi.md)
- [VehicleAcceleration](../msg_docs/VehicleAcceleration.md)
- [NeuralControl](../msg_docs/NeuralControl.md)
- [DatamanResponse](../msg_docs/DatamanResponse.md)
- [GimbalControls](../msg_docs/GimbalControls.md)
- [MavlinkTunnel](../msg_docs/MavlinkTunnel.md)
- [EstimatorAidSource3d](../msg_docs/EstimatorAidSource3d.md)
- [DatamanRequest](../msg_docs/DatamanRequest.md)
- [Event](../msg_docs/Event.md)
- [RadioStatus](../msg_docs/RadioStatus.md)
- [VehicleOpticalFlowVel](../msg_docs/VehicleOpticalFlowVel.md)
- [FixedWingLateralGuidanceStatus](../msg_docs/FixedWingLateralGuidanceStatus.md)
- [SystemPower](../msg_docs/SystemPower.md)
- [ActuatorServosTrim](../msg_docs/ActuatorServosTrim.md)
- [FigureEightStatus](../msg_docs/FigureEightStatus.md)
- [SensorCorrection](../msg_docs/SensorCorrection.md)
- [Airspeed](../msg_docs/Airspeed.md)
- [SensorsStatusImu](../msg_docs/SensorsStatusImu.md)
- [VehicleLocalPositionV0](../msg_docs/VehicleLocalPositionV0.md)
- [LandingTargetInnovations](../msg_docs/LandingTargetInnovations.md)
- [OpenDroneIdArmStatus](../msg_docs/OpenDroneIdArmStatus.md)
- [IridiumsbdStatus](../msg_docs/IridiumsbdStatus.md)
- [ActuatorArmed](../msg_docs/ActuatorArmed.md)
- [VehicleStatusV1](../msg_docs/VehicleStatusV1.md)
- [TuneControl](../msg_docs/TuneControl.md)
- [GeofenceResult](../msg_docs/GeofenceResult.md)
- [GimbalControls](../msg_docs/GimbalControls.md)
- [DifferentialPressure](../msg_docs/DifferentialPressure.md)
- [SensorsStatus](../msg_docs/SensorsStatus.md)
- [SensorHygrometer](../msg_docs/SensorHygrometer.md)
- [GpsInjectData](../msg_docs/GpsInjectData.md)
- [CameraStatus](../msg_docs/CameraStatus.md)
- [DebugArray](../msg_docs/DebugArray.md)
- [SensorGnssStatus](../msg_docs/SensorGnssStatus.md)
- [TakeoffStatus](../msg_docs/TakeoffStatus.md)
- [VehicleAcceleration](../msg_docs/VehicleAcceleration.md)
- [FixedWingRunwayControl](../msg_docs/FixedWingRunwayControl.md)
:::
@@ -98,13 +98,56 @@ leddar_one <command> [arguments...]
stop Stop driver
```
## lightware_grf_serial
Source: [drivers/distance_sensor/lightware_grf_serial](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/lightware_grf_serial)
### Description
Serial bus driver for the Lightware GRF Laser rangefinder.
### Configuration
https://docs.px4.io/main/en/sensor/grf_lidar
### Parameters
https://docs.px4.io/main/en/advanced_config/parameter_reference#GRF_SENS_MODEL
https://docs.px4.io/main/en/advanced_config/parameter_reference#GRF_RATE_CFG
https://docs.px4.io/main/en/advanced_config/parameter_reference#SENS_EN_GRF_CFG
### Examples
Attempt to start driver on a specified serial device.
```
lightware_grf_serial start -d /dev/ttyS1
```
Stop driver
```
lightware_grf_serial stop
```
### Usage {#lightware_grf_serial_usage}
```
lightware_grf_serial <command> [arguments...]
Commands:
start Start driver
-d <val> Serial device
stop Stop driver
```
## lightware_laser_i2c
Source: [drivers/distance_sensor/lightware_laser_i2c](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/distance_sensor/lightware_laser_i2c)
### Description
I2C bus driver for Lightware SFxx series LIDAR rangefinders: SF10/a, SF10/b, SF10/c, SF11/c, SF/LW20, SF30/d.
I2C bus driver for Lightware LIDAR rangefinders: SF10/a, SF10/b, SF10/c, SF11/c, SF/LW20, SF/LW30/d, GRF250, GRF500.
Setup/usage information: https://docs.px4.io/main/en/sensor/sfxx_lidar.html
@@ -122,8 +165,6 @@ lightware_laser_i2c <command> [arguments...]
[-q] quiet startup (no message if no device found)
[-a <val>] I2C address
default: 102
[-R <val>] Sensor rotation - downward facing by default
default: 25
stop
+2 -5
View File
@@ -17,8 +17,7 @@ as well as tracking of the used firmware versions on the devices.
| ---------------- | ---------- | ------------ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| timestamp | `uint64` | | | time since system start (microseconds) |
| device_type | `uint8` | | [DEVICE_TYPE](#DEVICE_TYPE) | Type of the device. Matches MAVLink DEVICE_TYPE enum |
| vendor_name | `char[32]` | | | Name of the device vendor |
| model_name | `char[32]` | | | Name of the device model |
| name | `char[80]` | | | Name of device e.g. DroneCAN node name |
| `uint32` | | | Unique device ID for the sensor. Does not change between power cycles. (Invalid: 0 if not available) |
| firmware_version | `char[24]` | | | Firmware version. (Invalid: empty if not available) |
| hardware_version | `char[24]` | | | Hardware version. (Invalid: empty if not available) |
@@ -62,7 +61,6 @@ as well as tracking of the used firmware versions on the devices.
uint64 timestamp # time since system start (microseconds)
uint8 device_type # [@enum DEVICE_TYPE] Type of the device. Matches MAVLink DEVICE_TYPE enum
uint8 DEVICE_TYPE_GENERIC = 0 # Generic/unknown sensor
uint8 DEVICE_TYPE_AIRSPEED = 1 # Airspeed sensor
uint8 DEVICE_TYPE_ESC = 2 # ESC
@@ -80,8 +78,7 @@ uint8 DEVICE_TYPE_DIFFERENTIAL_PRESSURE = 13 # Differential pressure
uint8 DEVICE_TYPE_BATTERY = 14 # Battery
uint8 DEVICE_TYPE_HYGROMETER = 15 # Hygrometer
char[32] vendor_name # Name of the device vendor
char[32] model_name # Name of the device model
char[80] name # Name of device e.g. DroneCAN node name
uint32 device_id # [-] [@invalid 0 if not available] Unique device ID for the sensor. Does not change between power cycles.
char[24] firmware_version # [-] [@invalid empty if not available] Firmware version.
+2
View File
@@ -16,6 +16,7 @@ pageClass: is-wide-page
| esc_voltage | `float32` | | | Voltage measured from current ESC [V] - if supported |
| esc_current | `float32` | | | Current measured from current ESC [A] - if supported |
| esc_temperature | `float32` | | | Temperature measured from current ESC [degC] - if supported |
| motor_temperature | `int16` | | | Temperature measured from current motor [degC] - if supported |
| esc_address | `uint8` | | | Address of current ESC (in most cases 1-8 / must be set by driver) |
| esc_cmdcount | `uint8` | | | Counter of number of commands |
| esc_state | `uint8` | | | State of ESC - depend on Vendor |
@@ -64,6 +65,7 @@ int32 esc_rpm # Motor RPM, negative for reverse rotation [RPM] - if support
float32 esc_voltage # Voltage measured from current ESC [V] - if supported
float32 esc_current # Current measured from current ESC [A] - if supported
float32 esc_temperature # Temperature measured from current ESC [degC] - if supported
int16 motor_temperature # Temperature measured from current motor [degC] - if supported
uint8 esc_address # Address of current ESC (in most cases 1-8 / must be set by driver)
uint8 esc_cmdcount # Counter of number of commands
+7 -4
View File
@@ -10,10 +10,11 @@ Status of the launch detection state machine (fixed-wing only).
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ---------------------- | -------- | ------------ | ---------- | -------------------------------------- |
| timestamp | `uint64` | | | time since system start (microseconds) |
| launch_detection_state | `uint8` | | |
| Name | Type | Unit [Frame] | Range/Enum | Description |
| --------------------------------- | -------- | ------------ | ---------- | ------------------------------------------------------------------------------------------------------------- |
| timestamp | `uint64` | | | time since system start (microseconds) |
| launch_detection_state | `uint8` | | |
| selected_control_surface_disarmed | `bool` | | | flag indicating whether selected actuators should kept disarmed (have to be configured in control allocation) |
## Constants
@@ -39,6 +40,8 @@ uint8 STATE_LAUNCH_DETECTED_DISABLED_MOTOR = 1 # launch detected, but keep moto
uint8 STATE_FLYING = 2 # launch detected, use normal takeoff/flying configuration
uint8 launch_detection_state
bool selected_control_surface_disarmed # [-] flag indicating whether selected actuators should kept disarmed (have to be configured in control allocation)
```
:::
+2
View File
@@ -36,6 +36,7 @@ pageClass: is-wide-page
| heartbeat_type_onboard_controller | `bool` | | | MAV_TYPE_ONBOARD_CONTROLLER |
| heartbeat_type_gimbal | `bool` | | | MAV_TYPE_GIMBAL |
| heartbeat_type_adsb | `bool` | | | MAV_TYPE_ADSB |
| heartbeat_type_flarm | `bool` | | | MAV_TYPE_FLARM |
| heartbeat_type_camera | `bool` | | | MAV_TYPE_CAMERA |
| heartbeat_type_parachute | `bool` | | | MAV_TYPE_PARACHUTE |
| heartbeat_type_open_drone_id | `bool` | | | MAV_TYPE_ODID |
@@ -112,6 +113,7 @@ bool heartbeat_type_gcs # MAV_TYPE_GCS
bool heartbeat_type_onboard_controller # MAV_TYPE_ONBOARD_CONTROLLER
bool heartbeat_type_gimbal # MAV_TYPE_GIMBAL
bool heartbeat_type_adsb # MAV_TYPE_ADSB
bool heartbeat_type_flarm # MAV_TYPE_FLARM
bool heartbeat_type_camera # MAV_TYPE_CAMERA
bool heartbeat_type_parachute # MAV_TYPE_PARACHUTE
bool heartbeat_type_open_drone_id # MAV_TYPE_ODID
+48 -43
View File
@@ -10,53 +10,55 @@ Encodes the system state of the vehicle published by commander.
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ---------------------------- | -------- | ------------ | ---------- | ----------------------------------------------------------------------------------------------- |
| timestamp | `uint64` | | | time since system start (microseconds) |
| armed_time | `uint64` | | | Arming timestamp (microseconds) |
| takeoff_time | `uint64` | | | Takeoff timestamp (microseconds) |
| arming_state | `uint8` | | |
| latest_arming_reason | `uint8` | | |
| latest_disarming_reason | `uint8` | | |
| nav_state_timestamp | `uint64` | | | time when current nav_state activated |
| nav_state_user_intention | `uint8` | | | Mode that the user selected (might be different from nav_state in a failsafe situation) |
| nav_state | `uint8` | | | Currently active mode |
| executor_in_charge | `uint8` | | | Current mode executor in charge (0=Autopilot) |
| valid_nav_states_mask | `uint32` | | | Bitmask for all valid nav_state values |
| can_set_nav_states_mask | `uint32` | | | Bitmask for all modes that a user can select |
| failure_detector_status | `uint16` | | |
| hil_state | `uint8` | | |
| vehicle_type | `uint8` | | |
| failsafe | `bool` | | | true if system is in failsafe state (e.g.:RTL, Hover, Terminate, ...) |
| failsafe_and_user_took_over | `bool` | | | true if system is in failsafe state but the user took over control |
| failsafe_defer_state | `uint8` | | | one of FAILSAFE*DEFER_STATE*\* |
| gcs_connection_lost | `bool` | | | datalink to GCS lost |
| gcs_connection_lost_counter | `uint8` | | | counts unique GCS connection lost events |
| high_latency_data_link_lost | `bool` | | | Set to true if the high latency data link (eg. RockBlock Iridium 9603 telemetry module) is lost |
| is_vtol | `bool` | | | True if the system is VTOL capable |
| is_vtol_tailsitter | `bool` | | | True if the system performs a 90° pitch down rotation during transition from MC to FW |
| in_transition_mode | `bool` | | | True if VTOL is doing a transition |
| in_transition_to_fw | `bool` | | | True if VTOL is doing a transition from MC to FW |
| system_type | `uint8` | | | system type, contains mavlink MAV_TYPE |
| system_id | `uint8` | | | system id, contains MAVLink's system ID field |
| component_id | `uint8` | | | subsystem / component id, contains MAVLink's component ID field |
| safety_button_available | `bool` | | | Set to true if a safety button is connected |
| safety_off | `bool` | | | Set to true if safety is off |
| power_input_valid | `bool` | | | set if input power is valid |
| usb_connected | `bool` | | | set to true (never cleared) once telemetry received from usb link |
| open_drone_id_system_present | `bool` | | |
| open_drone_id_system_healthy | `bool` | | |
| parachute_system_present | `bool` | | |
| parachute_system_healthy | `bool` | | |
| rc_calibration_in_progress | `bool` | | |
| calibration_enabled | `bool` | | |
| pre_flight_checks_pass | `bool` | | | true if all checks necessary to arm pass |
| Name | Type | Unit [Frame] | Range/Enum | Description |
| -------------------------------- | -------- | ------------ | ---------- | ----------------------------------------------------------------------------------------------- |
| timestamp | `uint64` | | | time since system start (microseconds) |
| armed_time | `uint64` | | | Arming timestamp (microseconds) |
| takeoff_time | `uint64` | | | Takeoff timestamp (microseconds) |
| arming_state | `uint8` | | |
| latest_arming_reason | `uint8` | | |
| latest_disarming_reason | `uint8` | | |
| nav_state_timestamp | `uint64` | | | time when current nav_state activated |
| nav_state_user_intention | `uint8` | | | Mode that the user selected (might be different from nav_state in a failsafe situation) |
| nav_state | `uint8` | | | Currently active mode |
| executor_in_charge | `uint8` | | | Current mode executor in charge (0=Autopilot) |
| nav_state_display | `uint8` | | | User-visible nav state sent via MAVLink (executor state if active, otherwise nav_state) |
| valid_nav_states_mask | `uint32` | | | Bitmask for all valid nav_state values |
| can_set_nav_states_mask | `uint32` | | | Bitmask for all modes that a user can select |
| failure_detector_status | `uint16` | | |
| hil_state | `uint8` | | |
| vehicle_type | `uint8` | | |
| failsafe | `bool` | | | true if system is in failsafe state (e.g.:RTL, Hover, Terminate, ...) |
| failsafe_and_user_took_over | `bool` | | | true if system is in failsafe state but the user took over control |
| failsafe_defer_state | `uint8` | | | one of FAILSAFE*DEFER_STATE*\* |
| gcs_connection_lost | `bool` | | | datalink to GCS lost |
| gcs_connection_lost_counter | `uint8` | | | counts unique GCS connection lost events |
| high_latency_data_link_lost | `bool` | | | Set to true if the high latency data link (eg. RockBlock Iridium 9603 telemetry module) is lost |
| is_vtol | `bool` | | | True if the system is VTOL capable |
| is_vtol_tailsitter | `bool` | | | True if the system performs a 90° pitch down rotation during transition from MC to FW |
| in_transition_mode | `bool` | | | True if VTOL is doing a transition |
| in_transition_to_fw | `bool` | | | True if VTOL is doing a transition from MC to FW |
| system_type | `uint8` | | | system type, contains mavlink MAV_TYPE |
| system_id | `uint8` | | | system id, contains MAVLink's system ID field |
| component_id | `uint8` | | | subsystem / component id, contains MAVLink's component ID field |
| safety_button_available | `bool` | | | Set to true if a safety button is connected |
| safety_off | `bool` | | | Set to true if safety is off |
| power_input_valid | `bool` | | | set if input power is valid |
| usb_connected | `bool` | | | set to true (never cleared) once telemetry received from usb link |
| open_drone_id_system_present | `bool` | | |
| open_drone_id_system_healthy | `bool` | | |
| parachute_system_present | `bool` | | |
| parachute_system_healthy | `bool` | | |
| traffic_avoidance_system_present | `bool` | | |
| rc_calibration_in_progress | `bool` | | |
| calibration_enabled | `bool` | | |
| pre_flight_checks_pass | `bool` | | | true if all checks necessary to arm pass |
## Constants
| Name | Type | Value | Description |
| ----------------------------------------------------------------------------------------- | -------- | ----- | ------------------------------------------------ |
| <a href="#MESSAGE_VERSION"></a> MESSAGE_VERSION | `uint32` | 1 |
| <a href="#MESSAGE_VERSION"></a> MESSAGE_VERSION | `uint32` | 2 |
| <a href="#ARMING_STATE_DISARMED"></a> ARMING_STATE_DISARMED | `uint8` | 1 |
| <a href="#ARMING_STATE_ARMED"></a> ARMING_STATE_ARMED | `uint8` | 2 |
| <a href="#ARM_DISARM_REASON_STICK_GESTURE"></a> ARM_DISARM_REASON_STICK_GESTURE | `uint8` | 1 |
@@ -129,7 +131,7 @@ Encodes the system state of the vehicle published by commander.
```c
# Encodes the system state of the vehicle published by commander
uint32 MESSAGE_VERSION = 1
uint32 MESSAGE_VERSION = 2
uint64 timestamp # time since system start (microseconds)
@@ -192,6 +194,7 @@ uint8 NAVIGATION_STATE_EXTERNAL8 = 30
uint8 NAVIGATION_STATE_MAX = 31
uint8 executor_in_charge # Current mode executor in charge (0=Autopilot)
uint8 nav_state_display # User-visible nav state sent via MAVLink (executor state if active, otherwise nav_state)
uint32 valid_nav_states_mask # Bitmask for all valid nav_state values
uint32 can_set_nav_states_mask # Bitmask for all modes that a user can select
@@ -255,6 +258,8 @@ bool open_drone_id_system_healthy
bool parachute_system_present
bool parachute_system_healthy
bool traffic_avoidance_system_present
bool rc_calibration_in_progress
bool calibration_enabled
+286
View File
@@ -0,0 +1,286 @@
---
pageClass: is-wide-page
---
# VehicleStatusV1 (UORB message)
Encodes the system state of the vehicle published by commander.
**TOPICS:** vehicle_statusv1
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ---------------------------- | -------- | -------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| timestamp | `uint64` | us | | Time since system start |
| armed_time | `uint64` | us | | Arming timestamp |
| takeoff_time | `uint64` | us | | Takeoff timestamp |
| arming_state | `uint8` | | |
| latest_arming_reason | `uint8` | | |
| latest_disarming_reason | `uint8` | | |
| nav_state_timestamp | `uint64` | | | Time when current nav_state activated |
| nav_state_user_intention | `uint8` | | | Mode that the user selected (might be different from nav_state in a failsafe situation) |
| nav_state | `uint8` | | [NAVIGATION_STATE](#NAVIGATION_STATE) | Currently active mode |
| executor_in_charge | `uint8` | | | Current mode executor in charge (0=Autopilot) |
| valid_nav_states_mask | `uint32` | | | Bitmask for all valid nav_state values |
| can_set_nav_states_mask | `uint32` | | | Bitmask for all modes that a user can select |
| failure_detector_status | `uint16` | | [FAILURE](#FAILURE) |
| hil_state | `uint8` | enum HIL_STATE | |
| vehicle_type | `uint8` | | [VEHICLE_TYPE](#VEHICLE_TYPE) |
| failsafe | `bool` | | | true if system is in failsafe state (e.g.:RTL, Hover, Terminate, ...) |
| failsafe_and_user_took_over | `bool` | | | true if system is in failsafe state but the user took over control |
| failsafe_defer_state | `uint8` | | [FAILSAFE_DEFER_STATE](#FAILSAFE_DEFER_STATE) |
| gcs_connection_lost | `bool` | | | datalink to GCS lost |
| gcs_connection_lost_counter | `uint8` | | | counts unique GCS connection lost events |
| high_latency_data_link_lost | `bool` | | | Set to true if the high latency data link (eg. RockBlock Iridium 9603 telemetry module) is lost |
| is_vtol | `bool` | | | True if the system is VTOL capable |
| is_vtol_tailsitter | `bool` | | | True if the system performs a 90° pitch down rotation during transition from MC to FW |
| in_transition_mode | `bool` | | | True if VTOL is doing a transition |
| in_transition_to_fw | `bool` | | | True if VTOL is doing a transition from MC to FW |
| system_type | `uint8` | | | system type, contains mavlink MAV_TYPE |
| system_id | `uint8` | | | system id, contains MAVLink's system ID field |
| component_id | `uint8` | | | subsystem / component id, contains MAVLink's component ID field |
| safety_button_available | `bool` | | | Set to true if a safety button is connected |
| safety_off | `bool` | | | Set to true if safety is off |
| power_input_valid | `bool` | | | Set if input power is valid |
| usb_connected | `bool` | | | Set to true (never cleared) once telemetry received from usb link |
| open_drone_id_system_present | `bool` | | |
| open_drone_id_system_healthy | `bool` | | |
| parachute_system_present | `bool` | | |
| parachute_system_healthy | `bool` | | |
| rc_calibration_in_progress | `bool` | | |
| calibration_enabled | `bool` | | |
| pre_flight_checks_pass | `bool` | | | true if all checks necessary to arm pass |
## Enums
### NAVIGATION_STATE {#NAVIGATION_STATE}
| Name | Type | Value | Description |
| --------------------------------------------------------------------------------------- | ------- | ----- | ------------------------------------- |
| <a href="#NAVIGATION_STATE_MANUAL"></a> NAVIGATION_STATE_MANUAL | `uint8` | 0 | Manual mode |
| <a href="#NAVIGATION_STATE_ALTCTL"></a> NAVIGATION_STATE_ALTCTL | `uint8` | 1 | Altitude control mode |
| <a href="#NAVIGATION_STATE_POSCTL"></a> NAVIGATION_STATE_POSCTL | `uint8` | 2 | Position control mode |
| <a href="#NAVIGATION_STATE_AUTO_MISSION"></a> NAVIGATION_STATE_AUTO_MISSION | `uint8` | 3 | Auto mission mode |
| <a href="#NAVIGATION_STATE_AUTO_LOITER"></a> NAVIGATION_STATE_AUTO_LOITER | `uint8` | 4 | Auto loiter mode |
| <a href="#NAVIGATION_STATE_AUTO_RTL"></a> NAVIGATION_STATE_AUTO_RTL | `uint8` | 5 | Auto return to launch mode |
| <a href="#NAVIGATION_STATE_POSITION_SLOW"></a> NAVIGATION_STATE_POSITION_SLOW | `uint8` | 6 |
| <a href="#NAVIGATION_STATE_FREE5"></a> NAVIGATION_STATE_FREE5 | `uint8` | 7 |
| <a href="#NAVIGATION_STATE_ALTITUDE_CRUISE"></a> NAVIGATION_STATE_ALTITUDE_CRUISE | `uint8` | 8 | Altitude with Cruise mode |
| <a href="#NAVIGATION_STATE_FREE3"></a> NAVIGATION_STATE_FREE3 | `uint8` | 9 |
| <a href="#NAVIGATION_STATE_ACRO"></a> NAVIGATION_STATE_ACRO | `uint8` | 10 | Acro mode |
| <a href="#NAVIGATION_STATE_FREE2"></a> NAVIGATION_STATE_FREE2 | `uint8` | 11 |
| <a href="#NAVIGATION_STATE_DESCEND"></a> NAVIGATION_STATE_DESCEND | `uint8` | 12 | Descend mode (no position control) |
| <a href="#NAVIGATION_STATE_TERMINATION"></a> NAVIGATION_STATE_TERMINATION | `uint8` | 13 | Termination mode |
| <a href="#NAVIGATION_STATE_OFFBOARD"></a> NAVIGATION_STATE_OFFBOARD | `uint8` | 14 |
| <a href="#NAVIGATION_STATE_STAB"></a> NAVIGATION_STATE_STAB | `uint8` | 15 | Stabilized mode |
| <a href="#NAVIGATION_STATE_FREE1"></a> NAVIGATION_STATE_FREE1 | `uint8` | 16 |
| <a href="#NAVIGATION_STATE_AUTO_TAKEOFF"></a> NAVIGATION_STATE_AUTO_TAKEOFF | `uint8` | 17 | Takeoff |
| <a href="#NAVIGATION_STATE_AUTO_LAND"></a> NAVIGATION_STATE_AUTO_LAND | `uint8` | 18 | Land |
| <a href="#NAVIGATION_STATE_AUTO_FOLLOW_TARGET"></a> NAVIGATION_STATE_AUTO_FOLLOW_TARGET | `uint8` | 19 | Auto Follow |
| <a href="#NAVIGATION_STATE_AUTO_PRECLAND"></a> NAVIGATION_STATE_AUTO_PRECLAND | `uint8` | 20 | Precision land with landing target |
| <a href="#NAVIGATION_STATE_ORBIT"></a> NAVIGATION_STATE_ORBIT | `uint8` | 21 | Orbit in a circle |
| <a href="#NAVIGATION_STATE_AUTO_VTOL_TAKEOFF"></a> NAVIGATION_STATE_AUTO_VTOL_TAKEOFF | `uint8` | 22 | Takeoff, transition, establish loiter |
| <a href="#NAVIGATION_STATE_EXTERNAL1"></a> NAVIGATION_STATE_EXTERNAL1 | `uint8` | 23 |
| <a href="#NAVIGATION_STATE_EXTERNAL2"></a> NAVIGATION_STATE_EXTERNAL2 | `uint8` | 24 |
| <a href="#NAVIGATION_STATE_EXTERNAL3"></a> NAVIGATION_STATE_EXTERNAL3 | `uint8` | 25 |
| <a href="#NAVIGATION_STATE_EXTERNAL4"></a> NAVIGATION_STATE_EXTERNAL4 | `uint8` | 26 |
| <a href="#NAVIGATION_STATE_EXTERNAL5"></a> NAVIGATION_STATE_EXTERNAL5 | `uint8` | 27 |
| <a href="#NAVIGATION_STATE_EXTERNAL6"></a> NAVIGATION_STATE_EXTERNAL6 | `uint8` | 28 |
| <a href="#NAVIGATION_STATE_EXTERNAL7"></a> NAVIGATION_STATE_EXTERNAL7 | `uint8` | 29 |
| <a href="#NAVIGATION_STATE_EXTERNAL8"></a> NAVIGATION_STATE_EXTERNAL8 | `uint8` | 30 |
| <a href="#NAVIGATION_STATE_MAX"></a> NAVIGATION_STATE_MAX | `uint8` | 31 |
### FAILURE {#FAILURE}
| Name | Type | Value | Description |
| --------------------------------------------------------------- | -------- | ----- | ----------- |
| <a href="#FAILURE_NONE"></a> FAILURE_NONE | `uint16` | 0 |
| <a href="#FAILURE_ROLL"></a> FAILURE_ROLL | `uint16` | 1 | (1 << 0) |
| <a href="#FAILURE_PITCH"></a> FAILURE_PITCH | `uint16` | 2 | (1 << 1) |
| <a href="#FAILURE_ALT"></a> FAILURE_ALT | `uint16` | 4 | (1 << 2) |
| <a href="#FAILURE_EXT"></a> FAILURE_EXT | `uint16` | 8 | (1 << 3) |
| <a href="#FAILURE_ARM_ESC"></a> FAILURE_ARM_ESC | `uint16` | 16 | (1 << 4) |
| <a href="#FAILURE_BATTERY"></a> FAILURE_BATTERY | `uint16` | 32 | (1 << 5) |
| <a href="#FAILURE_IMBALANCED_PROP"></a> FAILURE_IMBALANCED_PROP | `uint16` | 64 | (1 << 6) |
| <a href="#FAILURE_MOTOR"></a> FAILURE_MOTOR | `uint16` | 128 | (1 << 7) |
### VEHICLE_TYPE {#VEHICLE_TYPE}
| Name | Type | Value | Description |
| ----------------------------------------------------------------- | ------- | ----- | ----------- |
| <a href="#VEHICLE_TYPE_UNSPECIFIED"></a> VEHICLE_TYPE_UNSPECIFIED | `uint8` | 0 |
| <a href="#VEHICLE_TYPE_ROTARY_WING"></a> VEHICLE_TYPE_ROTARY_WING | `uint8` | 1 |
| <a href="#VEHICLE_TYPE_FIXED_WING"></a> VEHICLE_TYPE_FIXED_WING | `uint8` | 2 |
| <a href="#VEHICLE_TYPE_ROVER"></a> VEHICLE_TYPE_ROVER | `uint8` | 3 |
### FAILSAFE_DEFER_STATE {#FAILSAFE_DEFER_STATE}
| Name | Type | Value | Description |
| --------------------------------------------------------------------------------------- | ------- | ----- | ------------------------------------------------ |
| <a href="#FAILSAFE_DEFER_STATE_DISABLED"></a> FAILSAFE_DEFER_STATE_DISABLED | `uint8` | 0 |
| <a href="#FAILSAFE_DEFER_STATE_ENABLED"></a> FAILSAFE_DEFER_STATE_ENABLED | `uint8` | 1 |
| <a href="#FAILSAFE_DEFER_STATE_WOULD_FAILSAFE"></a> FAILSAFE_DEFER_STATE_WOULD_FAILSAFE | `uint8` | 2 | Failsafes deferred, but would trigger a failsafe |
## Constants
| Name | Type | Value | Description |
| ----------------------------------------------------------------------------------------- | -------- | ----- | ----------- |
| <a href="#MESSAGE_VERSION"></a> MESSAGE_VERSION | `uint32` | 1 |
| <a href="#ARMING_STATE_DISARMED"></a> ARMING_STATE_DISARMED | `uint8` | 1 |
| <a href="#ARMING_STATE_ARMED"></a> ARMING_STATE_ARMED | `uint8` | 2 |
| <a href="#ARM_DISARM_REASON_STICK_GESTURE"></a> ARM_DISARM_REASON_STICK_GESTURE | `uint8` | 1 |
| <a href="#ARM_DISARM_REASON_RC_SWITCH"></a> ARM_DISARM_REASON_RC_SWITCH | `uint8` | 2 |
| <a href="#ARM_DISARM_REASON_COMMAND_INTERNAL"></a> ARM_DISARM_REASON_COMMAND_INTERNAL | `uint8` | 3 |
| <a href="#ARM_DISARM_REASON_COMMAND_EXTERNAL"></a> ARM_DISARM_REASON_COMMAND_EXTERNAL | `uint8` | 4 |
| <a href="#ARM_DISARM_REASON_MISSION_START"></a> ARM_DISARM_REASON_MISSION_START | `uint8` | 5 |
| <a href="#ARM_DISARM_REASON_LANDING"></a> ARM_DISARM_REASON_LANDING | `uint8` | 6 |
| <a href="#ARM_DISARM_REASON_PREFLIGHT_INACTION"></a> ARM_DISARM_REASON_PREFLIGHT_INACTION | `uint8` | 7 |
| <a href="#ARM_DISARM_REASON_KILL_SWITCH"></a> ARM_DISARM_REASON_KILL_SWITCH | `uint8` | 8 |
| <a href="#ARM_DISARM_REASON_RC_BUTTON"></a> ARM_DISARM_REASON_RC_BUTTON | `uint8` | 13 |
| <a href="#ARM_DISARM_REASON_FAILSAFE"></a> ARM_DISARM_REASON_FAILSAFE | `uint8` | 14 |
| <a href="#HIL_STATE_OFF"></a> HIL_STATE_OFF | `uint8` | 0 |
| <a href="#HIL_STATE_ON"></a> HIL_STATE_ON | `uint8` | 1 |
## Source Message
[Source file (GitHub)](https://github.com/PX4/PX4-Autopilot/blob/main/msg/px4_msgs_old/msg/VehicleStatusV1.msg)
::: details Click here to see original file
```c
# Encodes the system state of the vehicle published by commander
uint32 MESSAGE_VERSION = 1
uint64 timestamp # [us] Time since system start
uint64 armed_time # [us] Arming timestamp
uint64 takeoff_time # [us] Takeoff timestamp
uint8 arming_state
uint8 ARMING_STATE_DISARMED = 1
uint8 ARMING_STATE_ARMED = 2
uint8 latest_arming_reason
uint8 latest_disarming_reason
uint8 ARM_DISARM_REASON_STICK_GESTURE = 1
uint8 ARM_DISARM_REASON_RC_SWITCH = 2
uint8 ARM_DISARM_REASON_COMMAND_INTERNAL = 3
uint8 ARM_DISARM_REASON_COMMAND_EXTERNAL = 4
uint8 ARM_DISARM_REASON_MISSION_START = 5
uint8 ARM_DISARM_REASON_LANDING = 6
uint8 ARM_DISARM_REASON_PREFLIGHT_INACTION = 7
uint8 ARM_DISARM_REASON_KILL_SWITCH = 8
uint8 ARM_DISARM_REASON_RC_BUTTON = 13
uint8 ARM_DISARM_REASON_FAILSAFE = 14
uint64 nav_state_timestamp # Time when current nav_state activated
uint8 nav_state_user_intention # Mode that the user selected (might be different from nav_state in a failsafe situation)
uint8 nav_state # [@enum NAVIGATION_STATE] Currently active mode
uint8 NAVIGATION_STATE_MANUAL = 0 # Manual mode
uint8 NAVIGATION_STATE_ALTCTL = 1 # Altitude control mode
uint8 NAVIGATION_STATE_POSCTL = 2 # Position control mode
uint8 NAVIGATION_STATE_AUTO_MISSION = 3 # Auto mission mode
uint8 NAVIGATION_STATE_AUTO_LOITER = 4 # Auto loiter mode
uint8 NAVIGATION_STATE_AUTO_RTL = 5 # Auto return to launch mode
uint8 NAVIGATION_STATE_POSITION_SLOW = 6
uint8 NAVIGATION_STATE_FREE5 = 7
uint8 NAVIGATION_STATE_ALTITUDE_CRUISE = 8 # Altitude with Cruise mode
uint8 NAVIGATION_STATE_FREE3 = 9
uint8 NAVIGATION_STATE_ACRO = 10 # Acro mode
uint8 NAVIGATION_STATE_FREE2 = 11
uint8 NAVIGATION_STATE_DESCEND = 12 # Descend mode (no position control)
uint8 NAVIGATION_STATE_TERMINATION = 13 # Termination mode
uint8 NAVIGATION_STATE_OFFBOARD = 14
uint8 NAVIGATION_STATE_STAB = 15 # Stabilized mode
uint8 NAVIGATION_STATE_FREE1 = 16
uint8 NAVIGATION_STATE_AUTO_TAKEOFF = 17 # Takeoff
uint8 NAVIGATION_STATE_AUTO_LAND = 18 # Land
uint8 NAVIGATION_STATE_AUTO_FOLLOW_TARGET = 19 # Auto Follow
uint8 NAVIGATION_STATE_AUTO_PRECLAND = 20 # Precision land with landing target
uint8 NAVIGATION_STATE_ORBIT = 21 # Orbit in a circle
uint8 NAVIGATION_STATE_AUTO_VTOL_TAKEOFF = 22 # Takeoff, transition, establish loiter
uint8 NAVIGATION_STATE_EXTERNAL1 = 23
uint8 NAVIGATION_STATE_EXTERNAL2 = 24
uint8 NAVIGATION_STATE_EXTERNAL3 = 25
uint8 NAVIGATION_STATE_EXTERNAL4 = 26
uint8 NAVIGATION_STATE_EXTERNAL5 = 27
uint8 NAVIGATION_STATE_EXTERNAL6 = 28
uint8 NAVIGATION_STATE_EXTERNAL7 = 29
uint8 NAVIGATION_STATE_EXTERNAL8 = 30
uint8 NAVIGATION_STATE_MAX = 31
uint8 executor_in_charge # [-] Current mode executor in charge (0=Autopilot)
uint32 valid_nav_states_mask # [-] Bitmask for all valid nav_state values
uint32 can_set_nav_states_mask # [-] Bitmask for all modes that a user can select
# Bitmask of detected failures
uint16 failure_detector_status # [@enum FAILURE]
uint16 FAILURE_NONE = 0
uint16 FAILURE_ROLL = 1 # (1 << 0)
uint16 FAILURE_PITCH = 2 # (1 << 1)
uint16 FAILURE_ALT = 4 # (1 << 2)
uint16 FAILURE_EXT = 8 # (1 << 3)
uint16 FAILURE_ARM_ESC = 16 # (1 << 4)
uint16 FAILURE_BATTERY = 32 # (1 << 5)
uint16 FAILURE_IMBALANCED_PROP = 64 # (1 << 6)
uint16 FAILURE_MOTOR = 128 # (1 << 7)
uint8 hil_state # [enum HIL_STATE]
uint8 HIL_STATE_OFF = 0
uint8 HIL_STATE_ON = 1
# Current vehicle locomotion method. A vehicle can have different methods (e.g. VTOL transitions from RW to FW method)
uint8 vehicle_type # [@enum VEHICLE_TYPE]
uint8 VEHICLE_TYPE_UNSPECIFIED = 0
uint8 VEHICLE_TYPE_ROTARY_WING = 1
uint8 VEHICLE_TYPE_FIXED_WING = 2
uint8 VEHICLE_TYPE_ROVER = 3
uint8 FAILSAFE_DEFER_STATE_DISABLED = 0
uint8 FAILSAFE_DEFER_STATE_ENABLED = 1
uint8 FAILSAFE_DEFER_STATE_WOULD_FAILSAFE = 2 # Failsafes deferred, but would trigger a failsafe
bool failsafe # true if system is in failsafe state (e.g.:RTL, Hover, Terminate, ...)
bool failsafe_and_user_took_over # true if system is in failsafe state but the user took over control
uint8 failsafe_defer_state # [@enum FAILSAFE_DEFER_STATE]
# Link loss
bool gcs_connection_lost # datalink to GCS lost
uint8 gcs_connection_lost_counter # counts unique GCS connection lost events
bool high_latency_data_link_lost # Set to true if the high latency data link (eg. RockBlock Iridium 9603 telemetry module) is lost
# VTOL flags
bool is_vtol # True if the system is VTOL capable
bool is_vtol_tailsitter # True if the system performs a 90° pitch down rotation during transition from MC to FW
bool in_transition_mode # True if VTOL is doing a transition
bool in_transition_to_fw # True if VTOL is doing a transition from MC to FW
# MAVLink identification
uint8 system_type # system type, contains mavlink MAV_TYPE
uint8 system_id # system id, contains MAVLink's system ID field
uint8 component_id # subsystem / component id, contains MAVLink's component ID field
bool safety_button_available # Set to true if a safety button is connected
bool safety_off # Set to true if safety is off
bool power_input_valid # Set if input power is valid
bool usb_connected # Set to true (never cleared) once telemetry received from usb link
bool open_drone_id_system_present
bool open_drone_id_system_healthy
bool parachute_system_present
bool parachute_system_healthy
bool rc_calibration_in_progress
bool calibration_enabled
bool pre_flight_checks_pass # true if all checks necessary to arm pass
```
:::
+1
View File
@@ -269,3 +269,4 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [VehicleAttitudeSetpointV0](VehicleAttitudeSetpointV0.md)
- [VehicleLocalPositionV0](VehicleLocalPositionV0.md) — Fused local position in NED. The coordinate system origin is the vehicle position at the time when the EKF2-module was started.
- [VehicleStatusV0](VehicleStatusV0.md) — Encodes the system state of the vehicle published by commander.
- [VehicleStatusV1](VehicleStatusV1.md) — Encodes the system state of the vehicle published by commander.
+17
View File
@@ -78,6 +78,23 @@ Configure the action when there is a potential collision using the parameter bel
| <a id="NAV_TRAFF_A_VER"></a>[NAV_TRAFF_A_VER](../advanced_config/parameter_reference.md#NAV_TRAFF_A_VER) | Vertical height above and below vehicle of the cylinder that defines its airspace (also see [NAV_TRAFF_A_HOR](#NAV_TRAFF_A_HOR)). |
| <a id="NAV_TRAFF_COLL_T"></a>[NAV_TRAFF_COLL_T](../advanced_config/parameter_reference.md#NAV_TRAFF_COLL_T) | Collision time threshold. Avoidance will trigger if the estimated time until collision drops below this value (the estimated time is based on relative speed of traffic and UAV). |
### Arming Check
PX4 can be configured to check for the presence of a traffic avoidance system (ADSB or FLARM transponder) before arming.
This ensures that a traffic avoidance system is connected and functioning before flight.
The check is configured using the [COM_ARM_TRAFF](../advanced_config/parameter_reference.md#COM_ARM_TRAFF) parameter:
| Value | Description |
| ----- | -------------------------------------------------------------------------------------------------------------------------- |
| 0 | Disabled (default). No check is performed. |
| 1 | Warning only. A warning is issued if no traffic avoidance system is detected, but arming is allowed. |
| 2 | Enforce for all modes. Arming is denied if no traffic avoidance system is detected, regardless of flight mode. |
| 3 | Enforce for mission modes only. Arming is denied if no traffic avoidance system is detected and a mission mode is planned. |
When a traffic avoidance system is detected, the system tracks its presence with a 3-second timeout.
If the system is lost or regained, corresponding events are logged ("Traffic avoidance system lost" / "Traffic avoidance system regained").
## Implementation
### ADSB/FLARM
+12
View File
@@ -38,6 +38,18 @@ Instructions for integrating the motor/ESC using with DroneCAN can be found in [
These instructions walk you through setting the correct parameters for enabling the flight controller's DroneCAN drivers, setting the correct configuration parameters for communication with Vertiq modules on the DroneCAN bus, ESC configuration, and testing that your flight controller can properly control your modules over DroneCAN.
#### LED Configuration for Vertiq Modules
::: info
This configuration is only required if you have the optional [Vertiq LED module add-on](https://www.vertiq.co/add-ons).
Standard Vertiq ESC modules do not include LEDs.
:::
Vertiq LED Add-on modules have two LEDs per ESC (RGB for status, White for anti-collision).
See [DroneCAN Lights](../dronecan/index.md#lights) for configuration instructions.
The `light_id` for each LED is calculated as: `esc_index × 3 + BASE_ID`, where `BASE_ID` is 1 for RGB and 2 for White.
### DShot/PWM Configuration
Instructions for integrating the motor/ESC using PWM and DShot can be found in [PWM and DShot Control with a Flight Controller](https://iqmotion.readthedocs.io/en/latest/tutorials/pwm_control_flight_controller.html).
+2 -2
View File
@@ -26,7 +26,7 @@ They cover the _ROS Melodic and Noetic_ releases.
::: tab ROS Noetic (Ubuntu 20.04)
If you're working with [ROS Noetic](https://wiki.ros.org/noetic) on Ubuntu 20.04:
If you're working with [ROS "Noetic"](https://wiki.ros.org/noetic) on Ubuntu 20.04:
1. Install PX4 without the simulator toolchain:
1. [Download PX4 Source Code](../dev_setup/building_px4.md):
@@ -57,7 +57,7 @@ If you're working with [ROS Noetic](https://wiki.ros.org/noetic) on Ubuntu 20.04
::: tab ROS Melodic (Ubuntu 18.04)
If you're working with ROS "Melodic on Ubuntu 18.04:
If you're working with ROS "Melodic" on Ubuntu 18.04:
1. Download the [ubuntu_sim_ros_melodic.sh](https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_ros_melodic.sh) script in a bash shell:
+69
View File
@@ -0,0 +1,69 @@
# Lightware GRF250/GRF500 Gimbal Lidar
LightWare [GRF250](https://lightwarelidar.com/shop/grf-250/) and [GRF500](https://lightwarelidar.com/shop/grf-500/) are small and light Lidar modules with a range of 250m and 500m, respectively.
![LightWare GRF250 Gimbal Lidar](../../assets/hardware/sensors/lidar_lightware/grf_500.png)
::: info
The Lidar driver is not included in the default build of PX4.
You will need to [create and use a custom build](#add-the-driver-to-the-px4-build).
:::
## Where to Buy
Order these modules from:
- [GRF250](https://lightwarelidar.com/shop/grf-250/)
- [GRF500](https://lightwarelidar.com/shop/grf-500/)
## Hardware Setup
The rangefinder can be connected to any unused serial port, such as `TELEM2`.
[Parameter Configuration](#parameter-configuration) explains how to configure the port to use and the other properties of the rangefinder.
## PX4 Setup
### Add the Driver to the PX4 Build
The [lightware_grf_serial](../modules/modules_driver_distance_sensor.md#lightware-grf-serial) driver for this Lidar is not included in PX4 firmware by default.
In order to use these modules you will first need to update the firmware configuration to add the driver, and then build the firmware.
1. Update the firmware configuration. You can use either of the following options:
- Menuconfig:
1. Install and open [menuconfig](../hardware/porting_guide_config.md#px4-menuconfig-setup)
2. In [menuconfig](../hardware/porting_guide_config.md#px4-menuconfig-setup), navigate to **Drivers > Distance sensors**
3. Select/Enable `lightware_grf_serial`
4. Save the configuration
- Manually update `default.px4` to include the configuration key:
1. Open the `default.px4board` config file that corresponds to the board you want to build for.
For example, to add the driver to `fmu-v6x` boards you would update [/boards/px4/fmu-v6x/default.px4board ](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6x/default.px4board)
2. Add the following line and save the file:
```txt
CONFIG_DRIVERS_DISTANCE_SENSOR_LIGHTWARE_GRF_SERIAL=y
```
2. [Build PX4](../dev_setup/building_px4.md) for your flight controller target and upload the new firmware.
### Parameter Configuration
You will need to configure PX4 to indicate the serial port to which the sensor is connected (as per [Serial Port Configuration](../peripherals/serial_configuration.md)) and also the orientation and other properties of the sensor.
The [parameters to change](../advanced_config/parameters.md) are listed in the table.
| Parameter | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| <a id="SENS_EN_GRF_CFG"></a>[SENS_EN_GRF_CFG](../advanced_config/parameter_reference.md#SENS_EN_GRF_CFG) | Set to the serial port the sensor is connected to. |
| <a id="GRF_UPDATE_CFG"></a>[GRF_UPDATE_CFG](../advanced_config/parameter_reference.md#GRF_UPDATE_CFG) | Set the update rate. |
| <a id="GRF_SENS_MODEL"></a>[GRF_SENS_MODEL](../advanced_config/parameter_reference.md#GRF_SENS_MODEL) | Set the update rate. |
## Testing
You can confirm that the sensor is correctly configured by connecting QGroundControl, and observing that [DISTANCE_SENSOR](https://mavlink.io/en/messages/common.html#DISTANCE_SENSOR) is present in the [MAVLink Inspector](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_inspector.html).
Moving the sensor around at various distances from a surface will have the `current_distance` value change.
## Troubleshooting
If you are having problems with connecting to the sensor you may need to unassign a the default serial port. [Unassign Default Serial Port](../peripherals/serial_configuration.md)
+5 -2
View File
@@ -15,8 +15,8 @@ The following models are supported by PX4, and can be connected to either the I2
| [LW20/C](https://lightware.co.za/products/lw20-c-100-m) | 100 | I2C bus | Waterproofed (IP67) with servo for sense-and-avoid applications |
| [SF30/D](https://lightwarelidar.com/shop/sf30-d-200-m/) | 200 | I2C bus | Waterproofed (IP67) |
| [SF45/B](../sensor/sf45_rotating_lidar.md) | 50 | Serial | Rotary Lidar (Used for [Collision Prevention](../computer_vision/collision_prevention.md)) |
| [GRF250](https://lightwarelidar.com/shop/grf-250/) | 250 | I2C | Gimbal Range Finder |
| [GRF500](https://lightwarelidar.com/shop/grf-500/) | 500 | I2C | Gimbal Range Finder |
| [GRF250](../sensor/grf_lidar.md) | 250 | Serial or I2C | Gimbal Range Finder |
| [GRF500](../sensor/grf_lidar.md) | 500 | Serial or I2C | Gimbal Range Finder |
::: details Discontinued
@@ -69,6 +69,9 @@ VTOL vehicles may choose to also set [SF1XX_MODE](../advanced_config/parameter_r
::: tip
[SF45/B](../sensor/sf45_rotating_lidar.md) setup is covered in the linked document.
:::
::: tip
[GRF250/GRF500](../sensor/grf_lidar.md) setup is covered in the linked document.
:::
### Hardware
+531 -16
View File
@@ -2,6 +2,512 @@
PX4 uses GitHub Actions for continuous integration, with different workflows handling code builds, testing, and documentation.
## Code CI
PX4 builds and testing are performed using GitHub Actions with a waterfall/staged pipeline architecture to optimize costs and provide fast developer feedback.
### CI Architecture Overview
PX4 uses a **4-tier waterfall pipeline** that ensures expensive AWS-hosted integration tests only run after basic checks pass. This architecture prevents costly runs when simple issues like formatting errors are present.
#### Pipeline Structure
```
┌─────────────────────────────────────────────┐
│ TIER 1: Gate Checks (2-5 min) │
│ • Format checks, shellcheck, Python linting │
│ • GitHub-hosted runners (free/cheap) │
│ • fail-fast: stops on first failure │
└─────────────────┬───────────────────────────┘
│ ALL PASS
┌─────────────────────────────────────────────┐
│ TIER 2: Builds, Analysis & Platform Checks │
│ (10-30 min) │
│ • SITL build + cache seed (PX4 + Gazebo) │
│ • Unit tests, static analysis, EKF checks │
│ • Ubuntu/macOS builds, ITCM, flash analysis │
│ • Failsafe web simulator (Emscripten) │
│ • Mixed runners (AWS 4cpu + GitHub) │
└─────────────────┬───────────────────────────┘
│ ALL PASS
┌─────────────────────────────────────────────┐
│ TIER 3: Integration Tests (30-45 min) │
│ • SITL tests (Gazebo + MAVSDK, 20x speed) │
│ • ROS2 integration, MAVROS tests │
│ • ROS translation node (humble + jazzy) │
│ • AWS Self-hosted 8cpu runners │
└─────────────────┬───────────────────────────┘
│ ALL PASS
┌─────────────────────────────────────────────┐
│ TIER 4: Full Build Matrix (30-60 min) │
│ • Build all board targets │
│ • AWS 8cpu runners (most expensive) │
│ • Only on main/stable/beta/release/tags │
└─────────────────────────────────────────────┘
```
### Active Workflows
#### Core CI
**[ci-orchestrator.yml](https://github.com/PX4/PX4-Autopilot/blob/main/.github/workflows/ci-orchestrator.yml)** - Main CI Pipeline
- Runs on all PRs and pushes
- Implements Tiers 1-4 with cascading dependencies
- Fails fast to save costs and provide quick feedback
- Uses concurrency control to cancel outdated runs
**[build_all_targets.yml](https://github.com/PX4/PX4-Autopilot/blob/main/.github/workflows/build_all_targets.yml)** - Full Board Build Matrix
- Triggered by orchestrator completion on PRs
- Runs independently on tagged releases
- Builds all board configurations
- Uploads artifacts to S3 and GitHub Releases
#### Infrastructure Workflows
- **dev_container.yml** - Docker container builds for development environment
- **fuzzing.yml** - Daily fuzzing tests for security
#### Maintenance Workflows
- **ekf_update_change_indicator.yml** - Track EKF functional changes
- **label.yml** - Auto-label PRs based on modified files
- **stale.yml** - Mark and close stale issues/PRs
- **sync_to_px4_msgs.yml** - Sync ROS message definitions to px4_msgs repo
### CI Tier Details
#### Tier 1: Gate Checks (2-5 minutes)
**Purpose:** Catch common errors quickly before spinning up expensive resources.
**Jobs:**
- Format checks (`check_format`)
- Newline checks (`check_newlines`)
- Shellcheck for bash scripts
- Python linting (mypy, flake8) for MAVSDK tests
**Runner:** GitHub-hosted `ubuntu-latest`
**Behavior:** `fail-fast: true` - stops all jobs immediately on first failure
#### Tier 2: Builds, Analysis & Platform Checks (10-30 minutes)
**Purpose:** Validate code compiles, passes unit tests, and builds on all platforms. This tier runs all build and analysis jobs in parallel to minimize wall-clock time.
**Jobs:**
- **Build SITL Cache Seed** - Builds `px4_sitl_default` and Gazebo Classic plugins, seeds the ccache for downstream SITL test jobs
- **Basic Tests** - Unit tests, module configuration validation, module documentation checks, and EKF functional change detection (PRs only — checks `src/modules/ekf2/test/change_indication` for uncommitted diff after running EKF tests)
- **Clang-tidy** static analysis (16cpu runner); incremental on PRs (changed files only), full scan on push to main/stable/beta/release
- **Clang-tidy PR Annotations** - Posts inline line-level review comments with one-click fix suggestions via `platisd/clang-tidy-pr-comments`; same-repo PRs only, informational (does not block merge)
- **Ubuntu builds** (22.04, 24.04) on AWS 4cpu runners
- **macOS build** on GitHub macOS runners
- **ITCM memory checks** for 4 NuttX targets (fmu-v5x, fmu-v6xrt, tropic variants)
- **Flash analysis** using bloaty for 2 targets (fmu-v5x, fmu-v6x), with PR comment
- **Failsafe web simulator** build (Emscripten, cached SDK)
**Runners:** Mixed (AWS 4cpu-linux-x64, 16cpu for clang-tidy, 2cpu for clang-tidy annotations, GitHub macos-latest)
**Behavior:** Only runs if Tier 1 passes completely; `fail-fast: false` to let all jobs attempt
#### Tier 3: Integration Tests (30-45 minutes)
**Purpose:** Run expensive simulation and integration tests.
**Jobs:**
- **SITL Tests** - Gazebo Classic simulation with MAVSDK test suite at 20x speed factor (iris, tailsitter, standard_vtol models)
- **ROS2 Integration** - Build and test ROS2 interface library
- **MAVROS Mission Tests** - Mission execution tests
- **MAVROS Offboard Tests** - Offboard control tests
- **ROS Translation Node** - Tests for humble and jazzy distributions
**Runners:** AWS Self-hosted 8cpu-linux-x64
**Behavior:** Only runs if all Tier 2 jobs pass; `fail-fast: false` to collect all test results
**Timeout:** 45 minutes per job
#### Tier 4: Full Build Matrix (30-60 minutes)
**Purpose:** Build all board targets for firmware distribution.
**Trigger:**
- Automatically after orchestrator succeeds (for PRs)
- Independently on main/stable/beta/release branches
- Independently on version tags (v*)
**Process:**
1. Scan and group board targets by architecture
2. Build targets in parallel on AWS 8cpu runners
3. Package and upload artifacts
**Artifacts:**
- Uploaded to S3 bucket (px4-travis) for QGroundControl
- Uploaded to GitHub Releases for version tags
- Draft releases created for manual review before publishing
**Runners:** AWS Self-hosted 8cpu-linux-x64 (most expensive)
### Runner Types
#### GitHub-Hosted Runners
Used for Tier 1 gate checks and macOS builds.
**Benefits:**
- Fast startup (5-10 seconds)
- Free for public repos (2,000 minutes/month)
- Low cost when paying (~$0.008/min for Linux)
- Reliable provisioning
**Used For:**
- Format/lint checks
- Python linting
- Shellcheck
- macOS builds
#### AWS Self-Hosted Runners (RunsOn)
Used for Tiers 2-4 builds and tests.
**Configuration:**
- `1cpu-linux-x64` - Utility jobs (flash analysis comment publishing)
- `2cpu-linux-x64` - Clang-tidy PR annotation posting
- `4cpu-linux-x64` - SITL cache seed, basic tests, EKF checks, platform builds, flash analysis, ITCM checks, failsafe sim
- `8cpu-linux-x64` - SITL integration tests, ROS integration tests, full build matrix
- `16cpu-linux-x64` - Clang-tidy static analysis
- `spot=false` - On-demand instances (can be changed to spot for 60-70% savings)
**Used For:**
- SITL simulation tests (8cpu for Gazebo physics at 20x speed)
- ROS integration tests (8cpu for parallel compilation of xrce-dds and ROS2 libraries)
- Full board compilation (8cpu)
- Platform builds and analysis (4cpu)
### Fork CI Configuration
Forks can run CI without AWS self-hosted runners. There are two paths depending on how much of the pipeline you need.
#### Option 1: Configure the Orchestrator
Use the full orchestrator with settings tuned for your fork's infrastructure. This gives you access to all tiers, job toggles, and cache tuning.
1. Copy the example config:
```bash
cp .github/ci-config.yml.example .github/ci-config.yml
```
2. Edit `.github/ci-config.yml` to match your setup:
- **Runner labels** -- point all tiers to `ubuntu-latest` (or your own self-hosted labels)
- **Job toggles** -- disable hardware-specific jobs (ITCM, flash analysis, platform builds) that don't apply to your fork
- **Cache sizes** -- GitHub provides 10 GB per repo; the example config uses roughly 15-20% of that with most upstream-specific jobs disabled
- **`is_gha` flag** -- set to `true` when running on GitHub-hosted runners (wired for future infrastructure-aware behavior)
3. Commit the file and push. The orchestrator reads it at runtime and applies your overrides.
This configuration has been validated end-to-end on GitHub-hosted `ubuntu-latest` runners: [successful run](https://github.com/PX4/PX4-Autopilot/actions/runs/22746668606).
#### Option 2: Use the Simple CI Workflow
If you only need basic validation (SITL build, one hardware target, unit tests, format checks), use the single-job workflow instead of the full orchestrator.
1. Rename the example file:
```bash
mv .github/workflows/ci-simple.yml.example .github/workflows/ci-simple.yml
```
2. Optionally delete `ci-orchestrator.yml` to avoid running both workflows.
3. Enable GitHub Actions in your fork settings if not already enabled.
The simple workflow runs a single `quick-check` job on `ubuntu-latest` that builds PX4 SITL, FMU-v5, runs unit tests, and checks formatting. It typically completes in under 15 minutes and has no AWS or self-hosted runner dependencies.
### Cost Optimization Features
#### 1. Cascading Dependencies
Each tier only executes if the previous tier passes completely. This prevents expensive AWS runners from spinning up when basic checks fail.
**Example:**
- Format error detected in 2 minutes (Tier 1)
- Pipeline stops immediately
- AWS runners never start
- Cost: ~$0.01 vs ~$5 for full run
#### 2. Fail-Fast Strategy
Tier 1 uses `fail-fast: true` to stop all parallel jobs on the first failure, providing immediate feedback to developers.
#### 3. Concurrency Control
All workflows use `cancel-in-progress: true` to automatically stop outdated runs when developers push new commits.
#### 4. Branch-Aware Execution
The full build matrix (Tier 4) only runs on important branches:
- main, stable, beta
- release/* branches
- Version tags (v*)
Feature branch PRs skip the expensive full build after validation in Tiers 1-3.
#### 5. Path-Based Filtering
Most CI workflows ignore changes to `docs/**` paths to avoid unnecessary builds when only documentation is modified.
### Developer Experience
#### Quick Feedback Loop
The waterfall architecture provides progressively detailed feedback:
| Issue Type | Detection Time | Tier | Cost Impact |
|------------|---------------|------|-------------|
| Format error | 2 minutes | Tier 1 | ~$0.01 |
| Unit test / build failure | 15 minutes | Tier 2 | ~$0.50 |
| Integration test failure | 45 minutes | Tier 3 | ~$2.00 |
| Board target failure | 90 minutes | Tier 4 | ~$5.00 |
#### Before/After Comparison
**Before (28 separate workflows):**
- All workflows start simultaneously on every PR
- Format error detected at 2 min, but expensive tests run for 45+ min anyway
- Total wasted compute: ~43 minutes of AWS 4cpu + 8cpu runners
- Cost per failed PR: ~$5-10
**After (Orchestrator + Build All Targets):**
- Format error detected at 2 min
- Pipeline stops immediately after Tier 1
- Total wasted compute: ~2 minutes of GitHub-hosted runners
- Cost per failed PR: ~$0.01
- **Savings: ~99% on early failures, ~40-60% overall**
### Caching Strategy
The CI orchestrator uses several caching mechanisms to avoid redundant work across jobs and runs.
#### ccache (C++ compilation cache)
ccache caches compiled object files so unchanged source files skip recompilation on subsequent runs.
**Cache keys follow this fallback pattern:**
```
ccache-{scope}-{branch}-{sha} # exact match (never hits, since sha is unique)
ccache-{scope}-{branch}- # same branch, most recent commit
ccache-{scope}-{base_branch}- # base branch (e.g. main), for PR first runs
ccache-{scope}- # any branch, last resort
```
The exact-match key (`{sha}`) is used as the **save** key. Since GitHub Actions cache is immutable (write-once), each commit saves a new cache entry. The restore step falls through to the most recent cache from the same branch, or the base branch.
**Cache scopes and sizes:**
| Scope | Key prefix | Max size | Contents | Saved by |
|-------|-----------|----------|----------|----------|
| `ccache-sitl` | `ccache-sitl-` | 400M | PX4 SITL firmware + Gazebo Classic plugins | `build-sitl` (cache seed job) |
| `ccache-clang-tidy` | `ccache-clang-tidy-` | 250M | Clang-tidy analysis objects | `clang-tidy` |
| `ccache-ubuntu` | `ccache-ubuntu-{container}-` | 250M | Ubuntu build objects (per container version) | `ubuntu-builds` |
| `ccache-macos` | `ccache-macos-` | 400M | macOS build objects | `macos-build` |
| `ccache-ros-integration` | `ccache-ros-integration-` | 500M | PX4 + xrce-dds + Gazebo + ROS2 libraries | `ros-integration-tests` |
| `ccache-ros-translation-{ros}` | `ccache-ros-translation-{ros_version}-` | 250M | ROS translation node build objects (per ROS distro) | `ros-translation-node` |
| `ccache-flash-{target}-current` | `ccache-flash-{target}-current-` | 250M | Flash analysis objects for PR HEAD (per board target) | `flash-analysis` |
| `ccache-flash-{target}-baseline` | `ccache-flash-{target}-baseline-` | 250M | Flash analysis objects for baseline commit (per board target) | `flash-analysis` |
| `px4-ros2-ws` | `px4-ros2-ws-v1-galactic-{image}-{msg-hash}` | — | PX4 ROS 2 Interface Library workspace at `/opt/px4_ws` (keyed on msg hash) | `ros-integration-tests` |
**Cache seed pattern:** The `build-sitl` job acts as a cache seed for all downstream SITL-related jobs. It builds both `px4_sitl_default` and `sitl_gazebo-classic`, then saves the combined ccache. Downstream jobs (`basic-tests`, `ekf-functional-check`, `sitl-tests`) restore this cache using `actions/cache/restore` (read-only) and get near-100% hit rates without needing to save their own caches.
**ccache configuration (all jobs):**
| Setting | Value | Purpose |
|---------|-------|---------|
| `base_dir` | `${GITHUB_WORKSPACE}` | Normalize paths for cache portability |
| `compression` | `true` | Reduce cache storage size |
| `compression_level` | `6` | Balance compression ratio vs speed |
| `hash_dir` | `false` | Ignore directory paths in hash (portability) |
| `compiler_check` | `content` | Hash compiler binary content, not path/mtime |
#### Emscripten SDK cache
The failsafe web simulator job caches the Emscripten SDK directory to avoid re-cloning and installing it on every run.
| Key | Path | Contents |
|-----|------|----------|
| `emsdk-4.0.15` | `_emscripten_sdk` | Full emsdk installation (pinned to version 4.0.15) |
This is a simple version-pinned key. Updating the emsdk version in the workflow automatically invalidates the cache.
#### macOS Homebrew and pip caches
The macOS build job caches Homebrew packages and pip installations to avoid re-downloading dependencies.
#### Why separate cache scopes?
Different jobs use different compilers, flags, and build targets. Sharing a single ccache across all jobs would cause constant eviction as incompatible objects compete for space. Separate scopes ensure each job's cache stays warm with relevant objects.
#### CI Status
Check which tier failed by looking at the job names in the GitHub Actions UI:
- Tier 1 failure (T1 prefix) - Gate checks (format, lint) - Fix formatting/style issues
- Tier 2 failure (T2 prefix) - Builds/analysis (tests, static analysis, platform builds) - Fix compilation or test failures
- Tier 3 failure (T3 prefix) - Integration tests - Fix SITL/ROS test failures
- All tiers passed - Ready for merge (after approvals)
### Manual Workflow Triggers
All workflows support manual execution via GitHub Actions UI or CLI:
**Via GitHub UI:**
1. Go to Actions tab
2. Select the workflow
3. Click "Run workflow"
4. Choose branch and click "Run"
**Via GitHub CLI:**
```bash
gh workflow run ci-orchestrator.yml
gh workflow run build_all_targets.yml
```
This is useful for:
- Re-running specific workflows for debugging
- Testing workflow changes
- Manually triggering builds on branches
### Troubleshooting
#### Workflow Not Triggering
**Possible causes:**
- PR only modifies `docs/**` paths (ignored by most workflows)
- Orchestrator must complete successfully for `build_all_targets` to trigger (Tier 4)
- Workflow was canceled by a newer commit (concurrency control)
**Solution:**
- Check the Actions tab for workflow status
- Verify files modified are not in ignored paths
- Wait for orchestrator to complete before expecting Tier 4
#### Unexpected CI Failures
**Debugging steps:**
1. Check which tier failed by looking at job name prefixes (T1, T2, T3)
2. Review the specific failed job logs in that tier
3. Ensure your branch is rebased on latest main
4. Look for infrastructure issues (runner availability, network problems)
5. Try re-running failed jobs using "Re-run failed jobs" button
#### Common Issues
**Clang-tidy failures:**
- On PRs, only changed files are analyzed. Run `python3 Tools/ci/run-clang-tidy-pr.py origin/main` locally to reproduce the incremental check
- For a full scan (matches push-to-main behavior): `make clang-tidy`
- Fix any warnings or use `// NOLINT` comments for false positives
- Inline fix suggestions are posted as PR review comments by the `post-clang-tidy-comments` job (same-repo PRs only)
**SITL test timeouts:**
- Tests have a 45-minute timeout
- Check for deadlocks or infinite loops in simulation code
- Review MAVSDK test logs in failed artifacts
**AWS runner unavailable:**
- RunsOn provisions runners on-demand
- Rarely, provisioning can fail due to AWS capacity
- Re-run the workflow or wait a few minutes and try again
**Checkout errors in workflow_run:**
- The `build_all_targets` workflow (Tier 4) uses `workflow_run` trigger
- It automatically checks out the correct commit SHA
- If issues persist, check GitHub Actions permissions
### CI Best Practices for Contributors
#### Before Pushing
1. **Run format checks locally:**
```bash
make check_format
make shellcheck_all
```
2. **Run unit tests:**
```bash
make tests
```
3. **Build your target configuration:**
```bash
make px4_fmu-v5_default # or your target
```
#### During PR Review
- Monitor CI status in the GitHub UI
- Address failures starting from the earliest tier
- Don't push new commits while CI is running if possible (cancels previous run)
- Use draft PRs to prevent expensive builds until ready
#### When CI Fails
1. Check which tier failed by looking at job name prefixes (T1, T2, T3)
2. Read the failed job logs carefully
3. Reproduce the issue locally if possible
4. Fix the root cause, not just the symptom
5. Consider if your changes affect other platforms/configurations
### Future Optimization Opportunities
#### 1. Enable Spot Instances
Change `spot=false` to `spot=true` for PR testing to reduce costs by 60-70%. This requires accepting occasional (~5%) provisioning failures.
#### 2. Path-Based Test Selection
Only run ROS tests if ROS-related files (`msg/**`, `src/modules/uxrce_dds_client/**`) are modified.
#### 3. Skip Tests on Draft PRs
Add `if: github.event.pull_request.draft == false` to expensive jobs, allowing draft PRs to skip CI entirely.
#### 4. Pre-built Container Images for ROS
Bake xrce-dds, ROS2 libraries, and Gazebo into updated container images to eliminate build-from-source overhead in integration test jobs (currently ~5-8 minutes per job).
### Migration History
This waterfall architecture was introduced to replace 28 independent workflows that all ran simultaneously. The migration:
- Reduced workflow files from 28 to 14
- Eliminated 1,057 lines of redundant YAML
- Decreased CI costs by an estimated 40-60%
- Improved developer feedback time for common errors
- Maintained full test coverage with smarter execution
The previous workflows that were consolidated:
- `checks.yml` -> Tiers 1 & 2
- `python_checks.yml` -> Tier 1
- `clang-tidy.yml` -> Tier 2
- `compile_macos.yml` -> Tier 2
- `compile_ubuntu.yml` -> Tier 2
- `sitl_tests.yml` -> Tier 3
- `ros_integration_tests.yml` -> Tier 3
- `mavros_mission_tests.yml` -> Tier 3
- `mavros_offboard_tests.yml` -> Tier 3
- `ros_translation_node.yml` -> Tier 3
- `itcm_check.yml` -> Tier 2
- `flash_analysis.yml` -> Tier 2
- `failsafe_sim.yml` -> Tier 2
- `nuttx_env_config.yml` -> Tier 2
- `ekf_functional_change_indicator.yml` -> Tier 2
The original 5-tier design was subsequently optimized to 4 tiers by merging platform builds (old Tier 3) into Tier 2, since they had no data dependency on basic test results and could run in parallel. This reduced wall-clock time by ~20 minutes on successful runs.
## Documentation CI
The documentation pipeline handles building, deploying, and translating the PX4 User Guide.
@@ -18,12 +524,12 @@ Jobs are organized in tiers, where each tier depends on the previous one complet
| Tier | Job | PR | Push / Dispatch | Description |
| ---- | -------------- | ---------------------------- | --------------- | ------------------------------------------------------------- |
| T1 | Detect Changes | Yes | | Checks if source code files changed (triggers metadata regen) |
| T2 | PR Metadata | Yes (conditional) | | Builds PX4 SITL and regenerates all auto-generated docs |
| T2 | Metadata Sync | | Yes | Builds PX4 SITL, regenerates metadata, auto-commits |
| T2 | Link Check | Yes | | Checks for broken links in changed files, posts PR comment |
| T1 | Detect Changes | Yes | - | Checks if source code files changed (triggers metadata regen) |
| T2 | PR Metadata | Yes (conditional) | - | Builds PX4 SITL and regenerates all auto-generated docs |
| T2 | Metadata Sync | - | Yes | Builds PX4 SITL, regenerates metadata, auto-commits |
| T2 | Link Check | Yes | - | Checks for broken links in changed files, posts PR comment |
| T3 | Build Site | Yes (if docs/source changed) | Yes (after T2) | Builds the VitePress documentation site |
| T4 | Deploy | | Yes | Deploys to AWS S3 |
| T4 | Deploy | - | Yes | Deploys to AWS S3 |
#### Pull Request Flow
@@ -31,15 +537,15 @@ When a PR modifies files in `docs/**` or the orchestrator workflow file itself,
```txt
PR Event
|
v
┌─────────────────────────────────────┐
│ T1: Detect Changes │
│ • Checks if src/msg/ROMFS changed │
└─────────────────┬───────────────────┘
┌───────┴───────┐
▼ ▼
v v
┌──────────────────┐ ┌─────────────────────────┐
│ T2: PR Metadata │ │ T2: Link Check (~30s) │
│ (conditional) │ │ • Detects changed .md │
@@ -50,16 +556,16 @@ PR Event
│ failsafe web │ │
└────────┬─────────┘ │
└───────────┬────────────┘
v
┌─────────────────────────────────────┐
│ T3: Build Site (~7-10 min) │
│ (skipped if only workflow YAML │
│ changed no docs/source changes) │
│ changed - no docs/source changes) │
│ • Builds VitePress site │
│ • Verifies no build errors │
└─────────────────┬───────────────────┘
v
DONE
```
@@ -73,12 +579,12 @@ PR Event
#### Push / Dispatch Flow (main/release branches)
When changes are pushed to `main` or `release/**` branches (or a `workflow_dispatch` is triggered), the workflow regenerates metadata, builds, and deploys.
Only `main` and `release/*` branches are accepted for deploy other branches will fail with a clear error.
Only `main` and `release/*` branches are accepted for deploy -- other branches will fail with a clear error.
```txt
Push / Dispatch Event
|
v
┌─────────────────────────────────────┐
│ T2: Metadata Sync (~10-15 min) │
│ • Builds px4_sitl_default │
@@ -90,14 +596,14 @@ Push / Dispatch Event
│ (with [skip ci]) │
└─────────────────┬───────────────────┘
v
┌─────────────────────────────────────┐
│ T3: Build Site (~7-10 min) │
│ • Builds VitePress site │
│ • Uploads build artifact │
└─────────────────┬───────────────────┘
v
┌─────────────────────────────────────┐
│ T4: Deploy (~3 min) │
│ • Syncs to AWS S3 │
@@ -192,3 +698,12 @@ Jobs run on [runs-on](https://runs-on.com/) self-hosted runners with S3 cache:
| T2: Link Check | ubuntu-latest |
| T3: Build Site | 4 CPU |
| T4: Deploy | ubuntu-latest |
## Contact
For CI-related questions or issues:
- GitHub Issues: Tag the CI maintainer
- Slack: #infrastructure channel
- Dev Call: Bring up during weekly meeting
All workflows can be found in [.github/workflows/](https://github.com/PX4/PX4-Autopilot/tree/main/.github/workflows).
+29 -27
View File
@@ -1,12 +1,11 @@
# PX4 Docker Containers
Docker containers are provided for the complete [PX4 development toolchain](../dev_setup/dev_env.md#supported-targets) including NuttX and Linux based hardware, [Gazebo Classic](../sim_gazebo_classic/index.md) simulation, and [ROS](../simulation/ros_interface.md).
Docker containers are provided for the complete [PX4 development toolchain](../dev_setup/dev_env.md#supported-targets) including NuttX and Linux based hardware, [Gazebo](../sim_gazebo_gz/index.md) simulation, and [ROS 2](../ros2/user_guide.md).
This topic shows how to use the [available docker containers](#px4_containers) to access the build environment in a local Linux computer.
::: info
Dockerfiles and README can be found on [Github here](https://github.com/PX4/PX4-containers/tree/master?tab=readme-ov-file#container-hierarchy).
They are built automatically on [Docker Hub](https://hub.docker.com/u/px4io/).
The recommended `px4-dev` container is built from the [Dockerfile in the PX4-Autopilot source tree](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/setup/Dockerfile) by the [Container build workflow](https://github.com/PX4/PX4-Autopilot/actions/workflows/dev_container.yml).
:::
## Prerequisites
@@ -35,33 +34,36 @@ sudo usermod -aG docker $USER
# Log in/out again before using docker!
```
## Container Hierarchy {#px4_containers}
## px4-dev Container (Recommended) {#px4_containers}
The available containers are on [GitHub here](https://github.com/PX4/PX4-containers/tree/master?tab=readme-ov-file#container-hierarchy).
The **`px4-dev`** container is the recommended container for building PX4 firmware.
It is a single, multi-architecture container (linux/amd64 and linux/arm64) based on Ubuntu 24.04 that includes everything needed to build PX4 for NuttX hardware targets.
These allow testing of various build targets and configurations (the included tools can be inferred from their names).
The containers are hierarchical, such that containers have the functionality of their parents.
For example, the partial hierarchy below shows that the docker container with NuttX build tools (`px4-dev-nuttx-focal`) does not include ROS 2, while the simulation containers do:
It is published to both registries simultaneously:
```plain
- px4io/px4-dev-base-focal
- px4io/px4-dev-nuttx-focal
- px4io/px4-dev-simulation-focal
- px4io/px4-dev-ros-noetic
- px4io/px4-dev-ros2-foxy
- px4io/px4-dev-ros2-rolling
- px4io/px4-dev-base-jammy
- px4io/px4-dev-nuttx-jammy
```
- **GitHub Container Registry:** [ghcr.io/px4/px4-dev](https://github.com/PX4/PX4-Autopilot/pkgs/container/px4-dev)
- **Docker Hub:** [px4io/px4-dev](https://hub.docker.com/r/px4io/px4-dev)
The most recent version can be accessed using the `latest` tag: `px4io/px4-dev-nuttx-focal:latest`
(available tags are listed for each container on _hub.docker.com_.
For example, the `px4io/px4-dev-nuttx-focal` tags can be found on [hub.docker.com here](https://hub.docker.com/r/px4io/px4-dev-nuttx-focal/tags?page=1&ordering=last_updated)).
The container includes:
- Ubuntu 24.04 base
- ARM cross-compiler (`gcc-arm-none-eabi`) and Xtensa compiler (for ESP32 targets)
- Build tools: `cmake`, `ninja`, `ccache`, `make`
- Python 3 with PX4 build dependencies
- NuttX toolchain libraries (`libnewlib-arm-none-eabi`, etc.)
The container is built from the [Dockerfile](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/setup/Dockerfile) in the PX4 source tree using the [Container build workflow](https://github.com/PX4/PX4-Autopilot/actions/workflows/dev_container.yml).
Images are tagged with the PX4 version (e.g. `px4io/px4-dev:v1.16.0`).
:::tip
Typically you should use a recent container, but not necessarily the `latest` (as this changes too often).
A `px4-sim` container with simulation tools (Gazebo Harmonic) is planned to complement `px4-dev` for simulation workflows.
:::
### Legacy Containers
The older per-distro containers from [PX4/PX4-containers](https://github.com/PX4/PX4-containers) (e.g. `px4-dev-nuttx-jammy`, `px4-dev-ros2-humble`, etc.) are no longer recommended.
They will be replaced by `px4-dev` (for builds) and the upcoming `px4-sim` (for simulation).
## Use the Docker Container
The following instructions show how to build PX4 source code on the host computer using a toolchain running in a docker container.
@@ -121,7 +123,7 @@ Where,
- `<host_src>`: The host computer directory to be mapped to `<container_src>` in the container. This should normally be the **PX4-Autopilot** directory.
- `<container_src>`: The location of the shared (source) directory when inside the container.
- `<local_container_name>`: A name for the docker container being created. This can later be used if we need to reference the container again.
- `<container>:<tag>`: The container with version tag to start - e.g.: `px4io/px4-dev-ros:2017-10-23`.
- `<container>:<tag>`: The container with version tag to start - e.g.: `px4io/px4-dev:v1.16.0`.
- `<build_command>`: The command to invoke on the new container. E.g. `bash` is used to open a bash shell in the container.
The concrete example below shows how to open a bash shell and share the directory **~/src/PX4-Autopilot** on the host computer.
@@ -137,7 +139,7 @@ docker run -it --privileged \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e DISPLAY=:0 \
--network host \
--name=px4-ros px4io/px4-dev-ros2-foxy:2022-07-31 bash
--name=px4-dev px4io/px4-dev:v1.16.0 bash
```
::: info
@@ -155,7 +157,7 @@ Verify if everything works by running, for example, SITL:
```sh
cd src/PX4-Autopilot #This is <container_src>
make px4_sitl_default gazebo-classic
make px4_sitl gz_x500
```
### Re-enter the Container
@@ -219,7 +221,7 @@ This ensures that all files created within the container will be accessible on t
#### Graphics Driver Issues
It's possible that running Gazebo Classic will result in a similar error message like the following:
It's possible that running Gazebo will result in a similar error message like the following:
```sh
libGL error: failed to load driver: swrast
@@ -239,7 +241,7 @@ Any recent Linux distribution should work.
The following configuration is tested:
- OS X with VMWare Fusion and Ubuntu 14.04 (Docker container with GUI support on Parallels make the X-Server crash).
- OS X with VMWare Fusion and Ubuntu 22.04 (Docker container with GUI support on Parallels make the X-Server crash).
**Memory**
+3 -1
View File
@@ -179,6 +179,7 @@
- [CubePilot Cube Orange (CubePilot)](flight_controller/cubepilot_cube_orange.md)
- [CubePilot Cube Yellow (CubePilot)](flight_controller/cubepilot_cube_yellow.md)
- [Cube 배선 퀵 스타트](assembly/quick_start_cube.md)
- [Gear Up AirBrainH743](flight_controller/gearup_airbrainh743.md)
- [Holybro Kakute H7v2](flight_controller/kakuteh7v2.md)
- [Holybro Kakute H7mini](flight_controller/kakuteh7mini.md)
- [Holybro Kakute H7](flight_controller/kakuteh7.md)
@@ -255,7 +256,7 @@
- [Benewake TFmini 라이다](sensor/tfmini.md)
- [LeddarOne 라이다](sensor/leddar_one.md)
- [Lidar-Lite](sensor/lidar_lite.md)
- [Lightware Lidars (SF/LW)](sensor/sfxx_lidar.md)
- [Lightware Lidars (SF/LW/GRF)](sensor/sfxx_lidar.md)
- [Lightware SF45 Rotary Lidar](sensor/sf45_rotating_lidar.md)
- [TeraRanger ](sensor/teraranger.md)
- [✘ Lanbao PSK-CM8JL65-CC5](sensor/cm8jl65_ir_distance_sensor.md)
@@ -932,6 +933,7 @@
- [라이센스](contribute/licenses.md)
- [출시](releases/index.md)
- [Release Process](releases/release_process.md)
- [main (alpha)](releases/main.md)
- [1.17 (alpha)](releases/1.17.md)
- [1.16 (stable)](releases/1.16.md)
@@ -12,19 +12,16 @@ The [ARK Jetson Pixhawk Autopilot Bus (PAB) Carrier](https://arkelectron.gitbook
## 사양
- **Power Requirements**
- 5V
- 4A minimum (dependent on usage and peripherals)
- **Additional Features**
- Pixhawk Autopilot Bus (PAB) Form Factor ([PAB Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-010%20Pixhawk%20Autopilot%20Bus%20Standard.pdf))
- MicroSD Slot
- USA-built, NDAA compliant
- Integrated 1W heater for sensor stability in extreme conditions
- **Physical Details**
- Weight:
- Without Jetson and Flight Controller 80g
- With Jetson, no heatsink or Flight Controller 108g
@@ -170,7 +170,6 @@ To enable this MAVLink instance on the FC:
![Image of baseboard showing FC USB-C connector](../../assets/companion_computer/holybro_pixhawk_rpi_cm4_baseboard/baseboard_fc_usb_c.jpg)
2. [Set the parameters](../advanced_config/parameters.md):
- `MAV_1_CONFIG` = `102`
- `MAV_1_MODE = 2`
- `SER_TEL2_BAUD` = `921600`
@@ -184,7 +183,6 @@ On the RPi side:
1. Connect to the RPi (using WiFi, a router, or a WiFi Dongle).
2. Enable the RPi serial port by running `RPi-config`
- Go to `3 Interface Options`, then `I6 Serial Port`.
Then choose:
- `login shell accessible over serial → No`
@@ -145,7 +145,6 @@ Enter the following commands (in sequence) a terminal to configure Ubuntu for RP
```
3. Go to the **Interface Option** and then click **Serial Port**.
- Select **No** to disable serial login shell.
- Select **Yes** to enable the serial interface.
- Click **Finish** and restart the RPi.
@@ -164,7 +163,6 @@ Enter the following commands (in sequence) a terminal to configure Ubuntu for RP
```
6. Then save the file and restart the RPi.
- In `nano` you can save the file using the following sequence of keyboard shortcuts: **ctrl+x**, **ctrl+y**, **Enter**.
7. Check that the serial port is available.
@@ -214,7 +214,6 @@ The Lua script works by extracting the `obstacle_distance_fused` data at each ti
3. Open PlotJuggler and navigate to the **Tools > Reactive Script Editor** section.
In the **Script Editor** tab, add following scripts in the appropriate sections:
- **Global code, executed once:**
```lua
-1
View File
@@ -33,7 +33,6 @@ The instructions below might be used to create a task named _MyTask_:
- FlightTaskMyTask.cpp
3. Update **CMakeLists.txt** for the new task
- Copy the contents of the **CMakeLists.txt** for another task - e.g. [Orbit/CMakeLists.txt](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/flight_mode_manager/tasks/Orbit/CMakeLists.txt)
- Update the copyright to the current year
+1 -8
View File
@@ -84,16 +84,9 @@ The test steps are:
If an [Enable/Disable Autotune Switch](#enable-disable-autotune-switch) is configured you can just toggle the switch to the "enabled" position.
</div></div>
1. In QGroundControl, open the menu **Vehicle setup > PID Tuning**:
![Tuning Setup > Autotune Enabled](../../assets/qgc/setup/autotune/autotune.png)
2. Select either the _Rate Controller_ or _Attitude Controller_ tabs.
3. Ensure that the **Autotune enabled** button is enabled (this will display the **Autotune** button and remove the manual tuning selectors).
4. Read the warning popup and click on **OK** to start tuning.
![Tuning Setup > Autotune Enabled](../../assets/qgc/setup/autotune/autotune.png) 2. Select either the _Rate Controller_ or _Attitude Controller_ tabs. 3. Ensure that the **Autotune enabled** button is enabled (this will display the **Autotune** button and remove the manual tuning selectors). 4. Read the warning popup and click on **OK** to start tuning.
<div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">
@@ -22,7 +22,6 @@ Performing this calibration step is only recommended if the autopilot's orientat
:::
4. Place the vehicle in its level flight orientation on a level surface:
- For planes this is the position during level flight (planes tend to have their wings slightly pitched up!)
- For copters this is the hover position.

Some files were not shown because too many files have changed in this diff Show More