Compare commits

..

81 Commits

Author SHA1 Message Date
Daniel Agar 94cb201279 drivers/gps: warn if gps_inject_data publications have been missed 2025-11-10 00:55:16 -05:00
Daniel Agar 216fd858e8 drivers/gps: prioritize non-blocking reads over injection (#25535) 2025-11-10 00:55:16 -05:00
Jacob Dahl 399512571b platform: serial: add bytesAvailable() function 2025-11-10 00:55:16 -05:00
Matthew Berk 42dccca8fc flight_modes_fw/return.md: remove warning about now-fixed bug in mission RTLs in FW 2025-11-03 21:26:46 -09:00
Matthew Berk 6b5cfcce70 [Backport 1.16] Navigator: Fix mission RTL for fixed-wing by setting previous waypoint correctly(#25861)
This aligns setActiveMissionItems() in rtl_direct_mission_land.cpp and in rtl_mission_fast.cpp with what was already in mission.cpp. It probably was on oversight when the RTL restructure happened. The FW landing requires the previous waypoint to be correctly set, that's why it was only noticeable there.

* Fix position setpoint update logic in Mission RTL

Currently, when proceeding to the landing point the previous setpoint is not updated, which results in an unexpected and off course landing pattern in fixed wing. (see #25436)

* Change to work more like `mission.cpp`

* Fix rtl_direct_misssion_land formatting for style guide

* rtl_mission_fast: fix FW landing by setting previous wp in landing

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

---------

Signed-off-by: Silvan <silvan@auterion.com>
Co-authored-by: Silvan <silvan@auterion.com>
2025-11-03 21:34:27 +01:00
Jacob Dahl 06ec43629a mission: delay until: mark next setpoint invalid
Fixes bug with the NAV_CMD_DELAY where the copter would "pace" back and forth while waiting at the delay waypoint
2025-10-29 14:12:31 -08:00
Jacob Dahl 162b7d6372 serial: nuttx: revert tcdrain back to fsync (#25538)
* serial: nuttx: revert tcdrain back to fsync

* serial: do not print error on EAGAIN

---------

Co-authored-by: Alexander Lerach <alexander@auterion.com>
2025-10-29 12:42:06 -04:00
airpixel-cz 5141b40e79 mavlink: parameters: fix camera and cannode param message routing 2025-10-29 05:02:00 -08:00
Luka Filipović f3979c0fcf mission_base: on mission end, set loiter position from previous position type setpoint 2025-10-15 17:04:43 -04:00
Jacob Dahl 150dd0bff0 flight task auto: fix offtrack mission landing bug
During a mission the last waypoint is often a LAND. If the previous waypoint is not directly above the land waypoint the offtrack calculation is incorrect. This regression was introduced when the offtrack calculation switched from 2D to 3D.
2025-10-15 17:03:14 -04:00
Ramon Roche 09eda9ed3f ci: pull emscripten v4.0.15 to avoid c++17 errors (#25739)
https://github.com/emscripten-core/emscripten/issues/24850

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-10-15 12:26:27 -04:00
Peter van der Perk b4aeee5099 fmu-v6xrt: Enable lis2dml and bmm350 magnetometer 2025-10-15 11:15:46 -04:00
Peter van der Perk 4c02f799aa fmu-v6xrt: Add V6XRT001 and V6XRT002 sensor set 2025-10-15 11:15:46 -04:00
Hamish Willee 762a4189c5 [v1.16 backport] Enable clean URLs in VitePress config (#25759)
* [v1.16 backport] Enable clean URLs in VitePress config

* Remove the front page warning that only belongs on main
2025-10-14 16:51:14 -08:00
Liu1 9f27676c55 cuav_7-nano:use new sensors (#25098) (#25546) 2025-10-13 20:58:59 -08:00
Jacob Dahl 089887f232 mavlink: add message spacing for AVAILABLE_MODES, for low bandwidth (#25662)
* mavlink: add message spacing for AVAILABLE_MODES, for low bandwidth links

* calculate delay based on rate

* fixed transmit time calc & not delay single mode send



---------

Co-authored-by: Alexander Lerach <alexander@auterion.com>
Co-authored-by: bkueng <beat-kueng@gmx.net>
2025-10-01 13:25:27 -08:00
Jacob Dahl 2574e03cb2 uavcan: esc: init msg to avoid publishing random values (#25656) 2025-10-01 13:24:30 -08:00
Hamish Willee 2cbfe76308 AWS docs deployment - add back paths revert runner (#25690)
* AWS docs deployment - add back paths rever t runner

* touch doc
2025-10-01 15:27:41 +10:00
Hamish Willee f2b630256a AWS docs deployment - revert runs-on from ubuntu for test (#25689) 2025-10-01 15:04:03 +10:00
Hamish Willee 7008112da8 Update GitHub Actions output setting syntax to use envfile (#25687) 2025-10-01 14:28:50 +10:00
Hamish Willee 1aa783dc8b Change runner to ubuntu-latest for deployment (#25686)
* Change runner to ubuntu-latest for deployment

* Add actions permission to docs deployment workflow
2025-10-01 13:48:25 +10:00
Ramon Roche 81d97cc81d docs: fix deploy variables (#25685)
* ci: docs try again

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

* ci: try to fix docs deploy syntax

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

* ci: test for main and release/1.16

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

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-10-01 12:30:51 +10:00
Ramon Roche 12601ac1c4 ci: docs deploy branchname for build step (#25684)
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-10-01 12:08:43 +10:00
Hamish Willee c3b5a83d3e Restore to nearly working 2025-10-01 11:13:44 +10:00
Hamish Willee 767a765ddd Trigger v1.16 docs build 3 (#25682) 2025-10-01 11:05:06 +10:00
Hamish Willee 939ff4002d Update AWS deployment workflow for documentation 2025-10-01 11:01:48 +10:00
Hamish Willee 777dbe2926 Refactor AWS docs deployment workflow 2025-10-01 10:57:40 +10:00
Hamish Willee 835dac80c6 Trigger v1.16 docs build (#25681)
Removed an unnecessary line break in the index guide.
2025-10-01 10:49:54 +10:00
Hamish Willee 80f163760e Log BRANCH_NAME during VitePress build step 2025-10-01 10:38:42 +10:00
Hamish Willee 150757c43b Add debug step for manual workflow runs
Added a debug step to print environment variables during manual runs.
2025-10-01 10:31:09 +10:00
Hamish Willee a03386316f Fix up v1.16 docs version. Trigger docs build. Undo deploy by default to github (#25679) 2025-10-01 09:27:58 +10:00
Hamish Willee 0cc68650e9 AWS docs deploy workflow - modify release branch to same form (#25678)
Added a step to derive the branch name for deployment.
2025-10-01 08:25:02 +10:00
Ramon Roche ac5ed50b37 [backport] macos ci fixes for v1.16 (#25672)
* ci: lockdown gcc v9 for macos

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

* pxh: do not use variable sized array on the stack

This is a compiler-specific extension

* ci: macos build on older gcc

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

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2025-09-30 13:49:26 -08:00
Jacob Dahl 1c181fa8ec disable CONFIG_MODULES_VTOL_ATT_CONTROL on encrypted_logs target 2025-09-28 11:34:07 -06:00
Alex Klimaj 72d99c7214 [backport] boards: ark_fpv add vtol att control 2025-09-28 11:34:07 -06:00
Hamish Willee 23c49a2095 Fix formatting to trigger v1.16 release build for testing (#25643) 2025-09-26 08:44:34 +10:00
Hamish Willee 575514e6a1 Docs deploy AWS to v1.16 branch (#25641) 2025-09-26 07:50:27 +10:00
Hamish Willee 69bea3a3af [Docs] PX4 v1.16 Add warning for RTL mode issues in return.md (#25623)
* [Docs] PX4 v1.16 Add warning for RTL mode issues in return.md

Added a warning about known issues with RTL mode during fixed-wing approaches and landings.

* Apply suggestion from @hamishwillee

* Apply suggestion from @hamishwillee
2025-09-26 06:41:42 +10:00
Daniel Agar 5d6d973549 commander: accel cal rotate offsets and scales from body frame back into sensor frame before saving (#25626) (#25639)
- fixes https://github.com/PX4/PX4-Autopilot/issues/25606

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-09-25 10:33:14 -08:00
Hamish Willee 26cb1aafb3 [v1.16] Add relnote etc 2025-08-07 15:04:20 +10:00
Eric Katzfey 21c3732e09 VOXL2: Updated startup script to patch EKF2_EV_CTRL set default value issue 2025-08-06 10:14:14 -07:00
Sandesh Sharma 61079bd08b fix: let UXRCE DDS agent IP to be set via parameter in SITL (#25231)
* Read XRCE_DDS IP from ENV

* just remove the -h flag from the launch command

* add 127.0.0.1 as default IP

* add default value for IP
2025-08-06 08:20:43 -07:00
Ramon Roche 6ea3539157 [backport] v1.16 fix gazebo install on ROS integration tests (#25344)
* ci: update rosdistro apt keys (#25060)

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

* ci: use release/1.16 branch for px4-ros2-interface-lib integration tests

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
2025-08-05 14:54:48 -08:00
Vasily 7fc5393afc Update px4-rc.gzsim. Fix gz_world checking for PX4_GZ_STANDALONE=1 mode. Priority of gz_world (really running) over PX4_GZ_WORLD (#25346) 2025-08-01 01:14:09 -08:00
Mahima Yoga 740521ae08 MC PositionControl: Add timeout for invalid TrajectorySetpoint (#25283) (#25341)
* MulticopterPositionControl: Add timeout before triggering emergency setpoint on invalid TrajectorySetpoint

* Apply suggestions from code review



* Cleanup & address review comments

* Safegaurd against using old setpoint if states aren't valid anymore

---------

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-07-30 10:21:17 -08:00
PX4BuildBot aa745f2949 [1.16 backport] MAV_CMD_DO_SET_MODE - add support 2025-07-30 13:36:14 +10:00
Jacob Dahl 0294b608d3 [BACKPORT 1.16] ark: fpv: enable PAYLOAD_DELIVERER (#25323)
* payload deliverer: remove PD_GRIPPER_EN as unnecessary, reduce gripper timeout to 1s

* ark: fpv: enable payload deliverer module
2025-07-28 14:13:00 -06:00
Jacob Dahl 2471afd423 payload deliverer: remove PD_GRIPPER_EN as unnecessary, reduce gripper timeout to 1s 2025-07-28 12:08:15 -08:00
Jacob Dahl aab5ed8e0d ark: v6x: enable payload deliverer 2025-07-28 12:08:15 -08:00
Jacob Dahl 2902bea299 ark: v6x: encrypted: remove FW and VTOL modules to save flash (#25320) 2025-07-28 13:46:31 -06:00
Jacob Dahl 171d2c98ef ark_fpv: flash savings: remove FW and VTOL from encrypted_logs.px4board (#25321) 2025-07-28 11:45:06 -08:00
Matthias Grob af99ebce81 commander failsafe: never override user intended termination + unit test 2025-07-28 13:38:57 +02:00
Jacob Dahl b67c65bfe6 dshot: fix bidirectional dshot stream sharing (#24996)
Freeing the DMA stream in the hrt callback causes other peripherals on that DMA controller to lock up (namely GPS). Moving the free back into thread context, right before allocation, solves the problem
2025-07-09 12:19:24 -06:00
Jacob Dahl e3fecd96d5 dshot: fix scaling (#25001) 2025-07-09 12:19:24 -06:00
Jacob Dahl f244b4835b dshot: add perf counter for hrt callback (15us avg) (#24976) 2025-07-09 12:19:24 -06:00
Jacob Dahl 4858a20dfa ark_fpv: cleanup board_dma_map.h (#24975) 2025-07-09 12:19:24 -06:00
Peter van der Perk 0892108546 msp_osd: Add VTX config, stick commands and arming status
- Adds MSPv1 rx parsing to fetch VTX config
 - Allows to inspect and change VTX channel through CLI
 - Forward MSP_RC for stick commands osd
 - Forward MSP_STATUS for arming status for PIT and LP mode
2025-06-19 09:26:53 -07:00
Beniamino Pozzan 39fbca1d55 fix (msp_ods): clear buffers before writing and adjust sizes (#24951)
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-06-19 09:26:53 -07:00
Michael Smith 7720af113a MSP_OSD Update: Add original battery status msg. (#24872)
Co-authored-by: Michael <mfs3ee@gmail.com>
2025-06-19 09:26:53 -07:00
Li-Tianming bfc2efeea5 MSP_OSD code changes to support OpenIPC, DJI O3/O4 OSD rendering (#24695)
* Change MSP_OSD message content and rendering process

* Finish MSP_OSD battery message construct

* Finish MSP_OSD `display message` construct

	HOL|DSAM|N

* Finish MSP_FC_VARIANT(0x02) message

	BTFL

* Finish MSP_OSD RSSI message
	📶10%

* Finish MSP_OSD GPS message
	🛰 10
	🌐000.000000
	🌐00.000000

* Finish MSP_OSD PITCH ROLL  message
        🔃-10.5
	🔁13.2

* Change struct filed name

* Change OSD message postion

* Finish MSP_OSD PITCH Altitude  message
	🔝15.2

* Finish MSP_OSD distanceToHome  message
	🏠5000

* Add Hide/Show option for ALT and homeDist

* Format the code by `make format`

* Clean up stray text

* Remove other commented out dead code

* Change `sprintf()` to `snprintf()`

* Add msg field comment in `display_message` construct

* Init str buffer to 0, Change refresh rate back to 100ms

* Explicit conversion float to double

---------

Co-authored-by: Li.Tianming <Li.Tianming@example.com>
Co-authored-by: Li.Tianming <Li.Tianming>
2025-06-19 09:26:53 -07:00
Daniel Agar c7e78c92ee drivers/magnetometer: remove Vtrantech VCM1193L from common magnetometer set 2025-06-18 12:46:30 -04:00
Julian Oes d59067021c boards: save flash for KakuteH7-Wing 2025-06-15 16:23:32 -07:00
Julian Oes f6de7222d7 boards: set RC serial for KakuteH7-Wing
This was missed earlier.
2025-06-15 16:23:32 -07:00
Julian Oes 35725384d6 boards: fixup image size of KakuteH7-Wing
We have 1 sector for the bootloader and the last 2 for parameters.
That's to match how ArduPilot has it.
2025-06-15 16:23:32 -07:00
Julian Oes bfcb5ba6ba vscode: add KakuteH7-Wing 2025-06-15 16:23:32 -07:00
Ramon Roche e05f7d8d85 ci: fix wildcard branch detection
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-06-12 13:03:22 -07:00
Beat Küng a150fc05af VehicleStatus.msg: restore VEHICLE_TYPE_* indexes
This was changed in 7cb6464cfb and broke flight review
(https://github.com/PX4/flight_review/issues/310)
2025-06-11 11:25:17 -04:00
Peter van der Perk 8d14ab980a [BACKPORT] Update NuttX
Fixes RT117X OCRAM M7 memory freeze
2025-06-11 11:23:31 -04:00
Matthias Grob ea12400ea3 esc_calibration: simplify the logic and consider battery only connected if there's no message timeout and the connected flag is set 2025-06-04 11:27:19 -04:00
Don Gagne eedd770cbd Fix reporting of connected battery 2025-06-04 11:27:19 -04:00
Matthias Grob 67cf8d3229 uavcan esc: translate temperature field from Kelvin to Celsius 2025-06-04 11:27:19 -04:00
Silvan dfeebe5a94 ControlAllocator: only run allocator on torque updates, not thrust
Signed-off-by: Silvan <silvan@auterion.com>
2025-06-04 11:25:54 -04:00
Silvan dc747b2aa3 ControlAllocator: only use torque, not thrust sp as callback item
Signed-off-by: Silvan <silvan@auterion.com>
2025-06-04 11:25:54 -04:00
Julian Oes 4363c428bf holybro: hard-select CAM1 for now
I don't think there is an easy way to hook this up to RC input at the
moment, so I'm setting it fixed to CAM1 for now.
2025-05-29 06:35:05 +12:00
Julian Oes 7fc1a2a8d6 holybro: fixup Wing system power setup
I don't think we have a way to explicitly detect if BAT1 or BAT2
"bricks" are correct, so we have to assume they are, and rely on the
voltage/current shown.

Additionally, we can now power cycle sensor power.
2025-05-29 06:35:05 +12:00
Julian Oes 661a01f3c2 holybro: match AP flash layout
That way the ArduPilot bootloader works with PX4.
2025-05-29 06:35:05 +12:00
Jacob Dahl 1ed406c41d backport https://github.com/PX4/PX4-Autopilot/pull/24691 2025-05-15 10:51:07 -07:00
Julian Oes b067113365 ina238: actually run it
Without this the driver would not run when started from the
i2c_launcher.
2025-05-15 15:49:39 +12:00
Julian Oes d8323a0887 ina2xx: params require reboot 2025-05-15 15:49:39 +12:00
Julian Oes c75a5af236 ina228/ina238: correctly set ADC range
It turns out that we set the ADC range incorrectly leading to the
measured current being capped at a certain level as the ADC on the
sensor saturates.

Instead, we need to set the range according to the formula given in the
interface datasheet.
2025-05-15 15:49:39 +12:00
Ramon Roche 1e4919d252 [Backport v1.16] Support for Kakute H743-Wing (#24804)
* hrt: Fix PPM input on channel 2

The CCMR1_PPM define for PPM input on channel 2 was incorrectly set to 2,
which was setting bits for channel 1 instead of channel 2. This prevented
PPM input from functioning properly on channel 2.

Changed CCMR1_PPM for channel 2 from 2 to (1 << 8), which correctly
configures the CC2S bits for input capture mode on TI2.

This fixes an issue noted in the existing code comment:
"FIXME! There is an interaction in the CCMR registers that prevents
using Chan 1 as the timer and chan 2 as the PPM"

Tested on STM32H743 with PPM input on PC7 (TIM8_CH2).

* rc_input: enable sharing serial and PPM pin

By setting RC_SERIAL_PORT_SHARED_PPM_PIN_GPIO_RX it is now possible to
use the same pin on the STM32 for PPM input as well as serial input.

* boards: Add support for Holybro KakuteH7-Wing

---------

Co-authored-by: Julian Oes <julian@oes.ch>
2025-05-06 12:23:43 +12:00
2304 changed files with 39242 additions and 52926 deletions
+3
View File
@@ -3,3 +3,6 @@ contact_links:
- name: Support Question
url: https://docs.px4.io/main/en/contribute/support.html#forums-and-chat
about: For questions about using PX4 or related components, please use the discuss forum and discord server
- name: Documentation Issue
url: https://github.com/PX4/PX4-user_guide/issues
about: If you found an issue in documentation, please submit it directly to the docs repository issues
@@ -1,33 +0,0 @@
name: 📑 Documentation Bug report
description: Create a report to help us improve the docs
title: "[Docs] [Bug] "
labels: ["Documentation 📑"]
body:
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of the bug.
placeholder: |
# A PR to fix the bug is often better than adding this issue!
#
# If you can't create a PR please provide the following:
# - What page and/or section has the problem
# - What is the problem - missing information, incorrect information?
# - Suggested fixes, links to corresponding code PRs
# - Any additional context
validations:
required: true
- type: input
attributes:
label: Page URL
description: The URL of the problem page.
validations:
required: false
- type: textarea
attributes:
label: Screenshot / Media
description: Add screenshot / media if you have them
validations:
required: false
-10
View File
@@ -1,10 +0,0 @@
# Labeler configuration file for GitHub Actions
# The action is ./.github/workflows/label.yml
# Docs for the syntax in this file can be found at
# https://github.com/actions/labeler
# Add 'Documentation' label to any changes within 'docs' folder or any subfolders
"Documentation+📑":
- changed-files:
- any-glob-to-any-file: docs/**
+8 -19
View File
@@ -22,10 +22,6 @@ on:
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
group_targets:
name: Scan for Board Targets
@@ -34,6 +30,7 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
tagname: ${{ steps.set-tag.outputs.tagname }}
branchname: ${{ steps.set-branch.outputs.branchname }}
steps:
- uses: actions/checkout@v4
@@ -54,13 +51,7 @@ jobs:
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
- id: set-branch
run: |
echo "branchname=${{
github.event_name == 'pull_request' &&
format('pr-{0}', github.event.pull_request.number) ||
github.head_ref ||
github.ref_name
}}" >> $GITHUB_OUTPUT
run: echo "::set-output name=branchname::${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
- name: Debug Matrix Output
if: runner.debug == '1'
@@ -70,9 +61,9 @@ jobs:
echo "$(./Tools/ci/generate_board_targets_json.py --group --verbose)"
setup:
name: Build Group [${{ matrix.group }}][${{ matrix.arch == 'nuttx' && 'x86' || 'arm64' }}]
name: Build Group [${{ matrix.group }}]
# runs-on: ubuntu-latest
runs-on: [runs-on,"runner=8cpu-linux-${{ matrix.runner }}","image=ubuntu24-full-${{ matrix.runner }}","run-id=${{ github.run_id }}",spot=false]
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
needs: group_targets
strategy:
matrix: ${{ fromJson(needs.group_targets.outputs.matrix) }}
@@ -107,7 +98,7 @@ jobs:
- name: Building [${{ matrix.group }}]
run: |
./Tools/ci/build_all_runner.sh ${{matrix.targets}} ${{matrix.arch}}
./Tools/ci/build_all_runner.sh ${{matrix.targets}}
- name: Arrange Build Artifacts
run: |
@@ -125,7 +116,7 @@ jobs:
artifacts:
name: Upload Artifacts to S3
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
needs: [setup, group_targets]
if: contains(fromJSON('["main", "stable", "beta"]'), needs.group_targets.outputs.branchname)
steps:
@@ -153,12 +144,10 @@ jobs:
release:
name: Create Release and Upload Artifacts
permissions:
contents: write
# runs-on: ubuntu-latest
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
needs: [setup, group_targets]
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
+3 -5
View File
@@ -6,15 +6,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- '.github/**'
jobs:
build:
@@ -43,7 +41,7 @@ jobs:
- name: Building [${{ matrix.check }}]
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
image: px4io/px4-dev-nuttx-focal:2022-08-12
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
+2
View File
@@ -6,11 +6,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
build:
runs-on: ubuntu-latest
+7 -6
View File
@@ -6,19 +6,17 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- '.github/**'
jobs:
build:
runs-on: macos-latest
runs-on: macos-14
strategy:
matrix:
config: [
@@ -34,7 +32,8 @@ jobs:
- uses: actions/checkout@v4
- name: setup
run: ./Tools/setup/macos.sh; ./Tools/setup/macos.sh
run: |
./Tools/setup/macos.sh
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
@@ -42,12 +41,14 @@ jobs:
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v4
with:
path: ~/.ccache
key: macos_${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: macos_${{matrix.config}}-ccache-
- name: setup ccache
run: |
mkdir -p ~/.ccache
+2 -7
View File
@@ -9,18 +9,13 @@ on:
- 'release/**'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
env:
RUNS_IN_DOCKER: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- '.github/**'
jobs:
build_and_test:
+63 -148
View File
@@ -1,3 +1,4 @@
name: Container build
on:
@@ -9,58 +10,45 @@ on:
- 'release/**'
tags:
- 'v*'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/dev_container.yml'
- 'Tools/setup/ubuntu.sh'
- 'Tools/setup/requirements.txt'
- 'Tools/setup/Dockerfile'
- 'Tools/setup/docker-entrypoint.sh'
workflow_dispatch:
inputs:
px4_version:
description: 'Container tag (e.g. v1.16.0)'
required: true
type: string
deploy_to_registry:
description: 'Whether to push built images to the registry'
required: false
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
setup:
name: Set Tags and Variables
permissions:
contents: read
runs-on: [runs-on,"runner=1cpu-linux-x64","image=ubuntu24-full-x64","run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
outputs:
px4_version: ${{ steps.px4_version.outputs.px4_version }}
meta_tags: ${{ steps.meta.outputs.tags }}
meta_labels: ${{ steps.meta.outputs.labels }}
build:
name: Build and Push Container
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
steps:
- uses: runs-on/action@v1
- uses: actions/checkout@v4
with:
fetch-tags: true
submodules: false
fetch-depth: 0
# If manual dispatch, take the userprovided input
- name: Set PX4 Tag Version
id: px4_version
- name: Set PX4 Tag
id: px4-tag
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "px4_version=${{ github.event.inputs.px4_version }}" >> $GITHUB_OUTPUT
else
echo "px4_version=$(git describe --tags --match 'v[0-9]*')" >> $GITHUB_OUTPUT
fi
echo "tag=$(git describe --tags --match 'v[0-9]*')" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
@@ -68,125 +56,52 @@ jobs:
with:
images: |
ghcr.io/PX4/px4-dev
px4io/px4-dev
${{ (github.event_name != 'pull_request') && 'px4io/px4-dev' || '' }}
tags: |
type=raw,enable=true,value=${{ steps.px4_version.outputs.px4_version }},priority=1000
build:
name: Build Container (${{ matrix.arch }})
permissions:
contents: read
packages: write
needs: setup
strategy:
matrix:
include:
- platform: linux/arm64
arch: arm64
runner: arm64
- platform: linux/amd64
arch: amd64
runner: x64
runs-on: [runs-on,"runner=8cpu-linux-${{ matrix.runner }}","image=ubuntu24-full-${{ matrix.runner }}","run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
steps:
- uses: runs-on/action@v1
- uses: actions/checkout@v4
with:
fetch-tags: true
submodules: false
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
type=raw,enable=true,value=${{ steps.px4-tag.outputs.tag }},priority=1000
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
platforms: ${{ matrix.platform }}
- name: Build and Load Container Image
- name: Build and load container image
uses: docker/build-push-action@v6
id: docker
with:
context: Tools/setup
tags: |
ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-${{ matrix.arch }}
px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-${{ matrix.arch }}
labels: ${{ needs.setup.outputs.meta_labels }}
platforms: ${{ matrix.platform }}
load: false
push: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
provenance: false
cache-from: type=gha,version=1
cache-to: type=gha,version=1,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: |
linux/amd64
load: true
push: false
cache-from: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
cache-to: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max
deploy:
name: Deploy To Registry
permissions:
contents: read
packages: write
runs-on: [runs-on,"runner=8cpu-linux-x64","image=ubuntu24-full-x64","run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
needs: [build, setup]
if: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
steps:
- uses: runs-on/action@v1
- uses: actions/checkout@v4
with:
fetch-tags: true
submodules: false
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Verify Images Exist Before Creating Manifest
- name: Get Tag Name
id: tag_name
run: |
docker manifest inspect px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 || echo "⚠️ Warning: No ARM64 image found!"
docker manifest inspect px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64 || echo "⚠️ Warning: No AMD64 image found!"
docker manifest inspect ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 || echo "⚠️ Warning: No ARM64 image found!"
docker manifest inspect ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64 || echo "⚠️ Warning: No AMD64 image found!"
echo "::set-output name=tag_name::$(echo '${{ fromJSON(steps.docker.outputs.metadata)['image.name'] }}' | sed 's/,.*$//')"
- name: Create and Push Multi-Arch Manifest for Docker Hub
run: |
docker manifest create px4io/px4-dev:${{ needs.setup.outputs.px4_version }} \
--amend px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 \
--amend px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64
- name: make quick_check
uses: addnab/docker-run-action@v3
with:
image: ${{ steps.tag_name.outputs.tag_name }}
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
git config --global --add safe.directory /workspace
make px4_sitl_default
make px4_fmu-v6x_default
docker manifest annotate px4io/px4-dev:${{ needs.setup.outputs.px4_version }} px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 --arch arm64
docker manifest annotate px4io/px4-dev:${{ needs.setup.outputs.px4_version }} px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64 --arch amd64
docker manifest push px4io/px4-dev:${{ needs.setup.outputs.px4_version }}
- name: Create and Push Multi-Arch Manifest for GHCR
run: |
docker manifest create ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }} \
--amend ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 \
--amend ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64
docker manifest annotate ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }} ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 --arch arm64
docker manifest annotate ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }} ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64 --arch amd64
docker manifest push ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}
- name: Push container image
uses: docker/build-push-action@v6
with:
context: Tools/setup
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: |
linux/amd64
provenance: mode=max
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
cache-to: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max
-12
View File
@@ -1,18 +1,6 @@
name: Docs - Deploy PX4 User Guide
on:
push:
branches:
- 'main'
- 'release/**'
paths:
- 'docs/en/**'
pull_request:
branches:
- '**'
paths:
- 'docs/en/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
+114
View File
@@ -0,0 +1,114 @@
name: Docs - Deploy PX4 User Guide to AWS
on:
push:
branches:
- "main"
- "release/**"
paths:
- "docs/en/**"
- "docs/zh/**"
- "docs/uk/**"
- "docs/ko/**"
pull_request:
paths:
- "docs/en/**"
- "docs/zh/**"
- "docs/uk/**"
- "docs/ko/**"
permissions:
contents: read
actions: read
id-token: write # for AWS OIDC
concurrency:
group: docs-deploy
cancel-in-progress: false
jobs:
build:
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
outputs:
branchname: ${{ steps.set-branch.outputs.branchname }}
releaseversion: ${{ steps.set-version.outputs.releaseversion }}
steps:
- uses: runs-on/action@v1
- name: Checkout
uses: actions/checkout@v4
- id: set-branch
run: echo "branchname=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- id: set-version
run: |
branch="${{ steps.set-branch.outputs.branchname }}"
if [[ "$branch" == "main" ]]; then
version="main"
else
version="v${branch#release/}"
fi
echo "releaseversion=$version" >> $GITHUB_OUTPUT
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: ./docs/yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile --cwd ./docs
- name: Build with VitePress
working-directory: ./docs
env:
BRANCH_NAME: ${{ steps.set-version.outputs.releaseversion }}
run: |
npm run docs:build_ubuntu
touch .vitepress/dist/.nojekyll
npm run docs:sitemap
- name: Upload artifact
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: px4_docs_build
path: docs/.vitepress/dist/
retention-days: 1
deploy:
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'workflow_dispatch' }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: px4_docs_build
path: ~/_book
- name: Configure AWS from OIDC
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Sanity check AWS credentials
run: aws sts get-caller-identity
- name: Upload HTML with short cache
run: |
aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.releaseversion }}/ \
--delete \
--exclude "*" --include "*.html" \
--cache-control "public, max-age=60"
- name: Upload assets with long cache
run: |
aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build.outputs.releaseversion }}/ \
--delete \
--exclude "*.html" \
--cache-control "public, max-age=86400, immutable"
@@ -6,6 +6,7 @@ on:
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
unit_tests:
@@ -4,6 +4,7 @@ on:
push:
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
unit_tests:
+4 -8
View File
@@ -6,15 +6,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- '.github/**'
jobs:
build:
@@ -29,7 +27,7 @@ jobs:
"failsafe_web",
]
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
image: px4io/px4-dev-nuttx-focal:2022-08-12
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
steps:
- name: Install Node v20.18.0
@@ -41,13 +39,11 @@ jobs:
with:
fetch-depth: 0
- name: Git ownership workaround
run: git config --system --add safe.directory '*'
- name: Install empscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk
cd _emscripten_sdk
git checkout 4.0.15
./emsdk install latest
./emsdk activate latest
+4 -2
View File
@@ -11,11 +11,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
env:
MIN_FLASH_POS_DIFF_FOR_COMMENT: 50
@@ -26,7 +28,7 @@ jobs:
name: Analyzing ${{ matrix.target }}
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
image: px4io/px4-dev-nuttx-focal
strategy:
matrix:
target: [px4_fmu-v5x, px4_fmu-v6x]
@@ -78,7 +80,7 @@ jobs:
id: bloaty-step
with:
bloaty-file-args: ./with-change.elf -- ./before-change.elf
bloaty-additional-args: -d sections,symbols -s vm -n 20
bloaty-additional-args: -d sections,compileunits -s vm -n 20
output-to-summary: true
- name: Generate output
-63
View File
@@ -1,63 +0,0 @@
name: ITCM check
permissions:
contents: read
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_itcm:
name: Checking ${{ matrix.target }}
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
strategy:
fail-fast: false
matrix:
include:
- target: px4_fmu-v5x
scripts: >
boards/px4/fmu-v5x/nuttx-config/scripts/itcm_gen_functions.ld
boards/px4/fmu-v5x/nuttx-config/scripts/itcm_static_functions.ld
- target: px4_fmu-v6xrt
scripts: >
boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_functions_includes.ld
boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_static_functions.ld
- target: nxp_tropic-community
scripts: >
boards/nxp/tropic-community/nuttx-config/scripts/itcm_functions_includes.ld
boards/nxp/tropic-community/nuttx-config/scripts/itcm_static_functions.ld
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Git ownership workaround
run: git config --system --add safe.directory '*'
- name: Build Target
run: make ${{ matrix.target }}
- name: Copy built ELF
run: cp ./build/**/*.elf ./built.elf
- name: Install itcm-check dependencies
run: pip3 install -r Tools/setup/optional-requirements.txt --break-system-packages
- name: Execute the itcm-check
run: python3 Tools/itcm_check.py --elf-file built.elf --script-files ${{ matrix.scripts }}
-21
View File
@@ -1,21 +0,0 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
# The paths are set up in .github/labeler.yml
#
# See: https://github.com/actions/labeler
name: Labeler
on: [pull_request_target]
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+2 -4
View File
@@ -6,15 +6,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- '.github/**'
jobs:
build:
+3 -5
View File
@@ -6,15 +6,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- '.github/**'
jobs:
build:
+3 -5
View File
@@ -6,15 +6,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- '.github/**'
jobs:
build:
@@ -33,7 +31,7 @@ jobs:
- name: Build PX4 and Run Test [${{ matrix.config }}]
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
image: px4io/px4-dev-nuttx-focal:2022-08-12
options: -v ${{ github.workspace }}:/workspace
run: |
cd /workspace
+3 -1
View File
@@ -6,11 +6,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
jobs:
build:
+1 -5
View File
@@ -17,10 +17,6 @@ on:
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: [runs-on,runner=16cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
@@ -89,7 +85,7 @@ jobs:
. /opt/ros/galactic/setup.bash
mkdir -p /opt/px4_ws/src
cd /opt/px4_ws/src
git clone --recursive https://github.com/Auterion/px4-ros2-interface-lib.git
git clone --recursive --branch release/1.16 https://github.com/Auterion/px4-ros2-interface-lib.git
cd ..
# Copy messages to ROS workspace
"${PX4_DIR}/Tools/copy_to_ros_ws.sh" "$(pwd)"
+2 -5
View File
@@ -5,19 +5,16 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
- '.github/**'
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
name: Build and test
+3 -5
View File
@@ -11,15 +11,13 @@ on:
- 'main'
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches:
- '**'
- '**'
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
- '.github/**'
jobs:
build:
-10
View File
@@ -6,11 +6,6 @@ CONFIG:
buildType: RelWithDebInfo
settings:
CONFIG: px4_sitl_default
px4_sitl_spacecraft:
short: px4_sitl_spacecraft
buildType: RelWithDebInfo
settings:
CONFIG: px4_sitl_spacecraft
px4_sitl_nolockstep:
short: px4_sitl_nolockstep
buildType: RelWithDebInfo
@@ -311,11 +306,6 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: holybro_kakuteh7-wing_default
holybro_kakuteh7dualimu_default:
short: holybro_kakuteh7dualimu
buildType: MinSizeRel
settings:
CONFIG: holybro_kakuteh7dualimu_default
matek_h743-slim_default:
short: matek_h743-slim
buildType: MinSizeRel
+2
View File
@@ -426,6 +426,7 @@ if(BUILD_TESTING)
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
endif()
#=============================================================================
# subdirectories
#
@@ -495,6 +496,7 @@ add_custom_target(uorb_graph DEPENDS ${uorb_graph_config})
include(bloaty)
include(doxygen)
include(metadata)
include(package)
File diff suppressed because it is too large Load Diff
+16 -17
View File
@@ -7,34 +7,33 @@ See [the documentation on Maintainers](https://docs.px4.io/main/en/contribute/ma
| Name | Sector | GitHub | Chat | email
|-------------------------|--------|--------|------|----------------
| Lorenz Meier | Founder | [@LorenzMeier](https://github.com/LorenzMeier) | | <lorenz@px4.io>
| Daniel Agar | Architecture | [@dagar](https://github.com/dagar) | daniel_agar | <daniel@agar.ca>
| Beat Küng | Architecture | [@bkueng](https://github.com/bkueng) | beatkueng | <beat-kueng@gmx.net>
| Ramón Roche | CI / Testing | [@mrpollo](https://github.com/mrpollo) | rroche | <rroche@linuxfoundation.org>
| Mathieu Bresciani | State Estimation | [@bresch](https://github.com/bresch) | mbresch |
| Paul Riseborough | State Estimation | [@priseborough](https://github.com/priseborough) | |
| David Sidrane | RTOS / NuttX | [@davids5](https://github.com/davids5) | david_s5 | <David.Sidrane@Nscdg.com>
| Jayoung Lim | Simulation | [@Jaeyoung-Lim](https://github.com/Jaeyoung-Lim) | jaeyounglim. | <jalim@ethz.ch>
| Beniamino Pozzan | ROS 2 | [@beniaminopozzan](https://github.com/beniaminopozzan) | beniaminopozzan | <beniamino.pozzan@gmail.com>
| Matthias Grob | Multirotor | [@MaEtUgR](https://github.com/MaEtUgR) | maetugr |
| Silvan Fuhrer | Fixed-Wing / VTOL | [@sfuhrer](https://github.com/sfuhrer) | sfuhrer |
| Christian Friedrich | Rover | [@chfriedrich98](https://github.com/chfriedrich98) | christian982564 |
| Pedro Roque | Spacecraft | [@Pedro-Roque](https://github.com/Pedro-Roque) | .pedroroque | <padr@kth.se>
| Jacob Dahl | Simulation | [@dakejahl](https://github.com/dakejahl) | dakejahl | <dahl.jakejacob@gmail.com>
| Lorenz Meier | Founder | [LorenzMeier][LorenzMeier] | | <lorenz@px4.io>
| Daniel Agar | Architecture | [dagar][dagar] | daniel_agar | <daniel@agar.ca>
| Beat Küng | Architecture | [bkueng][bkueng] | beatkueng | <beat-kueng@gmx.net>
| Ramón Roche | CI / Testing | [mrpollo][mrpollo] | rroche | <rroche@linuxfoundation.org>
| Mathieu Bresciani | State Estimation | [bresch][bresch] | mbresch |
| Paul Riseborough | State Estimation | [priseborough][priseborough] | |
| David Sidrane | RTOS / NuttX | [davids5][davids5] | david_s5 | <David.Sidrane@Nscdg.com>
| Jayoung Lim | Simulation | [Jaeyoung-Lim][Jaeyoung-Lim] | jaeyounglim. | <jalim@ethz.ch>
| Beniamino Pozzan | ROS 2 | [beniaminopozzan][beniaminopozzan] | beniaminopozzan | <beniamino.pozzan@gmail.com>
| Matthias Grob | Multirotor | [MaEtUgR][MaEtUgR] | maetugr |
| Silvan Fuhrer | Fixed-Wing / VTOL | [sfuhrer][sfuhrer] | sfuhrer |
| Christian Friedrich | Rover | [chfriedrich98][chfriedrich98] | christian982564 |
| Pedro Roque | Spacecraft | [Pedro-Roque][Pedro-Roque] | .pedroroque | <padr@kth.se>
**Documentation Maintainers**
| Name | GitHub | Chat | email
|------|--------|------|----------------------
| Hamish Willee | [@hamishwillee](https://github.com/hamishwillee) | hamishwillee |
| Hamish Willee | [hamishwillee][hamishwillee] | hamishwillee |
**Release Managers**
| Name | GitHub | Chat | email
|------|--------|------|----------------------
| Ramón Roche | [@mrpollo](https://github.com/mrpollo) | rroche | <rroche@linuxfoundation.org>
| Daniel Agar | [@dagar](https://github.com/dagar) | daniel_agar | <daniel@agar.ca>
| Ramón Roche | [mrpollo][mrpollo] | rroche | <rroche@linuxfoundation.org>
| Daniel Agar | [dagar][dagar] | daniel_agar | <daniel@agar.ca>
**Retired Maintainers**
+8 -11
View File
@@ -300,8 +300,6 @@ uorb_graphs:
@$(MAKE) --no-print-directory px4_fmu-v2_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v4_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v5_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v5x_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v6x_default uorb_graph
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
px4io_update:
@@ -365,7 +363,7 @@ coverity_scan: px4_sitl_default
# Documentation
# --------------------------------------------------------------------
.PHONY: parameters_metadata airframe_metadata module_documentation extract_events px4_metadata
.PHONY: parameters_metadata airframe_metadata module_documentation extract_events px4_metadata doxygen
parameters_metadata:
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters ver_gen
@@ -381,6 +379,12 @@ extract_events:
px4_metadata: parameters_metadata airframe_metadata module_documentation extract_events
doxygen:
@mkdir -p "$(SRC_DIR)"/build/doxygen
@cd "$(SRC_DIR)"/build/doxygen && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DBUILD_DOXYGEN=ON
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/doxygen
@touch "$(SRC_DIR)"/build/doxygen/Documentation/.nojekyll
# Style
# --------------------------------------------------------------------
.PHONY: check_format format check_newlines
@@ -410,18 +414,11 @@ tests:
$(eval UBSAN_OPTIONS += color=always)
$(call cmake-build,px4_sitl_test)
# work around lcov bug #316; remove once lcov is fixed (see https://github.com/linux-test-project/lcov/issues/316)
LCOBUG = --ignore-errors mismatch
tests_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory tests PX4_CMAKE_BUILD_TYPE=Coverage
@mkdir -p coverage
@lcov --directory build/px4_sitl_test \
--base-directory build/px4_sitl_test \
--gcov-tool gcov \
--capture \
$(LCOBUG) \
-o coverage/lcov.info
@lcov --directory build/px4_sitl_test --base-directory build/px4_sitl_test --gcov-tool gcov --capture -o coverage/lcov.info
rostest: px4_sitl_default
+2 -23
View File
@@ -216,33 +216,12 @@ foreach(board_extra_file ${OPTIONAL_BOARD_EXTRAS})
if(CONFIG_SYSTEMCMDS_BL_UPDATE)
# generate rc.board_bootloader_upgrade
set(BOARD_FIRMWARE_BIN "${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_bootloader.bin")
message(STATUS "ROMFS: Adding platforms/nuttx/init/rc.board_bootloader_upgrade -> /etc/init.d/rc.board_bootloader_upgrade")
# Generate the file using configure_file at configure time to a temporary location
set(bootloader_upgrade_tmp ${CMAKE_CURRENT_BINARY_DIR}/rc.board_bootloader_upgrade.tmp)
configure_file(${PX4_SOURCE_DIR}/platforms/nuttx/init/rc.board_bootloader_upgrade.in ${bootloader_upgrade_tmp} @ONLY)
# Then copy it at build time with proper dependencies
add_custom_command(
OUTPUT
${romfs_gen_root_dir}/init.d/rc.board_bootloader_upgrade
rc.board_bootloader_upgrade.stamp
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${bootloader_upgrade_tmp} ${romfs_gen_root_dir}/init.d/rc.board_bootloader_upgrade
COMMAND ${CMAKE_COMMAND} -E touch rc.board_bootloader_upgrade.stamp
DEPENDS
${bootloader_upgrade_tmp}
${PX4_SOURCE_DIR}/platforms/nuttx/init/rc.board_bootloader_upgrade.in
romfs_copy.stamp
COMMENT "ROMFS: copying rc.board_bootloader_upgrade"
)
list(APPEND extras_dependencies
rc.board_bootloader_upgrade.stamp
)
configure_file(${PX4_SOURCE_DIR}/platforms/nuttx/init/rc.board_bootloader_upgrade.in ${romfs_gen_root_dir}/init.d/rc.board_bootloader_upgrade @ONLY)
else()
# remove bootloader from extras
list(REMOVE_ITEM OPTIONAL_BOARD_EXTRAS ${board_extra_file})
endif()
endif()
endforeach()
@@ -46,22 +46,3 @@ param set-default PWM_MAIN_FUNC3 203
param set-default PWM_MAIN_FUNC4 101
param set-default EKF2_GPS_DELAY 0
# Rate controllers
param set-default FW_RR_P 0.0500
param set-default FW_RR_I 2.0000
param set-default FW_RR_D 0.0000
param set-default FW_RR_FF 0.0000
param set-default FW_RR_IMAX 1.0000
param set-default FW_PR_P 0.0800
param set-default FW_PR_I 2.5000
param set-default FW_PR_D 0.0000
param set-default FW_PR_FF 0.0000
param set-default FW_PR_IMAX 1.0000
param set-default FW_YR_P 0.0500
param set-default FW_YR_I 3.0000
param set-default FW_YR_D 0.0000
param set-default FW_YR_FF 0.0000
param set-default FW_YR_IMAX 1.0000
@@ -1,47 +0,0 @@
#!/bin/sh
#
# @name HexarotorX SITL for SIH
#
# @type Hexarotor x
# @class Copter
#
# @maintainer Matthias Grob <maetugr@gmail.com>
#
. ${R}etc/init.d/rc.mc_defaults
PX4_SIMULATOR=${PX4_SIMULATOR:=sihsim}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=hex}
param set-default SENS_EN_GPSSIM 1
param set-default SENS_EN_BAROSIM 1
param set-default SENS_EN_MAGSIM 1
param set SIH_VEHICLE_TYPE 4
# Symmetric hexacopter X clockwise motor numbering
param set-default CA_ROTOR_COUNT 6
param set-default CA_ROTOR0_PX 0.866
param set-default CA_ROTOR0_PY 0.5
param set-default CA_ROTOR1_PX 0
param set-default CA_ROTOR1_PY 1
param set-default CA_ROTOR1_KM -0.05
param set-default CA_ROTOR2_PX -0.866
param set-default CA_ROTOR2_PY 0.5
param set-default CA_ROTOR3_PX -0.866
param set-default CA_ROTOR3_PY -0.5
param set-default CA_ROTOR3_KM -0.05
param set-default CA_ROTOR4_PX 0
param set-default CA_ROTOR4_PY -1
param set-default CA_ROTOR5_PX 0.866
param set-default CA_ROTOR5_PY -0.5
param set-default CA_ROTOR5_KM -0.05
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 105
param set-default PWM_MAIN_FUNC6 106
param set-default EKF2_GPS_DELAY 0
@@ -15,6 +15,7 @@ param set-default NAV_ACC_RAD 0.5
# Differential Parameters
param set-default RD_WHEEL_TRACK 0.3
param set-default RD_MAX_THR_YAW_R 1.5
param set-default RD_TRANS_DRV_TRN 0.349066
param set-default RD_TRANS_TRN_DRV 0.174533
@@ -30,16 +31,14 @@ param set-default RO_YAW_RATE_P 0.25
param set-default RO_YAW_RATE_LIM 180
param set-default RO_YAW_ACCEL_LIM 120
param set-default RO_YAW_DECEL_LIM 1000
param set-default RO_YAW_RATE_CORR 1.43
# Rover Attitude Control Parameters
param set-default RO_YAW_P 5
# Rover Velocity Control Parameters
# Rover Position Control Parameters
param set-default RO_SPEED_LIM 2
param set-default RO_SPEED_I 0.01
param set-default RO_SPEED_P 0.1
param set-default RO_SPEED_RED 1
# Pure Pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
@@ -1,68 +1,51 @@
#!/bin/sh
# @name Gazebo - Zero Turn Lawnmower
# @name Gazebo lawnmower
# @type Rover
# @class Rover
. ${R}etc/init.d/rc.rover_differential_defaults
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=lawn}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=lawnmower}
param set-default SIM_GZ_EN 1 # Gazebo bridge
param set-default NAV_ACC_RAD 0.5
# We can arm and drive in manual mode when it slides and GPS check fails:
param set-default COM_ARM_WO_GPS 1
# Differential Parameters
# Rover parameters
param set-default RD_WHEEL_TRACK 0.9
param set-default RD_YAW_RATE_I 0.1
param set-default RD_YAW_RATE_P 5
param set-default RD_MAX_ACCEL 1
param set-default RD_MAX_JERK 3
param set-default RD_MAX_SPEED 8
param set-default RD_YAW_P 5
param set-default RD_YAW_I 0.1
param set-default RD_MAX_YAW_RATE 30
param set-default RD_TRANS_DRV_TRN 0.349066
param set-default RD_TRANS_TRN_DRV 0.174533
# Rover Control Parameters
param set-default RO_ACCEL_LIM 1.5
param set-default RO_DECEL_LIM 5
param set-default RO_JERK_LIM 15
param set-default RO_MAX_THR_SPEED 2.7
# Rover Rate Control Parameters
param set-default RO_YAW_RATE_I 0.2
param set-default RO_YAW_RATE_P 1.0
param set-default RO_YAW_RATE_LIM 60
param set-default RO_YAW_ACCEL_LIM 50
param set-default RO_YAW_DECEL_LIM 1000
param set-default RO_YAW_RATE_CORR 1.0
# Rover Attitude Control Parameters
param set-default RO_YAW_P 5
# Rover Velocity Control Parameters
param set-default RO_SPEED_LIM 2.1
param set-default RO_SPEED_I 0.01
param set-default RO_SPEED_P 0.1
param set-defatul RO_SPEED_RED 1.0
# Pure pursuit parameters
param set-default PP_LOOKAHD_MAX 30
param set-default PP_LOOKAHD_MIN 2
param set-default PP_LOOKAHD_GAIN 1
param set-default PP_LOOKAHD_MAX 10
param set-default PP_LOOKAHD_MIN 1
# Actuator mapping - set SITL motors/servos output parameters:
# "Motors" - motor channels 0 (Right) and 1 (Left) - via Wheels GZ bridge:
param set-default SIM_GZ_WH_FUNC1 101 # right wheel
param set-default SIM_GZ_WH_MIN1 87
param set-default SIM_GZ_WH_MAX1 113
param set-default SIM_GZ_WH_DIS1 100
param set-default SIM_GZ_WH_FAIL1 100
#param set-default SIM_GZ_WH_MIN1 0
#param set-default SIM_GZ_WH_MAX1 200
#param set-default SIM_GZ_WH_DIS1 100
#param set-default SIM_GZ_WH_FAIL1 100
param set-default SIM_GZ_WH_FUNC2 102 # left wheel
param set-default SIM_GZ_WH_MIN2 87
param set-default SIM_GZ_WH_MAX2 113
param set-default SIM_GZ_WH_DIS2 100
param set-default SIM_GZ_WH_FAIL2 100
#param set-default SIM_GZ_WH_MIN2 0
#param set-default SIM_GZ_WH_MAX2 200
#param set-default SIM_GZ_WH_DIS2 100
#param set-default SIM_GZ_WH_FAIL2 100
param set-default SIM_GZ_WH_REV 0 # no need to reverse any wheels
@@ -30,16 +30,14 @@ param set-default RO_MAX_THR_SPEED 3.1
param set-default RO_YAW_RATE_I 0.1
param set-default RO_YAW_RATE_P 1
param set-default RO_YAW_RATE_LIM 180
param set-default RO_YAW_RATE_CORR 1
# Rover Attitude Control Parameters
param set-default RO_YAW_P 3
# Rover Velocity Control Parameters
# Rover Position Control Parameters
param set-default RO_SPEED_LIM 3
param set-default RO_SPEED_I 0.1
param set-default RO_SPEED_P 1
param set-default RO_SPEED_RED 1
# Pure Pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
@@ -15,6 +15,8 @@ param set-default NAV_ACC_RAD 0.5
# Mecanum Parameters
param set-default RM_WHEEL_TRACK 0.3
param set-default RM_MAX_THR_YAW_R 1.2
param set-default RM_MISS_SPD_GAIN 1
# Rover Control Parameters
param set-default RO_ACCEL_LIM 3
@@ -28,16 +30,14 @@ param set-default RO_YAW_RATE_P 0.1
param set-default RO_YAW_RATE_LIM 120
param set-default RO_YAW_ACCEL_LIM 240
param set-default RO_YAW_DECEL_LIM 1000
param set-default RO_YAW_RATE_CORR 1.75
# Rover Attitude Control Parameters
param set-default RO_YAW_P 5
# Rover Velocity Control Parameters
# Rover Position Control Parameters
param set-default RO_SPEED_LIM 2
param set-default RO_SPEED_I 0.5
param set-default RO_SPEED_P 1
param set-default RO_SPEED_RED 1
# Pure Pursuit parameters
param set-default PP_LOOKAHD_GAIN 0.5
@@ -1,56 +0,0 @@
#!/bin/sh
# @name Generic Differential Rover
# @type Rover
# @class Rover
. ${R}etc/init.d/rc.rover_differential_defaults
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=rover}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=rover_differential}
param set-default SIM_GZ_EN 1 # Gazebo bridge
param set-default NAV_ACC_RAD 0.5
# Differential Parameters
param set-default RD_WHEEL_TRACK 0.6
param set-default RD_TRANS_DRV_TRN 0.785398
param set-default RD_TRANS_TRN_DRV 0.174533
# Rate Control Parameters
param set-default RO_YAW_RATE_I 0.01
param set-default RO_YAW_RATE_P 0.25
param set-default RO_YAW_RATE_LIM 250
param set-default RO_YAW_ACCEL_LIM 400
param set-default RO_YAW_DECEL_LIM 800
param set-default RO_YAW_RATE_CORR 1
# Attitude Control Parameters
param set-default RO_YAW_P 5
# Velocity Control Parameters
param set-default RO_ACCEL_LIM 4
param set-default RO_DECEL_LIM 6
param set-default RO_JERK_LIM 10
param set-default RO_MAX_THR_SPEED 2
param set-default RO_SPEED_LIM 1.8
param set-default RO_SPEED_I 0.01
param set-default RO_SPEED_P 0.01
param set-default RO_SPEED_RED 1
# Pure Pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
param set-default PP_LOOKAHD_MAX 10
param set-default PP_LOOKAHD_MIN 1
# Actuator mapping
param set-default SIM_GZ_WH_FUNC1 101 # right wheel
param set-default SIM_GZ_WH_MIN1 80
param set-default SIM_GZ_WH_MAX1 120
param set-default SIM_GZ_WH_DIS1 100
param set-default SIM_GZ_WH_FUNC2 102 # left wheel
param set-default SIM_GZ_WH_MIN2 80
param set-default SIM_GZ_WH_MAX2 120
param set-default SIM_GZ_WH_DIS2 100
@@ -0,0 +1,155 @@
#!/bin/sh
#
# @name 6DoF Spacecraft Model
#
# @type Freeflyer with 8 thrusters
#
# @maintainer Pedro Roque <padr@kth.se>
#
. ${R}etc/init.d/rc.sc_defaults
param set-default CA_AIRFRAME 15
param set-default MAV_TYPE 99
param set-default CA_THRUSTER_CNT 12
param set-default CA_R_REV 0
# param set-default FW_ARSP_MODE 1
# Auto to be provided by Custom Airframe
param set-default CA_METHOD 0
# disable attitude failure detection
param set-default FD_FAIL_P 0
param set-default FD_FAIL_R 0
# Set proper failsafes
param set-default COM_ACT_FAIL_ACT 0
param set-default COM_LOW_BAT_ACT 0
param set-default NAV_DLL_ACT 0
param set-default GF_ACTION 1
param set-default NAV_RCL_ACT 1
param set-default COM_POSCTL_NAVL 2
# Set thrusters
param set-default CA_THRUSTER0_PX -0.50
param set-default CA_THRUSTER0_PY 0.50
param set-default CA_THRUSTER0_PZ 0.0
param set-default CA_THRUSTER0_CT 0.237
param set-default CA_THRUSTER0_AX 0.0
param set-default CA_THRUSTER0_AY -1.0
param set-default CA_THRUSTER0_AZ 0.0
param set-default CA_THRUSTER1_PX 0.50
param set-default CA_THRUSTER1_PY 0.50
param set-default CA_THRUSTER1_PZ 0.0
param set-default CA_THRUSTER1_CT 0.237
param set-default CA_THRUSTER1_AX 0.0
param set-default CA_THRUSTER1_AY -1.0
param set-default CA_THRUSTER1_AZ 0.0
param set-default CA_THRUSTER2_PX 0.50
param set-default CA_THRUSTER2_PY -0.50
param set-default CA_THRUSTER2_PZ 0.0
param set-default CA_THRUSTER2_CT 0.237
param set-default CA_THRUSTER2_AX 0.0
param set-default CA_THRUSTER2_AY 1.0
param set-default CA_THRUSTER2_AZ 0.0
param set-default CA_THRUSTER3_PX -0.50
param set-default CA_THRUSTER3_PY -0.50
param set-default CA_THRUSTER3_PZ 0.0
param set-default CA_THRUSTER3_CT 0.237
param set-default CA_THRUSTER3_AX 0.0
param set-default CA_THRUSTER3_AY 1.0
param set-default CA_THRUSTER3_AZ 0.0
param set-default CA_THRUSTER4_PX -0.50
param set-default CA_THRUSTER4_PY 0.0
param set-default CA_THRUSTER4_PZ -0.50
param set-default CA_THRUSTER4_CT 0.237
param set-default CA_THRUSTER4_AX 1.0
param set-default CA_THRUSTER4_AY 0.0
param set-default CA_THRUSTER4_AZ 0.0
param set-default CA_THRUSTER5_PX 0.50
param set-default CA_THRUSTER5_PY 0.0
param set-default CA_THRUSTER5_PZ -0.50
param set-default CA_THRUSTER5_CT 0.237
param set-default CA_THRUSTER5_AX -1.0
param set-default CA_THRUSTER5_AY 0.0
param set-default CA_THRUSTER5_AZ 0.0
param set-default CA_THRUSTER6_PX 0.50
param set-default CA_THRUSTER6_PY 0.0
param set-default CA_THRUSTER6_PZ 0.50
param set-default CA_THRUSTER6_CT 0.237
param set-default CA_THRUSTER6_AX -1.0
param set-default CA_THRUSTER6_AY 0.0
param set-default CA_THRUSTER6_AZ 0.0
param set-default CA_THRUSTER7_PX -0.50
param set-default CA_THRUSTER7_PY 0.0
param set-default CA_THRUSTER7_PZ 0.50
param set-default CA_THRUSTER7_CT 0.237
param set-default CA_THRUSTER7_AX 1.0
param set-default CA_THRUSTER7_AY 0.0
param set-default CA_THRUSTER7_AZ 0.0
param set-default CA_THRUSTER8_PX 0.0
param set-default CA_THRUSTER8_PY -0.50
param set-default CA_THRUSTER8_PZ -0.50
param set-default CA_THRUSTER8_CT 0.237
param set-default CA_THRUSTER8_AX 0.0
param set-default CA_THRUSTER8_AY 0.0
param set-default CA_THRUSTER8_AZ 1.0
param set-default CA_THRUSTER9_PX 0.0
param set-default CA_THRUSTER9_PY 0.50
param set-default CA_THRUSTER9_PZ -0.50
param set-default CA_THRUSTER9_CT 0.237
param set-default CA_THRUSTER9_AX 0.0
param set-default CA_THRUSTER9_AY 0.0
param set-default CA_THRUSTER9_AZ 1.0
param set-default CA_THRUSTER10_PX 0.0
param set-default CA_THRUSTER10_PY 0.50
param set-default CA_THRUSTER10_PZ 0.50
param set-default CA_THRUSTER10_CT 0.237
param set-default CA_THRUSTER10_AX 0.0
param set-default CA_THRUSTER10_AY 0.0
param set-default CA_THRUSTER10_AZ -1.0
param set-default CA_THRUSTER11_PX 0.0
param set-default CA_THRUSTER11_PY -0.50
param set-default CA_THRUSTER11_PZ 0.50
param set-default CA_THRUSTER11_CT 0.237
param set-default CA_THRUSTER11_AX 0.0
param set-default CA_THRUSTER11_AY 0.0
param set-default CA_THRUSTER11_AZ -1.0
param set-default PWM_MAIN_FUNC1 101
param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 105
param set-default PWM_MAIN_FUNC6 106
param set-default PWM_MAIN_FUNC7 107
param set-default PWM_MAIN_FUNC8 108
param set-default PWM_MAIN_FUNC9 109
param set-default PWM_MAIN_FUNC10 110
param set-default PWM_MAIN_FUNC11 111
param set-default PWM_MAIN_FUNC12 112
# PWM Simulation
param set PWM_SIM_PWM_MAX 10000
param set PWM_SIM_PWM_MIN 0
# Controller Tunings
param set-default SC_ROLLRATE_P 0.14
param set-default SC_PITCHRATE_P 0.14
param set-default SC_ROLLRATE_I 0.3
param set-default SC_PITCHRATE_I 0.3
param set-default SC_ROLLRATE_D 0.004
param set-default SC_PITCHRATE_D 0.004
@@ -20,7 +20,7 @@ param set-default COM_ARM_CHK_ESCS 0 # We don't have ESCs
param set-default FD_ESCS_EN 0 # We don't have ESCs - but maybe we need this later?
param set-default CA_AIRFRAME 14
param set-default MAV_TYPE 45
param set-default MAV_TYPE 99
param set-default CA_THRUSTER_CNT 8
param set-default CA_R_REV 0
@@ -109,13 +109,11 @@ px4_add_romfs_files(
10041_sihsim_airplane
10042_sihsim_xvert
10043_sihsim_standard_vtol
10044_sihsim_hex
17001_flightgear_tf-g1
17002_flightgear_tf-g2
50000_gz_rover_differential
71001_gazebo-classic_spacecraft_dart
71002_gz_spacecraft_2d
# [22000, 22999] Reserve for custom models
+31 -46
View File
@@ -1,13 +1,15 @@
#!/bin/sh
# shellcheck disable=SC2154
echo "INFO [init] Gazebo simulator"
# Enforce minimum gz version as Harmonic (gz-sim8)
MIN_GZ_VERSION="8.0.0"
GZ_SIM_VERSION=$(gz sim --versions 2>/dev/null | head -n 1 | tr -d ' ')
if [ -z "$GZ_SIM_VERSION" ]; then
echo "ERROR [init] Gazebo gz sim not found. Please install gz-harmonic"
exit 1
echo "ERROR [init] Gazebo gz sim not found. Please install gz-harmonic"
exit 1
fi
# Use sort compare, check that MIN_GZ_VERSION is ordered last
@@ -15,8 +17,6 @@ if [ "$(printf '%s\n' "$GZ_SIM_VERSION" "$MIN_GZ_VERSION" | sort -V | head -n1)"
gz_command="gz"
gz_sub_command="sim"
echo "INFO [init] Gazebo simulator $GZ_SIM_VERSION"
# Specify render engine if `GZ_SIM_RENDER_ENGINE` is set
# (for example, if you want to use Ogre 1.x instead of Ogre 2.x):
if [ -n "${PX4_GZ_SIM_RENDER_ENGINE}" ]; then
@@ -24,15 +24,19 @@ if [ "$(printf '%s\n' "$GZ_SIM_VERSION" "$MIN_GZ_VERSION" | sort -V | head -n1)"
gz_sub_command="${gz_sub_command} --render-engine ${PX4_GZ_SIM_RENDER_ENGINE}"
fi
else
echo "ERROR [init] Gazebo version too hold ($GZ_SIM_VERSION). Minimum required version is $MIN_GZ_VERSION"
exit 1
echo "ERROR [init] Gazebo gz sim version is too old ($GZ_SIM_VERSION). Minimum required version is $MIN_GZ_VERSION"
exit 1
fi
# If not standalone launch the world
# Look for an already running world
get_gz_world() {
gz_world=$( ${gz_command} topic -l | grep -m 1 -e "^/world/.*/clock" | sed 's/\/world\///g; s/\/clock//g' )
}
# If not standalone
if [ -z "${PX4_GZ_STANDALONE}" ]; then
# Look for an already running world
gz_world=$( ${gz_command} topic -l | grep -m 1 -e "^/world/.*/clock" | sed 's/\/world\///g; s/\/clock//g' )
get_gz_world
# shellcheck disable=SC2153
if [ -z "${gz_world}" ] && [ -n "${PX4_GZ_WORLD}" ]; then
@@ -66,6 +70,13 @@ fi
# Wait for Gazebo world to be ready before proceeding
check_scene_info() {
get_gz_world
if [ -n "${PX4_GZ_STANDALONE}" ] && [ -n "${gz_world}" ]; then
PX4_GZ_WORLD=${gz_world}
fi
SERVICE_INFO=$(${gz_command} service -i --service "/world/${PX4_GZ_WORLD}/scene/info" 2>&1)
if echo "$SERVICE_INFO" | grep -q "Service providers"; then
return 0
@@ -89,57 +100,31 @@ while [ $ATTEMPTS -gt 0 ]; do
sleep 1
done
# World is ready, check if custom location is provided
if [ -n "${PX4_HOME_LAT}" ] || [ -n "${PX4_HOME_LON}" ] || [ -n "${PX4_HOME_ALT}" ]; then
# must have all three
if [ -z "${PX4_HOME_LAT}" ] || [ -z "${PX4_HOME_LON}" ] || [ -z "${PX4_HOME_ALT}" ]; then
echo "ERROR [init] PX4_HOME_LAT, PX4_HOME_LON and PX4_HOME_ALT must all be set"
exit 1
fi
echo "INFO [init] Setting world origin to lat: ${PX4_HOME_LAT}, lon: ${PX4_HOME_LON}, alt: ${PX4_HOME_ALT}"
${gz_command} service -s "/world/${PX4_GZ_WORLD}/set_spherical_coordinates" \
--reqtype gz.msgs.SphericalCoordinates \
--reptype gz.msgs.Boolean \
--timeout 1000 \
--req "surface_model: EARTH_WGS84, latitude_deg: ${PX4_HOME_LAT}, longitude_deg: ${PX4_HOME_LON}, elevation: ${PX4_HOME_ALT}" > /dev/null 2>&1
fi
# Start gz_bridge - either spawn a model or connect to existing one
if [ -n "${PX4_SIM_MODEL#*gz_}" ] && [ -z "${PX4_GZ_MODEL_NAME}" ]; then
# Spawn a model
MODEL_NAME="${PX4_SIM_MODEL#*gz_}"
MODEL_NAME_INSTANCE="${MODEL_NAME}_${px4_instance}"
sdf_pose_str=""
POSE_ARG=""
if [ -n "${PX4_GZ_MODEL_POSE}" ]; then
pose_x=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $1}')
pose_y=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $2}')
pose_z=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $3}')
pose_roll=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $4}')
pose_pitch=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $5}')
pose_yaw=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $6}')
pos_x=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $1}')
pos_y=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $2}')
pos_z=$(echo "${PX4_GZ_MODEL_POSE}" | awk -F',' '{print $3}')
pos_x=${pos_x:-0}
pos_y=${pos_y:-0}
pos_z=${pos_z:-0}
pose_x=${pose_x:-0}
pose_y=${pose_y:-0}
pose_z=${pose_z:-0}
pose_roll=${pose_roll:-0}
pose_pitch=${pose_pitch:-0}
pose_yaw=${pose_yaw:-0}
sdf_pose_str="<pose> ${pose_x} ${pose_y} ${pose_z} ${pose_roll} ${pose_pitch} ${pose_yaw} </pose>"
echo "INFO [init] Gazebo model pose: ${pose_x} ${pose_y} ${pose_z} ${pose_roll} ${pose_pitch} ${pose_yaw}"
POSE_ARG=", pose: { position: { x: ${pos_x}, y: ${pos_y}, z: ${pos_z} } }"
echo "INFO [init] Spawning model at position: ${pos_x} ${pos_y} ${pos_z}"
fi
echo "INFO [init] Spawning Gazebo model"
# include the actual SDF in this one, containing the pose if given
sdf_str="<sdf version=\"1.6\"> <include> <uri>file://${PX4_GZ_MODELS}/${MODEL_NAME}/model.sdf</uri> ${sdf_pose_str} </include> </sdf>"
echo "INFO [init] Spawning model"
# Spawn model
${gz_command} service -s "/world/${PX4_GZ_WORLD}/create" --reqtype gz.msgs.EntityFactory \
--reptype gz.msgs.Boolean --timeout 5000 \
--req "name: \"${MODEL_NAME_INSTANCE}\", allow_renaming: false, sdf: '${sdf_str}'" > /dev/null 2>&1
--req "sdf_filename: \"${PX4_GZ_MODELS}/${MODEL_NAME}/model.sdf\", name: \"${MODEL_NAME_INSTANCE}\", allow_renaming: false${POSE_ARG}" > /dev/null 2>&1
# Wait for model to spawn
sleep 1
+9 -15
View File
@@ -190,6 +190,9 @@ param set-default SYS_FAILURE_EN 1
# does not go below 50% by default, but failure injection can trigger failsafes.
param set-default COM_LOW_BAT_ACT 3
# set default IP to localhost
param set-default UXRCE_DDS_AG_IP 2130706433 # 127.0.0.1
# Adapt timeout parameters if simulation runs faster or slower than realtime.
if [ -n "$PX4_SIM_SPEED_FACTOR" ]; then
@@ -295,15 +298,10 @@ then
# for multi intances setup, add namespace prefix
uxrce_dds_ns="-n px4_$px4_instance"
fi
if [ "${PX4_UXRCE_DDS_NS+x}" ]; then
# Override, as variable is set (empty or not)
if [ -n "$PX4_UXRCE_DDS_NS" ]; then
# Override namespace if environment variable is non-empty
uxrce_dds_ns="-n $PX4_UXRCE_DDS_NS"
else
# Clear namespace if variable is empty
uxrce_dds_ns=""
fi
if [ -n "$PX4_UXRCE_DDS_NS" ]
then
# Override namespace if environment variable is defined
uxrce_dds_ns="-n $PX4_UXRCE_DDS_NS"
fi
if [ -n "$ROS_DOMAIN_ID" ]
then
@@ -319,7 +317,7 @@ then
uxrce_dds_port="$PX4_UXRCE_DDS_PORT"
fi
uxrce_dds_client start -t udp -h 127.0.0.1 -p $uxrce_dds_port $uxrce_dds_ns
uxrce_dds_client start -t udp -p $uxrce_dds_port $uxrce_dds_ns
if param greater -s MNT_MODE_IN -1
then
@@ -342,11 +340,7 @@ then
gyro_calibration start
fi
# Payload deliverer module if gripper is enabled
if param compare -s PD_GRIPPER_EN 1
then
payload_deliverer start
fi
payload_deliverer start
if param compare -s ICE_EN 1
then
@@ -7,7 +7,6 @@
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
# @board px4_fmu-v6x exclude
#
. ${R}etc/init.d/rc.mc_defaults
@@ -5,5 +5,8 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_differential_defaults
@@ -7,6 +7,9 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_differential_defaults
@@ -23,6 +26,7 @@ param set-default NAV_ACC_RAD 0.5
# Differential Parameters
param set-default RD_WHEEL_TRACK 0.3
param set-default RD_MAX_THR_YAW_R 0.7
param set-default RD_TRANS_DRV_TRN 0.785398
param set-default RD_TRANS_TRN_DRV 0.139626
@@ -38,16 +42,14 @@ param set-default RO_YAW_RATE_P 0.1
param set-default RO_YAW_RATE_LIM 250
param set-default RO_YAW_ACCEL_LIM 600
param set-default RO_YAW_DECEL_LIM 600
param set-default RO_YAW_RATE_CORR 2.7
# Rover Attitude Control Parameters
param set-default RO_YAW_P 2.5
# Rover Velocity Control Parameters
# Rover Position Control Parameters
param set-default RO_SPEED_LIM 1.6
param set-default RO_SPEED_I 0.01
param set-default RO_SPEED_P 0.1
param set-default RO_SPEED_RED 1
# Pure Pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
@@ -5,5 +5,8 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_ackermann_defaults
@@ -7,6 +7,9 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_ackermann_defaults
@@ -30,16 +33,14 @@ param set-default RO_MAX_THR_SPEED 2.8
param set-default RO_YAW_RATE_I 0.1
param set-default RO_YAW_RATE_P 0.1
param set-default RO_YAW_RATE_LIM 120
param set-default RO_YAW_RATE_CORR 1
# Rover Attitude Control Parameters
param set-default RO_YAW_P 2.5
# Rover Velocity Control Parameters
# Rover Position Control Parameters
param set-default RO_SPEED_LIM 2.5
param set-default RO_SPEED_I 0.01
param set-default RO_SPEED_P 0.1
param set-default RO_SPEED_RED 1
# Pure pursuit parameters
param set-default PP_LOOKAHD_GAIN 1
@@ -5,5 +5,8 @@
# @type Rover
# @class Rover
#
# @board px4_fmu-v2 exclude
# @board bitcraze_crazyflie exclude
#
. ${R}etc/init.d/rc.rover_mecanum_defaults
@@ -11,7 +11,7 @@
. ${R}etc/init.d/rc.sc_defaults
param set-default CA_AIRFRAME 14
param set-default MAV_TYPE 45
param set-default MAV_TYPE 99
param set-default CA_THRUSTER_CNT 8
param set-default CA_R_REV 0
+1 -3
View File
@@ -13,11 +13,9 @@ control_allocator start
#
# Start attitude controller.
#
fw_dyn_soar_control start
fw_rate_control start
fw_att_control start
fw_mode_manager start
fw_lat_lon_control start
fw_pos_control start
airspeed_selector start
#
@@ -13,6 +13,8 @@ param set-default MAV_TYPE 1
#
# Default parameters for fixed wing UAVs.
#
# there is a 2.5 factor applied on the _FS thresholds if for invalidation
param set-default COM_POS_FS_EPH 50
param set-default COM_VEL_FS_EVH 3
param set-default COM_POS_LOW_EPH 50
@@ -20,5 +20,7 @@ param set-default NAV_ACC_RAD 2
param set-default RTL_RETURN_ALT 30
param set-default RTL_DESCEND_ALT 10
param set-default GPS_UBX_DYNMODEL 6
# lower RNG_FOG since MC are expected to fly closer over obstacles
param set-default EKF2_RNG_FOG 1.0
+3 -3
View File
@@ -3,10 +3,10 @@
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
set VEHICLE_TYPE spacecraft
set VEHICLE_TYPE sc
# MAV_TYPE_SPACECRAFT_ORBITTER
param set-default MAV_TYPE 45
# MAV_TYPE_QUADROTOR 2
#param set-default MAV_TYPE 12
# Set micro-dds-client to use ethernet and IP-address 192.168.0.1
param set-default UXRCE_DDS_AG_IP -1062731775
-1
View File
@@ -234,7 +234,6 @@ then
lis3mdl -X -q -a 0x1c start
fi
qmc5883l -X -q start
qmc5883p -X -q start
rm3100 -X -q start
# start last (wait for possible icm20948 passthrough mode)
@@ -68,15 +68,6 @@ then
. ${R}etc/init.d/rc.vtol_apps
fi
#
# Spapcecraft setup.
#
if [ $VEHICLE_TYPE = spacecraft ]
then
# Start standard multicopter apps.
. ${R}etc/init.d/rc.sc_apps
fi
#
# Airship setup.
#
+1 -2
View File
@@ -27,8 +27,7 @@ fi
fw_rate_control start vtol
fw_att_control start vtol
fw_mode_manager start
fw_lat_lon_control start vtol
fw_pos_control start vtol
fw_autotune_attitude_control start vtol
# Start Land Detector
@@ -10,6 +10,9 @@ set VEHICLE_TYPE vtol
# MAV_TYPE_VTOL_FIXEDROTOR 22
param set-default MAV_TYPE 22
# there is a 2.5 factor applied on COM_POS_FS_EPH if for invalidation
param set-default COM_POS_FS_EPH 50
param set-default COM_POS_LOW_EPH 50
param set-default MIS_TAKEOFF_ALT 20
+4 -16
View File
@@ -39,7 +39,7 @@ set VEHICLE_TYPE none
# Airframe parameter versioning
# Value set to 1 by default but can optionally be overridden in the airframe configuration startup script.
# Airframe maintainers can ensure a reset to the airframe defaults during an update by increasing by one.
# e.g. add line "set PARAM_DEFAULTS_VER 2" in your airframe file to build the first update that enforces a reset.
# e.g. add line "set PARAM_DEFAULTS_VER 2" in your airframe file to build the first update that enfoces a reset.
set PARAM_DEFAULTS_VER 1
#
@@ -224,7 +224,7 @@ else
# Look for airframe in ROMFS
. ${R}etc/init.d/rc.autostart
if [ ${VEHICLE_TYPE} = none ]
if [ ${VEHICLE_TYPE} == none ]
then
# Use external startup file
if [ $STORAGE_AVAILABLE = yes ]
@@ -235,7 +235,7 @@ else
fi
fi
if [ ${VEHICLE_TYPE} = none ]
if [ ${VEHICLE_TYPE} == none ]
then
echo "ERROR [init] No airframe file found for SYS_AUTOSTART value"
param set SYS_AUTOSTART 0
@@ -280,14 +280,6 @@ else
#
send_event start
#
# Start the hardfault streamer.
#
if param compare -s SYS_HF_MAV 1
then
hardfault_stream start
fi
#
# Start the resource load monitor.
#
@@ -568,11 +560,7 @@ else
px4flow start -X &
fi
# Payload deliverer module if gripper is enabled
if param compare -s PD_GRIPPER_EN 1
then
payload_deliverer start
fi
payload_deliverer start
if param compare -s ICE_EN 1
then
+2 -2
View File
@@ -3,14 +3,14 @@
return_value=0
# Check if there are files checked in that don't end in a newline (POSIX requirement)
git grep --cached -Il '' -- ':!docs/public/' ':!docs/ko/' ':!docs/uk/' ':!docs/zh/' | xargs -L1 bash -c 'if test "$(tail -c 1 "$0")"; then echo "No new line at end of $0"; exit 1; fi'
git grep --cached -Il '' -- ':!docs/*' | xargs -L1 bash -c 'if test "$(tail -c 1 "$0")"; then echo "No new line at end of $0"; exit 1; fi'
if [ $? -ne 0 ]; then
return_value=1
fi
# Check if there are files checked in that have duplicate newlines at the end (fail trailing whitespace checks)
git grep --cached -Il '' -- ':!docs/public/' ':!docs/ko/' ':!docs/uk/' ':!docs/zh/' | xargs -L1 bash -c 'if tail -c 2 "$0" | ( read x && read y && [ x"$x" = x ] && [ x"$y" = x ]); then echo "Multiple newlines at the end of $0"; exit 1; fi'
git grep --cached -Il '' -- ':!docs/*' | xargs -L1 bash -c 'if tail -c 2 "$0" | ( read x && read y && [ x"$x" = x ] && [ x"$y" = x ]); then echo "Multiple newlines at the end of $0"; exit 1; fi'
if [ $? -ne 0 ]; then
return_value=1
+3 -3
View File
@@ -27,9 +27,9 @@ do
# - An old .msg version exists
# - A translation header exists and is included
# Ignore changes to comments or constants and trim whitespace
content_a=$(git show "${BASE_COMMIT}:${file}" | grep -o '^[^#]*' | grep -v = | sed 's/^ *//;s/[ \t]*$//')
content_b=$(git show "${HEAD_COMMIT}:${file}" | grep -o '^[^#]*' | grep -v = | sed 's/^ *//;s/[ \t]*$//')
# Ignore changes to comments or constants
content_a=$(git show "${BASE_COMMIT}:${file}" | grep -o '^[^#]*' | grep -v =)
content_b=$(git show "${HEAD_COMMIT}:${file}" | grep -o '^[^#]*' | grep -v =)
if [ "${content_a}" == "${content_b}" ]; then
echo "No version update required for ${file}"
continue
+6 -8
View File
@@ -35,7 +35,6 @@ if args.filter:
for board in args.filter.split(','):
board_filter.append(board)
default_container = 'ghcr.io/px4/px4-dev:v1.16.0-rc1-258-g0369abd556'
build_configs = []
grouped_targets = {}
excluded_boards = ['modalai_voxl2', 'px4_ros2'] # TODO: fix and enable
@@ -87,17 +86,21 @@ def process_target(px4board_file, target_name):
assert platform, f"PLATFORM not found in {px4board_file}"
if platform not in excluded_platforms:
container = default_container
# get the container based on the platform and toolchain
if platform == 'posix':
container = 'px4io/px4-dev-base-focal:2021-09-08'
group = 'base'
if toolchain:
if toolchain.startswith('aarch64'):
container = 'px4io/px4-dev-aarch64:2022-08-12'
group = 'aarch64'
elif toolchain == 'arm-linux-gnueabihf':
container = 'px4io/px4-dev-armhf:2023-06-26'
group = 'armhf'
else:
if verbose: print(f'unmatched toolchain: {toolchain}')
elif platform == 'nuttx':
container = 'px4io/px4-dev-nuttx-focal:2022-08-12'
group = 'nuttx'
else:
if verbose: print(f'unmatched platform: {platform}')
@@ -121,7 +124,7 @@ if(verbose):
# - Events
metadata_targets = ['airframe_metadata', 'parameters_metadata', 'extract_events']
grouped_targets['base'] = {}
grouped_targets['base']['container'] = default_container
grouped_targets['base']['container'] = 'px4io/px4-dev-base-focal:2021-09-08'
grouped_targets['base']['manufacturers'] = {}
grouped_targets['base']['manufacturers']['px4'] = []
grouped_targets['base']['manufacturers']['px4'] += metadata_targets
@@ -203,7 +206,6 @@ if (args.group):
if(verbose):
print(f'=:Architectures: [{grouped_targets.keys()}]')
for arch in grouped_targets:
runner = 'x64' if arch == 'nuttx' else 'arm64'
if(verbose):
print(f'=:Processing: [{arch}]')
temp_group = []
@@ -221,7 +223,6 @@ if (args.group):
"container": grouped_targets[arch]['container'],
"targets": targets,
"arch": arch,
"runner": runner,
"group": group_name,
"len": len(grouped_targets[arch]['manufacturers'][man])
})
@@ -239,7 +240,6 @@ if (args.group):
"container": grouped_targets[arch]['container'],
"targets": targets,
"arch": arch,
"runner": runner,
"group": group_name,
"len": len(chunk),
})
@@ -260,7 +260,6 @@ if (args.group):
"container": grouped_targets[arch]['container'],
"targets": targets,
"arch": arch,
"runner": runner,
"group": group_name,
"len": temp_len
})
@@ -278,7 +277,6 @@ if (args.group):
"container": grouped_targets[arch]['container'],
"targets": targets,
"arch": arch,
"runner": runner,
"group": group_name,
"len": len(chunk),
})
+19 -21
View File
@@ -4,8 +4,8 @@ mkdir artifacts
cp **/**/*.px4 artifacts/
cp **/**/*.elf artifacts/
for build_dir_path in build/*/ ; do
build_dir_path=${build_dir_path::${#build_dir_path}-1}
build_dir=${build_dir_path#*/}
build_dir=${build_dir::${#build_dir}-1}
mkdir artifacts/$build_dir
find artifacts/ -maxdepth 1 -type f -name "*$build_dir*"
# Airframe
@@ -26,23 +26,21 @@ for build_dir_path in build/*/ ; do
echo "----------"
done
if [ -d artifacts/px4_sitl_default ]; then
# general metadata
mkdir artifacts/_general/
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
# Airframe
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
# Parameters
cp artifacts/px4_sitl_default/parameters.xml artifacts/_general/
cp artifacts/px4_sitl_default/parameters.json artifacts/_general/
cp artifacts/px4_sitl_default/parameters.json.xz artifacts/_general/
# Actuators
cp artifacts/px4_sitl_default/actuators.json artifacts/_general/
cp artifacts/px4_sitl_default/actuators.json.xz artifacts/_general/
# Events
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
# ROS 2 msgs
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
# Module Docs
ls -la artifacts/_general/
fi
# general metadata
mkdir artifacts/_general/
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
# Airframe
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
# Parameters
cp artifacts/px4_sitl_default/parameters.xml artifacts/_general/
cp artifacts/px4_sitl_default/parameters.json artifacts/_general/
cp artifacts/px4_sitl_default/parameters.json.xz artifacts/_general/
# Actuators
cp artifacts/px4_sitl_default/actuators.json artifacts/_general/
cp artifacts/px4_sitl_default/actuators.json.xz artifacts/_general/
# Events
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
# ROS 2 msgs
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
# Module Docs
ls -la artifacts/_general/
+22 -2
View File
@@ -2,7 +2,19 @@
if [ -z ${PX4_DOCKER_REPO+x} ]; then
echo "guessing PX4_DOCKER_REPO based on input";
if [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
if [[ $@ =~ .*px4_fmu.* ]]; then
# nuttx-px4fmu-v{1,2,3,4,5}
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2022-08-12"
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*pilotpi.default ]] || [[ $@ =~ .*navigator.* ]]; then
# beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, scumaker_pilotpi_default, bluerobotics_navigator_default
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2023-06-26"
elif [[ $@ =~ .*pilotpi.arm64 ]]; then
# scumaker_pilotpi_arm64
PX4_DOCKER_REPO="px4io/px4-dev-aarch64:2022-08-12"
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*bebop.* ]]; then
# posix_rpi_cross, posix_bebop_default
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2023-06-26"
elif [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
# clang tools
PX4_DOCKER_REPO="px4io/px4-dev-clang:2021-02-04"
elif [[ $@ =~ .*tests* ]]; then
@@ -15,9 +27,17 @@ fi
# otherwise default to nuttx
if [ -z ${PX4_DOCKER_REPO+x} ]; then
PX4_DOCKER_REPO="px4io/px4-dev:v1.16.0-rc1-258-g0369abd556"
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2022-08-12"
fi
# docker hygiene
#Delete all stopped containers (including data-only containers)
#docker rm $(docker ps -a -q)
#Delete all 'untagged/dangling' (<none>) images
#docker rmi $(docker images -q -f dangling=true)
echo "PX4_DOCKER_REPO: $PX4_DOCKER_REPO";
PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-185
View File
@@ -1,185 +0,0 @@
#! /usr/bin/env python3
"""
Checks if the functions that should be mapped to ITCM are contained in the built ELF file.
This helps against linker scripts that "rot" as the linker does not warn in case of a function
not existing. Thus, it is possible to forget to update the linker script after a code update.
The tool uses the DWARF debug info and the ELF symbol table section to identify which functions
exist in the built ELF file.
It is expected that the linker scripts that are analyzed by the tool are linker script include
files that only contain the name of the sections (functions) that should be mapped to ITCM in
the following format:
```
*(.text.arm_ack_irq)
*(.text.arm_doirq)
*(.text._ZN4uORB12DeviceMaster19getDeviceNodeLockedEPK12orb_metadatah)
*(.text._ZN3Ekf20controlGravityFusionERKN9estimator9imuSampleE)
[...]
```
A specific entry in the linker script file can be ignored by adding a comment, as shown in the following example:
```
*(.text.arm_ack_irq) /* itcm-check-ignore */
```
"""
import argparse
import re
from elftools.elf.elffile import ELFFile
from elftools.elf.sections import SymbolTableSection
from elftools.dwarf.die import DIE
from pathlib import Path
from typing import List, Set
def die_get_funcs_rec(die: DIE, ret: Set[str]):
"""
Recursively gets the mangled and demangled name of all functions in the given `die`.
:param die: DIE to be processed. Is gathered recursively after passing a top DIE.
:param ret: Output set where all function names are added to.
"""
if die.tag in ("DW_TAG_subprogram", "DW_TAG_inlined_subroutine"):
link_name_att = die.attributes.get("DW_AT_linkage_name")
name_att = die.attributes.get("DW_AT_name")
if link_name_att:
ret.add(link_name_att.value.decode("utf-8"))
if name_att:
ret.add(name_att.value.decode("utf-8"))
# Recurse into the DIE children
for child in die.iter_children():
die_get_funcs_rec(child, ret)
def get_elf_symbols_from_debug(elf_path: Path) -> Set[str]:
"""
Gets all functions contained in the built ELF file using the DWARF debug info.
:param elf_path: Path to the ELF file.
:return: The names of the contained functions.
"""
ret = set()
with open(elf_path, 'rb') as f:
elf = ELFFile(f)
if not elf.has_dwarf_info():
print("ELF does not have debug info. Compile with debug info.")
exit(1)
dwarf_info = elf.get_dwarf_info()
for CU in dwarf_info.iter_CUs():
top_die = CU.get_top_DIE()
die_get_funcs_rec(top_die, ret)
return ret
def get_elf_symbols_from_sections(elf_path: Path) -> Set[str]:
"""
Gets all functions contained in the built ELF file using the symbol table section.
:param elf_path: Path to the ELF file.
:return: The names of the contained functions.
"""
ret = set()
with open(elf_path, 'rb') as f:
elf = ELFFile(f)
for section in elf.iter_sections():
if isinstance(section, SymbolTableSection):
for sym in section.iter_symbols():
ret.add(sym.name)
return ret
def is_section_supported(section: str) -> bool:
"""
Returns whether this type of section can be checked.
:param section: Name of the section that should be checked for support.
:return: Whether the type of section is supported.
"""
not_supported_sections = [".isra", ".part", ".constprop"]
return not any(not_supported in section for not_supported in not_supported_sections)
def get_input_sections(script_path: Path) -> List[str]:
"""
Gets all sections (named after the functions) that should be mapped to ITCM according
to the linker script.
:param script_path: Path of the linker script.
:return: The names of the sections
"""
ret = []
section_pattern = re.compile(r"^\*\(\.([a-zA-Z0-9_\.]+)\)$")
ignored_marker = "itcm-check-ignore"
with open(script_path, 'r') as f:
for line in f:
match = section_pattern.match(line)
if match and ignored_marker not in line:
section_name = match.group(1).replace("text.", "")
if is_section_supported(section_name):
ret.append(section_name)
return ret
def check_itcm(elf_path: Path, script_paths: List[Path]):
"""
Checks if all the functions that should be mapped to ITCM are contained in the built ELF file.
:param elf_path: Path of the ELF file.
:param script_paths: Path of all linker scripts that should be checked.
"""
elf_symbols_from_debug = get_elf_symbols_from_debug(elf_path)
elf_symbols_from_sections = get_elf_symbols_from_sections(elf_path)
elf_symbols = elf_symbols_from_debug.union(elf_symbols_from_sections)
input_sections = []
for script_path in script_paths:
script_input_sections = get_input_sections(script_path)
if script_input_sections:
input_sections.extend(script_input_sections)
else:
print(f"No input sections found in {script_path}, please check if the path is correct.")
check_passed = True
for input_section in input_sections:
if input_section not in elf_symbols:
check_passed = False
print(f"Section: {input_section} not found in the ELF file!")
if check_passed:
print("ITCM check passed!")
exit(0)
else:
print("ITCM check failed!")
exit(1)
def main():
parser = argparse.ArgumentParser(description="Checks if functions marked for ITCM mapping exist in the ELF file.")
parser.add_argument(
"--elf-file",
help="Path of the compiled ELF file",
type=Path,
required=True
)
parser.add_argument(
"--script-files",
help="Paths of the linker script files",
nargs="+",
type=Path,
required=True
)
args = parser.parse_args()
check_itcm(args.elf_file, args.script_files)
if __name__ == '__main__':
main()
-97
View File
@@ -2,7 +2,6 @@
"""
Generate docs from .msg files
Also generates docs/en/middleware/dds_topics.md from dds_topics.yaml
"""
import os
@@ -10,99 +9,6 @@ import argparse
import sys
import yaml
def generate_dds_yaml_doc(allMessageFiles, output_file = 'dds_topics.md'):
"""
Generates human readable version of dds_topics.yaml.
Default output is to docs/en/middleware/dds_topics.md
"""
dds_file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),"../../src/modules/uxrce_dds_client/dds_topics.yaml")
output_file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),f"../../docs/en/middleware/{output_file}")
try:
with open(dds_file_path, 'r') as file:
data = yaml.safe_load(file)
# Get messages and topics that are not published by default
# Start by getting all that are published.
all_messages_in_source = set()
all_message_types =set()
all_topics =set()
for message in data["publications"]:
all_message_types.add(message['type'].split("::")[-1])
all_topics.add(message['topic'].split('/')[-1])
for message in data["subscriptions"]:
all_message_types.add(message['type'].split("::")[-1])
all_topics.add(message['topic'].split('/')[-1])
if data["subscriptions_multi"]: # There is none now
dds_markdown += "None\n"
for message in data["subscriptions_multi"]:
all_message_types.add(message['type'].split("::")[-1])
all_topics.add(message['topic'].split('/')[-1])
for message in allMessageFiles:
all_messages_in_source.add(message.split('/')[-1].split('.')[0])
messagesNotExported = all_messages_in_source - all_message_types
# write out the dds file
dds_markdown="""# dds_topics.yaml — PX4 Topics Exposed to ROS 2
::: info
This document is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/msg/generate_msg_docs.py) from the source code.
:::
The [dds_topics.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml) file specifies which uORB message definitions are compiled into the [uxrce_dds_client](../modules/modules_system.md#uxrce-dds-client) module when [PX4 is built](../middleware/uxrce_dds.md#code-generation), and hence which topics are available for ROS 2 applications to subscribe or publish (by default).
This document shows a markdown-rendered version of [dds_topics.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/uxrce_dds_client/dds_topics.yaml), listing the publications, subscriptions, and so on.
## Publications
Topic | Type| Rate Limit
--- | --- | ---
"""
for message in data["publications"]:
type = message['type']
px4Type=type.split("::")[-1]
dds_markdown += f"`{message['topic']}` | [{type}](../msg_docs/{px4Type}.md) | {message.get('rate_limit','')}\n"
dds_markdown += "\n## Subscriptions\n\nTopic | Type\n--- | ---\n"
for message in data["subscriptions"]:
type = message['type']
px4Type=type.split("::")[-1]
dds_markdown += f"{message['topic']} | [{type}](../msg_docs/{px4Type}.md)\n"
dds_markdown += "\n## Subscriptions Multi\n\n"
if not data["subscriptions_multi"]: # There is none now
dds_markdown += "None\n"
else:
print("Warning - we now have subscription_multi data - check format")
dds_markdown += "Topic | Type\n--- | ---\n"
for message in data["subscriptions_multi"]:
dds_markdown += f"{message['topic']} | {message['type']}\n"
if messagesNotExported:
# Print the topics that are not exported to DDS
dds_markdown += "\n## Not Exported\n\nThese messages are not listed in the yaml file.\nThey are not build into the module, and hence are neither published or subscribed."
dds_markdown += "\n\n::: details See messages\n"
for item in messagesNotExported:
dds_markdown += f"\n- [{item}](../msg_docs/{item}.md)"
dds_markdown += "\n:::\n" # End of details block
#print(dds_markdown)
with open(output_file_path, 'w') as content_file:
content_file.write(dds_markdown)
except yaml.YAMLError as exc:
print(f"Error parsing YAML: {exc}")
except FileNotFoundError:
print(f"Error: {dds_file_path} not found.")
def get_msgs_list(msgdir):
"""
Makes a list of relative paths of .msg files in the given directory
@@ -124,7 +30,6 @@ def get_msgs_list(msgdir):
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Generate docs from .msg files')
parser.add_argument('-d', dest='dir', help='output directory', required=True)
args = parser.parse_args()
@@ -227,5 +132,3 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
index_file = os.path.join(output_dir, 'index.md')
with open(index_file, 'w') as content_file:
content_file.write(index_text)
generate_dds_yaml_doc(msg_files)
+11 -11
View File
@@ -40,25 +40,25 @@ The generated files will be written to the `modules` directory.
## Categories
"""
for category in sorted(module_groups):
result += f"- [{category.capitalize()}](modules_{category}.md)\n"
result += "- [%s](modules_%s.md)\n" % (category.capitalize(), category)
self._outputs['main'] = result
for category in sorted(module_groups):
result = f"# Modules Reference: {category.capitalize()}\n\n"
result = "# Modules Reference: %s\n" % category.capitalize()
subcategories = module_groups[category]
if len(subcategories) > 1:
result += 'Subcategories:\n\n'
for subcategory in sorted(subcategories):
result += 'Subcategories:\n'
for subcategory in subcategories:
if subcategory == '':
continue
subcategory_label = subcategory.replace('_', ' ').title()
subcategory_file_name = category+'_'+subcategory
result += f'- [{subcategory_label}](modules_{subcategory_file_name}.md)\n'
result += '- [%s](modules_%s.md)\n' % (subcategory_label, subcategory_file_name)
# add a sub-page for the subcategory
result_subpage = f'# Modules Reference: {subcategory_label} ({category.capitalize()})\n'
result_subpage = '# Modules Reference: %s (%s)\n' % \
(subcategory_label, category.capitalize())
result_subpage += self._ProcessModules(subcategories[subcategory])
self._outputs[subcategory_file_name] = result_subpage
@@ -68,14 +68,14 @@ The generated files will be written to the `modules` directory.
def _ProcessModules(self, module_list):
result = ''
for module in module_list:
result += f"\n## {module.name()}\n\n"
result += f"Source: [{module.scope()}](https://github.com/PX4/PX4-Autopilot/tree/main/src/{module.scope()})\n\n"
result += "## %s\n" % module.name()
result += "Source: [%s](https://github.com/PX4/PX4-Autopilot/tree/main/src/%s)\n\n" % (module.scope(), module.scope())
doc = module.documentation()
if len(doc) > 0:
result += f"{doc}\n"
result += "%s\n" % doc
usage_string = module.usage_string()
if len(usage_string) > 0:
result += f'### Usage {{#{module.name()}_usage}}\n\n```\n{usage_string}\n```\n'
result += '<a id="%s_usage"></a>\n### Usage\n```\n%s\n```\n' % (module.name(), usage_string)
return result
def Save(self, dirname):
+2 -2
View File
@@ -12,11 +12,11 @@ class ModuleDocumentation(object):
"""
# If you add categories or subcategories, they also need to be added to the
# TOC in https://github.com/PX4/PX4-Autopilot/blob/main/docs/en/SUMMARY.md
# TOC in https://github.com/PX4/PX4-user_guide/blob/main/en/SUMMARY.md
valid_categories = ['driver', 'estimator', 'controller', 'system',
'communication', 'command', 'template', 'simulation', 'autotune']
valid_subcategories = ['', 'camera', 'distance_sensor', 'imu', 'ins', 'airspeed_sensor',
'magnetometer', 'baro', 'optical_flow', 'radio_control','rpm_sensor', 'transponder']
'magnetometer', 'baro', 'optical_flow', 'rpm_sensor', 'transponder']
max_line_length = 80 # wrap lines that are longer than this
+1 -1
View File
@@ -5,7 +5,7 @@
set SERIAL_DEV none
{% for serial_device in serial_devices -%}
if param compare "$PRT" {{ serial_device.index }}; then
if [ "$PRT_{{ serial_device.tag }}_" = "" ]; then
if [ "x$PRT_{{ serial_device.tag }}_" = "x" ]; then
set SERIAL_DEV {{ serial_device.device }}
set BAUD_PARAM SER_{{ serial_device.tag }}_BAUD
set PRT_{{ serial_device.tag }}_ 1
+2 -5
View File
@@ -8,25 +8,22 @@ ENV LC_ALL=C.UTF-8
ENV DISPLAY=:99
ENV TERM=xterm
ENV TZ=UTC
ENV RUNS_IN_DOCKER=true
# SITL UDP PORTS
EXPOSE 14556/udp
EXPOSE 14557/udp
# Install Shell Script Entrypoint
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
# Install PX4 Requirements
COPY requirements.txt /tmp/requirements.txt
COPY ubuntu.sh /tmp/ubuntu.sh
RUN touch /.dockerenv
RUN bash /tmp/ubuntu.sh --no-sim-tools
# Make sure git is ok with your local copy
RUN git config --global --add safe.directory '*'
# Create user with id 1001 (jenkins docker workflow default)
# create user with id 1001 (jenkins docker workflow default)
RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout user
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
+2 -10
View File
@@ -1,27 +1,19 @@
#!/bin/bash
GREEN='\033[0;32m'
NO_COLOR='\033[0m' # No Color
SCRIPTID="${GREEN}[docker-entrypoint.sh]${NO_COLOR}"
echo -e "$SCRIPTID Starting"
# Start virtual X server in the background
# - DISPLAY default is :99, set in dockerfile
# - Users can override with `-e DISPLAY=` in `docker run` command to avoid
# running Xvfb and attach their screen
if [[ -x "$(command -v Xvfb)" && "$DISPLAY" == ":99" ]]; then
echo -e "$SCRIPTID Starting Xvfb"
echo "[docker-entrypoint.sh] Starting Xvfb"
Xvfb :99 -screen 0 1600x1200x24+32 &
fi
# Check if the ROS_DISTRO is passed and use it
# to source the ROS environment
if [ -n "${ROS_DISTRO}" ]; then
echo -e "$SCRIPTID ROS: ${ROS_DISTRO}"
echo "[docker-entrypoint.sh] ROS: ${ROS_DISTRO}"
source "/opt/ros/$ROS_DISTRO/setup.bash"
fi
echo -e "$SCRIPTID ($( uname -m ))"
exec "$@"
+2
View File
@@ -42,6 +42,8 @@ else
echo "Installing PX4 general dependencies (homebrew px4-dev)"
brew tap PX4/px4
brew install px4-dev
# lock down gcc to v9 for v1.16 branch
brew install gcc-arm-none-eabi
brew install ncurses
brew install python-tk
fi
-1
View File
@@ -1,2 +1 @@
pyelftools>=0.32,<1
symforce>=0.9.0
-1
View File
@@ -27,4 +27,3 @@ six>=1.12.0
toml>=0.9
sympy>=1.10.1
pycryptodome
lark
+16 -34
View File
@@ -27,12 +27,9 @@ do
fi
done
echo "[ubuntu.sh] Starting..."
echo "[ubuntu.sh] arch: $INSTALL_ARCH"
# detect if running in docker
if [ "$RUNS_IN_DOCKER" = "true" ]; then
echo "[ubuntu.sh] Running within docker, installing initial dependencies";
if [ -f /.dockerenv ]; then
echo "Running within docker, installing initial dependencies";
apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \
ca-certificates \
gnupg \
@@ -50,7 +47,7 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# check requirements.txt exists (script not run in source tree)
REQUIREMENTS_FILE="requirements.txt"
if [[ ! -f "${DIR}/${REQUIREMENTS_FILE}" ]]; then
echo "[ubuntu.sh] FAILED: ${REQUIREMENTS_FILE} needed in same directory as ubuntu.sh (${DIR})."
echo "FAILED: ${REQUIREMENTS_FILE} needed in same directory as ubuntu.sh (${DIR})."
return 1
fi
@@ -58,8 +55,10 @@ fi
# check ubuntu version
# otherwise warn and point to docker?
UBUNTU_RELEASE="`lsb_release -rs`"
echo "[ubuntu.sh] Ubuntu ${UBUNTU_RELEASE}"
echo "[ubuntu.sh] Installing PX4 general dependencies"
echo "Ubuntu ${UBUNTU_RELEASE}"
echo
echo "Installing PX4 general dependencies"
sudo apt-get update -y --quiet
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
@@ -92,7 +91,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends i
# Python3 dependencies
echo
echo "[ubuntu.sh] Installing PX4 Python3 dependencies"
echo "Installing PX4 Python3 dependencies"
PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}')
REQUIRED_VERSION="3.11"
if [[ "$(printf '%s\n' "$REQUIRED_VERSION" "$PYTHON_VERSION" | sort -V | head -n1)" == "$REQUIRED_VERSION" ]]; then
@@ -110,18 +109,18 @@ fi
if [[ $INSTALL_NUTTX == "true" ]]; then
echo
echo "[ubuntu.sh] NuttX Installing Dependencies ($INSTALL_ARCH)"
sudo apt-get update -y --quiet
echo "Installing NuttX dependencies"
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
automake \
binutils-dev \
bison \
build-essential \
curl \
clang \
clang-tidy \
clang-format \
flex \
g++-multilib \
gcc-arm-none-eabi \
gcc-multilib \
gdb-multiarch \
genromfs \
gettext \
@@ -140,8 +139,6 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
libstdc++-arm-none-eabi-newlib \
libtool \
libunwind-dev \
lldb \
lld \
pkg-config \
screen \
texinfo \
@@ -150,21 +147,6 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
vim-common \
;
if [[ "${INSTALL_ARCH}" == "x86_64" ]]; then
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
g++-multilib \
gcc-arm-none-eabi \
gcc-multilib \
;
fi
if [[ "${INSTALL_ARCH}" == "aarch64" ]]; then
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
g++-aarch64-linux-gnu \
g++-arm-linux-gnueabihf \
;
fi
if [ -n "$USER" ]; then
# add user to dialout group (serial port access)
sudo usermod -aG dialout $USER
@@ -175,7 +157,7 @@ fi
if [[ $INSTALL_SIM == "true" ]]; then
echo
echo "[ubuntu.sh] Installing PX4 simulation dependencies"
echo "Installing PX4 simulation dependencies"
# General simulation dependencies
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
@@ -200,8 +182,8 @@ if [[ $INSTALL_SIM == "true" ]]; then
fi
else
# Expects Ubuntu 22.04 > by default
echo "[ubuntu.sh] Gazebo (Harmonic) will be installed"
echo "[ubuntu.sh] Earlier versions will be removed"
echo "Gazebo (Harmonic) will be installed"
echo "Earlier versions will be removed"
# Add Gazebo binary repository
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
@@ -10,7 +10,6 @@ CONFIG_DRIVERS_BAROMETER_DPS310=y
CONFIG_DRIVERS_BATT_SMBUS=y
CONFIG_DRIVERS_CAMERA_CAPTURE=y
CONFIG_DRIVERS_CAMERA_TRIGGER=y
CONFIG_DRIVERS_CDCACM_AUTOSTART=y
CONFIG_COMMON_DIFFERENTIAL_PRESSURE=y
CONFIG_COMMON_DISTANCE_SENSOR=y
CONFIG_DRIVERS_DSHOT=y
@@ -42,8 +41,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
@@ -132,7 +132,6 @@ ENTRY(_stext)
*/
EXTERN(abort)
EXTERN(_bootdelay_signature)
EXTERN(board_get_manifest)
SECTIONS
{
@@ -48,7 +48,6 @@ else()
i2c.cpp
init.c
led.c
mtd.cpp
spi.cpp
timer_config.cpp
usb.c
@@ -1,76 +0,0 @@
/****************************************************************************
*
* Copyright (C) 2025 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.
*
****************************************************************************/
#include <nuttx/spi/spi.h>
#include <px4_platform_common/px4_manifest.h>
// KiB BS nB
static const px4_mft_device_t spi2 = { // FM25V01A on FMUM native: 32K X 8, emulated as (1024 Blocks of 32)
.bus_type = px4_mft_device_t::SPI,
.devid = SPIDEV_FLASH(0)
};
static const px4_mtd_entry_t fmum_fram = {
.device = &spi2,
.npart = 1,
.partd = {
{
.type = MTD_PARAMETERS,
.path = "/fs/mtd_params",
.nblocks = (32768 / (1 << CONFIG_RAMTRON_EMULATE_PAGE_SHIFT))
},
},
};
static const px4_mtd_manifest_t board_mtd_config = {
.nconfigs = 1,
.entries = {
&fmum_fram
}
};
static const px4_mft_entry_s mtd_mft = {
.type = MTD,
.pmft = (void *) &board_mtd_config,
};
static const px4_mft_s mft = {
.nmft = 1,
.mfts = {
&mtd_mft
}
};
const px4_mft_s *board_get_manifest(void)
{
return &mft;
}
+1 -2
View File
@@ -46,8 +46,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
+2 -3
View File
@@ -56,13 +56,11 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
CONFIG_MODULES_GYRO_FFT=y
CONFIG_MODULES_HARDFAULT_STREAM=y
CONFIG_MODULES_LAND_DETECTOR=y
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
CONFIG_MODULES_LOAD_MON=y
@@ -78,6 +76,7 @@ CONFIG_MODULES_MC_POS_CONTROL=y
CONFIG_MODULES_MC_RATE_CONTROL=y
CONFIG_MODULES_NAVIGATOR=y
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
CONFIG_MODULES_PAYLOAD_DELIVERER=y
CONFIG_MODULES_RC_UPDATE=y
CONFIG_MODULES_ROVER_POS_CONTROL=y
CONFIG_MODULES_SENSORS=y
@@ -6,3 +6,8 @@ CONFIG_DRIVERS_SW_CRYPTO=y
# CONFIG_EKF2_AUX_GLOBAL_POSITION is not set
CONFIG_PUBLIC_KEY0="../../../Tools/test_keys/key0.pub"
CONFIG_PUBLIC_KEY1="../../../Tools/test_keys/rsa2048.pub"
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_POS_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
+2 -2
View File
@@ -37,8 +37,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
@@ -57,6 +56,7 @@ CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
CONFIG_MODULES_MC_POS_CONTROL=y
CONFIG_MODULES_MC_RATE_CONTROL=y
CONFIG_MODULES_NAVIGATOR=y
CONFIG_MODULES_PAYLOAD_DELIVERER=y
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
CONFIG_MODULES_RC_UPDATE=y
CONFIG_MODULES_SENSORS=y
+5
View File
@@ -5,3 +5,8 @@ CONFIG_DRIVERS_SW_CRYPTO=y
# CONFIG_EKF2_AUX_GLOBAL_POSITION is not set
CONFIG_PUBLIC_KEY0="../../../Tools/test_keys/key0.pub"
CONFIG_PUBLIC_KEY1="../../../Tools/test_keys/rsa2048.pub"
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_POS_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
+1 -3
View File
@@ -37,13 +37,11 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_FIGURE_OF_EIGHT=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
CONFIG_MODULES_HARDFAULT_STREAM=y
CONFIG_MODULES_LAND_DETECTOR=y
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
CONFIG_MODULES_LOAD_MON=y
@@ -26,6 +26,3 @@ nshterm /dev/ttyS3 &
# Start the time_persistor to cyclically store the RTC in FRAM
time_persistor start
# Start the ESC telemetry
dshot telemetry -d /dev/ttyS5 -x
+1 -2
View File
@@ -3,8 +3,7 @@ CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF=n
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_POS_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_COMMON_RC=y
+1 -2
View File
@@ -2,8 +2,7 @@ CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_MODE_MANAGER=n
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
CONFIG_MODULES_FW_POS_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=n
CONFIG_MODULES_MC_ATT_CONTROL=n
+1 -2
View File
@@ -42,8 +42,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
+1 -2
View File
@@ -30,8 +30,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
@@ -49,8 +49,7 @@ CONFIG_MODULES_UUV_ATT_CONTROL=y
CONFIG_MODULES_UUV_POS_CONTROL=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_MANUAL_CONTROL=y
CONFIG_MODULES_MC_ATT_CONTROL=y
+1 -2
View File
@@ -38,8 +38,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
CONFIG_MODULES_GYRO_FFT=y
+1 -2
View File
@@ -43,8 +43,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
+1 -2
View File
@@ -50,8 +50,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
+1 -2
View File
@@ -50,8 +50,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
+1 -2
View File
@@ -49,8 +49,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
@@ -50,8 +50,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
+1 -2
View File
@@ -46,8 +46,7 @@ CONFIG_MODULES_EVENTS=y
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
CONFIG_MODULES_FW_ATT_CONTROL=y
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
CONFIG_MODULES_FW_MODE_MANAGER=y
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
CONFIG_MODULES_FW_POS_CONTROL=y
CONFIG_MODULES_FW_RATE_CONTROL=y
CONFIG_MODULES_GIMBAL=y
CONFIG_MODULES_GYRO_CALIBRATION=y
@@ -14,7 +14,6 @@ CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU9250=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
CONFIG_DRIVERS_MAGNETOMETER_AKM_AK8963=y
CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
CONFIG_DRIVERS_PWM_OUT=y

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