Compare commits

..

93 Commits

Author SHA1 Message Date
Hamish Willee cf4bae6d3e Updted tests mostly for the spec overview 2026-04-09 08:40:53 +10:00
Hamish Willee f54a170361 docs(script): fix up generator PWM outputs 2026-04-02 10:36:01 +11:00
Hamish Willee 35a734d49a docs(infrastructure): Add script and tests to generate FC doc sections/docs 2026-04-02 09:10:59 +11:00
PX4BuildBot f444402e6c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-01 20:32:31 +00:00
Onur Özkan 0d18be5049 fix(scripts): replace hardcoded /bin/bash shebangs
Several helper scripts assumes bash is available at /bin/bash. That breaks on systems
such as NixOS, where bash is resolved from PATH instead of a fixed /bin location and
causes failures like `bad interpreter` during `make format`, e.g., on my host machine:

```sh
$ make format

/PX4-Autopilot/Tools/astyle/check_code_style.sh: /PX4-Autopilot/Tools/astyle/fix_code_style.sh: /bin/bash: bad interpreter: No such file or directory
```

This change switches these entrypoints to `#!/usr/bin/env bash` so they locate bash properly.

No functional changes intended.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
2026-04-01 12:25:28 -08:00
PX4BuildBot 197a1a6214 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-01 13:08:32 +00:00
Marco Hauswirth 93955bd313 chore(gazebo): update gazebo-classic submodule, remove ranging-beacon from constrained-flash-boards 2026-04-01 15:01:31 +02:00
Marco Hauswirth 65c96fb2bf feat(simulation): add ranging beacon simulation in SIH 2026-04-01 15:01:31 +02:00
Marco Hauswirth f4c820c7e1 feat(ekf2): add ranging beacon fusion support
- Add Symforce-derivation
- No altitude correction
- EKF2 replay
- New params
2026-04-01 15:01:31 +02:00
Marco Hauswirth c260794122 feat(mavlink): add ranging beacon parser and uORB message 2026-04-01 15:01:31 +02:00
Jacob Dahl 61f08771a7 fix(boards): trim unused EKF2 features on flash-constrained F4 targets (#26928)
Disable EKF2 fusion features with no corresponding hardware:
- px4_fmu-v2: optical flow, range finder (~17 KB saved)
- mamba-f405-mk2: optical flow, range finder, external vision,
  aux global position, aux velocity, baro compensation,
  drag fusion (~42 KB saved)
2026-03-31 23:10:13 -08:00
Onur Özkan 4d4d814d19 fix(cmake): add proper gtest filtering (#26861)
Before this change, filtered test runs still built every gtest target
because `test_results` depended on all unit and functional gtest targets.

This updates both `px4_add_unit_gtest()` and `px4_add_functional_gtest()`
to use the filtered dependency helper so filtered runs only build the
selected targets.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
2026-03-31 23:05:12 -08:00
PX4BuildBot 14086c6f2e docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-01 06:36:46 +00:00
PX4 Build Bot 2e0000c8fa docs(i18n): PX4 guide translations (Crowdin) - ko (#26898)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-01 17:29:31 +11:00
PX4 Build Bot 757be36ac2 docs(i18n): PX4 guide translations (Crowdin) - uk (#26899)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-01 17:29:18 +11:00
PX4 Build Bot 106907bfd4 docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#26900)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-04-01 17:29:06 +11:00
Onur Özkan 7d392394dd fix(build): add kconfig support for fortified toolchains 2026-03-31 22:23:50 -08:00
PX4BuildBot 94580ab1e5 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-01 02:57:46 +00:00
Hamish Willee 4cbdc3dec6 docs(updates): Link fixes and orphan image removals (#26925)
* docs(updates): Link fixes and orphan image removals
* docs(delete): Remove orphaned translations
2026-04-01 13:51:06 +11:00
PX4BuildBot 5568c66959 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-01 00:43:54 +00:00
Jacob Dahl a09c76d30d fix(mpl3115a2): correct timestamp_sample to integration midpoint
The MPL3115A2 ADC conversion at OSR 2 (ratio 4) takes ~18ms. The
driver polls until the conversion completes, so the read time is at
the end of the integration window. Correct timestamp_sample to the
midpoint by subtracting CONVERSION_TIME / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl 4b6cd37a23 fix(lps25h): correct timestamp_sample to integration midpoint
The LPS25H one-shot measurement is integrated over a ~40ms window
(at 25Hz-equivalent internal averaging). The read time corresponds to
the end of the integration window. Correct timestamp_sample to the
midpoint by subtracting CONVERSION_INTERVAL / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl ffa10ab362 fix(lps22hb): correct timestamp_sample to integration midpoint
The LPS22HB one-shot measurement is integrated over a ~40ms window
(at 25Hz-equivalent internal averaging). The read time corresponds to
the end of the integration window. Correct timestamp_sample to the
midpoint by subtracting CONVERSION_INTERVAL / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl e253c1e20c fix(ms5837): correct timestamp_sample to integration midpoint
Same fix as MS5611: the MS5837 ADC conversion at OSR 1024 takes
~2.28ms, but the data is read after a 10ms scheduling delay. Correct
timestamp_sample by subtracting (CONVERSION_INTERVAL - CONVERSION_TIME/2)
from the read time.
2026-03-31 16:37:12 -08:00
Jacob Dahl c149bad4f2 fix(ms5611): correct timestamp_sample to integration midpoint
The MS5611 ADC conversion at OSR 1024 takes ~2.28ms, but the data is
read after a 10ms scheduling delay. The current code timestamps the
read time, which is ~8.9ms after the true integration midpoint.
Correct timestamp_sample by subtracting the full offset
(CONVERSION_INTERVAL - CONVERSION_TIME/2) from the read time.
2026-03-31 16:37:12 -08:00
Jacob Dahl 8170e113fd fix(bmp581): correct timestamp_sample to integration midpoint
The BMP581 pressure measurement is integrated over a configurable
window (~23ms at 32x pressure / 2x temperature oversampling). The
read time corresponds to the end of the integration window, introducing
a systematic timing bias. Correct timestamp_sample to the midpoint by
subtracting measurement_time / 2.
2026-03-31 16:37:12 -08:00
Jacob Dahl 7f59e5dc16 fix(bmp280): correct timestamp_sample to integration midpoint
The BMP280 pressure measurement is integrated over _measure_interval
(~43ms at 16x pressure / 2x temperature oversampling). The read time
corresponds to the end of the integration window, introducing a
systematic timing bias. Correct timestamp_sample to the midpoint by
subtracting measurement_time / 2.
2026-03-31 16:37:12 -08:00
PX4BuildBot b2a75fcc0f docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-04-01 00:16:54 +00:00
Jacob Dahl 654306e9ed feat(logger): add high rate sensor topics at 100hz (#26922)
Set all high_rate_sensors_topics to 100hz (10ms interval) and add
vehicle_air_data, vehicle_thrust_setpoint, estimator_aid_src_baro_hgt,
and vehicle_magnetometer.
2026-03-31 16:09:50 -08:00
PX4BuildBot 7b8fc2efaf docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-31 23:42:44 +00:00
Jacob Dahl 0deb6b33ee fix(bmp388): correct timestamp_sample to integration midpoint (#26920)
The BMP388 pressure measurement is integrated over a configurable
window (e.g. 37ms at 16x oversampling). The previous code used the
read time as timestamp_sample, which is the end of the integration
window. Correct to the midpoint by subtracting half the measurement
time, with a guard against unsigned underflow.
2026-03-31 15:35:36 -08:00
PX4BuildBot 0e63f41642 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-31 23:13:34 +00:00
Ramon Roche b243398231 feat(build): add SPDX 2.3 SBOM generation for builds (#26731) 2026-03-31 17:06:51 -06:00
Ramon Roche 1d80fc317e docs(sim): restructure hardware sim pages and add SIH docs
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-31 17:01:10 -06:00
Ramon Roche 01dd41b7e8 fix(sim/sih): fix MAV_TYPE to report hexarotor in heartbeat
rc.mc_defaults sets MAV_TYPE=2 (quadrotor) which the hex airframe
never overrides. Set MAV_TYPE=13 (hexarotor) so the heartbeat
correctly identifies the vehicle type.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-31 17:01:10 -06:00
Ramon Roche 4f2918ee3b feat(sim): add SIH SITL build target and multi-instance args
- Add boards/px4/sitl/sih.px4board disabling Gazebo bridge/msgs/plugins
- Update sitl_multiple_run.sh to accept model and build target arguments
- Add openjdk@17 to macOS setup script for jMAVSim display-only mode

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-31 17:01:10 -06:00
PX4BuildBot f46609ac8b docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-31 21:50:26 +00:00
Victor Nan Fernandez-Ayala 62b94fa73e docs(frames_sub): update BlueROV2 docs and align UUV surge/heave stick mapping (#26822)
* Swap joystick surge/heave mapping in manual, stabilized and acro modes to make it similar to position modes

* docs: update UUV/BlueROV2 modes and joystick mapping

* Document basic control axes and joystick mapping

Added basic control axes and stick mapping for BlueROV2.

* Fixed formatting issue

* Enhance clarity of control axes and stick mapping

Clarified descriptions of motion axes and joystick controls for BlueROV2.
2026-03-31 14:42:52 -07:00
PX4BuildBot 1e769a76d6 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-31 18:19:24 +00:00
Nick 1856933bac fix(rcS): silence VTX_SER_CFG on boot (#26914) 2026-03-31 10:11:36 -08:00
PX4BuildBot eb029e6920 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-31 16:59:42 +00:00
Jacob Dahl d5d2ce26d7 fix(dshot): map MAVLink standard ACTUATOR_OUTPUT_FUNCTION to PX4 OutputFunction (#26909)
The MAVLink standard defines ACTUATOR_OUTPUT_FUNCTION_MOTOR1=1..MOTOR16=16,
but PX4 internally uses OutputFunction::Motor1=101..Motor12=112. The DShot
driver only handled PX4 internal values (101+) and QGC legacy values (1101+),
so any standards-compliant GCS sending the MAVLink enum values would get
VEHICLE_CMD_RESULT_UNSUPPORTED back from MAV_CMD_CONFIGURE_ACTUATOR.

Add a mapping from MAVLink standard values (1-16) to PX4 internal values
(101-116) by adding 100, matching the existing QGC backwards-compat pattern.
2026-03-31 08:52:25 -08:00
Nick 1d81ecb08d fix(dshot): no warning if dshot unconfigured (#26917) 2026-03-31 08:52:15 -08:00
PX4BuildBot b48f3ef6f7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-31 11:19:55 +00:00
alexcekay d24d4a4fc4 uavcan: fix battery sub not working 2026-03-31 13:12:23 +02:00
PX4BuildBot 710adefb4c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-30 17:41:31 +00:00
Anil Kircaliali d4e60cb1dc feat(navigator): support MAV_FRAME_GLOBAL_INT and MAV_FRAME_GLOBAL_RELATIVE_ALT_INT for RTL safe points (#26901)
* navigator:  support MAV_FRAME_GLOBAL_INT and MAV_FRAME_GLOBAL_RELATIVE_ALT_INT for RTL safe points

* Fix descriptive comment

* refactor(rtl): consolidate frame cases that are duplicate

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-03-30 19:33:46 +02:00
PX4BuildBot 45659d36aa docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-30 12:55:57 +00:00
ttechnick c2c811072e fix(mavlink): GPS jamming only warning 2026-03-30 14:48:51 +02:00
Beniamino Pozzan 7584f7567f ci(px4_msgs): publishing stable tag triggers tag creation in px4_msgs (#26858)
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2026-03-28 17:30:20 +00:00
PX4BuildBot 693b3111ca docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-27 07:48:24 +00:00
ttechnick 6c775c5a81 feat(mavlink): resend MISSION_COUNT when its dropped 2026-03-27 08:41:30 +01:00
PX4BuildBot b5cc93cebc docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-27 02:40:06 +00:00
PX4 Build Bot 9784fcbb8e docs(i18n): PX4 guide translations (Crowdin) - ko (#26849)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-03-27 13:33:08 +11:00
PX4 Build Bot 274e9e3ee8 docs(i18n): PX4 guide translations (Crowdin) - uk (#26850)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-03-27 13:32:55 +11:00
PX4 Build Bot 2ffc643390 docs(i18n): PX4 guide translations (Crowdin) - zh-CN (#26851)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2026-03-27 13:32:44 +11:00
PX4BuildBot e4e3795cad docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-27 01:48:11 +00:00
Claudio Chies 5a4c13fc23 fix(commander): ADSB timeout modification and cosmetics (#26878)
* fix(commander): add tab character to critical system loss messages

* fix(commander): extend timeout for traffic avoidance system heartbeat check

* Commander: Only Warn the user about traffic avoidance system loss if COM_ARM_TRAFF is set

Signed-off-by: Claudio Micheli <claudio@auterion.com>

---------

Signed-off-by: Claudio Micheli <claudio@auterion.com>
Co-authored-by: Claudio Micheli <claudio@auterion.com>
2026-03-26 18:41:33 -07:00
PX4BuildBot 565781e688 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-26 18:42:00 +00:00
Onur Özkan 6b17795aa4 fix(lib/gnss/test): mark buildRawFrame noinline to avoid GCC false positive (#26877)
GCC 14.3.0 emits `-Wstringop-overflow` when `RtcmTest::buildRawFrame()`
is optimized and inlined.

This change marks the helper `noinline` to keep it out of that optimization path.

Preserves the existing logic and only changes how the compiler emits the test helper.

Fixes https://github.com/PX4/PX4-Autopilot/issues/26875

Signed-off-by: Onur Özkan <work@onurozkan.dev>
2026-03-26 10:34:40 -08:00
PX4BuildBot f573dec0d9 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-25 17:52:11 +00:00
Valentin Bugrov 1bef6390f2 fix(drvers/ins): InertialLabs INS driver fix name-collision (#26874) 2026-03-25 09:44:49 -08:00
PX4BuildBot 80815bba4a docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-25 16:37:02 +00:00
Marco Hauswirth b82894143e fix(sensors): restrict baro calibrations to ground 2026-03-25 17:29:22 +01:00
PX4BuildBot 63c77734f7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-25 13:02:02 +00:00
Claudio Chies 72bcbdc1bb fix(ekf2): update minimum values for required EPH and EPV parameters 2026-03-25 13:54:44 +01:00
ttechnick ecd553da6a fix(mavlink): fix gps utc timestamp 2026-03-25 13:50:56 +01:00
Eric Katzfey 4a48525e45 fix(voxl2): Update to voxl-px4 service file so that it starts properly on power up 2026-03-24 12:09:41 -06:00
PX4BuildBot c7aa01bc80 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-24 15:31:21 +00:00
Mahima Yoga 5d26d7126a feat(fw-launch-detection): use acceleration magnitude instead of body-forward (#26857)
* feat(fw-launch-detection): use acceleration magnitude for launch detection

* docs: update takeoff docs

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2026-03-24 16:14:42 +01:00
PX4BuildBot d617971b3e docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-24 15:07:41 +00:00
mahima-yoga 596bb23bb9 docs(commander): add docs around COM_ARM_ON_BOOT functionality 2026-03-24 15:01:15 +00:00
mahima-yoga 873ee61d57 commander: enable arming on boot 2026-03-24 15:01:15 +00:00
PX4BuildBot 30bbd6ecd4 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-24 01:35:55 +00:00
Matteo Del Seppia 860505fc05 refactor(collision_prevention): Remove loop in _checkSetpointDirectionFeasability() (#26856)
* Refactor feasibility check for setpoint direction

* Add check for out of bounds index

* Formatting
2026-03-23 17:28:57 -08:00
Onur Özkan 8d4a5cc76c build(make): support Python venv (#26852)
* use venv python executable if active

Signed-off-by: Onur Özkan <work@onurozkan.dev>

* untrack .venv

Signed-off-by: Onur Özkan <work@onurozkan.dev>

---------

Signed-off-by: Onur Özkan <work@onurozkan.dev>
2026-03-23 16:44:40 -08:00
Alexander Lerach 1639c7f9c6 reserve second id for skynode n (#26680) 2026-03-23 11:19:04 +01:00
PX4BuildBot 3f180ac42d docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-23 00:16:49 +00:00
Pavel Guzenfeld f003fc39cb fix(uxrce_dds_client): handle empty DDS subscriptions in build (#26846)
When all subscription topics are commented out in dds_topics.yaml,
the build failed in two ways:

1. KeyError in generate_dds_topics.py when the subscriptions key is
   absent from YAML — fixed by using dict.get() with fallback to
   empty list, consistent with how subscriptions_multi is handled.

2. Unused variable errors (-Werror) in the generated dds_topics.h
   when no subscriptions exist — fixed by guarding on_topic_update(),
   time_offset_us, and uxr_set_topic_callback() with conditional
   template blocks. Also marked create_data_reader() as
   __attribute__((unused)) since it is only called from generated
   subscription code.

Closes #26799

Signed-off-by: Pavel Guzenfeld <pavelgu@gmail.com>
2026-03-23 00:10:40 +00:00
PX4BuildBot 53bec94205 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-21 06:01:54 +00:00
Konstantin Lelkov 552262f14f feat(dronecan): increase outputs from 8 to 12 (#25837)
* [feat] allowed to assign up to 16 ESC CAN

* Update EscStatus.msg

lowered down to 12 motors, hardware tested

* Update module.yaml

lowered down to 12 motors, hardware tested

---------

Co-authored-by: klelkov <kon.lelkov@yandex.ru>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-03-20 21:55:04 -08:00
Eric Katzfey 17bf9ccb5d feat(voxl2): add ina226 and ina228 driver support for voxl2
Add INA226 and INA228 power monitor drivers to the voxl2 SLPI board
config and add startup options in voxl-px4-start to select them via
the POWER_MANAGER environment variable.
2026-03-20 13:42:40 -07:00
PX4BuildBot 782e9b8b04 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-20 20:07:08 +00:00
Eric Katzfey 02a31d0293 fix(qurt): Added i2c uninitialize on probe failure to prevent zombie ports 2026-03-20 13:00:16 -07:00
PX4BuildBot 36006b6d70 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-20 17:02:19 +00:00
Silvan ffd670b54c chore(navigator): move return to point of last link from RTL to Hold
Give the operator the optiont to configure a "Hold at position where
the data link was still coming through" by setting NAV_DLL_ACT to Hold
and the new param NAV_LTR_LAST_DL to 1.

Signed-off-by: Silvan <silvan@auterion.com>
2026-03-20 17:55:42 +01:00
Silvan 7922ecbed2 feat(Commander): add preflight check for containing rally point for RTL_TYPE 5
Signed-off-by: Silvan <silvan@auterion.com>
2026-03-20 17:55:42 +01:00
PX4BuildBot e9a04ed755 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-20 13:15:38 +00:00
Pernilla 424f544c6d feat(gimbal): reduce poll time in aux mode 2026-03-20 14:08:55 +01:00
PX4BuildBot 962db50ce7 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-20 08:53:42 +00:00
Jacob Dahl 882bee610d feat(logger): add sensor_baro to high rate sensors logging profile (#26834) 2026-03-20 00:46:43 -08:00
PX4BuildBot abdde3e206 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-20 08:26:58 +00:00
ttechnick c333688700 feat(commander): prevent termination on arm after gcs loss 2026-03-20 09:19:59 +01:00
649 changed files with 68462 additions and 5417 deletions
+1
View File
@@ -268,4 +268,5 @@ jobs:
files: |
artifacts/*.px4
artifacts/*.deb
artifacts/**/*.sbom.spdx.json
name: ${{ steps.upload-location.outputs.uploadlocation }}
+2
View File
@@ -46,6 +46,8 @@ jobs:
fetch-depth: 0
- name: Building [${{ matrix.check }}]
env:
PX4_SBOM_DISABLE: 1
run: |
cd "$GITHUB_WORKSPACE"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
+2 -2
View File
@@ -36,8 +36,8 @@ jobs:
px4io/px4-dev-ros-melodic:2021-09-08 \
bash -c '
git config --global --add safe.directory /workspace
make px4_sitl_default
make px4_sitl_default sitl_gazebo-classic
PX4_SBOM_DISABLE=1 make px4_sitl_default
PX4_SBOM_DISABLE=1 make px4_sitl_default sitl_gazebo-classic
./test/rostest_px4_run.sh \
mavros_posix_test_mission.test \
mission:=MC_mission_box \
+2 -2
View File
@@ -36,8 +36,8 @@ jobs:
px4io/px4-dev-ros-melodic:2021-09-08 \
bash -c '
git config --global --add safe.directory /workspace
make px4_sitl_default
make px4_sitl_default sitl_gazebo-classic
PX4_SBOM_DISABLE=1 make px4_sitl_default
PX4_SBOM_DISABLE=1 make px4_sitl_default sitl_gazebo-classic
./test/rostest_px4_run.sh \
mavros_posix_tests_offboard_posctl.test \
vehicle:=iris
@@ -110,6 +110,8 @@ jobs:
run: ccache -s
- name: Build PX4
env:
PX4_SBOM_DISABLE: 1
run: make px4_sitl_default
- name: ccache post-run px4/firmware
run: ccache -s
+42
View File
@@ -0,0 +1,42 @@
name: SBOM License Check
on:
push:
branches:
- 'main'
- 'release/**'
- 'stable'
paths:
- '.gitmodules'
- 'Tools/ci/license-overrides.yaml'
- 'Tools/ci/generate_sbom.py'
pull_request:
branches:
- '**'
paths:
- '.gitmodules'
- 'Tools/ci/license-overrides.yaml'
- 'Tools/ci/generate_sbom.py'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify-licenses:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false
- name: Install PyYAML
run: pip install pyyaml --break-system-packages
- name: Verify submodule licenses
run: python3 Tools/ci/generate_sbom.py --verify-licenses --source-dir .
+132
View File
@@ -0,0 +1,132 @@
name: SBOM Monthly Audit
on:
schedule:
# First Monday of each month at 09:00 UTC
- cron: '0 9 1-7 * 1'
workflow_dispatch:
inputs:
branch:
description: 'Branch to audit (leave empty for current)'
required: false
type: string
permissions:
contents: read
issues: write
jobs:
audit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref }}
fetch-depth: 1
submodules: recursive
- name: Install PyYAML
run: pip install pyyaml --break-system-packages
- name: Run license verification
id: verify
continue-on-error: true
run: |
python3 Tools/ci/generate_sbom.py --verify-licenses --source-dir . 2>&1 | tee /tmp/sbom-verify.txt
echo "exit_code=$?" >> "$GITHUB_OUTPUT"
- name: Check for issues
id: check
run: |
if grep -q "NOASSERTION" /tmp/sbom-verify.txt; then
echo "has_issues=true" >> "$GITHUB_OUTPUT"
# Extract NOASSERTION lines
grep "NOASSERTION" /tmp/sbom-verify.txt | grep -v "skipped" > /tmp/sbom-issues.txt || true
# Extract copyleft lines
sed -n '/Copyleft licenses detected/,/^$/p' /tmp/sbom-verify.txt > /tmp/sbom-copyleft.txt || true
else
echo "has_issues=false" >> "$GITHUB_OUTPUT"
fi
- name: Create issue if problems found
if: steps.check.outputs.has_issues == 'true'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const fullOutput = fs.readFileSync('/tmp/sbom-verify.txt', 'utf8');
let issueLines = '';
try {
issueLines = fs.readFileSync('/tmp/sbom-issues.txt', 'utf8');
} catch (e) {
issueLines = 'No specific NOASSERTION lines captured.';
}
let copyleftLines = '';
try {
copyleftLines = fs.readFileSync('/tmp/sbom-copyleft.txt', 'utf8');
} catch (e) {
copyleftLines = '';
}
const date = new Date().toISOString().split('T')[0];
const branch = '${{ inputs.branch || github.ref_name }}';
// Check for existing open issue to avoid duplicates
const existing = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
labels: 'sbom-audit',
state: 'open',
});
if (existing.data.length > 0) {
// Update existing issue with new findings
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: existing.data[0].number,
body: `## Monthly audit update (${date})\n\nIssues still present:\n\n\`\`\`\n${issueLines}\n\`\`\`\n${copyleftLines ? `\n### Copyleft warnings\n\`\`\`\n${copyleftLines}\n\`\`\`` : ''}`,
});
return;
}
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `chore(sbom): license audit found NOASSERTION entries on ${branch} (${date})`,
labels: ['sbom-audit'],
assignees: ['mrpollo'],
body: [
`## SBOM Monthly Audit -- ${branch} -- ${date}`,
'',
'The automated SBOM license audit found submodules with unresolved licenses.',
'',
'### NOASSERTION entries',
'',
'```',
issueLines,
'```',
'',
copyleftLines ? `### Copyleft warnings\n\n\`\`\`\n${copyleftLines}\n\`\`\`\n` : '',
'### How to fix',
'',
'1. Check the submodule repo for a LICENSE file',
'2. Add an override to `Tools/ci/license-overrides.yaml`',
'3. Run `python3 Tools/ci/generate_sbom.py --verify-licenses --source-dir .` to confirm',
'',
'### Full output',
'',
'<details>',
'<summary>Click to expand</summary>',
'',
'```',
fullOutput,
'```',
'',
'</details>',
'',
'cc @mrpollo',
].join('\n'),
});
+1
View File
@@ -71,6 +71,7 @@ jobs:
- name: Build PX4
env:
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
PX4_SBOM_DISABLE: 1
run: make px4_sitl_default
- name: Cache Post-Run [px4_sitl_default]
@@ -0,0 +1,135 @@
name: Tag px4_msgs from PX4 release tags
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
tag_name:
description: 'PX4 tag to propagate (example: v1.17.0)'
required: true
type: string
permissions:
contents: read
jobs:
tag_px4_msgs:
if: github.repository == 'PX4/PX4-Autopilot'
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
env:
TAG_NAME: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
steps:
- name: Checkout PX4 repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup git credentials
run: |
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
- name: Resolve release branch from tag
id: tag_info
shell: bash
run: |
set -euo pipefail
if [[ ! "${TAG_NAME}" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
echo "Tag format is not stable vX.Y.Z, skipping: ${TAG_NAME}"
echo "should_run=false" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "should_run=true" >> "$GITHUB_OUTPUT"
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
release_branch="release/${major}.${minor}"
git show-ref --verify --quiet "refs/heads/${release_branch}" || {
echo "PX4 branch ${release_branch} not found"
exit 1
}
tag_date="$(git for-each-ref --format='%(creatordate:iso8601)' "refs/tags/${TAG_NAME}")"
if [[ -z "${tag_date}" ]]; then
echo "Unable to resolve tag date for ${TAG_NAME}"
exit 1
fi
echo "release_branch=${release_branch}" >> "$GITHUB_OUTPUT"
echo "tag_date=${tag_date}" >> "$GITHUB_OUTPUT"
- name: Clone px4_msgs repo
if: steps.tag_info.outputs.should_run == 'true'
run: |
git clone https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/px4_msgs.git
- name: Checkout matching px4_msgs release branch
if: steps.tag_info.outputs.should_run == 'true'
shell: bash
run: |
set -euo pipefail
cd px4_msgs
release_branch="${{ steps.tag_info.outputs.release_branch }}"
if git show-ref --verify --quiet "refs/remotes/origin/${release_branch}"; then
git checkout -B "${release_branch}" "origin/${release_branch}"
else
echo "px4_msgs branch ${release_branch} does not exist"
exit 1
fi
- name: Verify msg and srv trees are identical
if: steps.tag_info.outputs.should_run == 'true'
shell: bash
run: |
set -euo pipefail
release_branch="${{ steps.tag_info.outputs.release_branch }}"
git checkout "${release_branch}"
# Use the same synchronization logic as sync_to_px4_msgs.yml,
# then verify there are no changes in px4_msgs.
rm -f px4_msgs/msg/*.msg
rm -f px4_msgs/msg/versioned/*.msg
rm -f px4_msgs/srv/*.srv
rm -f px4_msgs/srv/versioned/*.srv
cp msg/*.msg px4_msgs/msg/
cp msg/versioned/*.msg px4_msgs/msg/ || true
cp srv/*.srv px4_msgs/srv/
cp srv/versioned/*.srv px4_msgs/srv/ || true
if ! git -C px4_msgs diff --exit-code -- msg srv; then
echo "Message/service definitions differ between PX4 ${release_branch} and px4_msgs ${release_branch}"
exit 1
fi
- name: Create and push tag in px4_msgs
if: steps.tag_info.outputs.should_run == 'true'
shell: bash
run: |
set -euo pipefail
cd px4_msgs
target="$(git rev-parse HEAD)"
existing_target="$(git rev-parse "refs/tags/${TAG_NAME}^{}" 2>/dev/null || true)"
if [[ -n "${existing_target}" ]]; then
if [[ "${existing_target}" == "${target}" ]]; then
echo "Tag ${TAG_NAME} already exists on ${target}; nothing to do"
exit 0
fi
echo "Tag ${TAG_NAME} already exists on ${existing_target}, expected ${target}"
exit 1
fi
GIT_COMMITTER_DATE="${{ steps.tag_info.outputs.tag_date }}" \
git tag -a "${TAG_NAME}" "${target}" \
-m "PX4 msgs and srvs definitions matching PX4 stable release ${TAG_NAME#v}"
git push origin "refs/tags/${TAG_NAME}"
+3
View File
@@ -112,3 +112,6 @@ keys/
# metadata
_emscripten_sdk/
# virtual Python environment
.venv
+9 -1
View File
@@ -240,8 +240,15 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${PX4_BUILD_TYPE} CACHE STRING "Build type" FORCE)
endif()
if(CONFIG_BOARD_SUPPORT_FORTIFIED_TOOLCHAIN)
set(PX4_DEBUG_OPT_LEVEL -Og)
message(STATUS "fortified toolchain support enabled: PX4_DEBUG_OPT_LEVEL=${PX4_DEBUG_OPT_LEVEL}")
else()
set(PX4_DEBUG_OPT_LEVEL -O0)
endif()
if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "Coverage"))
set(MAX_CUSTOM_OPT_LEVEL -O0)
set(MAX_CUSTOM_OPT_LEVEL ${PX4_DEBUG_OPT_LEVEL})
elseif(CMAKE_BUILD_TYPE MATCHES "Sanitizer")
set(MAX_CUSTOM_OPT_LEVEL -O1)
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
@@ -484,6 +491,7 @@ include(bloaty)
include(metadata)
include(package)
include(sbom)
# install python requirements using configured python
add_custom_target(install_python_requirements
+10
View File
@@ -67,6 +67,16 @@ menu "Toolchain"
help
Enables Cmake Release for -O3 optimization
config BOARD_SUPPORT_FORTIFIED_TOOLCHAIN
bool "Fortified toolchain support"
default n
help
Enable compatibility with toolchains that define
_FORTIFY_SOURCE.
This switches PX4_DEBUG_OPT_LEVEL from -O0 to -Og. Keep this
disabled unless the fortified toolchain requires optimization.
config BOARD_ROMFSROOT
string "ROMFSROOT"
default "px4fmu_common"
+6
View File
@@ -162,6 +162,12 @@ else
endif
# Prefer the interpreter from an active Python virtual environment.
# Otherwise leave PYTHON_EXECUTABLE unset and let CMake resolve Python.
ifneq ($(strip $(VIRTUAL_ENV)),)
PYTHON_EXECUTABLE ?= $(VIRTUAL_ENV)/bin/python
endif
# Pick up specific Python path if set
ifdef PYTHON_EXECUTABLE
override CMAKE_ARGS += -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
@@ -18,6 +18,7 @@ param set-default SENS_EN_BAROSIM 1
param set-default SENS_EN_MAGSIM 1
param set SIH_VEHICLE_TYPE 4
param set-default MAV_TYPE 13
# Symmetric hexacopter X clockwise motor numbering
param set-default CA_ROTOR_COUNT 6
+1 -1
View File
@@ -249,7 +249,7 @@ fi
load_mon start
if param greater SIM_BAT_DRAIN 0
if param compare SIM_BAT_ENABLE 1
then
battery_simulator start
fi
+1 -1
View File
@@ -633,7 +633,7 @@ else
#
# Start the VTX services.
#
if ! param compare VTX_SER_CFG 0
if ! param compare -s VTX_SER_CFG 0
then
set RC_VTXTABLE ${R}etc/init.d/rc.vtxtable
if [ -f ${RC_VTXTABLE} ]
+1 -1
View File
@@ -1,4 +1,4 @@
#! /bin/bash
#!/usr/bin/env bash
# exit when any command fails
set -e
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [[ $# -eq 0 ]] ; then
exit 0
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Flash PX4 to a device running AuterionOS in the local network
if [ "$1" == "-h" ] || [ "$1" == "--help" ] || [ $# -lt 2 ]; then
echo "Usage: $0 -f <firmware.px4|.elf> [-c <configuration_dir>] -d <IP/Device> [-u <user>] [-p <ssh_port>] [--revert]"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script is meant to be used by the build_all.yml workflow in a github runner
# Please only modify if you know what you are doing
set -e
+1 -1
View File
@@ -1,4 +1,4 @@
#! /bin/bash
#!/usr/bin/env bash
# Copy a git diff between two commits if msg versioning is added
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+603
View File
@@ -0,0 +1,603 @@
#!/usr/bin/env python3
"""Generate SPDX 2.3 JSON SBOM for a PX4 firmware build.
Produces one SBOM per board target containing:
- PX4 firmware as the primary package
- Git submodules as CONTAINS dependencies
- Python build requirements as BUILD_DEPENDENCY_OF packages
- Board-specific modules as CONTAINS packages
Requires PyYAML (pyyaml) for loading license overrides.
"""
import argparse
import configparser
import json
import re
import subprocess
import uuid
from datetime import datetime, timezone
from pathlib import Path
import yaml
# Ordered most-specific first: all keywords must appear for a match.
LICENSE_PATTERNS = [
# Copyleft licenses first (more specific keywords prevent false matches)
("GPL-3.0-only", ["GNU GENERAL PUBLIC LICENSE", "Version 3"]),
("GPL-2.0-only", ["GNU GENERAL PUBLIC LICENSE", "Version 2"]),
("LGPL-3.0-only", ["GNU LESSER GENERAL PUBLIC LICENSE", "Version 3"]),
("LGPL-2.1-only", ["GNU Lesser General Public License", "Version 2.1"]),
("AGPL-3.0-only", ["GNU AFFERO GENERAL PUBLIC LICENSE", "Version 3"]),
# Permissive licenses
("Apache-2.0", ["Apache License", "Version 2.0"]),
("MIT", ["Permission is hereby granted"]),
("BSD-3-Clause", ["Redistribution and use", "Neither the name"]),
("BSD-2-Clause", ["Redistribution and use", "THIS SOFTWARE IS PROVIDED"]),
("ISC", ["Permission to use, copy, modify, and/or distribute"]),
("EPL-2.0", ["Eclipse Public License", "2.0"]),
("Unlicense", ["The Unlicense", "unlicense.org"]),
]
COPYLEFT_LICENSES = {
"GPL-2.0-only", "GPL-3.0-only",
"LGPL-2.1-only", "LGPL-3.0-only",
"AGPL-3.0-only",
}
def load_license_overrides(source_dir):
"""Load license overrides and comments from YAML config file.
Returns (overrides, comments) dicts mapping submodule path to values.
Falls back to empty dicts if the file is missing.
"""
yaml_path = source_dir / "Tools" / "ci" / "license-overrides.yaml"
if not yaml_path.exists():
return {}, {}
with open(yaml_path) as f:
data = yaml.safe_load(f)
overrides = {}
comments = {}
for path, entry in (data.get("overrides") or {}).items():
overrides[path] = entry["license"]
if "comment" in entry:
comments[path] = entry["comment"]
return overrides, comments
LICENSE_FILENAMES = ["LICENSE", "LICENSE.md", "LICENSE.txt", "LICENCE", "LICENCE.md", "COPYING", "COPYING.md"]
def detect_license(submodule_dir):
"""Auto-detect SPDX license ID from LICENSE/COPYING file in a directory.
Reads the first 100 lines of the first license file found and matches
keywords against LICENSE_PATTERNS. Returns 'NOASSERTION' if no file
is found or no pattern matches.
"""
for fname in LICENSE_FILENAMES:
license_file = submodule_dir / fname
if license_file.is_file():
try:
lines = license_file.read_text(errors="replace").splitlines()[:100]
text = "\n".join(lines)
except OSError:
continue
text_upper = text.upper()
for spdx_id_val, keywords in LICENSE_PATTERNS:
if all(kw.upper() in text_upper for kw in keywords):
return spdx_id_val
return "NOASSERTION"
return "NOASSERTION"
def get_submodule_license(source_dir, sub_path, license_overrides):
"""Return the SPDX license for a submodule: override > auto-detect."""
if sub_path in license_overrides:
return license_overrides[sub_path]
return detect_license(source_dir / sub_path)
def spdx_id(name: str) -> str:
"""Convert a name to a valid SPDX identifier (letters, digits, dots, hyphens)."""
return re.sub(r"[^a-zA-Z0-9.\-]", "-", name)
def parse_gitmodules(source_dir):
"""Parse .gitmodules and return list of {name, path, url}."""
gitmodules_path = source_dir / ".gitmodules"
if not gitmodules_path.exists():
return []
config = configparser.ConfigParser()
config.read(str(gitmodules_path))
submodules = []
for section in config.sections():
if section.startswith("submodule "):
name = section.split('"')[1] if '"' in section else section.split(" ", 1)[1]
path = config.get(section, "path", fallback="")
url = config.get(section, "url", fallback="")
submodules.append({"name": name, "path": path, "url": url})
return submodules
def get_submodule_commits(source_dir):
"""Get commit hashes for all submodules via git ls-tree -r (works without init)."""
try:
result = subprocess.run(
["git", "ls-tree", "-r", "HEAD"],
cwd=str(source_dir),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
check=True,
)
except (subprocess.CalledProcessError, FileNotFoundError):
return {}
commits = {}
for line in result.stdout.splitlines():
parts = line.split()
if len(parts) >= 4 and parts[1] == "commit":
commits[parts[3]] = parts[2]
return commits
def get_git_info(source_dir: Path) -> dict:
"""Get PX4 git version and hash."""
info = {"version": "unknown", "hash": "unknown"}
try:
result = subprocess.run(
["git", "describe", "--always", "--tags", "--dirty"],
cwd=str(source_dir),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
check=True,
)
info["version"] = result.stdout.strip()
except (subprocess.CalledProcessError, FileNotFoundError):
pass
try:
result = subprocess.run(
["git", "rev-parse", "HEAD"],
cwd=str(source_dir),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
check=True,
)
info["hash"] = result.stdout.strip()
except (subprocess.CalledProcessError, FileNotFoundError):
pass
return info
def parse_requirements(requirements_path):
"""Parse pip requirements.txt into list of {name, version_spec}."""
if not requirements_path.exists():
return []
deps = []
for line in requirements_path.read_text().splitlines():
line = line.strip()
if not line or line.startswith("#") or line.startswith("-"):
continue
# Split on version specifiers
match = re.match(r"^([a-zA-Z0-9_\-]+)(.*)?$", line)
if match:
deps.append({
"name": match.group(1),
"version_spec": match.group(2).strip() if match.group(2) else "",
})
return deps
def read_module_list(modules_file, source_dir):
"""Read board-specific module list from file.
Paths may be absolute; they are converted to relative paths under src/.
Duplicates are removed while preserving order.
"""
if not modules_file or not modules_file.exists():
return []
seen = set()
modules = []
source_str = str(source_dir.resolve()) + "/"
for line in modules_file.read_text().splitlines():
path = line.strip()
if not path or path.startswith("#"):
continue
# Convert absolute path to relative
if path.startswith(source_str):
path = path[len(source_str):]
if path not in seen:
seen.add(path)
modules.append(path)
return modules
def make_purl(pkg_type: str, namespace: str, name: str, version: str = "") -> str:
"""Construct a Package URL (purl)."""
purl = f"pkg:{pkg_type}/{namespace}/{name}"
if version:
purl += f"@{version}"
return purl
def extract_git_host_org_repo(url):
"""Extract host type, org, and repo from a git URL.
Returns (host, org, repo) where host is 'github', 'gitlab', or ''.
"""
match = re.search(r"github\.com[:/]([^/]+)/([^/]+?)(?:\.git)?$", url)
if match:
return "github", match.group(1), match.group(2)
match = re.search(r"gitlab\.com[:/](.+?)/([^/]+?)(?:\.git)?$", url)
if match:
return "gitlab", match.group(1), match.group(2)
return "", "", ""
def generate_sbom(source_dir, board, modules_file, compiler, platform=""):
"""Generate a complete SPDX 2.3 JSON document."""
license_overrides, license_comments = load_license_overrides(source_dir)
git_info = get_git_info(source_dir)
timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
# Deterministic namespace using UUID5 from git hash + board
ns_seed = f"{git_info['hash']}:{board}"
doc_namespace = f"https://spdx.org/spdxdocs/{board}-{uuid.uuid5(uuid.NAMESPACE_URL, ns_seed)}"
doc = {
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": f"PX4 Firmware SBOM for {board}",
"documentNamespace": doc_namespace,
"creationInfo": {
"created": timestamp,
"creators": [
"Tool: px4-generate-sbom",
"Organization: Dronecode Foundation",
],
"licenseListVersion": "3.22",
},
"packages": [],
"relationships": [],
}
# Primary package: PX4 firmware
primary_spdx_id = f"SPDXRef-PX4-{spdx_id(board)}"
doc["packages"].append({
"SPDXID": primary_spdx_id,
"name": board,
"versionInfo": git_info["version"],
"packageFileName": f"{board}.px4",
"supplier": "Organization: Dronecode Foundation",
"downloadLocation": "https://github.com/PX4/PX4-Autopilot",
"filesAnalyzed": False,
"primaryPackagePurpose": "FIRMWARE",
"licenseConcluded": "BSD-3-Clause",
"licenseDeclared": "BSD-3-Clause",
"copyrightText": "Copyright (c) PX4 Development Team",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": make_purl(
"github", "PX4", "PX4-Autopilot", git_info["version"]
),
}
],
})
doc["relationships"].append({
"spdxElementId": "SPDXRef-DOCUMENT",
"relationshipType": "DESCRIBES",
"relatedSpdxElement": primary_spdx_id,
})
# Git submodules (filtered to those relevant to this board's modules)
submodules = parse_gitmodules(source_dir)
submodule_commits = get_submodule_commits(source_dir)
modules = read_module_list(modules_file, source_dir)
def submodule_is_relevant(sub_path):
"""A submodule is relevant if any board module path overlaps with it."""
# NuttX platform submodules are only relevant for NuttX builds
if sub_path.startswith("platforms/nuttx/"):
return platform in ("nuttx", "")
if not modules:
return True # no module list means include all
# Other platform submodules are always relevant
if sub_path.startswith("platforms/"):
return True
for mod in modules:
# Module is under this submodule, or submodule is under a module
if mod.startswith(sub_path + "/") or sub_path.startswith(mod + "/"):
return True
return False
for sub in submodules:
if not submodule_is_relevant(sub["path"]):
continue
sub_path = sub["path"]
sub_path_id = sub_path.replace("/", "-")
sub_spdx_id = f"SPDXRef-Submodule-{spdx_id(sub_path_id)}"
commit = submodule_commits.get(sub_path, "unknown")
license_id = get_submodule_license(source_dir, sub_path, license_overrides)
host, org, repo = extract_git_host_org_repo(sub["url"])
download = sub["url"] if sub["url"] else "NOASSERTION"
# Use repo name from URL for human-readable name, fall back to last path component
display_name = repo if repo else sub_path.rsplit("/", 1)[-1]
pkg = {
"SPDXID": sub_spdx_id,
"name": display_name,
"versionInfo": commit,
"supplier": f"Organization: {org}" if org else "NOASSERTION",
"downloadLocation": download,
"filesAnalyzed": False,
"licenseConcluded": license_id,
"licenseDeclared": license_id,
"copyrightText": "NOASSERTION",
}
comment = license_comments.get(sub_path)
if comment:
pkg["licenseComments"] = comment
if host and org and repo:
pkg["externalRefs"] = [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": make_purl(host, org, repo, commit),
}
]
doc["packages"].append(pkg)
doc["relationships"].append({
"spdxElementId": primary_spdx_id,
"relationshipType": "CONTAINS",
"relatedSpdxElement": sub_spdx_id,
})
# Python build dependencies
requirements_path = source_dir / "Tools" / "setup" / "requirements.txt"
py_deps = parse_requirements(requirements_path)
for dep in py_deps:
dep_name = dep["name"]
dep_spdx_id = f"SPDXRef-PyDep-{spdx_id(dep_name)}"
version_str = dep["version_spec"] if dep["version_spec"] else "NOASSERTION"
doc["packages"].append({
"SPDXID": dep_spdx_id,
"name": dep_name,
"versionInfo": version_str,
"supplier": "NOASSERTION",
"downloadLocation": f"https://pypi.org/project/{dep_name}/",
"filesAnalyzed": False,
"primaryPackagePurpose": "APPLICATION",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
"externalRefs": [
{
"referenceCategory": "PACKAGE-MANAGER",
"referenceType": "purl",
"referenceLocator": f"pkg:pypi/{dep_name}",
}
],
})
doc["relationships"].append({
"spdxElementId": dep_spdx_id,
"relationshipType": "BUILD_DEPENDENCY_OF",
"relatedSpdxElement": primary_spdx_id,
})
# Board-specific modules (already read above for submodule filtering)
for mod in modules:
mod_path_id = mod.replace("/", "-")
mod_spdx_id = f"SPDXRef-Module-{spdx_id(mod_path_id)}"
# Derive short name: strip leading src/ for readability
display_name = mod
if display_name.startswith("src/"):
display_name = display_name[4:]
doc["packages"].append({
"SPDXID": mod_spdx_id,
"name": display_name,
"versionInfo": git_info["version"],
"supplier": "Organization: Dronecode Foundation",
"downloadLocation": "https://github.com/PX4/PX4-Autopilot",
"filesAnalyzed": False,
"licenseConcluded": "BSD-3-Clause",
"licenseDeclared": "BSD-3-Clause",
"copyrightText": "NOASSERTION",
})
doc["relationships"].append({
"spdxElementId": primary_spdx_id,
"relationshipType": "CONTAINS",
"relatedSpdxElement": mod_spdx_id,
})
# Compiler as a build tool
if compiler:
compiler_spdx_id = f"SPDXRef-Compiler-{spdx_id(compiler)}"
doc["packages"].append({
"SPDXID": compiler_spdx_id,
"name": compiler,
"versionInfo": "NOASSERTION",
"supplier": "NOASSERTION",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": False,
"primaryPackagePurpose": "APPLICATION",
"licenseConcluded": "NOASSERTION",
"licenseDeclared": "NOASSERTION",
"copyrightText": "NOASSERTION",
})
doc["relationships"].append({
"spdxElementId": compiler_spdx_id,
"relationshipType": "BUILD_TOOL_OF",
"relatedSpdxElement": primary_spdx_id,
})
return doc
def verify_licenses(source_dir):
"""Verify license detection for all submodules. Returns exit code."""
license_overrides, _ = load_license_overrides(source_dir)
submodules = parse_gitmodules(source_dir)
if not submodules:
print("No submodules found in .gitmodules")
return 1
has_noassertion = False
print(f"{'Submodule Path':<65} {'Detected':<16} {'Override':<16} {'Final'}")
print("-" * 115)
for sub in submodules:
sub_path = sub["path"]
sub_dir = source_dir / sub_path
checked_out = sub_dir.is_dir() and any(sub_dir.iterdir())
if not checked_out:
detected = "(not checked out)"
override = license_overrides.get(sub_path, "")
final = override if override else "NOASSERTION"
else:
detected = detect_license(sub_dir)
override = license_overrides.get(sub_path, "")
final = override if override else detected
if final == "NOASSERTION" and checked_out:
has_noassertion = True
marker = " <-- NOASSERTION"
elif final == "NOASSERTION" and not checked_out:
marker = " (skipped)"
else:
marker = ""
print(f"{sub_path:<65} {str(detected):<16} {str(override) if override else '':<16} {final}{marker}")
# Copyleft warning (informational, not a failure)
copyleft_found = []
for sub in submodules:
sub_path = sub["path"]
sub_dir = source_dir / sub_path
checked_out = sub_dir.is_dir() and any(sub_dir.iterdir())
override = license_overrides.get(sub_path, "")
if checked_out:
final_lic = override if override else detect_license(sub_dir)
else:
final_lic = override if override else "NOASSERTION"
for cl in COPYLEFT_LICENSES:
if cl in final_lic:
copyleft_found.append((sub_path, final_lic))
break
print()
if copyleft_found:
print("Copyleft licenses detected (informational):")
for path, lic in copyleft_found:
print(f" {path}: {lic}")
print()
if has_noassertion:
print("FAIL: Some submodules resolved to NOASSERTION. "
"Add an entry to Tools/ci/license-overrides.yaml or check the LICENSE file.")
return 1
print("OK: All submodules have a resolved license.")
return 0
def main():
parser = argparse.ArgumentParser(
description="Generate SPDX 2.3 JSON SBOM for PX4 firmware"
)
parser.add_argument(
"--source-dir",
type=Path,
default=Path.cwd(),
help="PX4 source directory (default: cwd)",
)
parser.add_argument(
"--verify-licenses",
action="store_true",
help="Verify license detection for all submodules and exit",
)
parser.add_argument(
"--board",
default=None,
help="Board target name (e.g. px4_fmu-v5x_default)",
)
parser.add_argument(
"--modules-file",
type=Path,
default=None,
help="Path to config_module_list.txt",
)
parser.add_argument(
"--compiler",
default="",
help="Compiler identifier (e.g. arm-none-eabi-gcc)",
)
parser.add_argument(
"--platform",
default="",
help="PX4 platform (nuttx, posix, qurt). Filters platform-specific submodules.",
)
parser.add_argument(
"--output",
type=Path,
default=None,
help="Output SBOM file path",
)
args = parser.parse_args()
if args.verify_licenses:
raise SystemExit(verify_licenses(args.source_dir))
if not args.board:
parser.error("--board is required when not using --verify-licenses")
if not args.output:
parser.error("--output is required when not using --verify-licenses")
sbom = generate_sbom(
source_dir=args.source_dir,
board=args.board,
modules_file=args.modules_file,
compiler=args.compiler,
platform=args.platform,
)
args.output.parent.mkdir(parents=True, exist_ok=True)
with open(args.output, "w") as f:
json.dump(sbom, f, indent=2)
f.write("\n")
pkg_count = len(sbom["packages"])
print(f"SBOM generated: {args.output} ({pkg_count} packages)")
if __name__ == "__main__":
main()
+163
View File
@@ -0,0 +1,163 @@
#!/usr/bin/env python3
"""Inspect a PX4 SPDX SBOM file.
Usage:
inspect_sbom.py <sbom.spdx.json> # full summary
inspect_sbom.py <sbom.spdx.json> search <term> # search packages by name
inspect_sbom.py <sbom.spdx.json> ntia # NTIA minimum elements check
inspect_sbom.py <sbom.spdx.json> licenses # license summary
inspect_sbom.py <sbom.spdx.json> list <type> # list packages (Submodule|PyDep|Module|all)
"""
import json
import sys
from collections import Counter
from pathlib import Path
def load(path):
return json.loads(Path(path).read_text())
def pkg_type(pkg):
spdx_id = pkg["SPDXID"]
for prefix in ("Submodule", "PyDep", "Module", "Compiler", "PX4"):
if f"-{prefix}-" in spdx_id or spdx_id.startswith(f"SPDXRef-{prefix}"):
return prefix
return "Other"
def summary(doc):
print(f"spdxVersion: {doc['spdxVersion']}")
print(f"name: {doc['name']}")
print(f"namespace: {doc['documentNamespace']}")
print(f"created: {doc['creationInfo']['created']}")
print(f"creators: {', '.join(doc['creationInfo']['creators'])}")
print()
types = Counter(pkg_type(p) for p in doc["packages"])
print(f"Packages: {len(doc['packages'])}")
for t, c in types.most_common():
print(f" {t}: {c}")
print()
rc = Counter(r["relationshipType"] for r in doc["relationships"])
print(f"Relationships: {len(doc['relationships'])}")
for t, n in rc.most_common():
print(f" {t}: {n}")
print()
primary = doc["packages"][0]
print(f"Primary package:")
print(f" name: {primary['name']}")
print(f" version: {primary['versionInfo']}")
print(f" purpose: {primary.get('primaryPackagePurpose', 'N/A')}")
print(f" license: {primary['licenseDeclared']}")
print()
noassert = [
p["name"]
for p in doc["packages"]
if pkg_type(p) == "Submodule" and p["licenseDeclared"] == "NOASSERTION"
]
if noassert:
print(f"WARNING: {len(noassert)} submodules with NOASSERTION license:")
for n in noassert:
print(f" - {n}")
else:
print("All submodule licenses mapped")
print(f"\nFile size: {Path(sys.argv[1]).stat().st_size // 1024}KB")
def search(doc, term):
term = term.lower()
found = [p for p in doc["packages"] if term in p["name"].lower()]
if not found:
print(f"No packages matching '{term}'")
return
print(f"Found {len(found)} packages matching '{term}':\n")
for p in found:
print(json.dumps(p, indent=2))
print()
def ntia_check(doc):
required = ["SPDXID", "name", "versionInfo", "supplier", "downloadLocation"]
missing = []
for p in doc["packages"]:
for f in required:
if f not in p or p[f] in ("", None):
missing.append((p["name"], f))
if missing:
print(f"FAIL: {len(missing)} missing fields:")
for name, field in missing:
print(f" {name}: missing {field}")
else:
print(f"PASS: All {len(doc['packages'])} packages have required fields")
print(f"\nCreators: {doc['creationInfo']['creators']}")
print(f"Timestamp: {doc['creationInfo']['created']}")
rels = [r for r in doc["relationships"] if r["relationshipType"] == "DESCRIBES"]
print(f"DESCRIBES relationships: {len(rels)}")
return len(missing) == 0
def licenses(doc):
by_license = {}
for p in doc["packages"]:
lic = p.get("licenseDeclared", "NOASSERTION")
by_license.setdefault(lic, []).append(p["name"])
for lic in sorted(by_license.keys()):
names = by_license[lic]
print(f"\n{lic} ({len(names)}):")
for n in sorted(names):
print(f" {n}")
def list_packages(doc, filter_type):
filter_type = filter_type.lower()
for p in sorted(doc["packages"], key=lambda x: x["name"]):
t = pkg_type(p)
if filter_type != "all" and t.lower() != filter_type:
continue
lic = p.get("licenseDeclared", "?")
ver = p["versionInfo"][:20] if len(p["versionInfo"]) > 20 else p["versionInfo"]
print(f" {t:10s} {p['name']:50s} {ver:20s} {lic}")
def main():
if len(sys.argv) < 2:
print(__doc__)
sys.exit(1)
doc = load(sys.argv[1])
cmd = sys.argv[2] if len(sys.argv) > 2 else "summary"
if cmd == "summary":
summary(doc)
elif cmd == "search":
if len(sys.argv) < 4:
print("Usage: inspect_sbom.py <file> search <term>")
sys.exit(1)
search(doc, sys.argv[3])
elif cmd == "ntia":
if not ntia_check(doc):
sys.exit(1)
elif cmd == "licenses":
licenses(doc)
elif cmd == "list":
filter_type = sys.argv[3] if len(sys.argv) > 3 else "all"
list_packages(doc, filter_type)
else:
print(f"Unknown command: {cmd}")
print(__doc__)
sys.exit(1)
if __name__ == "__main__":
main()
+56
View File
@@ -0,0 +1,56 @@
# SPDX license overrides for submodules where auto-detection fails or is wrong.
# Each entry maps a submodule path to its SPDX license identifier and an
# optional comment explaining why the override exists.
#
# Run `python3 Tools/ci/generate_sbom.py --verify-licenses` to validate.
overrides:
src/modules/mavlink/mavlink:
license: "LGPL-3.0-only AND MIT"
comment: "Generator is LGPL-3.0; PX4 ships only MIT-licensed generated headers."
src/lib/cdrstream/cyclonedds:
license: "EPL-2.0 OR BSD-3-Clause"
comment: >-
Dual-licensed. PX4 elects BSD-3-Clause.
No board currently enables CONFIG_LIB_CDRSTREAM.
src/lib/cdrstream/rosidl:
license: "Apache-2.0"
src/lib/crypto/monocypher:
license: "BSD-2-Clause OR CC0-1.0"
comment: >-
Dual-licensed. LICENCE.md offers BSD-2-Clause with CC0-1.0 as
public domain fallback.
src/lib/crypto/libtomcrypt:
license: "Unlicense"
comment: "Public domain dedication. Functionally equivalent to Unlicense."
src/lib/crypto/libtommath:
license: "Unlicense"
comment: "Public domain dedication. Functionally equivalent to Unlicense."
platforms/nuttx/NuttX/nuttx:
license: "Apache-2.0"
comment: >-
Composite LICENSE (6652 lines) includes BSD/MIT/ISC sub-components.
Primary license is Apache-2.0. NOTICE file contains FAT LFN patent warnings.
platforms/nuttx/NuttX/apps:
license: "Apache-2.0"
boards/modalai/voxl2/libfc-sensor-api:
license: "NOASSERTION"
comment: >-
No LICENSE file in repo. README describes it as public interface
for proprietary sensor library.
boards/modalai/voxl2/src/lib/mpa/libmodal-json:
license: "LGPL-3.0-only"
comment: "LGPL-3.0 weak copyleft. Used via header includes in VOXL2 mpa library."
boards/modalai/voxl2/src/lib/mpa/libmodal-pipe:
license: "LGPL-3.0-only"
comment: "LGPL-3.0 weak copyleft. Used via header includes in VOXL2 mpa library."
+3 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
mkdir artifacts
cp **/**/*.px4 artifacts/ 2>/dev/null || true
@@ -29,6 +29,8 @@ for build_dir_path in build/*/ ; do
# Events
mkdir -p artifacts/$build_dir/events/
cp $build_dir_path/events/all_events.json.xz artifacts/$build_dir/events/ 2>/dev/null || true
# SBOM
cp $build_dir_path/*.sbom.spdx.json artifacts/$build_dir/ 2>/dev/null || true
ls -la artifacts/$build_dir
echo "----------"
done
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script runs the fuzz tests from a given binary for a certain amount of time
set -e
+1 -1
View File
@@ -1,4 +1,4 @@
#! /bin/bash
#!/usr/bin/env bash
# Copy msgs and the message translation node into a ROS workspace directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+1 -1
View File
@@ -1,4 +1,4 @@
#! /bin/bash
#!/usr/bin/env bash
if [ -z ${PX4_DOCKER_REPO+x} ]; then
PX4_DOCKER_REPO="px4io/px4-dev:v1.17.0-beta1"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Script to run ShellCheck (a static analysis tool for shell scripts) over a
# script directory
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
GREEN='\033[0;32m'
NO_COLOR='\033[0m' # No Color
+7
View File
@@ -79,6 +79,13 @@ if [[ $INSTALL_SIM == "--sim-tools" ]]; then
elif [[ $REINSTALL_FORMULAS == "--reinstall" ]]; then
brew reinstall px4-sim
fi
# jMAVSim requires a JDK (Java 17 LTS recommended)
if ! brew ls --versions openjdk@17 > /dev/null; then
echo "[macos.sh] Installing OpenJDK 17 (required for jMAVSim)"
brew install openjdk@17
sudo ln -sfn $(brew --prefix openjdk@17)/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
fi
fi
echo "[macos.sh] All set! The PX4 Autopilot toolchain was installed."
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Setup environment to make PX4 visible to Gazebo.
#
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# run multiple instances of the 'px4' binary, with the gazebo SITL simulation
# It assumes px4 is already built, with 'make px4_sitl_default sitl_gazebo-classic'
+14 -11
View File
@@ -1,25 +1,28 @@
#!/bin/bash
# run multiple instances of the 'px4' binary, but w/o starting the simulator.
# It assumes px4 is already built, with 'make px4_sitl_default'
#!/usr/bin/env bash
# Run multiple instances of the 'px4' binary, without starting an external simulator.
# It assumes px4 is already built with the specified build target.
#
# Usage: ./Tools/simulation/sitl_multiple_run.sh [num_instances] [model] [build_target]
# Examples:
# ./Tools/simulation/sitl_multiple_run.sh 3 sihsim_quadx px4_sitl_sih
# ./Tools/simulation/sitl_multiple_run.sh 2 gazebo-classic_iris px4_sitl_default
# ./Tools/simulation/sitl_multiple_run.sh # defaults: 2 instances, gazebo-classic_iris, px4_sitl_default
# The simulator is expected to send to TCP port 4560+i for i in [0, N-1]
# For example jmavsim can be run like this:
#./Tools/simulation/jmavsim/jmavsim_run.sh -p 4561 -l
sitl_num=2
[ -n "$1" ] && sitl_num="$1"
sitl_num=${1:-2}
sim_model=${2:-gazebo-classic_iris}
build_target=${3:-px4_sitl_default}
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
src_path="$SCRIPT_DIR/../../"
build_path=${src_path}/build/px4_sitl_default
build_path=${src_path}/build/${build_target}
echo "killing running instances"
pkill -x px4 || true
sleep 1
export PX4_SIM_MODEL=gazebo-classic_iris
export PX4_SIM_MODEL=${sim_model}
n=0
while [ $n -lt $sitl_num ]; do
@@ -25,7 +25,14 @@ CONFIG_MODULES_COMMANDER=y
CONFIG_MODULES_CONTROL_ALLOCATOR=y
CONFIG_MODULES_DATAMAN=y
CONFIG_MODULES_EKF2=y
# CONFIG_EKF2_AUX_GLOBAL_POSITION is not set
# CONFIG_EKF2_AUXVEL is not set
# CONFIG_EKF2_BARO_COMPENSATION is not set
# CONFIG_EKF2_DRAG_FUSION is not set
# CONFIG_EKF2_EXTERNAL_VISION is not set
# CONFIG_EKF2_GNSS_YAW is not set
# CONFIG_EKF2_OPTICAL_FLOW is not set
# CONFIG_EKF2_RANGE_FINDER is not set
# CONFIG_EKF2_SIDESLIP is not set
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_LAND_DETECTOR=y
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Run this from the px4 project top level directory
docker run -it --rm --privileged -v `pwd`:/usr/local/workspace px4io/px4-dev-nuttx-focal:2022-08-12
+1 -1
View File
@@ -47,7 +47,7 @@ set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
set(CPACK_INSTALL_PREFIX "/usr")
set(CPACK_SET_DESTDIR true)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libfc-sensor (>=1.0.10), voxl-px4-params (>=0.3.10), voxl3-system-image(>=0.0.2) | voxl2-system-image(>=1.5.4) | rb5-system-image(>=1.6.2), modalai-slpi(>=1.1.16) | modalai-adsp(>=1.0.2)")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libfc-sensor (>=1.0.10), voxl-px4-params (>=0.3.10), voxl3-system-image(>=0.0.2) | voxl2-system-image(>=1.5.4) | rb5-system-image(>=1.6.2), modalai-slpi(>=1.2.2) | modalai-adsp(>=1.0.5)")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "px4-rb5-flight")
set(CPACK_DEBIAN_PACKAGE_REPLACES "px4-rb5-flight")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "PX4 Autopilot for ModalAI VOXL2")
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
# Create px4-* symlinks from px4-alias.sh
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
# Stop voxl-px4 service if running
+1 -2
View File
@@ -4,11 +4,10 @@ After=sscrpcd.service
Requires=sscrpcd.service
[Service]
Type=simple
ExecStartPre=/bin/sleep 2
ExecStart=/usr/bin/voxl-px4
ExecStopPost=/usr/bin/voxl-reset-slpi
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo "*** Starting unified VOXL2 build (apps + SLPI) ***"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo "*** Starting unified VOXL2 build (apps + SLPI) ***"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo "*** Starting qurt slpi build ***"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Clean out the build artifacts
# source /home/build-env.sh
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Push slpi image to voxl2
adb push build/modalai_voxl2_slpi/platforms/qurt/libpx4.so /usr/lib/rfsa/adsp
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Push slpi image to voxl2
adb push build/modalai_voxl2_slpi/platforms/qurt/libpx4.so /usr/lib/rfsa/adsp
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
cd Tools/simulation/gazebo-classic/sitl_gazebo-classic/src
patch < ../../../../../boards/modalai/voxl2/gazebo-docker/patch/mavlink_interface.patch
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Run this from the px4 project top level directory
docker run -it --rm -v `pwd`:/usr/local/workspace rb5-flight-px4-build-docker
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
################################################################################
# Copyright 2023 ModalAI Inc.
#
+2
View File
@@ -37,6 +37,8 @@ CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
CONFIG_DRIVERS_POWER_MONITOR_VOXLPM=y
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
CONFIG_DRIVERS_POWER_MONITOR_INA228=y
CONFIG_DRIVERS_QSHELL_QURT=y
CONFIG_DRIVERS_RC_CRSF_RC=y
CONFIG_DRIVERS_VOXL2_IO=y
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
CONFIG_FILE="/etc/modalai/voxl-px4.conf"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Make sure that the SLPI DSP test signature is there otherwise px4 cannot run
# on the DSP
@@ -215,6 +215,12 @@ fi
if [ "$POWER_MANAGER" == "VOXLPM" ]; then
# APM power monitor
qshell voxlpm start -X -b 2
elif [ "$POWER_MANAGER" == "INA226" ]; then
/bin/echo "Starting INA226 power monitor"
qshell ina226 start -X -b 2
elif [ "$POWER_MANAGER" == "INA228" ]; then
/bin/echo "Starting INA228 power monitor"
qshell ina228 start -X -b 2
fi
if [ "$AIRSPEED_SENSOR" == "MS4525DO" ]; then
+2
View File
@@ -31,6 +31,8 @@ CONFIG_MODULES_EKF2=y
# CONFIG_EKF2_DRAG_FUSION is not set
# CONFIG_EKF2_EXTERNAL_VISION is not set
# CONFIG_EKF2_GNSS_YAW is not set
# CONFIG_EKF2_OPTICAL_FLOW is not set
# CONFIG_EKF2_RANGE_FINDER is not set
# CONFIG_EKF2_SIDESLIP is not set
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_LAND_DETECTOR=y
+3
View File
@@ -0,0 +1,3 @@
CONFIG_MODULES_SIMULATION_GZ_BRIDGE=n
CONFIG_MODULES_SIMULATION_GZ_MSGS=n
CONFIG_MODULES_SIMULATION_GZ_PLUGINS=n
+4 -4
View File
@@ -52,10 +52,10 @@ endif()
# add code coverage build type
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang"))
set(CMAKE_C_FLAGS_COVERAGE "--coverage -ftest-coverage -fdiagnostics-absolute-paths -O0 -fprofile-arcs -fno-inline-functions"
set(CMAKE_C_FLAGS_COVERAGE "--coverage -ftest-coverage -fdiagnostics-absolute-paths ${PX4_DEBUG_OPT_LEVEL} -fprofile-arcs -fno-inline-functions"
CACHE STRING "Flags used by the C compiler during coverage builds" FORCE)
set(CMAKE_CXX_FLAGS_COVERAGE "--coverage -ftest-coverage -fdiagnostics-absolute-paths -O0-fprofile-arcs -fno-inline-functions -fno-elide-constructors"
set(CMAKE_CXX_FLAGS_COVERAGE "--coverage -ftest-coverage -fdiagnostics-absolute-paths ${PX4_DEBUG_OPT_LEVEL} -fprofile-arcs -fno-inline-functions -fno-elide-constructors"
CACHE STRING "Flags used by the C++ compiler during coverage builds" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "-ftest-coverage -fdiagnostics-absolute-paths"
@@ -63,11 +63,11 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}"
else()
# Add -fprofile-abs-path for GCC v8/9 later on
set(CMAKE_C_FLAGS_COVERAGE "--coverage -ftest-coverage -fprofile-arcs -O0 -fno-default-inline -fno-inline"
set(CMAKE_C_FLAGS_COVERAGE "--coverage -ftest-coverage -fprofile-arcs ${PX4_DEBUG_OPT_LEVEL} -fno-default-inline -fno-inline"
CACHE STRING "Flags used by the C compiler during coverage builds" FORCE)
# Add -fprofile-abs-path for GCC v8/9 later on
set(CMAKE_CXX_FLAGS_COVERAGE "--coverage -ftest-coverage -fprofile-arcs -O0 -fno-default-inline -fno-inline -fno-elide-constructors"
set(CMAKE_CXX_FLAGS_COVERAGE "--coverage -ftest-coverage -fprofile-arcs ${PX4_DEBUG_OPT_LEVEL} -fno-default-inline -fno-inline -fno-elide-constructors"
CACHE STRING "Flags used by the C++ compiler during coverage builds" FORCE)
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "--coverage -ftest-coverage -lgcov"
+11 -2
View File
@@ -31,6 +31,15 @@
#
############################################################################
# Attach only matching test binaries to `test_results` when TESTFILTER is set.
# `ctest -R` filters execution only; without this helper the build still
# compiles every gtest target before running the filtered subset.
function(add_filtered_test_dependencies TESTNAME)
if(NOT TESTFILTER OR "${TESTNAME}" MATCHES "${TESTFILTER}")
add_dependencies(test_results ${TESTNAME})
endif()
endfunction()
#=============================================================================
#
# px4_add_unit_gtest
@@ -74,7 +83,7 @@ function(px4_add_unit_gtest)
WORKING_DIRECTORY ${PX4_BINARY_DIR})
# attach it to the unit test target
add_dependencies(test_results ${TESTNAME})
add_filtered_test_dependencies(${TESTNAME})
endif()
endfunction()
@@ -133,6 +142,6 @@ function(px4_add_functional_gtest)
COMMAND ${PX4_BINARY_DIR}/${TESTNAME})
# attach it to the unit test target
add_dependencies(test_results ${TESTNAME})
add_filtered_test_dependencies(${TESTNAME})
endif()
endfunction()
+72
View File
@@ -0,0 +1,72 @@
############################################################################
#
# Copyright (c) 2026 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
# SBOM - SPDX 2.3 JSON Software Bill of Materials generation
option(GENERATE_SBOM "Generate SPDX 2.3 SBOM" ON)
if(DEFINED ENV{PX4_SBOM_DISABLE})
set(GENERATE_SBOM OFF)
endif()
if(GENERATE_SBOM)
# Write board-specific module list for the SBOM generator
set(sbom_module_list_file "${PX4_BINARY_DIR}/config_module_list.txt")
get_property(module_list GLOBAL PROPERTY PX4_MODULE_PATHS)
string(REPLACE ";" "\n" module_list_content "${module_list}")
file(GENERATE OUTPUT ${sbom_module_list_file} CONTENT "${module_list_content}\n")
set(sbom_output "${PX4_BINARY_DIR}/${PX4_CONFIG}.sbom.spdx.json")
add_custom_command(
OUTPUT ${sbom_output}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/ci/generate_sbom.py
--source-dir ${PX4_SOURCE_DIR}
--board ${PX4_CONFIG}
--modules-file ${sbom_module_list_file}
--compiler ${CMAKE_C_COMPILER}
--platform ${PX4_PLATFORM}
--output ${sbom_output}
DEPENDS
${PX4_SOURCE_DIR}/Tools/ci/generate_sbom.py
${PX4_SOURCE_DIR}/Tools/ci/license-overrides.yaml
${PX4_SOURCE_DIR}/.gitmodules
${PX4_SOURCE_DIR}/Tools/setup/requirements.txt
${sbom_module_list_file}
COMMENT "Generating SPDX SBOM for ${PX4_CONFIG}"
)
add_custom_target(sbom ALL DEPENDS ${sbom_output})
endif()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

+30
View File
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 520 160" width="520" height="160" font-family="Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif">
<!-- Arrow marker -->
<defs>
<marker id="arrow" viewBox="0 0 10 7" refX="10" refY="3.5" markerWidth="10" markerHeight="7" orient="auto-start-reverse">
<path d="M 0 0 L 10 3.5 L 0 7 z" fill="#4a5568"/>
</marker>
</defs>
<!-- Left label: Actuator Outputs -->
<text x="20" y="72" font-size="13" fill="#4a5568" font-weight="500" text-anchor="start">Actuator</text>
<text x="20" y="90" font-size="13" fill="#4a5568" font-weight="500" text-anchor="start">Outputs</text>
<text x="20" y="108" font-size="11" fill="#718096" text-anchor="start">(uORB)</text>
<!-- Left arrow -->
<line x1="100" y1="80" x2="170" y2="80" stroke="#4a5568" stroke-width="2" marker-end="url(#arrow)"/>
<!-- SIH Module box -->
<rect x="180" y="30" width="160" height="100" rx="8" ry="8" fill="#edf2f7" stroke="#4a5568" stroke-width="2"/>
<text x="260" y="72" font-size="16" fill="#2d3748" font-weight="600" text-anchor="middle">SIH Module</text>
<text x="260" y="96" font-size="12" fill="#718096" text-anchor="middle">C++ / uORB</text>
<!-- Right arrow -->
<line x1="350" y1="80" x2="420" y2="80" stroke="#4a5568" stroke-width="2" marker-end="url(#arrow)"/>
<!-- Right label: Simulated Sensor Data -->
<text x="432" y="72" font-size="13" fill="#4a5568" font-weight="500" text-anchor="start">Simulated</text>
<text x="432" y="90" font-size="13" fill="#4a5568" font-weight="500" text-anchor="start">Sensor Data</text>
<text x="432" y="108" font-size="11" fill="#718096" text-anchor="start">(uORB)</text>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

+8 -2
View File
@@ -466,6 +466,7 @@
- [Plugins](sim_gazebo_gz/plugins.md)
- [Gazebo Models Repository](sim_gazebo_gz/gazebo_models.md)
- [Multi-Vehicle Sim](sim_gazebo_gz/multi_vehicle_simulation.md)
- [SIH Simulation](sim_sih/index.md)
- [Gazebo Classic Simulation](sim_gazebo_classic/index.md)
- [Vehicles](sim_gazebo_classic/vehicles.md)
- [Worlds](sim_gazebo_classic/worlds.md)
@@ -565,6 +566,8 @@
- [DistanceSensorModeChangeRequest](msg_docs/DistanceSensorModeChangeRequest.md)
- [DronecanNodeStatus](msg_docs/DronecanNodeStatus.md)
- [Ekf2Timestamps](msg_docs/Ekf2Timestamps.md)
- [EscEepromRead](msg_docs/EscEepromRead.md)
- [EscEepromWrite](msg_docs/EscEepromWrite.md)
- [EscReport](msg_docs/EscReport.md)
- [EscStatus](msg_docs/EscStatus.md)
- [EstimatorAidSource1d](msg_docs/EstimatorAidSource1d.md)
@@ -755,6 +758,7 @@
- [VehicleLocalPositionV0](msg_docs/VehicleLocalPositionV0.md)
- [VehicleStatusV0](msg_docs/VehicleStatusV0.md)
- [VehicleStatusV1](msg_docs/VehicleStatusV1.md)
- [VehicleStatusV2](msg_docs/VehicleStatusV2.md)
- [MAVLink Messaging](mavlink/index.md)
- [Adding Messages](mavlink/adding_messages.md)
- [Streaming Messages](mavlink/streaming_messages.md)
@@ -849,8 +853,9 @@
- [Multi-Vehicle Sim with JMAVSim](sim_jmavsim/multi_vehicle.md)
- [JSBSim Simulation](sim_jsbsim/index.md)
- [AirSim Simulation](sim_airsim/index.md)
- [HITL Simulation](simulation/hitl.md)
- [Simulation-In-Hardware](sim_sih/index.md)
- [Hardware Simulation](simulation/hardware.md)
- [HITL Simulation](simulation/hitl.md)
- [SIH on Hardware](sim_sih/hardware.md)
- [Multi-vehicle simulation](simulation/multi-vehicle-simulation.md)
- [Platform Testing and CI](test_and_ci/index.md)
- [Test Flights](test_and_ci/test_flights.md)
@@ -904,6 +909,7 @@
- [Translation](contribute/translation.md)
- [Terminology/Notation](contribute/notation.md)
- [Licenses](contribute/licenses.md)
- [SBOM](contribute/sbom.md)
- [Releases](releases/index.md)
- [Release Process](releases/release_process.md)
- [main (alpha)](releases/main.md)
+1 -1
View File
@@ -91,7 +91,7 @@ For FMUv6S, you need to route the PPS signal separately:
For ARK FMUv6X on the Jetson carrier board:
1. Connect your GNSS module using either the 10-pin or 6-pin GPS connector: [ARK PAB GPS1 Interface](../flight_controller/ark_pab#gps1)
1. Connect your GNSS module using either the 10-pin or 6-pin GPS connector: [ARK PAB GPS1 Interface](../flight_controller/ark_pab.md#gps1)
2. Connect the PPS signal to the **FMU_CAP** pin: [ARK PAB ADIO Interface](../flight_controller/ark_pab.md#adio)
## Verification
+1 -1
View File
@@ -160,7 +160,7 @@ After the bootloader has updated you can [Load PX4 Firmware](../config/firmware.
## FMUv2 Bootloader Update
If _QGroundControl_ installs the FMUv2 target (see console during installation), and you have a newer board, you may need to update the bootloader in order to access all the memory on your flight controller.
This example explains how you can use [QGC Bootloader Update](qgc-bootloader-update-sys-bl-update) to update the bootloader.
This example explains how you can use [QGC Bootloader Update](#qgc-bootloader-update-sys-bl-update) to update the bootloader.
::: info
Early FMUv2 [Pixhawk-series](../flight_controller/pixhawk_series.md#fmu_versions) flight controllers had a [hardware issue](../flight_controller/silicon_errata.md#fmuv2-pixhawk-silicon-errata) that restricted them to using 1MB of flash memory.
+535 -5
View File
@@ -9994,6 +9994,48 @@ When set to -1 (default), the value depends on the function (see UAVCAN_EC_FUNC1
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 8191 | | -1 | |
### UAVCAN_EC_FAIL10 (`INT32`) {#UAVCAN_EC_FAIL10}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 10 Failsafe Value.
This is the output value that is set when in failsafe mode.
When set to -1 (default), the value depends on the function (see UAVCAN_EC_FUNC10).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 8191 | | -1 | |
### UAVCAN_EC_FAIL11 (`INT32`) {#UAVCAN_EC_FAIL11}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 11 Failsafe Value.
This is the output value that is set when in failsafe mode.
When set to -1 (default), the value depends on the function (see UAVCAN_EC_FUNC11).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 8191 | | -1 | |
### UAVCAN_EC_FAIL12 (`INT32`) {#UAVCAN_EC_FAIL12}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 12 Failsafe Value.
This is the output value that is set when in failsafe mode.
When set to -1 (default), the value depends on the function (see UAVCAN_EC_FUNC12).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 8191 | | -1 | |
### UAVCAN_EC_FAIL2 (`INT32`) {#UAVCAN_EC_FAIL2}
<Badge type="warning" text="This parameter is only present on some boards." />
@@ -10092,6 +10134,20 @@ When set to -1 (default), the value depends on the function (see UAVCAN_EC_FUNC8
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 8191 | | -1 | |
### UAVCAN_EC_FAIL9 (`INT32`) {#UAVCAN_EC_FAIL9}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 9 Failsafe Value.
This is the output value that is set when in failsafe mode.
When set to -1 (default), the value depends on the function (see UAVCAN_EC_FUNC9).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -1 | 8191 | | -1 | |
### UAVCAN_EC_FUNC1 (`INT32`) {#UAVCAN_EC_FUNC1}
<Badge type="warning" text="This parameter is only present on some boards." />
@@ -10166,6 +10222,228 @@ The default failsafe value is set according to the selected function:
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### UAVCAN_EC_FUNC10 (`INT32`) {#UAVCAN_EC_FUNC10}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 10 Output Function.
Select what should be output on UAVCAN ESC 10.
The default failsafe value is set according to the selected function:
- 'Min' for ConstantMin
- 'Max' for ConstantMax
- 'Max' for Parachute
- ('Max'+'Min')/2 for Servos
- 'Disarmed' for the rest
**Values:**
- `0`: Disabled
- `1`: Constant Min
- `2`: Constant Max
- `101`: Motor 1
- `102`: Motor 2
- `103`: Motor 3
- `104`: Motor 4
- `105`: Motor 5
- `106`: Motor 6
- `107`: Motor 7
- `108`: Motor 8
- `109`: Motor 9
- `110`: Motor 10
- `111`: Motor 11
- `112`: Motor 12
- `201`: Servo 1
- `202`: Servo 2
- `203`: Servo 3
- `204`: Servo 4
- `205`: Servo 5
- `206`: Servo 6
- `207`: Servo 7
- `208`: Servo 8
- `301`: Peripheral via Actuator Set 1
- `302`: Peripheral via Actuator Set 2
- `303`: Peripheral via Actuator Set 3
- `304`: Peripheral via Actuator Set 4
- `305`: Peripheral via Actuator Set 5
- `306`: Peripheral via Actuator Set 6
- `400`: Landing Gear
- `401`: Parachute
- `402`: RC Roll
- `403`: RC Pitch
- `404`: RC Throttle
- `405`: RC Yaw
- `406`: RC Flaps
- `407`: RC AUX 1
- `408`: RC AUX 2
- `409`: RC AUX 3
- `410`: RC AUX 4
- `411`: RC AUX 5
- `412`: RC AUX 6
- `420`: Gimbal Roll
- `421`: Gimbal Pitch
- `422`: Gimbal Yaw
- `430`: Gripper
- `440`: Landing Gear Wheel
- `450`: IC Engine Ignition
- `451`: IC Engine Throttle
- `452`: IC Engine Choke
- `453`: IC Engine Starter
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### UAVCAN_EC_FUNC11 (`INT32`) {#UAVCAN_EC_FUNC11}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 11 Output Function.
Select what should be output on UAVCAN ESC 11.
The default failsafe value is set according to the selected function:
- 'Min' for ConstantMin
- 'Max' for ConstantMax
- 'Max' for Parachute
- ('Max'+'Min')/2 for Servos
- 'Disarmed' for the rest
**Values:**
- `0`: Disabled
- `1`: Constant Min
- `2`: Constant Max
- `101`: Motor 1
- `102`: Motor 2
- `103`: Motor 3
- `104`: Motor 4
- `105`: Motor 5
- `106`: Motor 6
- `107`: Motor 7
- `108`: Motor 8
- `109`: Motor 9
- `110`: Motor 10
- `111`: Motor 11
- `112`: Motor 12
- `201`: Servo 1
- `202`: Servo 2
- `203`: Servo 3
- `204`: Servo 4
- `205`: Servo 5
- `206`: Servo 6
- `207`: Servo 7
- `208`: Servo 8
- `301`: Peripheral via Actuator Set 1
- `302`: Peripheral via Actuator Set 2
- `303`: Peripheral via Actuator Set 3
- `304`: Peripheral via Actuator Set 4
- `305`: Peripheral via Actuator Set 5
- `306`: Peripheral via Actuator Set 6
- `400`: Landing Gear
- `401`: Parachute
- `402`: RC Roll
- `403`: RC Pitch
- `404`: RC Throttle
- `405`: RC Yaw
- `406`: RC Flaps
- `407`: RC AUX 1
- `408`: RC AUX 2
- `409`: RC AUX 3
- `410`: RC AUX 4
- `411`: RC AUX 5
- `412`: RC AUX 6
- `420`: Gimbal Roll
- `421`: Gimbal Pitch
- `422`: Gimbal Yaw
- `430`: Gripper
- `440`: Landing Gear Wheel
- `450`: IC Engine Ignition
- `451`: IC Engine Throttle
- `452`: IC Engine Choke
- `453`: IC Engine Starter
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### UAVCAN_EC_FUNC12 (`INT32`) {#UAVCAN_EC_FUNC12}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 12 Output Function.
Select what should be output on UAVCAN ESC 12.
The default failsafe value is set according to the selected function:
- 'Min' for ConstantMin
- 'Max' for ConstantMax
- 'Max' for Parachute
- ('Max'+'Min')/2 for Servos
- 'Disarmed' for the rest
**Values:**
- `0`: Disabled
- `1`: Constant Min
- `2`: Constant Max
- `101`: Motor 1
- `102`: Motor 2
- `103`: Motor 3
- `104`: Motor 4
- `105`: Motor 5
- `106`: Motor 6
- `107`: Motor 7
- `108`: Motor 8
- `109`: Motor 9
- `110`: Motor 10
- `111`: Motor 11
- `112`: Motor 12
- `201`: Servo 1
- `202`: Servo 2
- `203`: Servo 3
- `204`: Servo 4
- `205`: Servo 5
- `206`: Servo 6
- `207`: Servo 7
- `208`: Servo 8
- `301`: Peripheral via Actuator Set 1
- `302`: Peripheral via Actuator Set 2
- `303`: Peripheral via Actuator Set 3
- `304`: Peripheral via Actuator Set 4
- `305`: Peripheral via Actuator Set 5
- `306`: Peripheral via Actuator Set 6
- `400`: Landing Gear
- `401`: Parachute
- `402`: RC Roll
- `403`: RC Pitch
- `404`: RC Throttle
- `405`: RC Yaw
- `406`: RC Flaps
- `407`: RC AUX 1
- `408`: RC AUX 2
- `409`: RC AUX 3
- `410`: RC AUX 4
- `411`: RC AUX 5
- `412`: RC AUX 6
- `420`: Gimbal Roll
- `421`: Gimbal Pitch
- `422`: Gimbal Yaw
- `430`: Gripper
- `440`: Landing Gear Wheel
- `450`: IC Engine Ignition
- `451`: IC Engine Throttle
- `452`: IC Engine Choke
- `453`: IC Engine Starter
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### UAVCAN_EC_FUNC2 (`INT32`) {#UAVCAN_EC_FUNC2}
<Badge type="warning" text="This parameter is only present on some boards." />
@@ -10684,6 +10962,80 @@ The default failsafe value is set according to the selected function:
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### UAVCAN_EC_FUNC9 (`INT32`) {#UAVCAN_EC_FUNC9}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 9 Output Function.
Select what should be output on UAVCAN ESC 9.
The default failsafe value is set according to the selected function:
- 'Min' for ConstantMin
- 'Max' for ConstantMax
- 'Max' for Parachute
- ('Max'+'Min')/2 for Servos
- 'Disarmed' for the rest
**Values:**
- `0`: Disabled
- `1`: Constant Min
- `2`: Constant Max
- `101`: Motor 1
- `102`: Motor 2
- `103`: Motor 3
- `104`: Motor 4
- `105`: Motor 5
- `106`: Motor 6
- `107`: Motor 7
- `108`: Motor 8
- `109`: Motor 9
- `110`: Motor 10
- `111`: Motor 11
- `112`: Motor 12
- `201`: Servo 1
- `202`: Servo 2
- `203`: Servo 3
- `204`: Servo 4
- `205`: Servo 5
- `206`: Servo 6
- `207`: Servo 7
- `208`: Servo 8
- `301`: Peripheral via Actuator Set 1
- `302`: Peripheral via Actuator Set 2
- `303`: Peripheral via Actuator Set 3
- `304`: Peripheral via Actuator Set 4
- `305`: Peripheral via Actuator Set 5
- `306`: Peripheral via Actuator Set 6
- `400`: Landing Gear
- `401`: Parachute
- `402`: RC Roll
- `403`: RC Pitch
- `404`: RC Throttle
- `405`: RC Yaw
- `406`: RC Flaps
- `407`: RC AUX 1
- `408`: RC AUX 2
- `409`: RC AUX 3
- `410`: RC AUX 4
- `411`: RC AUX 5
- `412`: RC AUX 6
- `420`: Gimbal Roll
- `421`: Gimbal Pitch
- `422`: Gimbal Yaw
- `430`: Gripper
- `440`: Landing Gear Wheel
- `450`: IC Engine Ignition
- `451`: IC Engine Throttle
- `452`: IC Engine Choke
- `453`: IC Engine Starter
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### UAVCAN_EC_MAX1 (`INT32`) {#UAVCAN_EC_MAX1}
<Badge type="warning" text="This parameter is only present on some boards." />
@@ -10696,6 +11048,42 @@ Maxmimum output value (when not disarmed).
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 8191 | |
### UAVCAN_EC_MAX10 (`INT32`) {#UAVCAN_EC_MAX10}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 10 Maximum Value.
Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 8191 | |
### UAVCAN_EC_MAX11 (`INT32`) {#UAVCAN_EC_MAX11}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 11 Maximum Value.
Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 8191 | |
### UAVCAN_EC_MAX12 (`INT32`) {#UAVCAN_EC_MAX12}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 12 Maximum Value.
Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 8191 | |
### UAVCAN_EC_MAX2 (`INT32`) {#UAVCAN_EC_MAX2}
<Badge type="warning" text="This parameter is only present on some boards." />
@@ -10780,6 +11168,18 @@ Maxmimum output value (when not disarmed).
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 8191 | |
### UAVCAN_EC_MAX9 (`INT32`) {#UAVCAN_EC_MAX9}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 9 Maximum Value.
Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 8191 | |
### UAVCAN_EC_MIN1 (`INT32`) {#UAVCAN_EC_MIN1}
<Badge type="warning" text="This parameter is only present on some boards." />
@@ -10792,6 +11192,42 @@ Minimum output value (when not disarmed).
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 1 | |
### UAVCAN_EC_MIN10 (`INT32`) {#UAVCAN_EC_MIN10}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 10 Minimum Value.
Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 1 | |
### UAVCAN_EC_MIN11 (`INT32`) {#UAVCAN_EC_MIN11}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 11 Minimum Value.
Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 1 | |
### UAVCAN_EC_MIN12 (`INT32`) {#UAVCAN_EC_MIN12}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 12 Minimum Value.
Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 1 | |
### UAVCAN_EC_MIN2 (`INT32`) {#UAVCAN_EC_MIN2}
<Badge type="warning" text="This parameter is only present on some boards." />
@@ -10876,6 +11312,18 @@ Minimum output value (when not disarmed).
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 1 | |
### UAVCAN_EC_MIN9 (`INT32`) {#UAVCAN_EC_MIN9}
<Badge type="warning" text="This parameter is only present on some boards." />
UAVCAN ESC 9 Minimum Value.
Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 8191 | | 1 | |
### UAVCAN_EC_REV (`INT32`) {#UAVCAN_EC_REV}
<Badge type="warning" text="This parameter is only present on some boards." />
@@ -10895,10 +11343,14 @@ Note: this is only useful for servos.
- `5`: UAVCAN ESC 6
- `6`: UAVCAN ESC 7
- `7`: UAVCAN ESC 8
- `8`: UAVCAN ESC 9
- `9`: UAVCAN ESC 10
- `10`: UAVCAN ESC 11
- `11`: UAVCAN ESC 12
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 255 | | 0 | |
| &nbsp; | 0 | 4095 | | 0 | |
### UAVCAN_SV_DIS1 (`INT32`) {#UAVCAN_SV_DIS1}
@@ -18210,6 +18662,18 @@ disabled, warn only or deny arming.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### COM_ARM_ON_BOOT (`INT32`) {#COM_ARM_ON_BOOT}
Arm automatically on boot.
When enabled, the vehicle arms automatically once all preflight checks pass after boot.
The vehicle will not re-arm after a manual disarm.
Has no effect if COM_ARMABLE is 0.
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------------ | ---- |
| &check; | | | | Disabled (0) | |
### COM_ARM_SDCARD (`INT32`) {#COM_ARM_SDCARD}
Enable FMU SD card detection check.
@@ -21013,7 +21477,7 @@ Required EPH to use GPS.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 100 | | 3.0 | m |
| &nbsp; | 0.1 | 100 | | 3.0 | m |
### EKF2_REQ_EPV (`FLOAT`) {#EKF2_REQ_EPV}
@@ -21021,7 +21485,7 @@ Required EPV to use GPS.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 100 | | 5.0 | m |
| &nbsp; | 0.1 | 100 | | 5.0 | m |
### EKF2_REQ_FIX (`INT32`) {#EKF2_REQ_FIX}
@@ -21093,6 +21557,49 @@ Maximum vertical drift speed to use GPS.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.1 | 1.5 | | 0.2 | m/s |
### EKF2_RNGBC_CTRL (`INT32`) {#EKF2_RNGBC_CTRL}
Ranging beacon fusion control.
Enable/disable ranging beacon fusion.
**Values:**
- `0`: Disable ranging beacon fusion
- `1`: Enable ranging beacon fusion
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### EKF2_RNGBC_DELAY (`FLOAT`) {#EKF2_RNGBC_DELAY}
Ranging beacon measurement delay relative to IMU measurements.
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 1000 | | 0 | ms |
### EKF2_RNGBC_GATE (`FLOAT`) {#EKF2_RNGBC_GATE}
Gate size for ranging beacon fusion.
Sets the number of standard deviations used by the innovation consistency test.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 1.0 | | | 5.0 | SD |
### EKF2_RNGBC_NOISE (`FLOAT`) {#EKF2_RNGBC_NOISE}
Measurement noise for ranging beacon fusion.
Used to lower bound or replace the uncertainty included in the message
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.1 | 500.0 | | 30.0 | m |
### EKF2_RNG_A_HMAX (`FLOAT`) {#EKF2_RNG_A_HMAX}
Maximum height above ground allowed for conditional range aid mode.
@@ -21794,7 +22301,7 @@ Also applies to flaperons if enabled in the mixer/allocation.
Trigger time.
Launch is detected when acceleration in body forward direction is above FW_LAUN_AC_THLD for FW_LAUN_AC_T seconds.
Launch is detected when the norm of body acceleration is above FW_LAUN_AC_THLD for FW_LAUN_AC_T seconds.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
@@ -21804,7 +22311,7 @@ Launch is detected when acceleration in body forward direction is above FW_LAUN_
Trigger acceleration threshold.
Launch is detected when acceleration in body forward direction is above FW_LAUN_AC_THLD for FW_LAUN_AC_T seconds.
Launch is detected when the norm of body acceleration is above FW_LAUN_AC_THLD for FW_LAUN_AC_T seconds.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ----- |
@@ -28310,6 +28817,19 @@ clockwise, negative for counter-clockwise.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | -10000 | 10000 | 0.5 | 80.0 | m |
### NAV_LTR_LAST_DL (`INT32`) {#NAV_LTR_LAST_DL}
Loiter at last GCS heartbeat position on data link loss.
When the data link is lost and this setting is enabled,
the vehicle will loiter at the position where the last GCS
heartbeat was received rather than at its current position.
Only applies to Hold mode during failsafe actions.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------------ | ---- |
| &nbsp; | | | | Disabled (0) | |
### NAV_MC_ALT_RAD (`FLOAT`) {#NAV_MC_ALT_RAD}
MC Altitude Acceptance Radius.
@@ -39603,6 +40123,16 @@ This value is usually about few percent of the maximum thrust force.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | | 0.05 | 0.1 | Nm |
### SIH_RNGBC_NOISE (`FLOAT`) {#SIH_RNGBC_NOISE}
Ranging beacon measurement noise standard deviation.
Gaussian noise added to simulated ranging beacon measurements. Set to 0 to disable noise.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.0 | 100.0 | | 30.0 | m |
### SIH_T_MAX (`FLOAT`) {#SIH_T_MAX}
Max propeller thrust force.
@@ -91,6 +91,28 @@ The feature is configured using the following timeouts.
| <a id="COM_DISARM_LAND"></a>[COM_DISARM_LAND](../advanced_config/parameter_reference.md#COM_DISARM_LAND) | Time-out for auto disarm after landing. Default: 2s (-1 to disable). |
| <a id="COM_DISARM_PRFLT"></a>[COM_DISARM_PRFLT](../advanced_config/parameter_reference.md#COM_DISARM_PRFLT) | Time-out for auto disarm if too slow to takeoff. Default: 10s (<=0 to disable). |
## Auto-Arming on Boot
The vehicle can be configured to arm automatically on boot once all preflight checks pass,
using the `COM_ARM_ON_BOOT` parameter. For safety, PX4 enforces a minimum 5-second delay after boot before attempting to arm.
Once armed this way, the vehicle will not re-arm automatically after a manual disarm.
::: info
The parameter value is read once at boot.
Changing it while the system is running has no effect until the next reboot.
:::
:::warning
Use with caution.
A vehicle that arms automatically can spin up motors and actuators without any operator gesture.
Ensure the vehicle is in a safe state before powering on.
:::
| Parameter | Description |
| -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| <a id="COM_ARM_ON_BOOT"></a>[COM_ARM_ON_BOOT](../advanced_config/parameter_reference.md#COM_ARM_ON_BOOT) | Arm automatically once preflight checks pass after boot. Default: `0` (Disabled). |
## Pre-Arm Checks
To reduce accidents, vehicles are only allowed to arm certain conditions are met (some of which are configurable).
+2 -2
View File
@@ -37,7 +37,7 @@ The wiring for CAN networks is the same for both DroneCAN and Cyphal/CAN (in fac
Devices within a network are connected in a _daisy-chain_ in any order (this differs from UARTs peripherals, where you attach just one component per port).
:::warning Don't connect each CAN peripheral to a separate CAN port!
Unlike UARTs, CAN peripherals are designed to be daisy chained, with additional ports such as `CAN2` used for [redundancy](redundancy).
Unlike UARTs, CAN peripherals are designed to be daisy chained, with additional ports such as `CAN2` used for [redundancy](#redundancy).
:::
At either end of the chain, a 120Ω termination resistor should be connected between the two data lines.
@@ -83,7 +83,7 @@ You only _need_ one CAN port to support an arbitrary number of CAN devices using
Don't connect each CAN peripheral to a separate CAN port!
:::
Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](redundancy).
Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](#redundancy).
If three are three ports, you might use the remaining network for devices that support another CAN protocol.
The documentation for your flight controller should indicate which ports are supported/enabled.
+7 -7
View File
@@ -76,13 +76,13 @@ You might have to adjust the per-motor pole count (`DSHOT_MOT_POL1``DSHOT_MOT
The following parameters should be set to enable and configure dynamic notch filters:
| Parameter | Description |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| <a href="IMU_GYRO_DNF_EN"></a>[IMU_GYRO_DNF_EN](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_EN) | Enable IMU gyro dynamic notch filtering. `0`: ESC RPM, `1`: Onboard FFT. |
| <a href="IMU_GYRO_FFT_EN"></a>[IMU_GYRO_FFT_EN](../advanced_config/parameter_reference.md#IMU_GYRO_FFT_EN) | Enable onboard FFT (required if `IMU_GYRO_DNF_EN` is set to `1`). |
| <a href="IMU_GYRO_DNF_MIN"></a>[IMU_GYRO_DNF_MIN](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_MIN) | Minimum dynamic notch frequency in Hz. |
| <a href="IMU_GYRO_DNF_BW"></a>[IMU_GYRO_DNF_BW](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_BW) | Bandwidth for each notch filter in Hz. |
| <a href="IMU_GYRO_DNF_HMC"></a>[IMU_GYRO_DNF_HMC](../advanced_config/parameter_reference.md#IMU_GYRO_NF0_BW) | Number of harmonics to filter. |
| Parameter | Description |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| <a id="IMU_GYRO_DNF_EN"></a>[IMU_GYRO_DNF_EN](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_EN) | Enable IMU gyro dynamic notch filtering. `0`: ESC RPM, `1`: Onboard FFT. |
| <a id="IMU_GYRO_FFT_EN"></a>[IMU_GYRO_FFT_EN](../advanced_config/parameter_reference.md#IMU_GYRO_FFT_EN) | Enable onboard FFT (required if `IMU_GYRO_DNF_EN` is set to `1`). |
| <a id="IMU_GYRO_DNF_MIN"></a>[IMU_GYRO_DNF_MIN](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_MIN) | Minimum dynamic notch frequency in Hz. |
| <a id="IMU_GYRO_DNF_BW"></a>[IMU_GYRO_DNF_BW](../advanced_config/parameter_reference.md#IMU_GYRO_DNF_BW) | Bandwidth for each notch filter in Hz. |
| <a id="IMU_GYRO_DNF_HMC"></a>[IMU_GYRO_DNF_HMC](../advanced_config/parameter_reference.md#IMU_GYRO_NF0_BW) | Number of harmonics to filter. |
### Low-pass Filter
+226
View File
@@ -0,0 +1,226 @@
# Software Bill of Materials (SBOM)
PX4 generates a [Software Bill of Materials](https://ntia.gov/SBOM) for every firmware build in [SPDX 2.3](https://spdx.github.io/spdx-spec/v2.3/) JSON format.
## Why SBOM?
- **Regulatory compliance**: The EU Cyber Resilience Act (CRA) requires SBOMs for products with digital elements (reporting obligations begin in September 2026).
- **Supply chain transparency**: SBOMs enumerate every component compiled into firmware, enabling users and integrators to audit dependencies.
- **NTIA minimum elements**: Each SBOM satisfies all seven [NTIA required fields](https://www.ntia.gov/report/2021/minimum-elements-software-bill-materials-sbom): supplier, component name, version, unique identifier, dependency relationship, author, and timestamp.
## Format
PX4 uses SPDX 2.3 JSON.
SPDX is the Linux Foundation's own standard (ISO/IEC 5962), aligning with PX4's position as a Dronecode/LF project.
Zephyr RTOS also uses SPDX.
Each SBOM contains:
- **Primary package**: The PX4 firmware for a specific board target, marked with `primaryPackagePurpose: FIRMWARE`.
- **Git submodules**: All third-party libraries included via git submodules (~33 packages), with SPDX license identifiers and commit hashes.
- **Python build dependencies**: Packages from `Tools/setup/requirements.txt` marked as `BUILD_DEPENDENCY_OF` the firmware.
- **Board-specific modules**: Internal PX4 modules compiled for the target board.
- **Compiler**: The C compiler used for the build.
Typical SBOM size: 70-100 packages, ~500 lines, ~20 KB JSON.
## Generation
SBOMs are generated automatically as part of every CMake build.
The output file is:
```txt
build/<target>/<target>.sbom.spdx.json
```
For example:
```txt
build/px4_fmu-v6x_default/px4_fmu-v6x_default.sbom.spdx.json
```
The generator script is `Tools/ci/generate_sbom.py`.
It requires PyYAML (`pyyaml`) for loading license overrides.
### CMake Integration
The `sbom` CMake target is included in the default `ALL` target.
The relevant CMake module is `cmake/sbom.cmake`.
### Disabling SBOM Generation
Set the environment variable before building.
This is checked at CMake configure time, so a clean build or reconfigure is required:
```sh
PX4_SBOM_DISABLE=1 make px4_fmu-v6x_default
```
If the build directory already exists, force a reconfigure:
```sh
PX4_SBOM_DISABLE=1 cmake -B build/px4_fmu-v6x_default .
```
### Manual Generation
You can also run the generator directly:
```sh
python3 Tools/ci/generate_sbom.py \
--source-dir . \
--board px4_fmu-v6x_default \
--modules-file build/px4_fmu-v6x_default/config_module_list.txt \
--compiler arm-none-eabi-gcc \
--output build/px4_fmu-v6x_default/px4_fmu-v6x_default.sbom.spdx.json
```
## Artifacts
SBOMs are available in:
| Location | Path |
| --------------- | ---------------------------------------- |
| Build directory | `build/<target>/<target>.sbom.spdx.json` |
| GitHub Releases | Alongside `.px4` firmware files |
| S3 | Same directory as firmware artifacts |
## Validation
Validate an SBOM against the SPDX JSON schema:
```sh
python3 -c "
import json
doc = json.load(open('build/px4_sitl_default/px4_sitl_default.sbom.spdx.json'))
assert doc['spdxVersion'] == 'SPDX-2.3'
assert doc['dataLicense'] == 'CC0-1.0'
assert len(doc['packages']) > 0
print(f'Valid: {len(doc[\"packages\"])} packages')
"
```
For full schema validation, use the [SPDX online validator](https://tools.spdx.org/app/validate/) or the `spdx-tools` CLI.
## License Detection
Submodule licenses are identified through a combination of auto-detection and manual overrides.
### Auto-Detection
The generator reads the first 100 lines of each submodule's LICENSE or COPYING file
and matches keywords against known patterns.
Copyleft licenses (GPL, LGPL, AGPL) are checked before permissive ones
to prevent false positives.
Supported patterns include:
| SPDX Identifier | Matched Keywords |
| --------------- | ----------------------------------------------------- |
| GPL-3.0-only | "GNU GENERAL PUBLIC LICENSE", "Version 3" |
| GPL-2.0-only | "GNU GENERAL PUBLIC LICENSE", "Version 2" |
| LGPL-3.0-only | "GNU LESSER GENERAL PUBLIC LICENSE", "Version 3" |
| LGPL-2.1-only | "GNU Lesser General Public License", "Version 2.1" |
| AGPL-3.0-only | "GNU AFFERO GENERAL PUBLIC LICENSE", "Version 3" |
| Apache-2.0 | "Apache License", "Version 2.0" |
| MIT | "Permission is hereby granted" |
| BSD-3-Clause | "Redistribution and use", "Neither the name" |
| BSD-2-Clause | "Redistribution and use", "THIS SOFTWARE IS PROVIDED" |
| ISC | "Permission to use, copy, modify, and/or distribute" |
| EPL-2.0 | "Eclipse Public License", "2.0" |
| Unlicense | "The Unlicense", "unlicense.org" |
If no pattern matches, the license is set to `NOASSERTION`.
### Override File
When auto-detection fails or returns the wrong result,
add an entry to `Tools/ci/license-overrides.yaml`:
```yaml
overrides:
src/lib/crypto/libtomcrypt:
license: "Unlicense"
comment: "Public domain dedication. Functionally equivalent to Unlicense."
```
Each entry maps a submodule path to its correct SPDX license identifier.
The optional `comment` field is emitted as `licenseComments` in the SBOM,
providing context for auditors reviewing complex licensing situations
(dual licenses, composite LICENSE files, public domain dedications).
### Copyleft Guardrail
The `--verify-licenses` command flags submodules with copyleft licenses
(GPL, LGPL, AGPL) in a dedicated warning section.
This is informational only and does not cause a failure.
It helps maintainers track copyleft obligations when adding new submodules.
### Platform Filtering
Submodules under `platforms/nuttx/` are excluded from POSIX and QURT SBOMs.
The `--platform` argument (set automatically by CMake via `${PX4_PLATFORM}`)
controls which platform-specific submodules are included.
This ensures SITL builds do not list NuttX RTOS packages.
### Verification
Run the verify command to check detection for all submodules:
```sh
python3 Tools/ci/generate_sbom.py --verify-licenses --source-dir .
```
This prints each submodule with its detected license, any override, and the final value.
It exits non-zero if any checked-out submodule resolves to `NOASSERTION` without an override.
Copyleft warnings are printed after the main table.
### Adding a New Submodule
1. Add the submodule normally.
2. Run `--verify-licenses` to confirm the license is detected.
3. If detection fails, add an override to `Tools/ci/license-overrides.yaml`.
4. If the license is not in the SPDX list, use `LicenseRef-<name>`.
### EU CRA Compliance
The EU Cyber Resilience Act requires SBOMs for products with digital elements.
The goal is zero `NOASSERTION` licenses in shipped firmware SBOMs.
Every submodule should have either a detected or overridden license.
The `--verify-licenses` check enforces this in CI.
## What's in an SBOM
This section is for integrators, compliance teams, and anyone reviewing SBOM artifacts.
### Where to Find SBOMs
| Location | Path |
| --------------- | ---------------------------------------- |
| Build directory | `build/<target>/<target>.sbom.spdx.json` |
| GitHub Releases | Alongside `.px4` firmware files |
| S3 | Same directory as firmware artifacts |
### Reading the JSON
Each SBOM is a single JSON document following SPDX 2.3.
Key fields:
- **`packages`**: Array of all components. Each has `name`, `versionInfo`, `licenseConcluded`, and `SPDXID`.
- **`relationships`**: How packages relate. `CONTAINS` means a submodule is compiled into firmware. `BUILD_DEPENDENCY_OF` means a tool used only during build.
- **`licenseConcluded`**: The SPDX license identifier determined for that package.
- **`licenseComments`**: Free-text explanation for complex cases (dual licenses, composite files, public domain).
- **`externalRefs`**: Package URLs (purls) linking to GitHub repos or PyPI.
### Understanding NOASSERTION
`NOASSERTION` means no license could be determined.
For submodules, this happens when:
- The submodule is not checked out (common in CI shallow clones).
- No LICENSE/COPYING file exists.
- The LICENSE file does not match any known pattern and no override is configured.
For shipped firmware, `NOASSERTION` should be resolved by adding an override.
For build-only dependencies (Python packages), `NOASSERTION` is acceptable
since these are not compiled into the firmware binary.
+1 -1
View File
@@ -25,7 +25,7 @@ See the debug probe documentation for details on how to setup your debug connect
- [SEGGER J-Link](probe_jlink.md): commercial probe, no built-in serial console, requires adapter.
- [Black Magic Probe](probe_bmp.md): integrated GDB server and serial console, requires adapter.
- [STLink](probe_stlink): best value, integrated serial console, adapter must be soldered.
- [STLink](probe_stlink.md): best value, integrated serial console, adapter must be soldered.
We recommend using the J-Link with the Pixhawk Debug Adapter or the STLinkv3-MINIE with a soldered custom cable.
+9 -9
View File
@@ -5,7 +5,7 @@ PX4 runs on ARM Cortex-M microcontrollers, which contain dedicated hardware for
The SWD debug interface allows direct, low-level, hardware access to the microcontroller's processor and peripherals, so it does not depend on any software on the device.
Therefore it can be used to debug bootloaders and operating systems such as NuttX.
## Debug Signals
## Debug Signals {#debug-signals}
Four signals are required for debugging (in bold) while the rest is recommended.
@@ -29,7 +29,7 @@ They are usually not accessible and are typically only used to debug very specif
## Autopilot Debug Ports {#debug-ports}
Flight controllers commonly provide a single debug port that exposes both the [SWD Interface](#debug-signals) and [System Console](system_console).
Flight controllers commonly provide a single debug port that exposes both the [SWD Interface](#debug-signals) and [System Console](system_console.md).
The [Pixhawk Connector Standards](#pixhawk-standard-debug-ports) formalize the port that must be used in each FMU version.
However there are still many boards that use different pinouts or connectors, so we recommend you check the [documentation for your autopilot](../flight_controller/index.md) to confirm port location and pinout.
@@ -91,7 +91,7 @@ There FMU and Pixhawk versions are (only) consistent after FMUv5X.
### Pixhawk Debug Mini
The [Pixhawk Connector Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf) defines the _Pixhawk Debug Mini_, a _6-Pin SH Debug Port_ that provides access to both SWD pins and the [System Console](system_console).
The [Pixhawk Connector Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf) defines the _Pixhawk Debug Mini_, a _6-Pin SH Debug Port_ that provides access to both SWD pins and the [System Console](system_console.md).
This is used in FMUv4 and FMUv5.
@@ -122,7 +122,7 @@ You can connect to the debug port using a [cable like this one](https://www.digi
### Pixhawk Debug Full
The [Pixhawk Connector Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf) defines _Pixhawk Debug Full_, a _10-Pin SH Debug Port_ that provides access to both SWD pins and the [System Console](system_console).
The [Pixhawk Connector Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf) defines _Pixhawk Debug Full_, a _10-Pin SH Debug Port_ that provides access to both SWD pins and the [System Console](system_console.md).
This essentially moves the solder pads from beside the [Pixhawk Debug Mini](#pixhawk-debug-mini) into the connector, and also adds an SWO pin.
This port is specified for use in FMUv5x, FMUv6, FMUv6x.
@@ -154,14 +154,14 @@ You can connect to the debug port using a [cable like this one](https://www.digi
## Debug Probes for PX4 Hardware {#debug-probes}
Flight controllers commonly provide a [single debug port](#autopilot-debug-ports) that exposes both the [SWD Interface](#debug-signals) and [System Console](system_console).
Flight controllers commonly provide a [single debug port](#autopilot-debug-ports) that exposes both the [SWD Interface](#debug-signals) and [System Console](system_console.md).
There are several debug probes that are tested and supported for connecting to one or both of these interfaces:
- [SEGGER J-Link](../debug/probe_jlink.md): commercial probe, no built-in serial console, requires adapter.
- [Black Magic Probe](../debug/probe_bmp.md): integrated GDB server and serial console, requires adapter.
- [STLink](../debug/probe_stlink): best value, integrated serial console, adapter must be soldered.
- [MCU-Link](../debug/probe_mculink): best value, integrated serial console, requires adapter.
- [STLink](../debug/probe_stlink.md): best value, integrated serial console, adapter must be soldered.
- [MCU-Link](../debug/probe_mculink.md): best value, integrated serial console, requires adapter.
An adapter to connect to the debug port may come with your flight controller or debug probe.
Other options are given below.
@@ -199,7 +199,7 @@ Probes that are known to come with connectors are listed below:
### Board-specific Adapters
Some manufacturers provide cables to make it easy to connect the SWD interface and [System Console](../debug/system_console).
Some manufacturers provide cables to make it easy to connect the SWD interface and [System Console](../debug/system_console.md).
- [CUAV V5nano](../flight_controller/cuav_v5_nano.md#debug_port) and [CUAV V5+](../flight_controller/cuav_v5_plus.md#debug-port) include this debug cable:
@@ -213,7 +213,7 @@ You can also create custom cables for connecting to different boards or probes:
- Connect the VREF pin, if supported by the debug probe.
- Connect the remaining pins, if present.
See the [STLinkv3-MINIE](probe_stlink) for a guide on how to solder a custom cable.
See the [STLinkv3-MINIE](probe_stlink.md) for a guide on how to solder a custom cable.
:::tip
Where possible, we highly recommend that you create or obtain an adapter board rather than custom cables for connecting to SWD/JTAG debuggers and computers.
+1 -1
View File
@@ -263,7 +263,7 @@ make [VENDOR_][MODEL][_VARIANT] [VIEWER_MODEL_DEBUGGER_WORLD]
- **VENDOR:** The manufacturer of the board: `px4`, `aerotenna`, `airmind`, `atlflight`, `auav`, `beaglebone`, `intel`, `nxp`, etc.
The vendor name for Pixhawk series boards is `px4`.
- **MODEL:** The _board model_ "model": `sitl`, `fmu-v2`, `fmu-v3`, `fmu-v4`, `fmu-v5`, `navio2`, etc.
- **VARIANT:** Indicates particular configurations: e.g. `bootloader`, `cyphal`, which contain components that are not present in the `default` configuration.
- **VARIANT:** Indicates particular configurations: e.g. `bootloader`, `cyphal`, `sih`, which add or remove components to/from the `default` configuration.
Most commonly this is `default`, and may be omitted.
:::tip
+1 -1
View File
@@ -1,7 +1,7 @@
# Arch Linux Development Environment
:::warning
This development environment is [community supported and maintained](../advanced/community_supported_dev_env).
This development environment is [community supported and maintained](../advanced/community_supported_dev_env.md).
It may or may not work with current versions of PX4.
See [Toolchain Installation](../dev_setup/dev_env.md) for information about the environments and tools supported by the core development team.
+1 -1
View File
@@ -84,7 +84,7 @@ You need to set necessary [DroneCAN](index.md) parameters and define offsets if
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable GPS blending to ensure the heading is always published by setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 7 (all three bits checked).
- If using [Moving Baseline & GPS Heading](#setting-up-moving-baseline--gps-heading), set [SENS_GPS_PRIME](../advanced_config/parameter_reference.md#SENS_GPS_PRIME) to the CAN node ID of the _Moving Base_ module. The moving base is preferred because the rover receiver in a moving baseline configuration can experience degraded navigation rate and increased data latency when corrections are intermittent.
- If using [Moving Baseline & GPS Heading](#setting-up-moving-baseline-gps-heading), set [SENS_GPS_PRIME](../advanced_config/parameter_reference.md#SENS_GPS_PRIME) to the CAN node ID of the _Moving Base_ module. The moving base is preferred because the rover receiver in a moving baseline configuration can experience degraded navigation rate and increased data latency when corrections are intermittent.
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ) can be set to account for the offset of the ARK RTK GPS from the vehicles centre of gravity.
+1 -1
View File
@@ -5,7 +5,7 @@ PX4 supports DroneCAN compliant ESCs.
## Supported ESC
:::info
[Supported ESCs](../peripherals/esc_motors#supported-esc) in _ESCs & Motors_ may include additional devices that are not listed below.
[Supported ESCs](../peripherals/esc_motors.md#supported-esc) in _ESCs & Motors_ may include additional devices that are not listed below.
:::
The following articles have specific hardware/firmware information:
+1 -1
View File
@@ -5,7 +5,7 @@ PX4 does not manufacture this (or any) autopilot.
Contact the [manufacturer](https://arkelectron.com/contact-us/) for hardware support or compliance issues.
:::
The USA-built [ARKV6X](<(https://arkelectron.gitbook.io/ark-documentation/flight-controllers/arkv6x)>) flight controller is based on the [FMUV6X and Pixhawk Autopilot Bus open source standards](https://github.com/pixhawk/Pixhawk-Standards).
The USA-built [ARKV6X](https://arkelectron.gitbook.io/ark-documentation/flight-controllers/arkv6x) flight controller is based on the [FMUV6X and Pixhawk Autopilot Bus open source standards](https://github.com/pixhawk/Pixhawk-Standards).
With triple synced IMUs, data averaging, voting, and filtering is possible.
The Pixhawk Autopilot Bus (PAB) form factor enables the ARKV6X to be used on any [PAB-compatible carrier board](../flight_controller/pixhawk_autopilot_bus.md), such as the [ARK Pixhawk Autopilot Bus Carrier](../flight_controller/ark_pab.md).
+8 -8
View File
@@ -100,14 +100,14 @@ To launch in this mode:
The _launch detector_ is affected by the following parameters:
| Parameter | Description |
| ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| <a id="FW_LAUN_DETCN_ON"></a>[FW_LAUN_DETCN_ON](../advanced_config/parameter_reference.md#FW_LAUN_DETCN_ON) | Enable automatic launch detection. If disabled motors spin up on arming already |
| <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 |
| Parameter | Description |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| <a id="FW_LAUN_DETCN_ON"></a>[FW_LAUN_DETCN_ON](../advanced_config/parameter_reference.md#FW_LAUN_DETCN_ON) | Enable automatic launch detection. If disabled motors spin up on arming already |
| <a id="FW_LAUN_AC_THLD"></a>[FW_LAUN_AC_THLD](../advanced_config/parameter_reference.md#FW_LAUN_AC_THLD) | Acceleration threshold (norm of acceleration 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}
+8 -8
View File
@@ -13,14 +13,14 @@ The mission is typically created and uploaded with a Ground Control Station (GCS
The following commands can be used in missions at time of writing (PX4 v1.16):
| QGC mission item | Command | Description |
| ------------------- | ------------------------------------------------------------ | ------------------------------------------------- |
| Mission start | [MAV_CMD_MISSION_START](MAV_CMD_MISSION_START) | Starts the mission. |
| Waypoint | [MAV_CMD_NAV_WAYPOINT](MAV_CMD_NAV_WAYPOINT) | Navigate to waypoint. |
| Return to launch | [MAV_CMD_NAV_RETURN_TO_LAUNCH][MAV_CMD_NAV_RETURN_TO_LAUNCH] | Return to the launch location. |
| Change speed | [MAV_CMD_DO_CHANGE_SPEED][MAV_CMD_DO_CHANGE_SPEED] | Change the speed setpoint |
| Set launch location | [MAV_CMD_DO_SET_HOME](MAV_CMD_DO_SET_HOME) | Changes launch location to specified coordinates. |
| Jump to item (all) | [MAV_CMD_DO_JUMP][MAV_CMD_DO_JUMP] (and other jump commands) | Jump to specified mission item. |
| QGC mission item | Command | Description |
| ------------------- | ------------------------------------------- | ------------------------------------------------- |
| Mission start | [MAV_CMD_MISSION_START] | Starts the mission. |
| Waypoint | [MAV_CMD_NAV_WAYPOINT] | Navigate to waypoint. |
| Return to launch | [MAV_CMD_NAV_RETURN_TO_LAUNCH] | Return to the launch location. |
| Change speed | [MAV_CMD_DO_CHANGE_SPEED] | Change the speed setpoint |
| Set launch location | [MAV_CMD_DO_SET_HOME] | Changes launch location to specified coordinates. |
| Jump to item (all) | [MAV_CMD_DO_JUMP] (and other jump commands) | Jump to specified mission item. |
[MAV_CMD_MISSION_START]: https://mavlink.io/en/messages/common.html#MAV_CMD_MISSION_START
[MAV_CMD_NAV_WAYPOINT]: https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_WAYPOINT
+59 -6
View File
@@ -33,14 +33,67 @@ the [Airframe Reference](../airframes/airframe_reference.md#vectored-6-dof-uuv):
- **MAIN7:** motor 7 CCW, stern starboard vertical, propeller CW
- **MAIN8:** motor 8 CCW, stern port vertical, propeller CCW
## Basic Control Axes
For underwater vehicles, motion is defined in terms of body axes:
- **Surge:** forward/back motion - translation along the body X axis.
- **Sway:** left/right motion - translation along the body Y axis.
- **Heave:** up/down motion - translation along the body Z axis.
- **Yaw:** rotation about the (vertical) body Z axis.
### Stick Mapping (Mode 2)
The mapping below illustrates the default joystick behavior:
- **Pitch stick (forward/back):** surge
- **Roll stick (left/right):** sway
- **Throttle stick (up/down):** heave
- **Yaw stick (left/right):** yaw
![RC Basic Commands](../../assets/flying/rc_mode2_mc_position_mode.png)
## Manual Modes
| Mode | Description |
| -------- | -------------------------------------------------------------------------------------------------------------------- |
| Manual | Direct manual control of yaw and thrust. |
| Acro | Manual control of yaw/thrust, but keeps roll/pitch zero |
| Altitude | Manual control of x/y thrust and yaw. Control of height with PID, manually controlled by user. Keeps roll/pitch zero |
| Position | Controls x/y/z and yaw. Manually controlled by user. Keeps roll/pitch zero |
The following manual and assisted modes are currently supported on BlueROV2 Heavy:
| Mode | Description |
| ---------- | --------------------------------------------------------------------------------------------------------------------------- |
| Manual | Direct manual control of thrust and yaw. |
| Stabilized | Manual control of thurst and yaw with roll/pitch stabilization. |
| Acro | Manual control of yaw-rate and direct thrust commands with roll/pitch stabilization. |
| Altitude | Manual control of x/y thrust and yaw. Control of height with PID, manually controlled by user. Keeps roll/pitch stabilized. |
| Position | Controls x, y, z and yaw with position hold when sticks are released. Keeps roll/pitch stabilized. |
## Joystick Stick Mode
BlueROV2 supports two joystick mappings for manual control, selected using the
[UUV_STICK_MODE](../advanced_config/parameter_reference.md#UUV_STICK_MODE) parameter.
By default, `UUV_STICK_MODE` is set to `0`, which enables the UUV stick mapping intended for vectored underwater vehicles.
### UUV_STICK_MODE = 0 (default)
This mode is intended for normal BlueROV2 operation.
In `Manual`, `Stabilized`, and `Acro` modes, the sticks command:
- **Pitch stick:** surge - moving stick up -> moving forward, +X translation in body frame.
- **Roll stick:** sway - moving stick right -> moving sideways right, +Y translation in body frame.
- **Throttle stick:** heave - moving stick up -> moving upwards, -Z translation in body frame (note the Z axis points Down of the vehicle in PX4).
- **Yaw stick:** yaw - moving stick right -> yawing to the right, +Z rotation in body frame.
In this mode, roll and pitch are kept level rather than commanded directly.
### UUV_STICK_MODE = 1
This mode enables the legacy multicopter-style stick mapping for `Manual`, `Stabilized`, and `Acro` modes:
- **Throttle stick:** surge - moving stick up -> moving forward, +X translation in body frame.
- **Roll stick:** roll - moving stick right -> rolling to the right side, +X rotation in body frame.
- **Pitch stick:** pitch - moving stick up -> pitching down, -X translation in body frame (note signs are switched to follow PX4 standard).
- **Yaw stick:** yaw - moving stick right -> yawing to the right, +Z rotation in body frame.
This mode is mainly provided for compatibility with older setups and user preference.
## Airframe Configuration
+3 -3
View File
@@ -6,15 +6,15 @@
Support for UUVs is [experimental](../airframes/index.md#experimental-vehicles).
Maintainer volunteers, [contribution](../contribute/index.md) of new features, new frame configurations, or other improvements would all be very welcome!
At time of writing it has only been tested using ROS in offboard mode.
At time of writing manual and assisted manual modes are available for supported UUV frames, as well as ROS in offboard mode.
The following features have not been implemented:
- Modes like missions, depth hold, stabilised manual control, etc.
- Autonomous mission-style underwater workflows are still limited compared to aerial vehicles.
- BlueRobotics gripper support.
:::
PX4 has basic support for UUVs.
PX4 has basic support for UUVs. For BlueROV2 Heavy, PX4 currently supports Manual, Stabilized, Acro, Altitude and Position modes.
## Supported Frames
+47 -45
View File
@@ -14,50 +14,52 @@ This section describes the VTOL types and configurations supported by PX4, and p
## VTOL Types
PX4 supports the three most important/main VTOL types.
PX4 supports the three most important/main VTOL types: [Standard VTOL](standardvtol.md), [Tiltrotor](tiltrotor.md), and [Tailsitter](tailsitter.md).
<div class="grid_wrapper three_column">
<div class="grid_item">
<div class="grid_item_heading"><a href="tailsitter.html" title="Tailsitter"><big>Tailsitter</big></a></div>
<div class="grid_text">
Rotors permanently in fixed-wing position.
Takes off and lands on tail. Whole vehicle tilts forward to enter forward flight.
<img src="../../assets/airframes/vtol/wingtraone/hero.jpg" title="wingtraone" />
<ul>
<li>Simple and robust</li>
<li>Minimal set of actuators</li>
<li>Can be hard to control, particularly in wind</li>
<li>Tradeoff between efficiency in hover and forward flight, as same actuators are used</li>
</ul>
</div>
</div>
<div class="grid_item">
<div class="grid_item_heading"><a href="tiltrotor.html" title="Tiltrotor"><big>Tiltrotor</big></a></div>
Rotors swivel 90 degrees to transition from multicopter to forward flight orientation.
Takes off and lands on belly.
<div class="grid_text">
<img src="../../assets/airframes/vtol/eflite_convergence_pixfalcon/hero.jpg" title="Eflight Confvergence" />
<ul>
<li>Additional actuators for motor tilts</li>
<li>Mechanically complex tilting mechanism</li>
<li>Easier to control in hover than tailsitters due to more control authority</li>
</ul>
</div>
</div>
<div class="grid_item">
<div class="grid_item_heading"><a href="standardvtol.html" title="Standard VTOL"><big>Standard VTOL</big></a></div>
<div class="grid_text">
Separate rotors/flight controls for multicopter and forward flight. Takes off and lands on belly.
<img src="../../assets/airframes/vtol/vertical_technologies_deltaquad/hero_small.png" title="Vertical Technologies: Deltaquad" />
<ul>
<li>Additional weight from separate hover/forward flight propulsion systems</li>
<li>Easiest to control due to dedicated hover/forward flight actuators</li>
<li>Can hover</li>
<li>Fuel engines for forward flight propulsion can be used</li>
</ul>
</div>
</div>
</div>
:::: tabs
::: tab Standard VTOL
Separate rotors/flight controls for multicopter and forward flight.
Takes off and lands on belly.
![Vertical Technologies: Deltaquad](../../assets/airframes/vtol/vertical_technologies_deltaquad/hero_small.png)
- Additional weight from separate hover/forward flight propulsion systems
- Easiest to control due to dedicated hover/forward flight actuators
- Can hover
- Fuel engines can be used for forward flight propulsion
:::
::: tab Tailsitter
Rotors permanently in fixed-wing position.
Takes off and lands on tail. Whole vehicle tilts forward to enter forward flight.
![wingtraone](../../assets/airframes/vtol/wingtraone/hero.jpg)
- Simple and robust
- Minimal set of actuators
- Can be hard to control, particularly in wind
- Tradeoff between efficiency in hover and forward flight, as same actuators are used
:::
::: tab Tiltrotor
Rotors swivel 90 degrees to transition from multicopter to forward flight orientation.
Takes off and lands on belly.
![Eflight Confvergence](../../assets/airframes/vtol/eflite_convergence_pixfalcon/hero.jpg)
- Additional actuators for motor tilts
- Mechanically complex tilting mechanism
- Easier to control in hover than tailsitters due to more control authority
:::
::::
In general, as mechanical complexity increases the vehicles are easier to fly, but the cost and weight increase.
Each type has advantages and disadvantages, and there are successful commercial ventures based on all of them.
@@ -125,7 +127,7 @@ VTOL Control & Airspeed Fault Detection (PX4 Developer Summit 2019)
<!-- 20190704 -->
### Tailsitter
### Tailsitter {#tailsitter_video}
[UAV Works VALAQ Patrol Tailsitter](https://www.valaqpatrol.com/valaq_patrol_technical_data/)
@@ -135,7 +137,7 @@ VTOL Control & Airspeed Fault Detection (PX4 Developer Summit 2019)
<lite-youtube videoid="acG0aTuf3f8" title="PX4 VTOL - Call for Testpilots"/>
### Tiltrotor
### Tiltrotor {#tiltrotor_video}
[Convergence Tiltrotor](../frames_vtol/vtol_tiltrotor_eflite_convergence_pixfalcon.md)
+33 -32
View File
@@ -88,35 +88,36 @@ This section contains videos that are specific to Tailsitter VTOL (videos that a
## Gallery
<div class="grid_wrapper three_column">
<div class="grid_item">
<div class="grid_item_heading"><big><a href="https://wingtra.com/mapping-drone-fast-accurate-surveying/">WingtraOne</a></big></div>
<div class="grid_text">
<img src="../../assets/airframes/vtol/wingtraone/hero.jpg" title="Wingtra: WingtraOne VTOL Duo Tailsitter" alt="wingtraone" />
</div>
</div>
<div class="grid_item">
<div class="grid_item_heading"><big><a href="https://www.skypull.technology/">Skypull</a></big></div>
<div class="grid_text">
<img title="Skypull SP-1 VTOL QuadTailsitter" src="../../assets/airframes/vtol/skypull/skypull_sp1.jpg" />
</div>
</div>
<div class="grid_item">
<div class="grid_item_heading"><big><a href="../frames_vtol/vtol_tailsitter_caipiroshka_pixracer.html">TBS Caipiroshka</a></big></div>
<div class="grid_text">
<img title="TBS Caipiroshka" src="../../assets/airframes/vtol/caipiroshka/caipiroshka.jpg" />
</div>
</div>
<div class="grid_item">
<div class="grid_item_heading"><big><a href="http://uav-cas.ac.cn/WOSHARK/">Woshark</a></big></div>
<div class="grid_text">
<img title="Woshark" src="../../assets/airframes/vtol/xdwgood_ax1800/hero.jpg" />
</div>
</div>
<div class="grid_item">
<div class="grid_item_heading"><big><a href="https://www.valaqpatrol.com/valaq_patrol_technical_data/">UAV Works VALAQ Patrol Tailsitter</a></big></div>
<div class="grid_text">
<img title="UAV Works VALAQ Patrol Tailsitter" src="../../assets/airframes/vtol/uav_works_valaq_patrol/hero.jpg" />
</div>
</div>
</div>
:::: tabs
::: tab WingtraOne
[WingtraOne](https://wingtra.com/mapping-drone-fast-accurate-surveying/)
![Wingtra: WingtraOne VTOL Duo Tailsitter](../../assets/airframes/vtol/wingtraone/hero.jpg)
:::
::: tab Skypull
[Skypull](https://www.skypull.technology/)
![Skypull SP-1 VTOL QuadTailsitter](../../assets/airframes/vtol/skypull/skypull_sp1.jpg)
:::
::: tab TBS Caipiroshka
[TBS Caipiroshka](../frames_vtol/vtol_tailsitter_caipiroshka_pixracer.md)
![TBS Caipiroshka](../../assets/airframes/vtol/caipiroshka/caipiroshka.jpg)
:::
::: tab Woshark
[Woshark](http://uav-cas.ac.cn/WOSHARK/)
![Woshark](../../assets/airframes/vtol/xdwgood_ax1800/hero.jpg)
:::
::: tab VALAQ Patrol Tailsitter
[UAV Works VALAQ Patrol Tailsitter](https://www.valaqpatrol.com/valaq_patrol_technical_data/)
!["UAV Works VALAQ Patrol Tailsitte](../../assets/airframes/vtol/uav_works_valaq_patrol/hero.jpg)
:::
::::
+2 -2
View File
@@ -159,7 +159,7 @@ Runs after the package is installed. Common tasks:
- Board-specific setup (e.g., DSP signature generation)
```bash
#!/bin/bash
#!/usr/bin/env bash
set -e
# Create px4-* symlinks
@@ -185,7 +185,7 @@ fi
Runs before the package is removed:
```bash
#!/bin/bash
#!/usr/bin/env bash
set -e
# Stop the service
+16
View File
@@ -70,3 +70,19 @@ The command line and GUI interfaces are shown below.
### menuconfig Command Line Interface
![menuconfig command line interface](../../assets/hardware/kconfig-guiconfig.png)
## Fortified Toolchain Compatibility
Some toolchains define `_FORTIFY_SOURCE` by default. Those toolchains generally require some optimization, which means PX4 configurations that use `-O0` may fail.
PX4 keeps the default debug optimization unchanged unless you explicitly opt in. To switch `PX4_DEBUG_OPT_LEVEL` from `-O0` to `-Og`, enable:
- `Toolchain > Fortified toolchain support`
This is the Kconfig symbol:
```sh
CONFIG_BOARD_SUPPORT_FORTIFIED_TOOLCHAIN=y
```
You can set it either in `boardconfig`/`boardguiconfig` or directly in your board's `*.px4board` file.
+191 -190
View File
@@ -95,205 +95,206 @@ They are not build into the module, and hence are neither published or subscribe
::: details See messages
- [MavlinkLog](../msg_docs/MavlinkLog.md)
- [RadioStatus](../msg_docs/RadioStatus.md)
- [FlightPhaseEstimation](../msg_docs/FlightPhaseEstimation.md)
- [Rpm](../msg_docs/Rpm.md)
- [VehicleLocalPositionV0](../msg_docs/VehicleLocalPositionV0.md)
- [SensorGyroFft](../msg_docs/SensorGyroFft.md)
- [MountOrientation](../msg_docs/MountOrientation.md)
- [OpenDroneIdOperatorId](../msg_docs/OpenDroneIdOperatorId.md)
- [RateCtrlStatus](../msg_docs/RateCtrlStatus.md)
- [TuneControl](../msg_docs/TuneControl.md)
- [CameraStatus](../msg_docs/CameraStatus.md)
- [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md)
- [FollowTargetEstimator](../msg_docs/FollowTargetEstimator.md)
- [ManualControlSwitches](../msg_docs/ManualControlSwitches.md)
- [RtlStatus](../msg_docs/RtlStatus.md)
- [EventV0](../msg_docs/EventV0.md)
- [DebugArray](../msg_docs/DebugArray.md)
- [VehicleImuStatus](../msg_docs/VehicleImuStatus.md)
- [TakeoffStatus](../msg_docs/TakeoffStatus.md)
- [FigureEightStatus](../msg_docs/FigureEightStatus.md)
- [TrajectorySetpoint6dof](../msg_docs/TrajectorySetpoint6dof.md)
- [CanInterfaceStatus](../msg_docs/CanInterfaceStatus.md)
- [VehicleCommandAckV0](../msg_docs/VehicleCommandAckV0.md)
- [HomePositionV0](../msg_docs/HomePositionV0.md)
- [GimbalControls](../msg_docs/GimbalControls.md)
- [LandingTargetInnovations](../msg_docs/LandingTargetInnovations.md)
- [GpioOut](../msg_docs/GpioOut.md)
- [SensorAccel](../msg_docs/SensorAccel.md)
- [AirspeedWind](../msg_docs/AirspeedWind.md)
- [IridiumsbdStatus](../msg_docs/IridiumsbdStatus.md)
- [DatamanResponse](../msg_docs/DatamanResponse.md)
- [EstimatorAidSource3d](../msg_docs/EstimatorAidSource3d.md)
- [EstimatorInnovations](../msg_docs/EstimatorInnovations.md)
- [ParameterSetValueResponse](../msg_docs/ParameterSetValueResponse.md)
- [Ekf2Timestamps](../msg_docs/Ekf2Timestamps.md)
- [VehicleRoi](../msg_docs/VehicleRoi.md)
- [VehicleMagnetometer](../msg_docs/VehicleMagnetometer.md)
- [ArmingCheckReplyV0](../msg_docs/ArmingCheckReplyV0.md)
- [OpenDroneIdArmStatus](../msg_docs/OpenDroneIdArmStatus.md)
- [Vtx](../msg_docs/Vtx.md)
- [ActuatorServosTrim](../msg_docs/ActuatorServosTrim.md)
- [DebugArray](../msg_docs/DebugArray.md)
- [LaunchDetectionStatus](../msg_docs/LaunchDetectionStatus.md)
- [TakeoffStatus](../msg_docs/TakeoffStatus.md)
- [OpenDroneIdSystem](../msg_docs/OpenDroneIdSystem.md)
- [RcChannels](../msg_docs/RcChannels.md)
- [VehicleAttitudeSetpointV0](../msg_docs/VehicleAttitudeSetpointV0.md)
- [ParameterSetValueRequest](../msg_docs/ParameterSetValueRequest.md)
- [GainCompression](../msg_docs/GainCompression.md)
- [VehicleStatusV2](../msg_docs/VehicleStatusV2.md)
- [ControlAllocatorStatus](../msg_docs/ControlAllocatorStatus.md)
- [ActuatorArmed](../msg_docs/ActuatorArmed.md)
- [PositionSetpoint](../msg_docs/PositionSetpoint.md)
- [RoverRateStatus](../msg_docs/RoverRateStatus.md)
- [DebugValue](../msg_docs/DebugValue.md)
- [GpioConfig](../msg_docs/GpioConfig.md)
- [PurePursuitStatus](../msg_docs/PurePursuitStatus.md)
- [GeofenceResult](../msg_docs/GeofenceResult.md)
- [TrajectorySetpoint6dof](../msg_docs/TrajectorySetpoint6dof.md)
- [SensorAccelFifo](../msg_docs/SensorAccelFifo.md)
- [VehicleLocalPositionSetpoint](../msg_docs/VehicleLocalPositionSetpoint.md)
- [EstimatorSensorBias](../msg_docs/EstimatorSensorBias.md)
- [AdcReport](../msg_docs/AdcReport.md)
- [DistanceSensorModeChangeRequest](../msg_docs/DistanceSensorModeChangeRequest.md)
- [VehicleAngularAccelerationSetpoint](../msg_docs/VehicleAngularAccelerationSetpoint.md)
- [CameraTrigger](../msg_docs/CameraTrigger.md)
- [EscEepromRead](../msg_docs/EscEepromRead.md)
- [OrbTestLarge](../msg_docs/OrbTestLarge.md)
- [FollowTargetStatus](../msg_docs/FollowTargetStatus.md)
- [VelocityLimits](../msg_docs/VelocityLimits.md)
- [LedControl](../msg_docs/LedControl.md)
- [DatamanRequest](../msg_docs/DatamanRequest.md)
- [WheelEncoders](../msg_docs/WheelEncoders.md)
- [FuelTankStatus](../msg_docs/FuelTankStatus.md)
- [EstimatorInnovations](../msg_docs/EstimatorInnovations.md)
- [HeaterStatus](../msg_docs/HeaterStatus.md)
- [RoverAttitudeStatus](../msg_docs/RoverAttitudeStatus.md)
- [RegisterExtComponentRequestV0](../msg_docs/RegisterExtComponentRequestV0.md)
- [PowerButtonState](../msg_docs/PowerButtonState.md)
- [GimbalManagerSetAttitude](../msg_docs/GimbalManagerSetAttitude.md)
- [VehicleImuStatus](../msg_docs/VehicleImuStatus.md)
- [RadioStatus](../msg_docs/RadioStatus.md)
- [SensorTemp](../msg_docs/SensorTemp.md)
- [VehicleStatusV0](../msg_docs/VehicleStatusV0.md)
- [GpioRequest](../msg_docs/GpioRequest.md)
- [DifferentialPressure](../msg_docs/DifferentialPressure.md)
- [EstimatorStatus](../msg_docs/EstimatorStatus.md)
- [InternalCombustionEngineStatus](../msg_docs/InternalCombustionEngineStatus.md)
- [VehicleLocalPositionV0](../msg_docs/VehicleLocalPositionV0.md)
- [ActuatorControlsStatus](../msg_docs/ActuatorControlsStatus.md)
- [Mission](../msg_docs/Mission.md)
- [SystemPower](../msg_docs/SystemPower.md)
- [VehicleImu](../msg_docs/VehicleImu.md)
- [ActuatorOutputs](../msg_docs/ActuatorOutputs.md)
- [VehicleCommandAckV0](../msg_docs/VehicleCommandAckV0.md)
- [QshellReq](../msg_docs/QshellReq.md)
- [VehicleStatusV1](../msg_docs/VehicleStatusV1.md)
- [SensorPreflightMag](../msg_docs/SensorPreflightMag.md)
- [SensorSelection](../msg_docs/SensorSelection.md)
- [MavlinkTunnel](../msg_docs/MavlinkTunnel.md)
- [GimbalManagerInformation](../msg_docs/GimbalManagerInformation.md)
- [GimbalDeviceInformation](../msg_docs/GimbalDeviceInformation.md)
- [ManualControlSwitches](../msg_docs/ManualControlSwitches.md)
- [VehicleOpticalFlowVel](../msg_docs/VehicleOpticalFlowVel.md)
- [VehicleConstraints](../msg_docs/VehicleConstraints.md)
- [SensorsStatus](../msg_docs/SensorsStatus.md)
- [NormalizedUnsignedSetpoint](../msg_docs/NormalizedUnsignedSetpoint.md)
- [ParameterResetRequest](../msg_docs/ParameterResetRequest.md)
- [OpenDroneIdOperatorId](../msg_docs/OpenDroneIdOperatorId.md)
- [RtlStatus](../msg_docs/RtlStatus.md)
- [SensorUwb](../msg_docs/SensorUwb.md)
- [AirspeedValidatedV0](../msg_docs/AirspeedValidatedV0.md)
- [GeofenceResult](../msg_docs/GeofenceResult.md)
- [ParameterResetRequest](../msg_docs/ParameterResetRequest.md)
- [SensorPreflightMag](../msg_docs/SensorPreflightMag.md)
- [VehicleStatusV0](../msg_docs/VehicleStatusV0.md)
- [DatamanResponse](../msg_docs/DatamanResponse.md)
- [SensorAirflow](../msg_docs/SensorAirflow.md)
- [SensorsStatusImu](../msg_docs/SensorsStatusImu.md)
- [NavigatorMissionItem](../msg_docs/NavigatorMissionItem.md)
- [PowerMonitor](../msg_docs/PowerMonitor.md)
- [ParameterSetUsedRequest](../msg_docs/ParameterSetUsedRequest.md)
- [ControlAllocatorStatus](../msg_docs/ControlAllocatorStatus.md)
- [EscStatus](../msg_docs/EscStatus.md)
- [EstimatorSelectorStatus](../msg_docs/EstimatorSelectorStatus.md)
- [MagnetometerBiasEstimate](../msg_docs/MagnetometerBiasEstimate.md)
- [RtlTimeEstimate](../msg_docs/RtlTimeEstimate.md)
- [QshellReq](../msg_docs/QshellReq.md)
- [AutotuneAttitudeControlStatus](../msg_docs/AutotuneAttitudeControlStatus.md)
- [VehicleStatusV2](../msg_docs/VehicleStatusV2.md)
- [Gripper](../msg_docs/Gripper.md)
- [PositionControllerLandingStatus](../msg_docs/PositionControllerLandingStatus.md)
- [VehicleAirData](../msg_docs/VehicleAirData.md)
- [SensorGyroFifo](../msg_docs/SensorGyroFifo.md)
- [ActuatorServosTrim](../msg_docs/ActuatorServosTrim.md)
- [PpsCapture](../msg_docs/PpsCapture.md)
- [GimbalDeviceSetAttitude](../msg_docs/GimbalDeviceSetAttitude.md)
- [VehicleGlobalPositionV0](../msg_docs/VehicleGlobalPositionV0.md)
- [ParameterSetValueRequest](../msg_docs/ParameterSetValueRequest.md)
- [PositionControllerStatus](../msg_docs/PositionControllerStatus.md)
- [VehicleMagnetometer](../msg_docs/VehicleMagnetometer.md)
- [Airspeed](../msg_docs/Airspeed.md)
- [VehicleImu](../msg_docs/VehicleImu.md)
- [EstimatorStates](../msg_docs/EstimatorStates.md)
- [FixedWingLateralStatus](../msg_docs/FixedWingLateralStatus.md)
- [DifferentialPressure](../msg_docs/DifferentialPressure.md)
- [GimbalManagerSetAttitude](../msg_docs/GimbalManagerSetAttitude.md)
- [GimbalDeviceInformation](../msg_docs/GimbalDeviceInformation.md)
- [RegisterExtComponentRequestV0](../msg_docs/RegisterExtComponentRequestV0.md)
- [TiltrotorExtraControls](../msg_docs/TiltrotorExtraControls.md)
- [GimbalManagerInformation](../msg_docs/GimbalManagerInformation.md)
- [HoverThrustEstimate](../msg_docs/HoverThrustEstimate.md)
- [LoggerStatus](../msg_docs/LoggerStatus.md)
- [Cpuload](../msg_docs/Cpuload.md)
- [PurePursuitStatus](../msg_docs/PurePursuitStatus.md)
- [MavlinkTunnel](../msg_docs/MavlinkTunnel.md)
- [EstimatorAidSource2d](../msg_docs/EstimatorAidSource2d.md)
- [InputRc](../msg_docs/InputRc.md)
- [VehicleAngularVelocity](../msg_docs/VehicleAngularVelocity.md)
- [GimbalManagerStatus](../msg_docs/GimbalManagerStatus.md)
- [VehicleAcceleration](../msg_docs/VehicleAcceleration.md)
- [OrbitStatus](../msg_docs/OrbitStatus.md)
- [QshellRetval](../msg_docs/QshellRetval.md)
- [LandingTargetInnovations](../msg_docs/LandingTargetInnovations.md)
- [LogMessage](../msg_docs/LogMessage.md)
- [FollowTargetStatus](../msg_docs/FollowTargetStatus.md)
- [UavcanParameterRequest](../msg_docs/UavcanParameterRequest.md)
- [InternalCombustionEngineControl](../msg_docs/InternalCombustionEngineControl.md)
- [ActuatorControlsStatus](../msg_docs/ActuatorControlsStatus.md)
- [NormalizedUnsignedSetpoint](../msg_docs/NormalizedUnsignedSetpoint.md)
- [SensorHygrometer](../msg_docs/SensorHygrometer.md)
- [ParameterSetValueResponse](../msg_docs/ParameterSetValueResponse.md)
- [VehicleAttitudeSetpointV0](../msg_docs/VehicleAttitudeSetpointV0.md)
- [SensorGnssStatus](../msg_docs/SensorGnssStatus.md)
- [PowerButtonState](../msg_docs/PowerButtonState.md)
- [FollowTarget](../msg_docs/FollowTarget.md)
- [TaskStackInfo](../msg_docs/TaskStackInfo.md)
- [Ekf2Timestamps](../msg_docs/Ekf2Timestamps.md)
- [Event](../msg_docs/Event.md)
- [VelocityLimits](../msg_docs/VelocityLimits.md)
- [VehicleConstraints](../msg_docs/VehicleConstraints.md)
- [ConfigOverridesV0](../msg_docs/ConfigOverridesV0.md)
- [RaptorInput](../msg_docs/RaptorInput.md)
- [LedControl](../msg_docs/LedControl.md)
- [EstimatorBias](../msg_docs/EstimatorBias.md)
- [AirspeedWind](../msg_docs/AirspeedWind.md)
- [EstimatorBias3d](../msg_docs/EstimatorBias3d.md)
- [RcChannels](../msg_docs/RcChannels.md)
- [IridiumsbdStatus](../msg_docs/IridiumsbdStatus.md)
- [EstimatorStatus](../msg_docs/EstimatorStatus.md)
- [EscEepromWrite](../msg_docs/EscEepromWrite.md)
- [UavcanParameterValue](../msg_docs/UavcanParameterValue.md)
- [BatteryStatusV0](../msg_docs/BatteryStatusV0.md)
- [NavigatorStatus](../msg_docs/NavigatorStatus.md)
- [VehicleAngularAccelerationSetpoint](../msg_docs/VehicleAngularAccelerationSetpoint.md)
- [SensorTemp](../msg_docs/SensorTemp.md)
- [DebugValue](../msg_docs/DebugValue.md)
- [VehicleLocalPositionSetpoint](../msg_docs/VehicleLocalPositionSetpoint.md)
- [DistanceSensorModeChangeRequest](../msg_docs/DistanceSensorModeChangeRequest.md)
- [UlogStream](../msg_docs/UlogStream.md)
- [Px4ioStatus](../msg_docs/Px4ioStatus.md)
- [EscReport](../msg_docs/EscReport.md)
- [SensorsStatus](../msg_docs/SensorsStatus.md)
- [SensorBaro](../msg_docs/SensorBaro.md)
- [EstimatorAidSource3d](../msg_docs/EstimatorAidSource3d.md)
- [DebugKeyValue](../msg_docs/DebugKeyValue.md)
- [PositionSetpoint](../msg_docs/PositionSetpoint.md)
- [OrbTestMedium](../msg_docs/OrbTestMedium.md)
- [SensorGyro](../msg_docs/SensorGyro.md)
- [GeofenceStatus](../msg_docs/GeofenceStatus.md)
- [LandingGearWheel](../msg_docs/LandingGearWheel.md)
- [EstimatorEventFlags](../msg_docs/EstimatorEventFlags.md)
- [FixedWingRunwayControl](../msg_docs/FixedWingRunwayControl.md)
- [ButtonEvent](../msg_docs/ButtonEvent.md)
- [SensorSelection](../msg_docs/SensorSelection.md)
- [PwmInput](../msg_docs/PwmInput.md)
- [OpenDroneIdSystem](../msg_docs/OpenDroneIdSystem.md)
- [VehicleRoi](../msg_docs/VehicleRoi.md)
- [InternalCombustionEngineStatus](../msg_docs/InternalCombustionEngineStatus.md)
- [SensorAccelFifo](../msg_docs/SensorAccelFifo.md)
- [RegisterExtComponentReplyV0](../msg_docs/RegisterExtComponentReplyV0.md)
- [SensorMag](../msg_docs/SensorMag.md)
- [DatamanRequest](../msg_docs/DatamanRequest.md)
- [RoverSpeedStatus](../msg_docs/RoverSpeedStatus.md)
- [VehicleStatusV1](../msg_docs/VehicleStatusV1.md)
- [DeviceInformation](../msg_docs/DeviceInformation.md)
- [CameraCapture](../msg_docs/CameraCapture.md)
- [ActuatorOutputs](../msg_docs/ActuatorOutputs.md)
- [DronecanNodeStatus](../msg_docs/DronecanNodeStatus.md)
- [OpenDroneIdSelfId](../msg_docs/OpenDroneIdSelfId.md)
- [OrbTest](../msg_docs/OrbTest.md)
- [GeneratorStatus](../msg_docs/GeneratorStatus.md)
- [IrlockReport](../msg_docs/IrlockReport.md)
- [MissionResult](../msg_docs/MissionResult.md)
- [GpioConfig](../msg_docs/GpioConfig.md)
- [EstimatorAidSource1d](../msg_docs/EstimatorAidSource1d.md)
- [FailureDetectorStatus](../msg_docs/FailureDetectorStatus.md)
- [TecsStatus](../msg_docs/TecsStatus.md)
- [ActuatorArmed](../msg_docs/ActuatorArmed.md)
- [GpsDump](../msg_docs/GpsDump.md)
- [UlogStreamAck](../msg_docs/UlogStreamAck.md)
- [EstimatorSensorBias](../msg_docs/EstimatorSensorBias.md)
- [SystemPower](../msg_docs/SystemPower.md)
- [Mission](../msg_docs/Mission.md)
- [GainCompression](../msg_docs/GainCompression.md)
- [GpioOut](../msg_docs/GpioOut.md)
- [CameraTrigger](../msg_docs/CameraTrigger.md)
- [RaptorStatus](../msg_docs/RaptorStatus.md)
- [ParameterUpdate](../msg_docs/ParameterUpdate.md)
- [GpioIn](../msg_docs/GpioIn.md)
- [EscEepromRead](../msg_docs/EscEepromRead.md)
- [GpsInjectData](../msg_docs/GpsInjectData.md)
- [HomePositionV0](../msg_docs/HomePositionV0.md)
- [GpioRequest](../msg_docs/GpioRequest.md)
- [OrbTestLarge](../msg_docs/OrbTestLarge.md)
- [Ping](../msg_docs/Ping.md)
- [FixedWingLateralGuidanceStatus](../msg_docs/FixedWingLateralGuidanceStatus.md)
- [RoverRateStatus](../msg_docs/RoverRateStatus.md)
- [EstimatorGpsStatus](../msg_docs/EstimatorGpsStatus.md)
- [HealthReport](../msg_docs/HealthReport.md)
- [DebugVect](../msg_docs/DebugVect.md)
- [LaunchDetectionStatus](../msg_docs/LaunchDetectionStatus.md)
- [RcParameterMap](../msg_docs/RcParameterMap.md)
- [CellularStatus](../msg_docs/CellularStatus.md)
- [SensorCorrection](../msg_docs/SensorCorrection.md)
- [ParameterSetUsedRequest](../msg_docs/ParameterSetUsedRequest.md)
- [OrbTest](../msg_docs/OrbTest.md)
- [TecsStatus](../msg_docs/TecsStatus.md)
- [CameraStatus](../msg_docs/CameraStatus.md)
- [GpsDump](../msg_docs/GpsDump.md)
- [ArmingCheckRequestV0](../msg_docs/ArmingCheckRequestV0.md)
- [GimbalManagerSetManualControl](../msg_docs/GimbalManagerSetManualControl.md)
- [RoverAttitudeStatus](../msg_docs/RoverAttitudeStatus.md)
- [EstimatorAidSource1d](../msg_docs/EstimatorAidSource1d.md)
- [UlogStreamAck](../msg_docs/UlogStreamAck.md)
- [RateCtrlStatus](../msg_docs/RateCtrlStatus.md)
- [RoverSpeedStatus](../msg_docs/RoverSpeedStatus.md)
- [NavigatorStatus](../msg_docs/NavigatorStatus.md)
- [MissionResult](../msg_docs/MissionResult.md)
- [LogMessage](../msg_docs/LogMessage.md)
- [QshellRetval](../msg_docs/QshellRetval.md)
- [InternalCombustionEngineControl](../msg_docs/InternalCombustionEngineControl.md)
- [IrlockReport](../msg_docs/IrlockReport.md)
- [SensorGyroFft](../msg_docs/SensorGyroFft.md)
- [GeofenceStatus](../msg_docs/GeofenceStatus.md)
- [ConfigOverridesV0](../msg_docs/ConfigOverridesV0.md)
- [ButtonEvent](../msg_docs/ButtonEvent.md)
- [SensorCorrection](../msg_docs/SensorCorrection.md)
- [SensorHygrometer](../msg_docs/SensorHygrometer.md)
- [DeviceInformation](../msg_docs/DeviceInformation.md)
- [Gripper](../msg_docs/Gripper.md)
- [SensorMag](../msg_docs/SensorMag.md)
- [EstimatorSelectorStatus](../msg_docs/EstimatorSelectorStatus.md)
- [EscReport](../msg_docs/EscReport.md)
- [VehicleOpticalFlow](../msg_docs/VehicleOpticalFlow.md)
- [SatelliteInfo](../msg_docs/SatelliteInfo.md)
- [SensorAccel](../msg_docs/SensorAccel.md)
- [ActionRequest](../msg_docs/ActionRequest.md)
- [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md)
- [BatteryStatusV0](../msg_docs/BatteryStatusV0.md)
- [GimbalManagerStatus](../msg_docs/GimbalManagerStatus.md)
- [MagWorkerData](../msg_docs/MagWorkerData.md)
- [NeuralControl](../msg_docs/NeuralControl.md)
- [BatteryInfo](../msg_docs/BatteryInfo.md)
- [LandingTargetPose](../msg_docs/LandingTargetPose.md)
- [AdcReport](../msg_docs/AdcReport.md)
- [GimbalControls](../msg_docs/GimbalControls.md)
- [EstimatorStates](../msg_docs/EstimatorStates.md)
- [PositionControllerStatus](../msg_docs/PositionControllerStatus.md)
- [GimbalDeviceSetAttitude](../msg_docs/GimbalDeviceSetAttitude.md)
- [Cpuload](../msg_docs/Cpuload.md)
- [FailureDetectorStatus](../msg_docs/FailureDetectorStatus.md)
- [FixedWingLateralStatus](../msg_docs/FixedWingLateralStatus.md)
- [MagnetometerBiasEstimate](../msg_docs/MagnetometerBiasEstimate.md)
- [OpenDroneIdSelfId](../msg_docs/OpenDroneIdSelfId.md)
- [PpsCapture](../msg_docs/PpsCapture.md)
- [FollowTargetEstimator](../msg_docs/FollowTargetEstimator.md)
- [Event](../msg_docs/Event.md)
- [GpioIn](../msg_docs/GpioIn.md)
- [PowerMonitor](../msg_docs/PowerMonitor.md)
- [LandingGearWheel](../msg_docs/LandingGearWheel.md)
- [RaptorInput](../msg_docs/RaptorInput.md)
- [SensorGnssRelative](../msg_docs/SensorGnssRelative.md)
- [VehicleOpticalFlowVel](../msg_docs/VehicleOpticalFlowVel.md)
- [ActionRequest](../msg_docs/ActionRequest.md)
- [ActuatorTest](../msg_docs/ActuatorTest.md)
- [AutotuneAttitudeControlStatus](../msg_docs/AutotuneAttitudeControlStatus.md)
- [SensorBaro](../msg_docs/SensorBaro.md)
- [DebugKeyValue](../msg_docs/DebugKeyValue.md)
- [EstimatorAidSource2d](../msg_docs/EstimatorAidSource2d.md)
- [RegisterExtComponentReplyV0](../msg_docs/RegisterExtComponentReplyV0.md)
- [SensorGyro](../msg_docs/SensorGyro.md)
- [FlightPhaseEstimation](../msg_docs/FlightPhaseEstimation.md)
- [GimbalManagerSetManualControl](../msg_docs/GimbalManagerSetManualControl.md)
- [PositionControllerLandingStatus](../msg_docs/PositionControllerLandingStatus.md)
- [VehicleAcceleration](../msg_docs/VehicleAcceleration.md)
- [MountOrientation](../msg_docs/MountOrientation.md)
- [HealthReport](../msg_docs/HealthReport.md)
- [OrbTestMedium](../msg_docs/OrbTestMedium.md)
- [SensorGnssStatus](../msg_docs/SensorGnssStatus.md)
- [CanInterfaceStatus](../msg_docs/CanInterfaceStatus.md)
- [EstimatorGpsStatus](../msg_docs/EstimatorGpsStatus.md)
- [DronecanNodeStatus](../msg_docs/DronecanNodeStatus.md)
- [VehicleAngularVelocity](../msg_docs/VehicleAngularVelocity.md)
- [FuelTankStatus](../msg_docs/FuelTankStatus.md)
- [GeneratorStatus](../msg_docs/GeneratorStatus.md)
- [Px4ioStatus](../msg_docs/Px4ioStatus.md)
- [HeaterStatus](../msg_docs/HeaterStatus.md)
- [UlogStream](../msg_docs/UlogStream.md)
- [UavcanParameterRequest](../msg_docs/UavcanParameterRequest.md)
- [PwmInput](../msg_docs/PwmInput.md)
- [EventV0](../msg_docs/EventV0.md)
- [FollowTarget](../msg_docs/FollowTarget.md)
- [EstimatorBias3d](../msg_docs/EstimatorBias3d.md)
- [FigureEightStatus](../msg_docs/FigureEightStatus.md)
- [Ping](../msg_docs/Ping.md)
- [RcParameterMap](../msg_docs/RcParameterMap.md)
- [SensorGyroFifo](../msg_docs/SensorGyroFifo.md)
- [TaskStackInfo](../msg_docs/TaskStackInfo.md)
- [TiltrotorExtraControls](../msg_docs/TiltrotorExtraControls.md)
- [Airspeed](../msg_docs/Airspeed.md)
- [EscEepromWrite](../msg_docs/EscEepromWrite.md)
- [BatteryInfo](../msg_docs/BatteryInfo.md)
- [VehicleGlobalPositionV0](../msg_docs/VehicleGlobalPositionV0.md)
- [LoggerStatus](../msg_docs/LoggerStatus.md)
- [RtlTimeEstimate](../msg_docs/RtlTimeEstimate.md)
- [CellularStatus](../msg_docs/CellularStatus.md)
- [LandingTargetPose](../msg_docs/LandingTargetPose.md)
- [ParameterUpdate](../msg_docs/ParameterUpdate.md)
- [NavigatorMissionItem](../msg_docs/NavigatorMissionItem.md)
- [MavlinkLog](../msg_docs/MavlinkLog.md)
- [GpsInjectData](../msg_docs/GpsInjectData.md)
- [InputRc](../msg_docs/InputRc.md)
- [DebugVect](../msg_docs/DebugVect.md)
- [FixedWingLateralGuidanceStatus](../msg_docs/FixedWingLateralGuidanceStatus.md)
- [SensorAirflow](../msg_docs/SensorAirflow.md)
- [SatelliteInfo](../msg_docs/SatelliteInfo.md)
- [EscStatus](../msg_docs/EscStatus.md)
- [EstimatorEventFlags](../msg_docs/EstimatorEventFlags.md)
- [Vtx](../msg_docs/Vtx.md)
- [RangingBeacon](../msg_docs/RangingBeacon.md)
- [NeuralControl](../msg_docs/NeuralControl.md)
- [HoverThrustEstimate](../msg_docs/HoverThrustEstimate.md)
- [OrbitStatus](../msg_docs/OrbitStatus.md)
- [VehicleAirData](../msg_docs/VehicleAirData.md)
- [SensorsStatusImu](../msg_docs/SensorsStatusImu.md)
- [Rpm](../msg_docs/Rpm.md)
- [UavcanParameterValue](../msg_docs/UavcanParameterValue.md)
- [FixedWingRunwayControl](../msg_docs/FixedWingRunwayControl.md)
- [CameraCapture](../msg_docs/CameraCapture.md)
- [EstimatorBias](../msg_docs/EstimatorBias.md)
- [TuneControl](../msg_docs/TuneControl.md)
:::
+2 -2
View File
@@ -4,7 +4,7 @@ pageClass: is-wide-page
# EstimatorAidSource1d (UORB message)
**TOPICS:** estimator_aid_src_baro_hgt estimator_aid_src_ev_hgt estimator_aid_src_gnss_hgt estimator_aid_src_rng_hgt estimator_aid_src_airspeed estimator_aid_src_sideslip estimator_aid_src_fake_hgt estimator_aid_src_gnss_yaw estimator_aid_src_ev_yaw
**TOPICS:** estimator_aid_src_baro_hgt estimator_aid_src_ev_hgt estimator_aid_src_gnss_hgt estimator_aid_src_rng_hgt estimator_aid_src_ranging_beacon estimator_aid_src_airspeed estimator_aid_src_sideslip estimator_aid_src_fake_hgt estimator_aid_src_gnss_yaw estimator_aid_src_ev_yaw
## Fields
@@ -55,7 +55,7 @@ float32 test_ratio_filtered # signed filtered test ratio
bool innovation_rejected # true if the observation has been rejected
bool fused # true if the sample was successfully fused
# TOPICS estimator_aid_src_baro_hgt estimator_aid_src_ev_hgt estimator_aid_src_gnss_hgt estimator_aid_src_rng_hgt
# TOPICS estimator_aid_src_baro_hgt estimator_aid_src_ev_hgt estimator_aid_src_gnss_hgt estimator_aid_src_rng_hgt estimator_aid_src_ranging_beacon
# TOPICS estimator_aid_src_airspeed estimator_aid_src_sideslip
# TOPICS estimator_aid_src_fake_hgt
# TOPICS estimator_aid_src_gnss_yaw estimator_aid_src_ev_yaw
+72
View File
@@ -0,0 +1,72 @@
---
pageClass: is-wide-page
---
# RangingBeacon (UORB message)
Ranging beacon measurement data (e.g. LoRa, UWB).
**TOPICS:** ranging_beacon
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ---------------- | --------- | ------------ | --------------------- | ------------------------------------------- |
| timestamp | `uint64` | us | | time since system start |
| timestamp_sample | `uint64` | us | | the timestamp of the raw data |
| beacon_id | `uint8` | | |
| range | `float32` | m | | Range measurement |
| lat | `float64` | deg | | Latitude |
| lon | `float64` | deg | | Longitude |
| alt | `float32` | m | | Beacon altitude (frame defined in alt_type) |
| alt_type | `uint8` | | [ALT_TYPE](#ALT_TYPE) | Altitude frame for alt field |
| hacc | `float32` | m | | Groundbeacon horizontal accuracy |
| vacc | `float32` | m | | Groundbeacon vertical accuracy |
| sequence_nr | `uint8` | | |
| status | `uint8` | | |
| carrier_freq | `uint16` | MHz | | Carrier frequency |
| range_accuracy | `float32` | m | | Range accuracy estimate |
## Enums
### ALT_TYPE {#ALT_TYPE}
| Name | Type | Value | Description |
| ------------------------------------------- | ------- | ----- | ------------------------------------ |
| <a id="#ALT_TYPE_WGS84"></a> ALT_TYPE_WGS84 | `uint8` | 0 | Altitude above WGS84 ellipsoid |
| <a id="#ALT_TYPE_MSL"></a> ALT_TYPE_MSL | `uint8` | 1 | Altitude above Mean Sea Level (AMSL) |
## Source Message
[Source file (GitHub)](https://github.com/PX4/PX4-Autopilot/blob/main/msg/RangingBeacon.msg)
::: details Click here to see original file
```c
# Ranging beacon measurement data (e.g. LoRa, UWB)
uint64 timestamp # [us] time since system start
uint64 timestamp_sample # [us] the timestamp of the raw data
uint8 beacon_id
float32 range # [m] Range measurement
float64 lat # [deg] Latitude
float64 lon # [deg] Longitude
float32 alt # [m] Beacon altitude (frame defined in alt_type)
uint8 alt_type # [@enum ALT_TYPE] Altitude frame for alt field
uint8 ALT_TYPE_WGS84 = 0 # Altitude above WGS84 ellipsoid
uint8 ALT_TYPE_MSL = 1 # Altitude above Mean Sea Level (AMSL)
float32 hacc # [m] Groundbeacon horizontal accuracy
float32 vacc # [m] Groundbeacon vertical accuracy
uint8 sequence_nr
uint8 status
uint16 carrier_freq # [MHz] Carrier frequency
float32 range_accuracy # [m] Range accuracy estimate
# TOPICS ranging_beacon
```
:::
+2 -2
View File
@@ -15,7 +15,7 @@ pageClass: is-wide-page
| is_evaluation_pending | `bool` | | | flag if the RTL point needs reevaluation (e.g. new safe points available, but need loading). |
| has_vtol_approach | `bool` | | | flag if approaches are defined for current RTL_TYPE parameter setting |
| rtl_type | `uint8` | | | Type of RTL chosen |
| safe_point_index | `uint8` | | | index of the chosen safe point, if in RTL_STATUS_TYPE_DIRECT_SAFE_POINT mode |
| safe_point_index | `uint8` | | | index of the chosen safe point, UINT8_MAX if no rally point was chosen |
## Constants
@@ -42,7 +42,7 @@ bool is_evaluation_pending # flag if the RTL point needs reevaluation (e.
bool has_vtol_approach # flag if approaches are defined for current RTL_TYPE parameter setting
uint8 rtl_type # Type of RTL chosen
uint8 safe_point_index # index of the chosen safe point, if in RTL_STATUS_TYPE_DIRECT_SAFE_POINT mode
uint8 safe_point_index # index of the chosen safe point, UINT8_MAX if no rally point was chosen
uint8 RTL_STATUS_TYPE_NONE=0 # pending if evaluation can't pe performed currently e.g. when it is still loading the safe points
uint8 RTL_STATUS_TYPE_DIRECT_SAFE_POINT=1 # chosen to directly go to a safe point or home position
+1
View File
@@ -192,6 +192,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [QshellReq](QshellReq.md)
- [QshellRetval](QshellRetval.md)
- [RadioStatus](RadioStatus.md)
- [RangingBeacon](RangingBeacon.md) — Ranging beacon measurement data (e.g. LoRa, UWB).
- [RateCtrlStatus](RateCtrlStatus.md)
- [RcChannels](RcChannels.md)
- [RcParameterMap](RcParameterMap.md)
+1 -1
View File
@@ -13,7 +13,7 @@ This topic shows how to connect and configure DShot ESCs.
## Supported ESC
[ESCs & Motors > Supported ESCs](../peripherals/esc_motors#supported-esc) has a list of supported ESC (check "Protocols" column for DShot ESC).
[ESCs & Motors > Supported ESCs](../peripherals/esc_motors.md#supported-esc) has a list of supported ESC (check "Protocols" column for DShot ESC).
## Wiring/Connections {#wiring}
+95 -28
View File
@@ -22,36 +22,31 @@ jMAVSim can also be used for HITL Simulation ([as shown here](../simulation/hitl
## Installation
jMAVSim setup is included in our [standard build instructions](../dev_setup/dev_env.md) for Ubuntu Linux and Windows.
Follow the instructions below to install jMAVSim on macOS.
jMAVSim requires JDK 17 or later.
On Ubuntu and Windows, the [standard development environment setup](../dev_setup/dev_env.md) scripts install all required dependencies including Java.
On macOS, you need to install Java manually as shown below.
### macOS
To setup the environment for [jMAVSim](../sim_jmavsim/index.md) simulation:
jMAVSim requires OpenJDK 17 or later.
Install it via Homebrew:
1. Install a recent version of Java (e.g. Java 15).
You can download [Java 15 (or later) from Oracle](https://www.oracle.com/java/technologies/downloads/?er=221886) or use [Eclipse Temurin](https://adoptium.net):
```sh
brew install openjdk@17
```
```sh
brew install --cask temurin
```
Homebrew installs OpenJDK but does not link it into your `PATH`, so you need to set `JAVA_HOME` for jMAVSim to find it.
Add this to your shell profile (e.g. `~/.zshrc`):
1. Install jMAVSim:
```sh
brew install px4-sim-jmavsim
```
:::warning
PX4 v1.11 and beyond require at least JDK 15 for jMAVSim simulation.
For earlier versions, macOS users might see the error `Exception in thread "main" java.lang.UnsupportedClassVersionError:`.
You can find the fix in the [jMAVSim with SITL > Troubleshooting](../sim_jmavsim/index.md#troubleshooting)).
:::
```sh
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
```
## Simulation Environment
Software in the Loop Simulation runs the complete system on the host machine and simulates the autopilot. It connects via local network to the simulator. The setup looks like this:
Software in the Loop Simulation runs the complete system on the host machine and simulates the autopilot.
It connects via local network to the simulator.
The setup looks like this:
[![Mermaid graph: SITL Simulator](https://mermaid.ink/img/eyJjb2RlIjoiZ3JhcGggTFI7XG4gIFNpbXVsYXRvci0tPk1BVkxpbms7XG4gIE1BVkxpbmstLT5TSVRMOyIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9)](https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggTFI7XG4gIFNpbXVsYXRvci0tPk1BVkxpbms7XG4gIE1BVkxpbmstLT5TSVRMOyIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9)
@@ -94,7 +89,8 @@ It will also bring up a window showing a 3D view of the [jMAVSim](https://github
## Taking it to the Sky
The system will start printing status information. You will be able to start flying once you have a position lock (shortly after the console displays the message: _EKF commencing GPS fusion_).
The system will start printing status information.
You will be able to start flying once you have a position lock (shortly after the console displays the message: _EKF commencing GPS fusion_).
To takeoff enter the following into the console:
@@ -196,8 +192,8 @@ Lockstep makes it possible to [change the simulation speed](#change-simulation-s
The sequence of steps for lockstep are:
1. The simulation sends a sensor message [HIL_SENSOR](https://mavlink.io/en/messages/common.html#HIL_SENSOR) including a timestamp `time_usec` to update the sensor state and time of PX4.
1. PX4 receives this and does one iteration of state estimation, controls, etc. and eventually sends an actuator message [HIL_ACTUATOR_CONTROLS](https://mavlink.io/en/messages/common.html#HIL_ACTUATOR_CONTROLS).
1. The simulation waits until it receives the actuator/motor message, then simulates the physics and calculates the next sensor message to send to PX4 again.
2. PX4 receives this and does one iteration of state estimation, controls, etc. and eventually sends an actuator message [HIL_ACTUATOR_CONTROLS](https://mavlink.io/en/messages/common.html#HIL_ACTUATOR_CONTROLS).
3. The simulation waits until it receives the actuator/motor message, then simulates the physics and calculates the next sensor message to send to PX4 again.
The system starts with a "freewheeling" period where the simulation sends sensor messages including time and therefore runs PX4 until it has initialized and responds with an actuator message.
@@ -217,11 +213,13 @@ To disable lockstep in:
## Extending and Customizing
To extend or customize the simulation interface, edit the files in the **Tools/jMAVSim** folder. The code can be accessed through the[jMAVSim repository](https://github.com/px4/jMAVSim) on Github.
To extend or customize the simulation interface, edit the files in the **Tools/jMAVSim** folder.
The code can be accessed through the[jMAVSim repository](https://github.com/px4/jMAVSim) on Github.
::: info
The build system enforces the correct submodule to be checked out for all dependencies, including the simulator.
It will not overwrite changes in files in the directory, however, when these changes are committed the submodule needs to be registered in the Firmware repo with the new commit hash. To do so, `git add Tools/jMAVSim` and commit the change.
It will not overwrite changes in files in the directory, however, when these changes are committed the submodule needs to be registered in the Firmware repo with the new commit hash.
To do so, `git add Tools/jMAVSim` and commit the change.
This will update the GIT hash of the simulator.
:::
@@ -234,6 +232,75 @@ The simulation can be [interfaced to ROS](../simulation/ros_interface.md) the sa
- The startup scripts are discussed in [System Startup](../concept/system_startup.md).
- The simulated root file system ("`/`" directory) is created inside the build directory here: `build/px4_sitl_default/rootfs`.
## Display-Only Mode
jMAVSim can run as a display-only renderer for other simulators (like [SIH](../sim_sih/index.md)), with its internal physics disabled.
In this mode, jMAVSim receives vehicle position via MAVLink and only renders the 3D view.
To use jMAVSim as a display for SIH running in SITL:
```sh
# Start SIH first
make px4_sitl_sih sihsim_quadx
# In another terminal, start jMAVSim in display-only mode
./Tools/simulation/jmavsim/jmavsim_run.sh -p 19410 -u -q -o # 19410 is the default SIH display port
```
For SIH running on flight controller hardware:
```sh
./Tools/simulation/jmavsim/jmavsim_run.sh -q -d /dev/ttyACM0 -b 2000000 -o
```
Use `-a` for airplane display or `-t` for tailsitter display.
## Command-Line Reference
The `jmavsim_run.sh` launch script accepts the following flags:
| Flag | Description |
| ------------- | ------------------------------------------------ |
| `-b <rate>` | Serial baud rate (default: 921600) |
| `-d <device>` | Serial device path (e.g., `/dev/ttyACM0`) |
| `-u` | Use UDP connection instead of serial |
| `-i <id>` | Simulated MAVLink system ID |
| `-p <port>` | UDP port (default: 14560) |
| `-q` | No interactive console |
| `-s <port>` | TCP serial port |
| `-r <rate>` | Render rate in Hz |
| `-l` | Enable lockstep |
| `-o` | Display-only mode (disable physics, render only) |
| `-a` | Use airplane model |
| `-t` | Use tailsitter model |
| `HEADLESS=1` | Environment variable: run without GUI window |
## How jMAVSim Works
jMAVSim is a Java-based lightweight simulator that communicates with PX4 via MAVLink HIL (Hardware-In-the-Loop) messages.
In normal mode:
1. PX4 sends actuator commands via [HIL_ACTUATOR_CONTROLS](https://mavlink.io/en/messages/common.html#HIL_ACTUATOR_CONTROLS).
2. jMAVSim runs its physics engine to compute the vehicle state.
3. jMAVSim sends sensor data back via [HIL_SENSOR](https://mavlink.io/en/messages/common.html#HIL_SENSOR) and [HIL_GPS](https://mavlink.io/en/messages/common.html#HIL_GPS).
In **display-only mode** (`-o` flag), jMAVSim disables its physics engine and only reads [HIL_STATE_QUATERNION](https://mavlink.io/en/messages/common.html#HIL_STATE_QUATERNION) messages to render the vehicle position.
This allows it to visualize vehicles from other simulators like SIH.
jMAVSim supports [lockstep synchronization](#lockstep) with PX4 (enabled with `-l` flag), ensuring deterministic simulation results.
## Keyboard Shortcuts
Camera modes in the jMAVSim 3D view:
| Key | Camera Mode |
| ------------- | ------------------------------------ |
| **F** | First person (attached to vehicle) |
| **S** | Stationary (fixed position) |
| **G** | Gimbal (follows vehicle orientation) |
| **(default)** | Third person follow |
## Troubleshooting
### java.long.NoClassDefFoundError
@@ -324,8 +391,8 @@ Exception in thread "main" java.lang.UnsupportedClassVersionError: me/drton/jmav
This error is telling you, you need a more recent version of Java in your environment.
Class file version 58 corresponds to jdk14, version 59 to jdk15, version 60 to jdk 16 etc.
To fix it under macOS, we recommend installing OpenJDK through homebrew
To fix it under macOS, install a newer OpenJDK via Homebrew:
```sh
brew install --cask adoptopenjdk16
brew install openjdk@17
```
+170
View File
@@ -0,0 +1,170 @@
# SIH on Flight Controller Hardware
SIH can run directly on flight controller hardware with `SYS_HITL=2`.
This replaces real sensors with simulated data while running on the actual autopilot, useful for testing without propellers.
For a comparison of SIH and HITL on hardware, see [Hardware Simulation](../simulation/hardware.md).
## Firmware Builds with SIH
The SIH module is included in many, but not all, default firmware builds.
This list can change between PX4 releases. Always verify using the method in [Check if SIH is in Firmware](#check-if-sih-is-in-firmware).
The table below lists build targets that include SIH at the time of writing:
| Build Target | Board |
| ------------------------------------ | -------------------------- |
| `px4_fmu-v3_default` | Pixhawk 2 (Cube Black) |
| `px4_fmu-v4_default` | Pixhawk 3 Pro |
| `px4_fmu-v4pro_default` | Pixracer |
| `px4_fmu-v5_default` | Pixhawk 4 |
| `px4_fmu-v5x_default` | Pixhawk 5X |
| `px4_fmu-v6c_default` | Pixhawk 6C |
| `px4_fmu-v6c_raptor` | Pixhawk 6C (Raptor) |
| `px4_fmu-v6x_multicopter` | Pixhawk 6X (multicopter) |
| `auterion_fmu-v6s_default` | Auterion FMU-v6S |
| `auterion_fmu-v6x_default` | Auterion FMU-v6X |
| `holybro_durandal-v1_default` | Holybro Durandal |
| `holybro_kakuteh7_default` | Holybro Kakute H7 |
| `holybro_kakuteh7v2_default` | Holybro Kakute H7 V2 |
| `holybro_pix32v5_default` | Holybro Pix32 V5 |
| `cuav_nora_default` | CUAV Nora |
| `cuav_x7pro_default` | CUAV X7 Pro |
| `cuav_x25-evo_default` | CUAV X25 EVO |
| `cuav_x25-super_default` | CUAV X25 Super |
| `cubepilot_cubeyellow_default` | CubePilot Cube Yellow |
| `mro_pixracerpro_default` | MRO PixRacer Pro |
| `mro_x21_default` | MRO X2.1 |
| `mro_ctrl-zero-h7_default` | MRO Ctrl Zero H7 |
| `mro_ctrl-zero-h7-oem_default` | MRO Ctrl Zero H7 OEM |
| `mro_ctrl-zero-f7_default` | MRO Ctrl Zero F7 |
| `mro_ctrl-zero-f7-oem_default` | MRO Ctrl Zero F7 OEM |
| `mro_ctrl-zero-classic_default` | MRO Ctrl Zero Classic |
| `3dr_ctrl-zero-h7-oem-revg_default` | 3DR Ctrl Zero H7 OEM RevG |
| `modalai_fc-v1_default` | ModalAI FC V1 |
| `nxp_fmuk66-v3_default` | NXP FMUK66-V3 |
| `nxp_fmuk66-e_default` | NXP FMUK66-E |
| `radiolink_PIX6_default` | Radiolink PIX6 |
| `siyi_n7_default` | SIYI N7 |
| `sky-drones_smartap-airlink_default` | Sky-Drones SmartAP Airlink |
| `uvify_core_default` | UVify Core |
| `atl_mantis-edu_default` | ATL Mantis EDU |
| `av_x-v1_default` | AV X-V1 |
| `narinfc_h7_default` | NarinFC H7 |
| `thepeach_k1_default` | ThePeach K1 |
| `thepeach_r1_default` | ThePeach R1 |
| `airmind_mindpx-v2_default` | AirMind MindPX V2 |
| `beaglebone_blue_default` | BeagleBone Blue |
| `bluerobotics_navigator_default` | BlueRobotics Navigator |
| `emlid_navio2_default` | Emlid Navio2 |
| `px4_raspberrypi_default` | Raspberry Pi |
| `scumaker_pilotpi_default` | Scumaker PilotPi |
::: info
Some boards (e.g., `px4_fmu-v6x_default`, `cubepilot_cubeorange_default`) do not include SIH in their default build due to flash memory constraints.
You can add SIH to any board -- see [Check if SIH is in Firmware](#check-if-sih-is-in-firmware).
:::
## Requirements
- A flight controller with SIH module included in firmware (see [Firmware Builds with SIH](#firmware-builds-with-sih)).
- USB connection for QGroundControl.
- Optional: jMAVSim for 3D visualization via serial link (see [Visualization](#hardware-visualization)).
## Check if SIH is in Firmware
SIH is included in most default firmware builds. To verify, search for `sih` in the parameter list in QGroundControl. If `SIH_*` parameters are available, the module is included.
To add SIH to a custom build, enable it in the board configuration:
```txt
CONFIG_MODULES_SIMULATION_SIMULATOR_SIH=y
```
## Starting SIH
1. Connect the flight controller to QGroundControl via USB.
2. Set `SYS_HITL` parameter to `2`.
3. Reboot the flight controller.
4. The SIH module starts automatically and provides simulated sensor data.
Once running, the vehicle can be controlled from QGroundControl or an RC controller.
:::warning
To save flash memory on boards with limited storage, SIH can be built with only quadrotor support.
Set `SIH_VEHICLE_TYPE` before building to limit included vehicle models.
:::
## Visualization (Optional) {#hardware-visualization}
If you need a visual aid to see what the simulated vehicle is doing on hardware:
### QGroundControl
Connect the flight controller via USB. QGC shows the vehicle on the map view with attitude, position, and telemetry, the same as a real flight.
### jMAVSim (3D Display-Only)
jMAVSim can render a 3D view of the vehicle over a serial connection. No physics are simulated in jMAVSim -- it is display-only.
```sh
./Tools/simulation/jmavsim/jmavsim_run.sh -q -d /dev/ttyACM0 -b 2000000 -o
```
Where `/dev/ttyACM0` is the serial device for the flight controller.
On macOS, this is typically `/dev/tty.usbmodem*`.
## Controlling Actuators
:::warning
If you want to control throttling actuators in SIH, make sure to remove propellers for safety.
:::
In some scenarios, it may be useful to control an actuator while running SIH on hardware. For example, you might want to verify that winches or grippers are functioning correctly by checking the servo responses.
**To enable actuator control in SIH:**
1. Configure PWM parameters in the airframe file:
Ensure your airframe file includes the necessary parameters to map PWM outputs to the correct channels.
For example, if a servo is connected to MAIN 3 and you want to map it to AUX1 on your RC, use the following command:
`param set-default PWM_MAIN_FUNC3 407`
You can find a full list of available values for `PWM_MAIN_FUNCn` [here](../advanced_config/parameter_reference.md#PWM_MAIN_FUNC1). In this case, `407` maps the MAIN 3 output to AUX1 on the RC.
Alternatively, you can use the [`PWM_AUX_FUNCn`](../advanced_config/parameter_reference.md#PWM_AUX_FUNC1) parameters.
You may also configure the output as desired:
- Disarmed PWM: ([`PWM_MAIN_DISn`](../advanced_config/parameter_reference.md#PWM_MAIN_DIS1) / [`PWM_AUX_DIS1`](../advanced_config/parameter_reference.md#PWM_AUX_DIS1))
- Minimum PWM ([`PWM_MAIN_MINn`](../advanced_config/parameter_reference.md#PWM_MAIN_MIN1) / [`PWM_AUX_MINn`](../advanced_config/parameter_reference.md#PWM_AUX_MIN1))
- Maximum PWM ([`PWM_MAIN_MAXn`](../advanced_config/parameter_reference.md#PWM_MAIN_MAX1) / [`PWM_AUX_MAXn`](../advanced_config/parameter_reference.md#PWM_AUX_MAX1))
2. Manually start the PWM output driver
For safety, the PWM driver is not started automatically in SIH. To enable it, run the following command in the MAVLink shell:
```sh
pwm_out start
```
**And to disable it again:**
```sh
pwm_out stop
```
## Adding New Airframes (FC)
Airframe configuration for SIH on a flight controller differs from SITL in a few ways:
- Airframe file goes in `ROMFS/px4fmu_common/init.d/airframes` and follows the naming template `${ID}_${model_name}.hil`, where `ID` is the `SYS_AUTOSTART_ID` used to select the airframe, and `model_name` is the airframe model name.
- Add the model name in `ROMFS/px4fmu_common/init.d/airframes/CMakeLists.txt` to generate a corresponding make target.
- Actuators are configured with `HIL_ACT_FUNC*` parameters (not the usual `PWM_MAIN_FUNC*` parameters).
This is to avoid using the real actuator outputs in SIH.
Similarly, the bitfield for inverting individual actuator output ranges is `HIL_ACT_REV`, rather than `PWM_MAIN_REV`.
For general airframe setup (SIH parameters, EKF2 tuning), see [Adding New Airframes](index.md#adding-new-airframes) on the main SIH page.
For examples, see the `.hil` airframes in [ROMFS/px4fmu_common/init.d/airframes](https://github.com/PX4/PX4-Autopilot/tree/main/ROMFS/px4fmu_common/init.d/airframes).

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