mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-31 01:50:04 +08:00
Compare commits
286 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04ea8d26f2 | |||
| f97ca30c3f | |||
| d847f20515 | |||
| 563d0dffd4 | |||
| 27edc5c4d8 | |||
| 84150189d4 | |||
| 0b7cddeca0 | |||
| 580c196600 | |||
| d4defb7a81 | |||
| 5d2e7c8748 | |||
| 4a99a51fb1 | |||
| 8aece9bff2 | |||
| 2fd4150b38 | |||
| 81747f35bb | |||
| 1c9c5e51c2 | |||
| 82a7d0410c | |||
| aab2390e51 | |||
| 1755b8304e | |||
| e6f07bde2a | |||
| 9ca0630376 | |||
| 11440cfb45 | |||
| 878c8bfcce | |||
| 4713a6737e | |||
| 585c92796d | |||
| 4ba4b340cc | |||
| 22c2878cf8 | |||
| 741ea6b707 | |||
| 5d8a107925 | |||
| c94c1ce4d2 | |||
| 03aec2e188 | |||
| a5729da4e9 | |||
| 15e9c65a8f | |||
| 8bca467c15 | |||
| bb0210ecd7 | |||
| 67ee4817ae | |||
| 232f699a7f | |||
| c2bd3900be | |||
| 44967bdaab | |||
| 1337fca4d0 | |||
| 3d36c8519d | |||
| f98eb067be | |||
| e4d25df58a | |||
| 8eaf93468e | |||
| d967cdbb48 | |||
| 556a302a09 | |||
| f7c35291ee | |||
| 81cf6a736d | |||
| 6fa6360aef | |||
| 80d4fad624 | |||
| a9cdb36d7c | |||
| 8f6ce4edbf | |||
| b7c5ba1752 | |||
| cd63cfed3a | |||
| 7d1d398984 | |||
| 04ea4f9b3a | |||
| d999258171 | |||
| de00c23e19 | |||
| cf19764d75 | |||
| 87a63e75be | |||
| 4c63e9e4f9 | |||
| 7dcea6b2e4 | |||
| 787fe9590d | |||
| 5b0014cb06 | |||
| f8188f0981 | |||
| c86d44f831 | |||
| 6b3e3aa363 | |||
| 2cda0efd84 | |||
| 0f1507c24e | |||
| bab256bfe6 | |||
| cd2170deea | |||
| 130fefb1e7 | |||
| af752536b9 | |||
| 9169a7c5fc | |||
| f3d58cdf10 | |||
| 6c24413888 | |||
| 5ff4eea870 | |||
| ac48b8b51d | |||
| 2a9e205442 | |||
| 9d57a3c02f | |||
| bbcf741e9e | |||
| be4d0d351c | |||
| 5fff1ad6d1 | |||
| f67eb6989d | |||
| ca47f6f016 | |||
| 16c77be7c0 | |||
| a75db1286d | |||
| 8bfd3b0f62 | |||
| 9183c479a5 | |||
| 1a4e8a7341 | |||
| 510d3cfb39 | |||
| ebbb880e92 | |||
| 56560726d3 | |||
| d7b165991f | |||
| 54f7b58007 | |||
| 1a0f97ebbd | |||
| 64b0586dad | |||
| cf941b18df | |||
| 13c413622b | |||
| b1dfe1d731 | |||
| 00c3017334 | |||
| 89f29e91de | |||
| 7f33dcfcfb | |||
| d617bf4129 | |||
| 7250ee1b32 | |||
| ebbd2c1825 | |||
| ee022a70c1 | |||
| e0bb56b6a7 | |||
| 6ef82ada6e | |||
| 20b6f343a3 | |||
| 02ed1162ed | |||
| b33b0398dd | |||
| ae16556107 | |||
| b2f663648e | |||
| 3478765c31 | |||
| f252e20eae | |||
| 0931179579 | |||
| 98eae3cd4c | |||
| f2f4488594 | |||
| ecfdbd2e60 | |||
| c60b1d1a5f | |||
| 07734c243f | |||
| 072892fbef | |||
| 746ae25768 | |||
| 0481c04b2b | |||
| 4d21110cfb | |||
| 7e45f49152 | |||
| e29a36adb4 | |||
| 435e9665b3 | |||
| ea0ef154d8 | |||
| ad1d9e1312 | |||
| ea673b0b5b | |||
| 4f66410d24 | |||
| 09638552b7 | |||
| 4a3cbecf01 | |||
| f7e6e1354a | |||
| 2a124fd998 | |||
| af0129dab7 | |||
| c8501cc1d0 | |||
| 4ed3e9e210 | |||
| 25fcb3c913 | |||
| 9f69e9ee6c | |||
| 1fa878ad88 | |||
| dec550dcb9 | |||
| f3a8d05f8c | |||
| 5121358e87 | |||
| a327b14cef | |||
| 0459481cb4 | |||
| cc4d5bd2a6 | |||
| fd062d0085 | |||
| e2c0e5c88a | |||
| aad607e0dd | |||
| a0d22a4d21 | |||
| acc0cd7e8a | |||
| afc360d637 | |||
| db8781e531 | |||
| e008ca24f1 | |||
| c9343ca11d | |||
| af06bee8d0 | |||
| 478875c006 | |||
| 64056fc7bb | |||
| 1211aad9b0 | |||
| f4f93118e6 | |||
| fdfe43471e | |||
| 3f17f15505 | |||
| 8b12b7c641 | |||
| f04aa2494b | |||
| 6cf0bf5e19 | |||
| 58a699e3cb | |||
| 82be5cd44f | |||
| 718d308d91 | |||
| a294e011ab | |||
| 1a7717b5d9 | |||
| 1af295f1a9 | |||
| cd231d0eed | |||
| a91aa40a3d | |||
| 0381e14822 | |||
| a737036633 | |||
| 588c4a04c8 | |||
| b01c179eed | |||
| e2f5debf77 | |||
| a8d54c7fae | |||
| 2d99ae18ad | |||
| 086c044f47 | |||
| a39a3e2099 | |||
| b488e45e73 | |||
| 176f09b48b | |||
| 876730a9be | |||
| 588eedb8cb | |||
| c8ff5909b5 | |||
| 28a0de63c5 | |||
| 33d99a13e8 | |||
| bfcd4564a6 | |||
| 3157a4e171 | |||
| d2478d00cf | |||
| 8ed3489bd1 | |||
| 84d4ee0e60 | |||
| 326e2a9f5c | |||
| 4883f2128a | |||
| d4d60a5181 | |||
| abc629c2bb | |||
| 75ce550db3 | |||
| b74e46b1ac | |||
| e5657ba011 | |||
| 9ca9ae5b24 | |||
| ba579245fb | |||
| a18c18e163 | |||
| 72ed160aa9 | |||
| 2e66bbdfb8 | |||
| e06629bfe5 | |||
| 0d00543292 | |||
| 7d79bdfa05 | |||
| edcda80cb9 | |||
| b93dd0e8d4 | |||
| 7b3d168af1 | |||
| 9257744da3 | |||
| d841bf124f | |||
| 9d9d8aeb4c | |||
| 5808dac4bc | |||
| 97561d7802 | |||
| ee8030de56 | |||
| 0b1eba948a | |||
| a07c986dbc | |||
| 85b6b0a406 | |||
| b76c1c97b3 | |||
| fd72578e98 | |||
| ebcfb5348c | |||
| 4ca3e1b6e6 | |||
| af36c0b6ec | |||
| b38305dd21 | |||
| ab82c24e3e | |||
| 54b20f1ff3 | |||
| ea92c7ffcc | |||
| d0d9aaa6e9 | |||
| 3fa9cda505 | |||
| a99cc0a20b | |||
| 46e43ec725 | |||
| 79e0e00d8c | |||
| 39abd87949 | |||
| 36d89df0a7 | |||
| 9ff6c4bf28 | |||
| b46b2cdf54 | |||
| 85de0ff227 | |||
| 3a3f04c0f4 | |||
| 7a6c4f0bfa | |||
| 561dceea7b | |||
| aa0dda7443 | |||
| f8bebd9e41 | |||
| f2bca92221 | |||
| 7f14110bb1 | |||
| fe3cd4b0cb | |||
| 1b9f1b78e5 | |||
| ca9948a84d | |||
| eac14b7db2 | |||
| a42dc2165c | |||
| 08c790217d | |||
| 5083ec52ec | |||
| f8f8ddc101 | |||
| 691fdf713c | |||
| 57c1ba545f | |||
| 6fe0fa6d63 | |||
| c5c27a87f1 | |||
| 8c4620b77e | |||
| 81575049df | |||
| f832ae688d | |||
| 20c0d3a096 | |||
| b48aca10a0 | |||
| 397ff4a102 | |||
| 13b62a74d6 | |||
| 76cf54c948 | |||
| aa8a9e3a06 | |||
| fe5a07a96d | |||
| 48f1687d3a | |||
| 1cd7d54170 | |||
| 9d6c2baa90 | |||
| 8e5f28f834 | |||
| 80ee622f77 | |||
| 40349fa3dc | |||
| 177613eb68 | |||
| 9bbfc8715e | |||
| e03aef616c | |||
| a5a67315fd | |||
| be551097e0 | |||
| dc5f8118b0 | |||
| 59b96f4968 | |||
| b1b0032b8d | |||
| e2b31454a3 |
@@ -35,6 +35,7 @@ pipeline {
|
||||
|
||||
def nuttx_builds_archive = [
|
||||
target: [
|
||||
"3dr_ctrl-zero-h7-oem-revg_default",
|
||||
"airmind_mindpx-v2_default",
|
||||
"ark_can-flow_canbootloader",
|
||||
"ark_can-flow_default",
|
||||
@@ -76,6 +77,7 @@ pipeline {
|
||||
"matek_h743-mini_default",
|
||||
"matek_h743-slim_default",
|
||||
"matek_h743_default",
|
||||
"micoair_h743_default",
|
||||
"modalai_fc-v1_default",
|
||||
"modalai_fc-v2_default",
|
||||
"mro_ctrl-zero-classic_default",
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@ tab_width = 8
|
||||
# Not in the official standard, but supported by many editors
|
||||
max_line_length = 120
|
||||
|
||||
[*.yaml]
|
||||
[*.yaml, *.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
@@ -20,14 +20,14 @@ body:
|
||||
3. Took off '....'
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
@@ -45,7 +45,7 @@ body:
|
||||
placeholder: |
|
||||
# PASTE HERE THE LINK TO THE LOG
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
@@ -60,14 +60,14 @@ body:
|
||||
placeholder: |
|
||||
# If you don't know the version, paste the output of `ver all` in the MAVLink Shell of QGC
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Flight controller
|
||||
description: Specify your flight controller model (what type is it, where was it bought from, ...).
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
|
||||
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
|
||||
# and comment the "runs-on: [runs-on,runner=..." lines.
|
||||
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
|
||||
|
||||
name: Build all targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
group_targets:
|
||||
name: Scan for Board Targets
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python Dependencies
|
||||
uses: py-actions/py-dependency-install@v4
|
||||
with:
|
||||
path: "./Tools/setup/requirements.txt"
|
||||
|
||||
- id: set-matrix
|
||||
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py --group)"
|
||||
|
||||
- id: set-timestamp
|
||||
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
|
||||
|
||||
setup:
|
||||
name: ${{ matrix.group }}
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
|
||||
needs: group_targets
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.group_targets.outputs.matrix) }}
|
||||
container:
|
||||
image: ${{ matrix.container }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: ccache setup keys
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ matrix.group }}-ccache-${{ needs.group_targets.outputs.timestamp }}
|
||||
restore-keys: ${{ matrix.group }}-ccache-${{ needs.group_targets.outputs.timestamp }}
|
||||
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 120M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: build target group
|
||||
run: |
|
||||
./Tools/ci_build_all_runner.sh ${{matrix.targets}}
|
||||
|
||||
- name: Upload px4 package
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: px4_${{matrix.group}}_build_artifacts
|
||||
path: |
|
||||
build/**/*.px4
|
||||
build/**/*.bin
|
||||
compression-level: 0
|
||||
|
||||
- name: ccache post-run
|
||||
run: ccache -s
|
||||
@@ -16,6 +16,7 @@ jobs:
|
||||
matrix:
|
||||
check: [
|
||||
"check_format",
|
||||
"check_newlines",
|
||||
"tests",
|
||||
"tests_coverage",
|
||||
"px4_fmu-v2_default stack_check",
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
name: Compile Linux Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-armhf:2023-06-26
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
beaglebone_blue_default,
|
||||
emlid_navio2_default,
|
||||
px4_raspberrypi_default,
|
||||
scumaker_pilotpi_default,
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
- name: ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: ${{matrix.config}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make ${{matrix.config}}
|
||||
run: make ${{matrix.config}}
|
||||
- name: ccache post-run
|
||||
run: ccache -s
|
||||
@@ -1,54 +0,0 @@
|
||||
name: Compile Linux ARM64 Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-aarch64:2022-08-12
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
scumaker_pilotpi_arm64,
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: ${{matrix.config}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make ${{matrix.config}}
|
||||
run: make ${{matrix.config}}
|
||||
- name: ccache post-run
|
||||
run: ccache -s
|
||||
@@ -1,136 +0,0 @@
|
||||
name: Compile Nuttx Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2022-08-12
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config: [
|
||||
airmind_mindpx-v2,
|
||||
ark_can-flow,
|
||||
ark_can-gps,
|
||||
ark_can-rtk-gps,
|
||||
ark_cannode,
|
||||
ark_fmu-v6x,
|
||||
ark_pi6x,
|
||||
ark_septentrio-gps,
|
||||
atl_mantis-edu,
|
||||
av_x-v1,
|
||||
bitcraze_crazyflie,
|
||||
bitcraze_crazyflie21,
|
||||
cuav_can-gps-v1,
|
||||
cuav_nora,
|
||||
cuav_x7pro,
|
||||
cubepilot_cubeorange,
|
||||
cubepilot_cubeorangeplus,
|
||||
cubepilot_cubeyellow,
|
||||
diatone_mamba-f405-mk2,
|
||||
freefly_can-rtk-gps,
|
||||
holybro_can-gps-v1,
|
||||
holybro_durandal-v1,
|
||||
holybro_kakutef7,
|
||||
holybro_kakuteh7,
|
||||
holybro_pix32v5,
|
||||
matek_gnss-m9n-f4,
|
||||
matek_h743,
|
||||
matek_h743-mini,
|
||||
matek_h743-slim,
|
||||
modalai_fc-v1,
|
||||
modalai_fc-v2,
|
||||
mro_ctrl-zero-classic,
|
||||
mro_ctrl-zero-f7,
|
||||
mro_ctrl-zero-f7-oem,
|
||||
mro_ctrl-zero-h7,
|
||||
mro_ctrl-zero-h7-oem,
|
||||
mro_pixracerpro,
|
||||
mro_x21,
|
||||
mro_x21-777,
|
||||
nxp_fmuk66-e,
|
||||
nxp_fmuk66-v3,
|
||||
nxp_mr-canhubk3,
|
||||
nxp_ucans32k146,
|
||||
omnibus_f4sd,
|
||||
px4_fmu-v2,
|
||||
px4_fmu-v3,
|
||||
px4_fmu-v4,
|
||||
px4_fmu-v4pro,
|
||||
px4_fmu-v5,
|
||||
px4_fmu-v5x,
|
||||
px4_fmu-v6c,
|
||||
px4_fmu-v6u,
|
||||
px4_fmu-v6x,
|
||||
px4_fmu-v6xrt,
|
||||
raspberrypi_pico,
|
||||
sky-drones_smartap-airlink,
|
||||
spracing_h7extreme,
|
||||
uvify_core,
|
||||
siyi_n7
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: ${{matrix.config}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 120M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make all_variants_${{matrix.config}}
|
||||
run: make all_variants_${{matrix.config}}
|
||||
timeout-minutes: 45
|
||||
- name: make ${{matrix.config}} bloaty_compileunits
|
||||
run: make ${{matrix.config}} bloaty_compileunits || true
|
||||
- name: make ${{matrix.config}} bloaty_inlines
|
||||
run: make ${{matrix.config}} bloaty_inlines || true
|
||||
- name: make ${{matrix.config}} bloaty_segments
|
||||
run: make ${{matrix.config}} bloaty_segments || true
|
||||
- name: make ${{matrix.config}} bloaty_symbols
|
||||
run: make ${{matrix.config}} bloaty_symbols || true
|
||||
- name: make ${{matrix.config}} bloaty_templates
|
||||
run: make ${{matrix.config}} bloaty_templates || true
|
||||
- name: make ${{matrix.config}} bloaty_ram
|
||||
run: make ${{matrix.config}} bloaty_ram || true
|
||||
- name: make ${{matrix.config}} bloaty_compare_master
|
||||
run: make ${{matrix.config}} bloaty_compare_master || true
|
||||
- name: ccache post-run
|
||||
run: ccache -s
|
||||
|
||||
- name: Upload px4 package
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: px4_package_${{matrix.config}}
|
||||
path: |
|
||||
build/**/*.px4
|
||||
build/**/*.bin
|
||||
@@ -54,4 +54,3 @@ jobs:
|
||||
AWS_REGION: 'us-west-1'
|
||||
SOURCE_DIR: 'build/${{ matrix.target }}/_metadata/'
|
||||
DEST_DIR: 'Firmware/${{ env.version }}/${{ matrix.target }}/'
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
- name: Upload px4 coredump
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
@@ -103,21 +103,21 @@ jobs:
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
- name: Store PX4 log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: px4_log
|
||||
path: ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Store ROS log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ros_log
|
||||
path: ~/.ros/**/rostest-*.log
|
||||
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
- name: Upload px4 coredump
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
@@ -98,21 +98,21 @@ jobs:
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
- name: Store PX4 log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: px4_log
|
||||
path: ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Store ROS log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ros_log
|
||||
path: ~/.ros/**/rostest-*.log
|
||||
|
||||
+124
-106
@@ -1,3 +1,8 @@
|
||||
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
|
||||
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
|
||||
# and comment the "runs-on: [runs-on,runner=..." lines.
|
||||
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
|
||||
|
||||
name: SITL Tests
|
||||
|
||||
on:
|
||||
@@ -10,126 +15,139 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Testing PX4 ${{ matrix.config.model }}
|
||||
runs-on: [runs-on,runner=16cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}"]
|
||||
container:
|
||||
image: px4io/px4-dev-simulation-focal:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska
|
||||
# - {model: "standard_vtol", latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer" } # Australia
|
||||
- {model: "tailsitter" , latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo" } # Florida
|
||||
- {model: "standard_vtol", latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage" } # Zurich
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-simulation-focal:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download MAVSDK
|
||||
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
- name: Install MAVSDK
|
||||
run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
- name: Git Ownership Workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
- id: set-timestamp
|
||||
name: Set timestamp for cache
|
||||
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
|
||||
|
||||
- name: check environment
|
||||
env:
|
||||
PX4_HOME_LAT: ${{matrix.config.latitude}}
|
||||
PX4_HOME_LON: ${{matrix.config.longitude}}
|
||||
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: Build PX4
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: make px4_sitl_default
|
||||
- name: ccache post-run px4/firmware
|
||||
run: ccache -s
|
||||
- name: Build SITL Gazebo
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: make px4_sitl_default sitl_gazebo-classic
|
||||
- name: ccache post-run sitl_gazebo-classic
|
||||
run: ccache -s
|
||||
- name: Build MAVSDK tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
DONT_RUN: 1
|
||||
run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests
|
||||
- name: ccache post-run mavsdk_tests
|
||||
run: ccache -s
|
||||
- name: Cache Key Config
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: sitl-ccache-${{ steps.set-timestamp.outputs.timestamp }}
|
||||
restore-keys: sitl-ccache-${{ steps.set-timestamp.outputs.timestamp }}
|
||||
|
||||
- name: Core dump settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
- name: Cache Conf Config
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 120M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: Run SITL tests
|
||||
env:
|
||||
PX4_HOME_LAT: ${{matrix.config.latitude}}
|
||||
PX4_HOME_LON: ${{matrix.config.longitude}}
|
||||
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
|
||||
timeout-minutes: 45
|
||||
- name: Build PX4
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: make px4_sitl_default
|
||||
|
||||
- name: Look at core files
|
||||
if: failure()
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
- name: Upload px4 coredump
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
- name: Cache Post-Run [px4_sitl_default]
|
||||
run: ccache -s
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
- name: Build SITL Gazebo
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: make px4_sitl_default sitl_gazebo-classic
|
||||
|
||||
# Report test coverage
|
||||
- name: Upload coverage
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
run: |
|
||||
git config --global credential.helper "" # disable the keychain credential helper
|
||||
git config --global --add credential.helper store # enable the local store credential helper
|
||||
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
|
||||
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
|
||||
mkdir -p coverage
|
||||
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
- name: Upload coverage information to Codecov
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: mavsdk
|
||||
file: coverage/lcov.info
|
||||
- name: Cache Post-Run [sitl_gazebo-classic]
|
||||
run: ccache -s
|
||||
|
||||
- name: Download MAVSDK
|
||||
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
|
||||
- name: Install MAVSDK
|
||||
run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
|
||||
- name: Check PX4 Environment Variables
|
||||
env:
|
||||
PX4_HOME_LAT: ${{matrix.config.latitude}}
|
||||
PX4_HOME_LON: ${{matrix.config.longitude}}
|
||||
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
|
||||
- name: Build PX4 / MAVSDK tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
DONT_RUN: 1
|
||||
run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests
|
||||
|
||||
- name: Cache Post-Run [px4_sitl_default sitl_gazebo-classic mavsdk_tests]
|
||||
run: ccache -s
|
||||
|
||||
- name: Core Dump Settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run SITL / MAVSDK Tests
|
||||
env:
|
||||
PX4_HOME_LAT: ${{matrix.config.latitude}}
|
||||
PX4_HOME_LON: ${{matrix.config.longitude}}
|
||||
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 10 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
|
||||
timeout-minutes: 45
|
||||
|
||||
- name: Upload failed logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: failed-${{matrix.config.model}}-logs.zip
|
||||
path: |
|
||||
logs/**/**/**/*.log
|
||||
logs/**/**/**/*.ulg
|
||||
build/px4_sitl_default/tmp_mavsdk_tests/rootfs/*.ulg
|
||||
|
||||
- name: Look at Core files
|
||||
if: failure() && ${{ hashFiles('px4.core') != '' }}
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
|
||||
- name: Upload PX4 coredump
|
||||
if: failure() && ${{ hashFiles('px4.core') != '' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
|
||||
- name: Setup & Generate Coverage Report
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
run: |
|
||||
git config --global credential.helper "" # disable the keychain credential helper
|
||||
git config --global --add credential.helper store # enable the local store credential helper
|
||||
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
|
||||
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
|
||||
mkdir -p coverage
|
||||
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
|
||||
- name: Upload Coverage Information to Codecov
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: mavsdk
|
||||
file: coverage/lcov.info
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@
|
||||
[submodule "src/modules/zenoh/zenoh-pico"]
|
||||
path = src/modules/zenoh/zenoh-pico
|
||||
url = https://github.com/px4/zenoh-pico
|
||||
branch = pr-zubf-werror-fix
|
||||
branch = dev/1.0.0-px4
|
||||
[submodule "src/lib/heatshrink/heatshrink"]
|
||||
path = src/lib/heatshrink/heatshrink
|
||||
url = https://github.com/PX4/heatshrink.git
|
||||
|
||||
Vendored
+1
-1
@@ -2,4 +2,4 @@
|
||||
{
|
||||
"name": "PX4 detect"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
Vendored
+10
@@ -111,6 +111,11 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6xrt_bootloader
|
||||
3dr_ctrl-zero-h7-oem-revg_default:
|
||||
short: 3dr_ctrl-zero-h7-oem-revg
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: 3dr_ctrl-zero-h7-oem-revg_default
|
||||
airmind_mindpx-v2_default:
|
||||
short: airmind_mindpx-v2
|
||||
buildType: MinSizeRel
|
||||
@@ -281,6 +286,11 @@ CONFIG:
|
||||
buildType: MiniSizeRel
|
||||
settings:
|
||||
CONFIG: matek_gnss-m9n-f4_default
|
||||
micoair_h743_default:
|
||||
short: micoair_h743
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743_default
|
||||
modalai_fc-v1_default:
|
||||
short: modalai_fc-v1
|
||||
buildType: MinSizeRel
|
||||
|
||||
+9
-1
@@ -113,12 +113,20 @@ include(px4_parse_function_args)
|
||||
include(px4_git)
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --exclude ext/* --always --tags
|
||||
COMMAND git describe --exclude ext/* --tags --match "v[0-9]*"
|
||||
OUTPUT_VARIABLE PX4_GIT_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
RESULTS_VARIABLE GIT_DESCRIBE_RESULT
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
|
||||
# if proper git tag unavilable default to v0.0.0
|
||||
if(NOT ${GIT_DESCRIBE_RESULT} MATCHES "0")
|
||||
set(PX4_GIT_TAG "v0.0.0")
|
||||
endif()
|
||||
|
||||
message(STATUS "PX4_GIT_TAG: ${PX4_GIT_TAG}")
|
||||
|
||||
# git describe to X.Y.Z version
|
||||
string(REPLACE "." ";" VERSION_LIST ${PX4_GIT_TAG})
|
||||
|
||||
|
||||
@@ -185,6 +185,17 @@ menu "Serial ports"
|
||||
string "EXT2 tty port"
|
||||
endmenu
|
||||
|
||||
menu "File paths"
|
||||
|
||||
config BOARD_ROOT_PATH
|
||||
string "PX4 Root file path"
|
||||
default "/fs/microsd"
|
||||
|
||||
config BOARD_PARAM_FILE
|
||||
string "Parameter file"
|
||||
default "/fs/mtd_params"
|
||||
endmenu
|
||||
|
||||
menu "drivers"
|
||||
source "src/drivers/Kconfig"
|
||||
endmenu
|
||||
|
||||
@@ -324,6 +324,7 @@ px4io_update:
|
||||
git status
|
||||
|
||||
bootloaders_update: \
|
||||
3dr_ctrl-zero-h7-oem-revg_bootloader \
|
||||
ark_fmu-v6x_bootloader \
|
||||
ark_pi6x_bootloader \
|
||||
cuav_nora_bootloader \
|
||||
@@ -339,6 +340,7 @@ bootloaders_update: \
|
||||
matek_h743_bootloader \
|
||||
matek_h743-mini_bootloader \
|
||||
matek_h743-slim_bootloader \
|
||||
micoair_h743_bootloader \
|
||||
modalai_fc-v2_bootloader \
|
||||
mro_ctrl-zero-classic_bootloader \
|
||||
mro_ctrl-zero-h7_bootloader \
|
||||
@@ -379,9 +381,9 @@ doxygen:
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/doxygen
|
||||
@touch "$(SRC_DIR)"/build/doxygen/Documentation/.nojekyll
|
||||
|
||||
# Astyle
|
||||
# Style
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: check_format format
|
||||
.PHONY: check_format format check_newlines
|
||||
|
||||
check_format:
|
||||
$(call colorecho,'Checking formatting with astyle')
|
||||
@@ -392,6 +394,10 @@ format:
|
||||
$(call colorecho,'Formatting with astyle')
|
||||
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh --fix
|
||||
|
||||
check_newlines:
|
||||
$(call colorecho,'Checking for missing or duplicate newlines at the end of files')
|
||||
@"$(SRC_DIR)"/Tools/astyle/check_newlines.sh
|
||||
|
||||
# Testing
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard tests_avoidance
|
||||
@@ -545,14 +551,14 @@ distclean:
|
||||
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
|
||||
%:
|
||||
$(if $(filter $(FIRST_ARG),$@), \
|
||||
$(error "Make target $@ not found. It either does not exist or $@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#)
|
||||
$(error "Make target $@ not found. It either does not exist or $@ cannot be the first argument. Use '$(MAKE) list_config_targets' to get a list of all possible [configuration] targets."),@#)
|
||||
|
||||
# Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069)
|
||||
help:
|
||||
@echo "Usage: $(MAKE) <target>"
|
||||
@echo "Where <target> is one of:"
|
||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
|
||||
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
|
||||
awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
|
||||
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(Makefile)'
|
||||
@echo
|
||||
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
|
||||
|
||||
@@ -120,6 +120,7 @@ add_custom_command(
|
||||
${romfs_gen_root_dir}/init.d/rc.serial
|
||||
${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
${romfs_gen_root_dir}/init.d/rc.autostart.post
|
||||
${romfs_gen_root_dir}/init.d/rc.filepaths
|
||||
${romfs_copy_stamp}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
|
||||
@@ -131,6 +132,9 @@ add_custom_command(
|
||||
--rc-dir ${romfs_gen_root_dir}/init.d
|
||||
--serial-ports ${board_serial_ports} ${added_arguments}
|
||||
--config-files ${module_config_files} #--verbose
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/filepaths/generate_config.py
|
||||
--rc-dir ${romfs_gen_root_dir}/init.d
|
||||
--params-file ${CONFIG_BOARD_PARAM_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_copy_stamp}
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
DEPENDS ${romfs_tar_file}
|
||||
@@ -320,6 +324,7 @@ add_custom_target(romfs_gen_files_target
|
||||
DEPENDS
|
||||
${romfs_copy_stamp}
|
||||
${romfs_gen_root_dir}/init.d/rc.serial
|
||||
${romfs_gen_root_dir}/init.d/rc.filepaths
|
||||
romfs_extras.stamp
|
||||
)
|
||||
|
||||
|
||||
@@ -21,25 +21,14 @@ set R /
|
||||
#
|
||||
ver all
|
||||
|
||||
if mft query -q -k MTD -s MTD_PARAMETERS -v /fs/mtd_params
|
||||
then
|
||||
set PARAM_FILE /fs/mtd_params
|
||||
fi
|
||||
|
||||
if mft query -q -k MTD -s MTD_PARAMETERS -v /dev/eeeprom0
|
||||
then
|
||||
set PARAM_FILE /dev/eeeprom0
|
||||
fi
|
||||
|
||||
if mft query -q -k MTD -s MTD_PARAMETERS -v /mnt/qspi/params
|
||||
then
|
||||
set PARAM_FILE /mnt/qspi/params
|
||||
fi
|
||||
# Load param file location from kconfig
|
||||
. ${R}etc/init.d/rc.filepaths
|
||||
|
||||
#
|
||||
# Load parameters.
|
||||
#
|
||||
param select $PARAM_FILE
|
||||
|
||||
if ! param load
|
||||
then
|
||||
param reset_all
|
||||
|
||||
@@ -29,4 +29,3 @@ 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
|
||||
|
||||
|
||||
@@ -30,4 +30,3 @@ param set-default PWM_MAIN_FUNC3 103
|
||||
param set-default PWM_MAIN_FUNC4 104
|
||||
|
||||
param set-default EKF2_RNG_A_HMAX 10
|
||||
|
||||
|
||||
@@ -94,4 +94,3 @@ param set-default CA_METHOD 0
|
||||
# disable attitude failure detection
|
||||
param set-default FD_FAIL_P 0
|
||||
param set-default FD_FAIL_R 0
|
||||
|
||||
|
||||
@@ -12,4 +12,3 @@ 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
|
||||
|
||||
|
||||
@@ -47,5 +47,5 @@ param set-default MPC_ALT_MODE 2
|
||||
|
||||
param set-default SENS_FLOW_ROT 6
|
||||
param set-default SENS_FLOW_MINHGT 0.7
|
||||
param set-default SENS_FLOW_MAXHGT 3
|
||||
param set-default SENS_FLOW_MAXHGT 15
|
||||
param set-default SENS_FLOW_MAXR 2.5
|
||||
|
||||
@@ -30,4 +30,3 @@ param set-default PWM_MAIN_FUNC3 103
|
||||
param set-default PWM_MAIN_FUNC4 104
|
||||
|
||||
param set-default LPE_FUSION 242
|
||||
|
||||
|
||||
@@ -18,4 +18,3 @@ param set-default LPE_FUSION 132
|
||||
|
||||
# AEQ: External heading set to use vision input
|
||||
param set-default ATT_EXT_HDG_M 1
|
||||
|
||||
|
||||
@@ -41,4 +41,3 @@ 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
|
||||
|
||||
|
||||
@@ -61,4 +61,3 @@ 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
|
||||
|
||||
|
||||
@@ -68,5 +68,3 @@ param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
param set-default PWM_MAIN_FUNC9 206
|
||||
param set-default PWM_MAIN_REV 256
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 30
|
||||
param set-default MIS_TAKEOFF_ALT 30
|
||||
|
||||
param set-default NAV_ACC_RAD 15
|
||||
|
||||
@@ -41,7 +41,6 @@ param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 30
|
||||
param set-default MIS_TAKEOFF_ALT 30
|
||||
|
||||
param set-default NAV_ACC_RAD 15
|
||||
@@ -71,4 +70,3 @@ param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
param set-default PWM_MAIN_FUNC9 206
|
||||
param set-default PWM_MAIN_REV 256
|
||||
|
||||
|
||||
@@ -55,4 +55,3 @@ param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
param set-default PWM_MAIN_FUNC9 206
|
||||
param set-default PWM_MAIN_REV 256
|
||||
|
||||
|
||||
@@ -54,4 +54,3 @@ param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
param set-default PWM_MAIN_FUNC9 206
|
||||
param set-default PWM_MAIN_REV 256
|
||||
|
||||
|
||||
@@ -55,4 +55,3 @@ param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
param set-default PWM_MAIN_FUNC9 206
|
||||
param set-default PWM_MAIN_REV 256
|
||||
|
||||
|
||||
@@ -62,4 +62,3 @@ param set-default PWM_MAIN_FUNC7 202
|
||||
param set-default PWM_MAIN_FUNC8 203
|
||||
param set-default PWM_MAIN_FUNC9 206
|
||||
param set-default PWM_MAIN_REV 256
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 30
|
||||
param set-default MIS_TAKEOFF_ALT 30
|
||||
|
||||
param set-default NAV_ACC_RAD 15
|
||||
|
||||
@@ -23,7 +23,6 @@ param set-default FW_RR_P 0.085
|
||||
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 30
|
||||
param set-default MIS_TAKEOFF_ALT 20
|
||||
|
||||
param set-default NAV_ACC_RAD 15
|
||||
|
||||
@@ -78,4 +78,3 @@ param set-default VT_FWD_THRUST_EN 4
|
||||
param set-default VT_FWD_THRUST_SC 1
|
||||
param set-default VT_F_TRANS_THR 0.75
|
||||
param set-default VT_TYPE 2
|
||||
|
||||
|
||||
@@ -75,4 +75,3 @@ param set-default VT_F_TRANS_DUR 1.5
|
||||
param set-default VT_TYPE 0
|
||||
|
||||
param set-default WV_EN 0
|
||||
|
||||
|
||||
@@ -88,4 +88,3 @@ param set-default PWM_MAIN_FUNC11 422
|
||||
param set-default RC_MAP_AUX1 8
|
||||
param set-default RC_MAP_AUX2 9
|
||||
param set-default RC_MAP_AUX3 10
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 30
|
||||
param set-default MIS_TAKEOFF_ALT 30
|
||||
|
||||
param set-default NAV_ACC_RAD 15
|
||||
|
||||
@@ -33,7 +33,7 @@ param set-default PWM_MAIN_FUNC3 103
|
||||
param set-default PWM_MAIN_FUNC4 104
|
||||
param set-default PWM_MAIN_FUNC5 0
|
||||
|
||||
parm set-default FD_FAIL_R 70
|
||||
param set-default FD_FAIL_R 70
|
||||
|
||||
param set-default FW_P_TC 0.6
|
||||
|
||||
|
||||
@@ -31,4 +31,3 @@ param set-default PWM_MAIN_FUNC1 201
|
||||
param set-default PWM_MAIN_FUNC2 201
|
||||
param set-default PWM_MAIN_FUNC6 101
|
||||
param set-default PWM_MAIN_FUNC7 101
|
||||
|
||||
|
||||
@@ -38,4 +38,3 @@ param set-default PWM_MAIN_FUNC1 201
|
||||
param set-default PWM_MAIN_FUNC2 201
|
||||
param set-default PWM_MAIN_FUNC6 101
|
||||
param set-default PWM_MAIN_FUNC7 101
|
||||
|
||||
|
||||
@@ -41,4 +41,3 @@ param set-default CA_R_REV 3
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
|
||||
|
||||
@@ -64,4 +64,3 @@ param set-default PWM_MAIN_FUNC4 203
|
||||
param set-default PWM_MAIN_FUNC5 407
|
||||
param set-default PWM_MAIN_FUNC6 408
|
||||
param set-default PWM_MAIN_FUNC7 409
|
||||
|
||||
|
||||
@@ -69,4 +69,3 @@ param set-default PWM_MAIN_FUNC4 203
|
||||
param set-default PWM_MAIN_FUNC5 407
|
||||
param set-default PWM_MAIN_FUNC6 408
|
||||
param set-default PWM_MAIN_FUNC7 409
|
||||
|
||||
|
||||
@@ -36,4 +36,3 @@ param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
param set-default PWM_MAIN_FUNC3 201
|
||||
param set-default PWM_MAIN_FUNC4 103
|
||||
|
||||
|
||||
@@ -6,16 +6,40 @@
|
||||
. ${R}etc/init.d/rc.rover_differential_defaults
|
||||
|
||||
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
|
||||
PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
|
||||
PX4_GZ_WORLD=${PX4_GZ_WORLD:=rover}
|
||||
PX4_SIM_MODEL=${PX4_SIM_MODEL:=r1_rover}
|
||||
|
||||
param set-default SIM_GZ_EN 1 # Gazebo bridge
|
||||
|
||||
# Rover parameters
|
||||
param set-default RD_WHEEL_TRACK 0.3
|
||||
param set-default RD_MAN_YAW_SCALE 0.1
|
||||
param set-default RD_MAX_ACCEL 6
|
||||
param set-default RD_MAX_JERK 30
|
||||
param set-default RD_MAX_THR_YAW_R 5
|
||||
param set-default RD_YAW_RATE_P 0.1
|
||||
param set-default RD_YAW_RATE_I 0
|
||||
param set-default RD_YAW_P 5
|
||||
param set-default RD_YAW_I 0
|
||||
param set-default RD_MAX_SPEED 5
|
||||
param set-default RD_MAX_THR_SPD 7
|
||||
param set-default RD_SPEED_P 1
|
||||
param set-default RD_SPEED_I 0
|
||||
param set-default RD_MAX_YAW_RATE 180
|
||||
param set-default RD_MISS_SPD_DEF 5
|
||||
param set-default RD_TRANS_DRV_TRN 0.349066
|
||||
param set-default RD_TRANS_TRN_DRV 0.174533
|
||||
|
||||
# Pure pursuit parameters
|
||||
param set-default PP_LOOKAHD_MAX 30
|
||||
param set-default PP_LOOKAHD_MIN 2
|
||||
param set-default PP_LOOKAHD_GAIN 1
|
||||
|
||||
# Simulated sensors
|
||||
param set-default SENS_EN_GPSSIM 1
|
||||
param set-default SENS_EN_BAROSIM 0
|
||||
param set-default SENS_EN_MAGSIM 1
|
||||
param set-default SENS_EN_ARSPDSIM 1
|
||||
param set-default SENS_EN_ARSPDSIM 0
|
||||
|
||||
# Actuator mapping
|
||||
param set-default SIM_GZ_WH_FUNC1 101 # right wheel
|
||||
|
||||
@@ -15,14 +15,29 @@ param set-default SIM_GZ_EN 1 # Gazebo bridge
|
||||
param set-default SENS_EN_GPSSIM 1
|
||||
param set-default SENS_EN_BAROSIM 0
|
||||
param set-default SENS_EN_MAGSIM 1
|
||||
param set-default SENS_EN_ARSPDSIM 1
|
||||
param set-default SENS_EN_ARSPDSIM 0
|
||||
# We can arm and drive in manual mode when it slides and GPS check fails:
|
||||
param set-default COM_ARM_WO_GPS 1
|
||||
|
||||
# Set Differential Drive Kinematics Library parameters:
|
||||
param set RDD_WHEEL_BASE 0.9
|
||||
param set RDD_WHEEL_RADIUS 0.22
|
||||
param set RDD_WHEEL_SPEED 10.0 # Maximum wheel speed rad/s, approx 8 km/h
|
||||
# Rover parameters
|
||||
param set-default RD_WHEEL_TRACK 0.9
|
||||
param set-default RD_MAN_YAW_SCALE 0.1
|
||||
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_MISS_SPD_DEF 8
|
||||
param set-default RD_TRANS_DRV_TRN 0.349066
|
||||
param set-default RD_TRANS_TRN_DRV 0.174533
|
||||
|
||||
# Pure pursuit parameters
|
||||
param set-default PP_LOOKAHD_MAX 30
|
||||
param set-default PP_LOOKAHD_MIN 2
|
||||
param set-default PP_LOOKAHD_GAIN 1
|
||||
|
||||
# Actuator mapping - set SITL motors/servos output parameters:
|
||||
|
||||
@@ -36,14 +51,14 @@ param set-default SIM_GZ_WH_FUNC1 101 # right wheel
|
||||
param set-default SIM_GZ_WH_FUNC2 102 # left wheel
|
||||
#param set-default SIM_GZ_WH_MIN2 0
|
||||
#param set-default SIM_GZ_WH_MAX2 200
|
||||
#aram set-default SIM_GZ_WH_DIS2 100
|
||||
#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
|
||||
|
||||
# Note: The servo configurations ( SIM_GZ_SV_FUNC*) outlined below are intended for educational purposes in this simulation.
|
||||
# They do not have physical effects in the simulated environment, except for actuating the joints. Their definitions are meant to demonstrate
|
||||
# how actuators could be mapped and configured in a real-world application, providing a foundation for understanding and implementing actuator
|
||||
# Note: The servo configurations ( SIM_GZ_SV_FUNC*) outlined below are intended for educational purposes in this simulation.
|
||||
# They do not have physical effects in the simulated environment, except for actuating the joints. Their definitions are meant to demonstrate
|
||||
# how actuators could be mapped and configured in a real-world application, providing a foundation for understanding and implementing actuator
|
||||
# controls in practical scenarios.
|
||||
|
||||
# Cutter deck blades clutch, PCA9685 servo channel 3, "RC FLAPS" (406) - leftmost switch, or "Servo 3" (203):
|
||||
|
||||
@@ -15,9 +15,6 @@ param set-default SIM_GZ_EN 1 # Gazebo bridge
|
||||
param set-default NAV_ACC_RAD 0.5
|
||||
param set-default RA_ACC_RAD_GAIN 2
|
||||
param set-default RA_ACC_RAD_MAX 3
|
||||
param set-default RA_LOOKAHD_GAIN 1
|
||||
param set-default RA_LOOKAHD_MAX 10
|
||||
param set-default RA_LOOKAHD_MIN 1
|
||||
param set-default RA_MAX_ACCEL 1.5
|
||||
param set-default RA_MAX_JERK 15
|
||||
param set-default RA_MAX_SPEED 3
|
||||
@@ -30,6 +27,11 @@ param set-default RA_SPEED_I 0.01
|
||||
param set-default RA_SPEED_P 2
|
||||
param set-default RA_WHEEL_BASE 0.321
|
||||
|
||||
# Pure Pursuit parameters
|
||||
param set-default PP_LOOKAHD_GAIN 1
|
||||
param set-default PP_LOOKAHD_MAX 10
|
||||
param set-default PP_LOOKAHD_MIN 1
|
||||
|
||||
# Simulated sensors
|
||||
param set-default SENS_EN_GPSSIM 1
|
||||
param set-default SENS_EN_BAROSIM 0
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Gazebo x500 lidar
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
|
||||
PX4_SIM_MODEL=${PX4_SIM_MODEL:=x500_lidar}
|
||||
|
||||
. ${R}etc/init.d-posix/airframes/4001_gz_x500
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Gazebo x500 mono cam
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
|
||||
PX4_SIM_MODEL=${PX4_SIM_MODEL:=x500_mono_cam_down}
|
||||
|
||||
. ${R}etc/init.d-posix/airframes/4001_gz_x500
|
||||
@@ -63,4 +63,3 @@ param set-default PWM_MAIN_FUNC9 422
|
||||
# Landing gear
|
||||
param set-default PWM_MAIN_FUNC10 400
|
||||
param set-default PWM_MAIN_FUNC11 400
|
||||
|
||||
|
||||
@@ -119,4 +119,3 @@ param set-default CA_METHOD 0
|
||||
# disable attitude failure detection
|
||||
param set-default FD_FAIL_P 0
|
||||
param set-default FD_FAIL_R 0
|
||||
|
||||
|
||||
@@ -84,6 +84,8 @@ px4_add_romfs_files(
|
||||
4010_gz_x500_mono_cam
|
||||
4011_gz_lawnmower
|
||||
4012_gz_rover_ackermann
|
||||
4013_gz_x500_lidar
|
||||
4014_gz_x500_mono_cam_down
|
||||
|
||||
6011_gazebo-classic_typhoon_h480
|
||||
6011_gazebo-classic_typhoon_h480.post
|
||||
|
||||
@@ -44,6 +44,7 @@ px4_add_romfs_files(
|
||||
# TODO
|
||||
rc.balloon_apps
|
||||
rc.balloon_defaults
|
||||
rc.sysinit
|
||||
)
|
||||
|
||||
if(CONFIG_MODULES_AIRSHIP_ATT_CONTROL)
|
||||
@@ -77,7 +78,7 @@ if(CONFIG_MODULES_ROVER_POS_CONTROL)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MODULES_DIFFERENTIAL_DRIVE)
|
||||
if(CONFIG_MODULES_ROVER_DIFFERENTIAL)
|
||||
px4_add_romfs_files(
|
||||
rc.rover_differential_apps
|
||||
rc.rover_differential_defaults
|
||||
|
||||
@@ -44,4 +44,3 @@ param set-default CA_ROTOR4_KM -0.05
|
||||
param set-default CA_ROTOR5_PX 0.25
|
||||
param set-default CA_ROTOR5_PY -0.433
|
||||
param set-default CA_ROTOR5_PZ 0.05
|
||||
|
||||
|
||||
@@ -43,6 +43,10 @@ param set-default CA_SV_CS1_TRQ_P 0.3
|
||||
param set-default CA_SV_CS1_TRQ_Y -0.3
|
||||
param set-default CA_SV_CS1_TYPE 6
|
||||
|
||||
param set-default FW_AIRSPD_MAX 12
|
||||
param set-default FW_AIRSPD_MIN 7
|
||||
param set-default FW_AIRSPD_TRIM 10
|
||||
|
||||
param set-default HIL_ACT_FUNC1 101
|
||||
param set-default HIL_ACT_FUNC2 102
|
||||
param set-default HIL_ACT_FUNC5 202
|
||||
@@ -62,6 +66,8 @@ param set-default CBRK_SUPPLY_CHK 894281
|
||||
# - without safety switch
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set-default SENS_DPRES_OFF 0.001
|
||||
|
||||
param set SIH_T_MAX 2.0
|
||||
param set SIH_Q_MAX 0.0165
|
||||
param set SIH_MASS 0.2
|
||||
@@ -75,3 +81,5 @@ param set SIH_L_ROLL 0.145
|
||||
|
||||
# sih as tailsitter
|
||||
param set SIH_VEHICLE_TYPE 2
|
||||
|
||||
param set-default VT_ARSP_TRANS 6
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name SIH Tailsitter Duo
|
||||
#
|
||||
# @type Simulation
|
||||
# @class VTOL
|
||||
#
|
||||
# @output Motor1 motor right
|
||||
# @output Motor2 motor left
|
||||
# @output Servo1 elevon right
|
||||
# @output Servo2 elevon left
|
||||
#
|
||||
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set UAVCAN_ENABLE 0
|
||||
param set-default VT_B_TRANS_DUR 5
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
param set-default VT_TYPE 2
|
||||
param set-default MPC_MAN_Y_MAX 60
|
||||
param set-default MC_PITCH_P 5
|
||||
|
||||
param set-default CA_AIRFRAME 2
|
||||
param set-default CA_ROTOR_COUNT 5
|
||||
param set-default CA_ROTOR0_KM 0.05
|
||||
param set-default CA_ROTOR0_PX 0.2
|
||||
param set-default CA_ROTOR0_PY 0.2
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR1_PX -0.2
|
||||
param set-default CA_ROTOR1_PY -0.2
|
||||
param set-default CA_ROTOR2_PX 0.2
|
||||
param set-default CA_ROTOR2_PY -0.2
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -0.2
|
||||
param set-default CA_ROTOR3_PY 0.2
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
|
||||
|
||||
param set-default CA_ROTOR4_PX -0.3
|
||||
param set-default CA_ROTOR4_KM 0.05
|
||||
param set-default CA_ROTOR4_AX 1
|
||||
param set-default CA_ROTOR4_AZ 0
|
||||
|
||||
param set-default CA_SV_CS_COUNT 3
|
||||
param set-default CA_SV_CS0_TRQ_R 0.5
|
||||
param set-default CA_SV_CS0_TYPE 2
|
||||
param set-default CA_SV_CS1_TRQ_P 1
|
||||
param set-default CA_SV_CS1_TYPE 3
|
||||
param set-default CA_SV_CS2_TRQ_Y 1
|
||||
|
||||
param set HIL_ACT_REV 32
|
||||
|
||||
param set-default FW_AIRSPD_MAX 12
|
||||
param set-default FW_AIRSPD_MIN 7
|
||||
param set-default FW_AIRSPD_TRIM 10
|
||||
|
||||
param set-default HIL_ACT_FUNC1 101
|
||||
param set-default HIL_ACT_FUNC2 102
|
||||
param set-default HIL_ACT_FUNC3 103
|
||||
param set-default HIL_ACT_FUNC4 104
|
||||
param set-default HIL_ACT_FUNC5 201
|
||||
param set-default HIL_ACT_FUNC6 202
|
||||
param set-default HIL_ACT_FUNC7 203
|
||||
param set-default HIL_ACT_FUNC8 105
|
||||
|
||||
param set-default MAV_TYPE 22
|
||||
|
||||
|
||||
|
||||
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
|
||||
param set-default SYS_HITL 2
|
||||
|
||||
# disable some checks to allow to fly:
|
||||
# - without real battery
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
# - without safety switch
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set-default SENS_DPRES_OFF 0.001
|
||||
|
||||
param set SIH_T_MAX 2.0
|
||||
param set SIH_Q_MAX 0.0165
|
||||
param set SIH_MASS 0.2
|
||||
# IXX and IZZ are inverted from the thesis as the body frame is pitched by 90 deg
|
||||
param set SIH_IXX 0.00354
|
||||
param set SIH_IYY 0.000625
|
||||
param set SIH_IZZ 0.00300
|
||||
param set SIH_IXZ 0
|
||||
param set SIH_KDV 0.2
|
||||
param set SIH_L_ROLL 0.145
|
||||
|
||||
# sih as tailsitter
|
||||
param set SIH_VEHICLE_TYPE 3
|
||||
|
||||
param set-default VT_ARSP_TRANS 6
|
||||
@@ -119,5 +119,3 @@ param set-default PWM_MAIN_TIM0 50
|
||||
param set-default PWM_MAIN_DIS1 1500
|
||||
param set-default PWM_MAIN_DIS2 1500
|
||||
param set-default PWM_MAIN_DIS4 1500
|
||||
|
||||
|
||||
|
||||
@@ -32,4 +32,3 @@ param set-default CA_SV_TL0_MAXA 45
|
||||
param set-default CA_SV_TL0_MINA -45
|
||||
param set-default CA_SV_TL0_TD 90
|
||||
param set-default CA_SV_TL_COUNT 1
|
||||
|
||||
|
||||
@@ -24,5 +24,3 @@ param set-default MC_PITCHRATE_D 0
|
||||
param set-default MC_PITCHRATE_FF 0.1
|
||||
|
||||
param set-default CA_AIRFRAME 10
|
||||
|
||||
|
||||
|
||||
@@ -23,4 +23,3 @@ param set-default MAV_0_MODE 1
|
||||
param set-default MAV_0_CONFIG 102
|
||||
param set-default GPS_UBX_DYNMODEL 8
|
||||
param set-default SER_TEL2_BAUD 9600
|
||||
|
||||
|
||||
@@ -72,5 +72,3 @@ param set-default PWM_MAIN_DIS5 1000
|
||||
param set-default PWM_MAIN_DIS6 1500
|
||||
param set-default PWM_MAIN_DIS7 1500
|
||||
param set-default PWM_MAIN_DIS8 1500
|
||||
|
||||
|
||||
|
||||
@@ -66,4 +66,3 @@ param set-default CA_ROTOR11_PX -0.344
|
||||
param set-default CA_ROTOR11_PY -0.25
|
||||
param set-default CA_ROTOR11_PZ -0.05
|
||||
param set-default CA_ROTOR11_KM -0.05
|
||||
|
||||
|
||||
@@ -38,4 +38,3 @@ param set-default CA_SV_CS_COUNT 1
|
||||
param set-default CA_SV_CS0_TRQ_P 1
|
||||
|
||||
param set-default CA_R_REV 7
|
||||
|
||||
|
||||
@@ -68,6 +68,9 @@ param set-default MPC_THR_MIN 0.025
|
||||
param set-default MPC_VEL_MANUAL 5.0
|
||||
param set-default MPC_XY_VEL_MAX 8.0
|
||||
|
||||
param set-default RC_CRSF_PRT_CFG 300
|
||||
param set-default RC_CRSF_TEL_EN 1
|
||||
|
||||
param set-default RTL_RETURN_ALT 15
|
||||
|
||||
param set-default SENS_FLOW_MINHGT 0.0
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Generic Rover Differential
|
||||
#
|
||||
# @type Rover
|
||||
# @class Rover
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.rover_differential_defaults
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Aion Robotics R1 UGV
|
||||
#
|
||||
# @url https://www.aionrobotics.com/r1
|
||||
#
|
||||
# @type Rover
|
||||
# @class Rover
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.rover_differential_defaults
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
|
||||
# Set geometry & output configration
|
||||
param set-default RBCLW_ADDRESS 128
|
||||
param set-default RBCLW_FUNC1 101
|
||||
param set-default RBCLW_FUNC2 102
|
||||
param set-default RBCLW_REV 1 # reverse right wheels
|
||||
|
||||
# Rover parameters
|
||||
param set-default RD_WHEEL_TRACK 0.3
|
||||
param set-default RD_MAN_YAW_SCALE 1
|
||||
param set-default RD_MAX_ACCEL 5
|
||||
param set-default RD_MAX_JERK 10
|
||||
param set-default RD_MAX_THR_YAW_R 4
|
||||
param set-default RD_YAW_RATE_P 0.1
|
||||
param set-default RD_YAW_RATE_I 0
|
||||
param set-default RD_YAW_P 5
|
||||
param set-default RD_YAW_I 0
|
||||
param set-default RD_MAX_SPEED 1.8
|
||||
param set-default RD_MAX_THR_SPD 2
|
||||
param set-default RD_SPEED_P 0.5
|
||||
param set-default RD_SPEED_I 0.1
|
||||
param set-default RD_MAX_YAW_RATE 300
|
||||
param set-default RD_MISS_SPD_DEF 1.8
|
||||
param set-default RD_TRANS_DRV_TRN 0.349066
|
||||
param set-default RD_TRANS_TRN_DRV 0.174533
|
||||
|
||||
# Pure pursuit parameters
|
||||
param set-default PP_LOOKAHD_MAX 10
|
||||
param set-default PP_LOOKAHD_MIN 1
|
||||
param set-default PP_LOOKAHD_GAIN 1
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Aion Robotics R1 UGV
|
||||
#
|
||||
# @url https://www.aionrobotics.com/r1
|
||||
#
|
||||
# @type Rover
|
||||
# @class Rover
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.rover_differential_defaults
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
|
||||
param set-default EKF2_GBIAS_INIT 0.01
|
||||
param set-default EKF2_ANGERR_INIT 0.01
|
||||
|
||||
# Set geometry & output configration
|
||||
param set-default RBCLW_ADDRESS 128
|
||||
param set-default RBCLW_FUNC1 101
|
||||
param set-default RBCLW_FUNC2 102
|
||||
param set-default RBCLW_REV 1 # reverse right wheels
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Generic ackermann rover
|
||||
# @name Generic Rover Ackermann
|
||||
#
|
||||
# @type Rover
|
||||
# @class Rover
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Axial SCX10 2 Trail Honcho
|
||||
#
|
||||
# @url https://www.axialadventure.com/product/1-10-scx10-ii-trail-honcho-4wd-rock-crawler-brushed-rtr/AXID9059.html
|
||||
#
|
||||
# @type Rover
|
||||
# @class Rover
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.rover_ackermann_defaults
|
||||
|
||||
param set-default BAT1_N_CELLS 3
|
||||
|
||||
# Rover parameters
|
||||
param set-default NAV_ACC_RAD 0.5
|
||||
param set-default RA_ACC_RAD_GAIN 2
|
||||
param set-default RA_ACC_RAD_MAX 3
|
||||
param set-default RA_MAX_ACCEL 0.5
|
||||
param set-default RA_MAX_JERK 10
|
||||
param set-default RA_MAX_SPEED 2.7
|
||||
param set-default RA_MAX_STR_ANG 0.5236
|
||||
param set-default RA_MAX_STR_RATE 270
|
||||
param set-default RA_MISS_VEL_DEF 2.7
|
||||
param set-default RA_MISS_VEL_GAIN 3.5
|
||||
param set-default RA_MISS_VEL_MIN 1
|
||||
param set-default RA_SPEED_I 0.1
|
||||
param set-default RA_SPEED_P 0.5
|
||||
param set-default RA_WHEEL_BASE 0.321
|
||||
|
||||
# Pure pursuit parameters
|
||||
param set-default PP_LOOKAHD_GAIN 1
|
||||
param set-default PP_LOOKAHD_MAX 10
|
||||
param set-default PP_LOOKAHD_MIN 1.5
|
||||
+1
-3
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Generic Ground Vehicle (Ackermann)
|
||||
# @name Generic Ground Vehicle (Deprecated)
|
||||
#
|
||||
# @type Rover
|
||||
# @class Rover
|
||||
@@ -48,5 +48,3 @@ param set-default PWM_MAIN_FUNC1 201
|
||||
param set-default PWM_MAIN_FUNC2 201
|
||||
param set-default PWM_MAIN_FUNC6 101
|
||||
param set-default PWM_MAIN_FUNC7 101
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name NXP Cup car: DF Robot GPX
|
||||
# @name NXP Cup car: DF Robot GPX (Deprecated)
|
||||
|
||||
#
|
||||
# @type Rover
|
||||
@@ -42,4 +42,3 @@ param set-default CA_ROTOR3_KM 0
|
||||
param set-default CA_ROTOR3_PX 0
|
||||
param set-default CA_ROTOR3_PY -0.3
|
||||
param set-default CA_ROTOR3_PZ 0.3
|
||||
|
||||
|
||||
@@ -31,5 +31,3 @@ param set-default CA_ROTOR4_PY 0.25
|
||||
param set-default CA_ROTOR5_PX -0.43
|
||||
param set-default CA_ROTOR5_PY -0.25
|
||||
param set-default CA_ROTOR5_KM -0.05
|
||||
|
||||
|
||||
|
||||
@@ -123,4 +123,3 @@ param set-default PWM_MAIN_FUNC6 106
|
||||
param set-default PWM_MAIN_TIM0 -1
|
||||
param set-default PWM_MAIN_TIM1 -1
|
||||
param set-default PWM_MAIN_TIM2 -1
|
||||
|
||||
|
||||
@@ -31,5 +31,3 @@ param set-default CA_ROTOR4_PY -0.43
|
||||
param set-default CA_ROTOR5_PX -0.25
|
||||
param set-default CA_ROTOR5_PY 0.43
|
||||
param set-default CA_ROTOR5_KM -0.05
|
||||
|
||||
|
||||
|
||||
@@ -36,5 +36,3 @@ param set-default CA_ROTOR6_PY -0.46
|
||||
param set-default CA_ROTOR7_KM -0.05
|
||||
param set-default CA_ROTOR7_PX -0.19
|
||||
param set-default CA_ROTOR7_PY 0.46
|
||||
|
||||
|
||||
|
||||
@@ -36,4 +36,3 @@ param set-default CA_ROTOR6_PY -0.5
|
||||
param set-default CA_ROTOR7_KM -0.05
|
||||
param set-default CA_ROTOR7_PX 0
|
||||
param set-default CA_ROTOR7_PY 0.5
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ if(CONFIG_MODULES_SIMULATION_PWM_OUT_SIM)
|
||||
1100_rc_quad_x_sih.hil
|
||||
1101_rc_plane_sih.hil
|
||||
1102_tailsitter_duo_sih.hil
|
||||
1103_standard_vtol_sih.hil
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -136,22 +137,27 @@ if(CONFIG_MODULES_VTOL_ATT_CONTROL)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MODULES_ROVER_POS_CONTROL)
|
||||
if(CONFIG_MODULES_ROVER_DIFFERENTIAL)
|
||||
px4_add_romfs_files(
|
||||
50000_generic_ground_vehicle
|
||||
50004_nxpcup_car_dfrobot_gpx
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MODULES_DIFFERENTIAL_DRIVE)
|
||||
px4_add_romfs_files(
|
||||
50003_aion_robotics_r1_rover
|
||||
# [50000, 50999] Differential rovers
|
||||
50000_generic_rover_differential
|
||||
50001_aion_robotics_r1_rover
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MODULES_ROVER_ACKERMANN)
|
||||
px4_add_romfs_files(
|
||||
50010_ackermann_rover_generic
|
||||
# [51000, 51999] Ackermann rovers
|
||||
51000_generic_rover_ackermann
|
||||
51001_axial_scx10_2_trail_honcho
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_MODULES_ROVER_POS_CONTROL)
|
||||
px4_add_romfs_files(
|
||||
# [59000, 59999] Rover position control (deprecated)
|
||||
59000_generic_ground_vehicle
|
||||
59001_nxpcup_car_dfrobot_gpx
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Standard apps for a ackermann drive rover.
|
||||
# Standard apps for an ackermann rover.
|
||||
|
||||
# Start rover ackermann drive controller.
|
||||
# Start rover ackermann module.
|
||||
rover_ackermann start
|
||||
|
||||
# Start Land Detector.
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
# Ackermann rover parameters.
|
||||
|
||||
set VEHICLE_TYPE rover_ackermann
|
||||
param set-default MAV_TYPE 10 # MAV_TYPE_GROUND_ROVER
|
||||
param set-default CA_AIRFRAME 5 # Rover (Ackermann)
|
||||
param set-default CA_R_REV 1 # Motor is assumed to be reversible
|
||||
param set-default EKF2_MAG_TYPE 1 # make sure magnetometer is fused even when not flying
|
||||
param set-default MAV_TYPE 10 # MAV_TYPE_GROUND_ROVER
|
||||
param set-default CA_AIRFRAME 5 # Rover (Ackermann)
|
||||
param set-default CA_R_REV 1 # Motor is assumed to be reversible
|
||||
param set-default EKF2_MAG_TYPE 1 # Make sure magnetometer is fused even when not flying
|
||||
param set-default NAV_ACC_RAD 0.5 # Waypoint acceptance radius
|
||||
param set-default EKF2_GBIAS_INIT 0.01
|
||||
param set-default EKF2_ANGERR_INIT 0.01
|
||||
param set-default NAV_ACC_RAD 0.5 # Waypoint acceptance radius
|
||||
param set-default NAV_RCL_ACT 6 # Disarm on manual control loss
|
||||
param set-default COM_FAIL_ACT_T 1 # Delay before failsafe after rc loss
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Standard apps for a differential drive rover.
|
||||
# Standard apps for a differential rover.
|
||||
|
||||
# Start rover differential drive controller.
|
||||
differential_drive start
|
||||
# Start rover differential module.
|
||||
rover_differential start
|
||||
|
||||
# Start Land Detector.
|
||||
land_detector start rover
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# Differential rover parameters.
|
||||
|
||||
set VEHICLE_TYPE rover_differential
|
||||
|
||||
param set-default MAV_TYPE 10 # MAV_TYPE_GROUND_ROVER
|
||||
|
||||
param set-default CA_AIRFRAME 6 # Rover (Differential)
|
||||
param set-default CA_R_REV 3 # Right and left motors reversible
|
||||
|
||||
param set-default EKF2_MAG_TYPE 1 # make sure magnetometer is fused even when not flying
|
||||
param set-default MAV_TYPE 10 # MAV_TYPE_GROUND_ROVER
|
||||
param set-default CA_AIRFRAME 6 # Rover (Differential)
|
||||
param set-default CA_R_REV 3 # Right and left motors reversible
|
||||
param set-default EKF2_MAG_TYPE 1 # Make sure magnetometer is fused even when not flying
|
||||
param set-default NAV_ACC_RAD 0.5 # Waypoint acceptance radius
|
||||
param set-default EKF2_GBIAS_INIT 0.01
|
||||
param set-default EKF2_ANGERR_INIT 0.01
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Standard system init script
|
||||
#
|
||||
@@ -30,7 +30,7 @@ set LOGGER_BUF 8
|
||||
set PARAM_FILE ""
|
||||
set PARAM_BACKUP_FILE ""
|
||||
set RC_INPUT_ARGS ""
|
||||
set SDCARD_AVAILABLE no
|
||||
set STORAGE_AVAILABLE no
|
||||
set SDCARD_EXT_PATH /fs/microsd/ext_autostart
|
||||
set SDCARD_FORMAT no
|
||||
set STARTUP_TUNE 1
|
||||
@@ -62,11 +62,11 @@ then
|
||||
umount /fs/microsd
|
||||
|
||||
else
|
||||
set SDCARD_AVAILABLE yes
|
||||
set STORAGE_AVAILABLE yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SDCARD_AVAILABLE = no -o $SDCARD_FORMAT = yes ]
|
||||
if [ $STORAGE_AVAILABLE = no -o $SDCARD_FORMAT = yes ]
|
||||
then
|
||||
echo "INFO [init] formatting /dev/mmcsd0"
|
||||
set STARTUP_TUNE 15 # tune 15 = SD_ERROR (overridden to SD_INIT if format + mount succeeds)
|
||||
@@ -77,7 +77,7 @@ then
|
||||
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
set SDCARD_AVAILABLE yes
|
||||
set STORAGE_AVAILABLE yes
|
||||
set STARTUP_TUNE 14 # tune 14 = SD_INIT
|
||||
else
|
||||
echo "ERROR [init] card mount failed"
|
||||
@@ -86,19 +86,32 @@ then
|
||||
echo "ERROR [init] format failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
else
|
||||
# Is there a device mounted for storage
|
||||
if mft query -q -k MTD -s MTD_PARAMETERS -v /mnt/microsd
|
||||
then
|
||||
if hardfault_log check
|
||||
set STORAGE_AVAILABLE yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $STORAGE_AVAILABLE = yes ]
|
||||
then
|
||||
if hardfault_log check
|
||||
then
|
||||
set STARTUP_TUNE 2 # tune 2 = ERROR_TUNE
|
||||
if hardfault_log commit
|
||||
then
|
||||
set STARTUP_TUNE 2 # tune 2 = ERROR_TUNE
|
||||
if hardfault_log commit
|
||||
then
|
||||
hardfault_log reset
|
||||
fi
|
||||
hardfault_log reset
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e /fs/microsd/new ]
|
||||
then
|
||||
echo "Updating external autostart files"
|
||||
rm -r $SDCARD_EXT_PATH
|
||||
mv /fs/microsd/new $SDCARD_EXT_PATH
|
||||
fi
|
||||
|
||||
# Check for an update of the ext_autostart folder, and replace the old one with it
|
||||
if [ -e /fs/microsd/ext_autostart_new ]
|
||||
then
|
||||
@@ -120,14 +133,8 @@ then
|
||||
. $FRC
|
||||
else
|
||||
|
||||
#
|
||||
# Set the parameter file the board supports params on
|
||||
# MTD device.
|
||||
#
|
||||
if mft query -q -k MTD -s MTD_PARAMETERS -v /fs/mtd_params
|
||||
then
|
||||
set PARAM_FILE /fs/mtd_params
|
||||
fi
|
||||
# Load param file location from kconfig
|
||||
. ${R}etc/init.d/rc.filepaths
|
||||
|
||||
# Check if /fs/mtd_params is a valid BSON file
|
||||
if ! bsondump docsize /fs/mtd_caldata
|
||||
@@ -178,7 +185,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
if [ $STORAGE_AVAILABLE = yes ]
|
||||
then
|
||||
param select-backup $PARAM_BACKUP_FILE
|
||||
fi
|
||||
@@ -226,8 +233,8 @@ else
|
||||
|
||||
if [ ${VEHICLE_TYPE} == none ]
|
||||
then
|
||||
# Look for airframe on SD card
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
# Use external startup file
|
||||
if [ $STORAGE_AVAILABLE = yes ]
|
||||
then
|
||||
. ${R}etc/init.d/rc.autostart_ext
|
||||
else
|
||||
@@ -621,7 +628,7 @@ unset PARAM_FILE
|
||||
unset PARAM_BACKUP_FILE
|
||||
unset PARAM_DEFAULTS_VER
|
||||
unset RC_INPUT_ARGS
|
||||
unset SDCARD_AVAILABLE
|
||||
unset STORAGE_AVAILABLE
|
||||
unset SDCARD_EXT_PATH
|
||||
unset SDCARD_FORMAT
|
||||
unset STARTUP_TUNE
|
||||
|
||||
@@ -45,7 +45,7 @@ function [ center, radii, evecs, v ] = ellipsoid_fit( X, flag, equals )
|
||||
% * center - ellispoid center coordinates [xc; yc; zc]
|
||||
% * ax - ellipsoid radii [a; b; c]
|
||||
% * evecs - ellipsoid radii directions as columns of the 3x3 matrix
|
||||
% * v - the 9 parameters describing the ellipsoid algebraically:
|
||||
% * v - the 9 parameters describing the ellipsoid algebraically:
|
||||
% Ax^2 + By^2 + Cz^2 + 2Dxy + 2Exz + 2Fyz + 2Gx + 2Hy + 2Iz = 1
|
||||
%
|
||||
% Author:
|
||||
@@ -59,7 +59,7 @@ end
|
||||
if flag == 2 && nargin == 2
|
||||
equals = 'xy';
|
||||
end
|
||||
|
||||
|
||||
if size( X, 2 ) ~= 3
|
||||
error( 'Input data must have three columns!' );
|
||||
else
|
||||
@@ -69,7 +69,7 @@ else
|
||||
end
|
||||
|
||||
% need nine or more data points
|
||||
if length( x ) < 9 && flag == 0
|
||||
if length( x ) < 9 && flag == 0
|
||||
error( 'Must have at least 9 points to fit a unique ellipsoid' );
|
||||
end
|
||||
if length( x ) < 6 && flag == 1
|
||||
@@ -91,7 +91,7 @@ if flag == 0
|
||||
2 * x .* z, ...
|
||||
2 * y .* z, ...
|
||||
2 * x, ...
|
||||
2 * y, ...
|
||||
2 * y, ...
|
||||
2 * z ]; % ndatapoints x 9 ellipsoid parameters
|
||||
elseif flag == 1
|
||||
% fit ellipsoid in the form Ax^2 + By^2 + Cz^2 + 2Gx + 2Hy + 2Iz = 1
|
||||
@@ -99,7 +99,7 @@ elseif flag == 1
|
||||
y .* y, ...
|
||||
z .* z, ...
|
||||
2 * x, ...
|
||||
2 * y, ...
|
||||
2 * y, ...
|
||||
2 * z ]; % ndatapoints x 6 ellipsoid parameters
|
||||
elseif flag == 2
|
||||
% fit ellipsoid in the form Ax^2 + By^2 + Cz^2 + 2Gx + 2Hy + 2Iz = 1,
|
||||
@@ -127,7 +127,7 @@ else
|
||||
% fit sphere in the form A(x^2 + y^2 + z^2) + 2Gx + 2Hy + 2Iz = 1
|
||||
D = [ x .* x + y .* y + z .* z, ...
|
||||
2 * x, ...
|
||||
2 * y, ...
|
||||
2 * y, ...
|
||||
2 * z ]; % ndatapoints x 4 sphere parameters
|
||||
end
|
||||
|
||||
@@ -170,5 +170,3 @@ else
|
||||
radii = ( sqrt( gam ./ v( 1:3 ) ) )';
|
||||
evecs = eye( 3 );
|
||||
end
|
||||
|
||||
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
return_value=0
|
||||
|
||||
# Check if there are files checked in that don't end in a newline (POSIX requirement)
|
||||
git grep --cached -Il '' | 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 '' | 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
|
||||
fi
|
||||
|
||||
exit $return_value
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# This script is meant to be used by the build_all.yml workflow in a github runner
|
||||
# Please only modify if you know what you are doing
|
||||
set -e
|
||||
|
||||
echo "### :clock1: Build Times" >> $GITHUB_STEP_SUMMARY
|
||||
targets=$1
|
||||
for target in ${targets//,/ }
|
||||
do
|
||||
echo "::group::Building: [${target}]"
|
||||
start=$(date +%s)
|
||||
make $target
|
||||
stop=$(date +%s)
|
||||
diff=$(($stop-$start))
|
||||
build_time="$(($diff /60/60))h $(($diff /60))m $(($diff % 60))s elapsed"
|
||||
echo -e "\033[0;32mBuild Time: [$build_time]"
|
||||
echo "* **$target** - $build_time" >> $GITHUB_STEP_SUMMARY
|
||||
echo "::endgroup::"
|
||||
done
|
||||
@@ -170,4 +170,3 @@ if(__name__ == "__main__"):
|
||||
fs.write(f.read())
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@@ -139,7 +139,3 @@ def find_checks_that_apply(
|
||||
innov_fail_checks.append('ofy')
|
||||
|
||||
return sensor_checks, innov_fail_checks
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ def calculate_sensor_metrics(
|
||||
# calculates peak, mean, percentage above 0.5 std, and percentage above std metrics for
|
||||
# estimator status variables
|
||||
for signal, result_id in [('hgt_test_ratio', 'hgt'),
|
||||
('mag_test_ratio', 'mag'),
|
||||
('hdg_test_ratio', 'mag'),
|
||||
('vel_test_ratio', 'vel'),
|
||||
('pos_test_ratio', 'pos'),
|
||||
('tas_test_ratio', 'tas'),
|
||||
|
||||
@@ -84,4 +84,4 @@ def main() -> None:
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
main()
|
||||
|
||||
@@ -160,7 +160,7 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
|
||||
# plot normalised innovation test levels
|
||||
# define variables to plot
|
||||
variables = [['mag_test_ratio'], ['vel_test_ratio', 'pos_test_ratio'], ['hgt_test_ratio']]
|
||||
variables = [['hdg_test_ratio'], ['vel_test_ratio', 'pos_test_ratio'], ['hgt_test_ratio']]
|
||||
y_labels = ['mag', 'vel, pos', 'hgt']
|
||||
legend = [['mag'], ['vel', 'pos'], ['hgt']]
|
||||
if np.amax(estimator_status['hagl_test_ratio']) > 0.0: # plot hagl test ratio, if applicable
|
||||
|
||||
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
""" Script to generate Serial rc.filepaths for the ROMFS startup script """
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
except ImportError as e:
|
||||
print("Failed to import jinja2: " + str(e))
|
||||
print("")
|
||||
print("You may need to install it using:")
|
||||
print(" pip3 install --user jinja2")
|
||||
print("")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
import yaml
|
||||
except ImportError as e:
|
||||
print("Failed to import yaml: " + str(e))
|
||||
print("")
|
||||
print("You may need to install it using:")
|
||||
print(" pip3 install --user pyyaml")
|
||||
print("")
|
||||
sys.exit(1)
|
||||
|
||||
parser = argparse.ArgumentParser(description='Generate PX4 ROMFS filepaths')
|
||||
|
||||
parser.add_argument('--config-files', type=str, nargs='*', default=[],
|
||||
help='YAML module config file(s)')
|
||||
parser.add_argument('--constrained-flash', action='store_true',
|
||||
help='Reduce verbosity in ROMFS scripts to reduce flash size')
|
||||
parser.add_argument('--rc-dir', type=str, action='store',
|
||||
help='ROMFS output directory', default=None)
|
||||
parser.add_argument('--params-file', type=str, action='store',
|
||||
help='Parameter output file', default=None)
|
||||
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
|
||||
help='Verbose Output')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
verbose = args.verbose
|
||||
constrained_flash = args.constrained_flash
|
||||
rc_filepaths_output_dir = args.rc_dir
|
||||
rc_filepaths_template = 'rc.filepaths.jinja'
|
||||
|
||||
|
||||
jinja_env = Environment(loader=FileSystemLoader(
|
||||
os.path.dirname(os.path.realpath(__file__))))
|
||||
|
||||
# generate the ROMFS script using a jinja template
|
||||
if rc_filepaths_output_dir is not None:
|
||||
rc_filepath_output_file = os.path.join(rc_filepaths_output_dir, "rc.filepaths")
|
||||
|
||||
if verbose: print("Generating {:}".format(rc_filepath_output_file))
|
||||
template = jinja_env.get_template(rc_filepaths_template)
|
||||
with open(rc_filepath_output_file, 'w') as fid:
|
||||
fid.write(template.render(constrained_flash=constrained_flash, params_file=args.params_file))
|
||||
else:
|
||||
raise Exception("--rc-dir needs to be specified")
|
||||
@@ -0,0 +1,6 @@
|
||||
{# jinja template to generate the serial autostart script. #}
|
||||
|
||||
# serial autostart script generated with generate_serial_config.py
|
||||
|
||||
|
||||
set PARAM_FILE {{ params_file }}
|
||||
@@ -23,11 +23,14 @@ parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
|
||||
help='Verbose Output')
|
||||
parser.add_argument('-p', '--pretty', dest='pretty', action='store_true',
|
||||
help='Pretty output instead of a single line')
|
||||
parser.add_argument('-g', '--groups', dest='group', action='store_true',
|
||||
help='Groups targets')
|
||||
|
||||
args = parser.parse_args()
|
||||
verbose = args.verbose
|
||||
|
||||
build_configs = []
|
||||
grouped_targets = {}
|
||||
excluded_boards = ['modalai_voxl2', 'px4_ros2'] # TODO: fix and enable
|
||||
excluded_manufacturers = ['atlflight']
|
||||
excluded_platforms = ['qurt']
|
||||
@@ -37,10 +40,27 @@ excluded_labels = [
|
||||
'uavcanv1', # TODO: fix and enable
|
||||
]
|
||||
|
||||
github_action_config = { 'include': build_configs }
|
||||
extra_args = {}
|
||||
if args.pretty:
|
||||
extra_args['indent'] = 2
|
||||
|
||||
def chunks(arr, size):
|
||||
# splits array into parts
|
||||
for i in range(0, len(arr), size):
|
||||
yield arr[i:i + size]
|
||||
|
||||
def comma_targets(targets):
|
||||
# turns array of targets into a comma split string
|
||||
return ",".join(targets)
|
||||
|
||||
def process_target(px4board_file, target_name):
|
||||
# reads through the board file and grabs
|
||||
# useful information for building
|
||||
ret = None
|
||||
platform = None
|
||||
toolchain = None
|
||||
group = None
|
||||
|
||||
if px4board_file.endswith("default.px4board") or \
|
||||
px4board_file.endswith("recovery.px4board") or \
|
||||
@@ -63,22 +83,34 @@ def process_target(px4board_file, target_name):
|
||||
# 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}')
|
||||
|
||||
ret = {'target': target_name, 'container': container}
|
||||
if(args.group):
|
||||
ret['arch'] = group
|
||||
|
||||
return ret
|
||||
|
||||
# Look for board targets in the ./boards directory
|
||||
if(verbose):
|
||||
print("=======================")
|
||||
print("= scanning for boards =")
|
||||
print("=======================")
|
||||
|
||||
for manufacturer in os.scandir(os.path.join(source_dir, 'boards')):
|
||||
if not manufacturer.is_dir():
|
||||
continue
|
||||
@@ -105,12 +137,140 @@ for manufacturer in os.scandir(os.path.join(source_dir, 'boards')):
|
||||
if verbose: print(f'excluding label {label} ({target_name})')
|
||||
continue
|
||||
target = process_target(files.path, target_name)
|
||||
if (args.group and target is not None):
|
||||
if (target['arch'] not in grouped_targets):
|
||||
grouped_targets[target['arch']] = {}
|
||||
grouped_targets[target['arch']]['container'] = target['container']
|
||||
grouped_targets[target['arch']]['manufacturers'] = {}
|
||||
if(manufacturer.name not in grouped_targets[target['arch']]['manufacturers']):
|
||||
grouped_targets[target['arch']]['manufacturers'][manufacturer.name] = {}
|
||||
grouped_targets[target['arch']]['manufacturers'][manufacturer.name] = []
|
||||
grouped_targets[target['arch']]['manufacturers'][manufacturer.name].append(target_name)
|
||||
if target is not None:
|
||||
build_configs.append(target)
|
||||
|
||||
if(verbose):
|
||||
import pprint
|
||||
print("============================")
|
||||
print("= Boards found in ./boards =")
|
||||
print("============================")
|
||||
pprint.pp(grouped_targets)
|
||||
|
||||
github_action_config = { 'include': build_configs }
|
||||
extra_args = {}
|
||||
if args.pretty:
|
||||
extra_args['indent'] = 2
|
||||
print(json.dumps(github_action_config, **extra_args))
|
||||
if (args.group):
|
||||
# if we are using this script for grouping builds
|
||||
# we loop trough the manufacturers list and split their targets
|
||||
# if a manufacturer has more than a LIMIT of boards then we split that
|
||||
# into sub groups such as "arch-manufacturer name-index"
|
||||
# example:
|
||||
# nuttx-px4-0
|
||||
# nuttx-px4-1
|
||||
# nuttx-px4-2
|
||||
# nuttx-ark-0
|
||||
# nuttx-ark-1
|
||||
# if the manufacturer doesn't have more targets than LIMIT then we add
|
||||
# them to a generic group with the following structure "arch-index"
|
||||
# example:
|
||||
# nuttx-0
|
||||
# nuttx-1
|
||||
final_groups = []
|
||||
temp_group = []
|
||||
group_number = {}
|
||||
last_man = ''
|
||||
last_arch = ''
|
||||
SPLIT_LIMIT = 10
|
||||
LOWER_LIMIT = 5
|
||||
for arch in grouped_targets:
|
||||
if(last_arch == ''):
|
||||
last_arch = arch
|
||||
if(arch not in group_number):
|
||||
group_number[arch] = 0
|
||||
|
||||
if(last_arch != arch and len(temp_group) > 0):
|
||||
group_name = last_arch + "-" + str(group_number[last_arch])
|
||||
group_number[last_arch] += 1
|
||||
targets = comma_targets(temp_group)
|
||||
final_groups.append({
|
||||
"container": grouped_targets[last_arch]['container'],
|
||||
"targets": targets,
|
||||
"arch": last_arch,
|
||||
"group": group_name,
|
||||
"len": len(temp_group)
|
||||
})
|
||||
last_arch = arch
|
||||
temp_group = []
|
||||
for man in grouped_targets[arch]['manufacturers']:
|
||||
for tar in grouped_targets[arch]['manufacturers'][man]:
|
||||
if(last_man != man):
|
||||
man_len = len(grouped_targets[arch]['manufacturers'][man])
|
||||
if(man_len > LOWER_LIMIT and man_len < (SPLIT_LIMIT + 1)):
|
||||
# Manufacturers can have their own group
|
||||
group_name = arch + "-" + man
|
||||
targets = comma_targets(grouped_targets[arch]['manufacturers'][man])
|
||||
last_man = man
|
||||
final_groups.append({
|
||||
"container": grouped_targets[arch]['container'],
|
||||
"targets": targets,
|
||||
"arch": arch,
|
||||
"group": group_name,
|
||||
"len": len(grouped_targets[arch]['manufacturers'][man])
|
||||
})
|
||||
elif(man_len >= (SPLIT_LIMIT + 1)):
|
||||
# Split big man groups into subgroups
|
||||
# example: Pixhawk
|
||||
chunk_limit = SPLIT_LIMIT
|
||||
chunk_counter = 0
|
||||
for chunk in chunks(grouped_targets[arch]['manufacturers'][man], chunk_limit):
|
||||
group_name = arch + "-" + man + "-" + str(chunk_counter)
|
||||
targets = comma_targets(chunk)
|
||||
last_man = man
|
||||
final_groups.append({
|
||||
"container": grouped_targets[arch]['container'],
|
||||
"targets": targets,
|
||||
"arch": arch,
|
||||
"group": group_name,
|
||||
"len": len(chunk),
|
||||
})
|
||||
chunk_counter += 1
|
||||
else:
|
||||
temp_group.append(tar)
|
||||
|
||||
if(last_arch != arch and len(temp_group) > 0):
|
||||
group_name = last_arch + "-" + str(group_number[last_arch])
|
||||
group_number[last_arch] += 1
|
||||
targets = comma_targets(temp_group)
|
||||
final_groups.append({
|
||||
"container": grouped_targets[last_arch]['container'],
|
||||
"targets": targets,
|
||||
"arch": last_arch,
|
||||
"group": group_name,
|
||||
"len": len(temp_group)
|
||||
})
|
||||
last_arch = arch
|
||||
temp_group = []
|
||||
if(len(temp_group) > (LOWER_LIMIT - 1)):
|
||||
group_name = arch + "-" + str(group_number[arch])
|
||||
last_arch = arch
|
||||
group_number[arch] += 1
|
||||
targets = comma_targets(temp_group)
|
||||
final_groups.append({
|
||||
"container": grouped_targets[arch]['container'],
|
||||
"targets": targets,
|
||||
"arch": arch,
|
||||
"group": group_name,
|
||||
"len": len(temp_group)
|
||||
})
|
||||
temp_group = []
|
||||
if(verbose):
|
||||
import pprint
|
||||
print("================")
|
||||
print("= final_groups =")
|
||||
print("================")
|
||||
pprint.pp(final_groups)
|
||||
|
||||
print("===============")
|
||||
print("= JSON output =")
|
||||
print("===============")
|
||||
|
||||
print(json.dumps({ "include": final_groups }, **extra_args))
|
||||
else:
|
||||
print(json.dumps(github_action_config, **extra_args))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user