mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-24 00:07:34 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b3494fabd | |||
| f4948d1404 | |||
| a460808774 | |||
| 34423a6c92 | |||
| 9fe5652252 | |||
| 3db5a35005 | |||
| ec1fbca575 | |||
| ebe0a4095c |
@@ -20,7 +20,7 @@ A clear and concise description of what you expected to happen.
|
||||
|
||||
## Log Files and Screenshots
|
||||
*Always* provide a link to the flight log file:
|
||||
- Download the flight log file from the vehicle ([tutorial](https://docs.px4.io/main/en/getting_started/flight_reporting.html)).
|
||||
- Download the flight log file from the vehicle ([tutorial](https://docs.px4.io/master/en/getting_started/flight_reporting.html)).
|
||||
- Upload the log to the [PX4 Flight Review](http://logs.px4.io/)
|
||||
- Share the link to the log (Copy and paste the URL of the log)
|
||||
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
Please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/) to align on pull requests if necessary. You can then open draft pull requests to get early feedback.
|
||||
**How this PR solves the problem**
|
||||
Depending on how complex the PR is, something between a line and a few paragraphs with logs and videos.
|
||||
|
||||
## Describe problem solved by this pull request
|
||||
A clear and concise description of the problem this proposed change will solve. Or, what it will improve.
|
||||
E.g. For this use case I ran into...
|
||||
**JIRA ID in title, and link here**
|
||||
Add a link and the title of the JIRA for context
|
||||
|
||||
## Describe your solution
|
||||
A clear and concise description of what you have implemented.
|
||||
**Upstream/develop PR that this was backported from**
|
||||
If applicable, link to PR and/or commit
|
||||
|
||||
## Describe possible alternatives
|
||||
A clear and concise description of alternative solutions or features you've considered.
|
||||
**Critical bug that needs backporting?**
|
||||
Yes/No, link to backport PR when applicable
|
||||
|
||||
## Test data / coverage
|
||||
How was it tested? What cases were covered? Logs uploaded to https://review.px4.io/ and screenshots of the important plot parts.
|
||||
|
||||
## Additional context
|
||||
**Additional context**
|
||||
Add any other related context or media.
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
name: ClusterFuzzLite batch fuzzing
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 6 * * *' # UTC 6am every day.
|
||||
permissions: read-all
|
||||
jobs:
|
||||
BatchFuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer:
|
||||
- address
|
||||
- undefined
|
||||
- memory
|
||||
steps:
|
||||
- name: Build Fuzzers (${{ matrix.sanitizer }})
|
||||
id: build
|
||||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
||||
with:
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
||||
id: run
|
||||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fuzz-seconds: 1800 # 30 mins
|
||||
mode: 'batch'
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
# Optional but recommended: For storing certain artifacts from fuzzing.
|
||||
# See later section on "Git repo for storage".
|
||||
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
|
||||
# storage-repo-branch: main # Optional. Defaults to "main"
|
||||
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
|
||||
@@ -1,51 +0,0 @@
|
||||
name: Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
check: [
|
||||
"check_format",
|
||||
"tests",
|
||||
"tests_coverage",
|
||||
"px4_fmu-v2_default stack_check",
|
||||
"validate_module_configs",
|
||||
"shellcheck_all",
|
||||
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
|
||||
"NO_NINJA_BUILD=1 px4_sitl_default",
|
||||
"BUILD_MICRORTPS_AGENT=1 px4_sitl_rtps",
|
||||
"airframe_metadata",
|
||||
"module_documentation",
|
||||
"parameters_metadata",
|
||||
]
|
||||
container:
|
||||
image: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: ${{matrix.check}}
|
||||
run: make ${{matrix.check}}
|
||||
- name: upload coverage
|
||||
if: contains(matrix.check, 'coverage')
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: unittests
|
||||
file: coverage/lcov.info
|
||||
@@ -1,21 +0,0 @@
|
||||
name: Clang Tidy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-clang:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: make clang-tidy-quiet
|
||||
run: make clang-tidy-quiet
|
||||
@@ -1,54 +0,0 @@
|
||||
name: Linux Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-armhf:2021-09-08
|
||||
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: 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,51 +0,0 @@
|
||||
name: Linux ARM64 Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-aarch64:2021-09-08
|
||||
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,56 +0,0 @@
|
||||
name: MacOS build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-10.15
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
px4_fmu-v5_default,
|
||||
px4_sitl
|
||||
#tests, # includes px4_sitl
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: setup
|
||||
run: ./Tools/setup/macos.sh; ./Tools/setup/macos.sh
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: macos_${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: macos_${{matrix.config}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 40M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make ${{matrix.config}}
|
||||
run: |
|
||||
ccache -z
|
||||
make ${{matrix.config}}
|
||||
ccache -s
|
||||
@@ -1,126 +0,0 @@
|
||||
name: Nuttx Targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config: [
|
||||
airmind_mindpx-v2,
|
||||
ark_can-flow,
|
||||
ark_can-gps,
|
||||
ark_can-rtk-gps,
|
||||
ark_cannode,
|
||||
atl_mantis-edu,
|
||||
av_x-v1,
|
||||
bitcraze_crazyflie,
|
||||
bitcraze_crazyflie21,
|
||||
cuav_can-gps-v1,
|
||||
cuav_nora,
|
||||
cuav_x7pro,
|
||||
cubepilot_cubeorange,
|
||||
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-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_fmurt1062-v1,
|
||||
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,
|
||||
raspberrypi_pico,
|
||||
sky-drones_smartap-airlink,
|
||||
spracing_h7extreme,
|
||||
uvify_core
|
||||
]
|
||||
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
|
||||
@@ -1,54 +0,0 @@
|
||||
name: Deploy metadata for all targets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'release/*'
|
||||
- 'pr-metadata-test'
|
||||
|
||||
jobs:
|
||||
enumerate_targets:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
- id: set-matrix
|
||||
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py)"
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: enumerate_targets
|
||||
strategy:
|
||||
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}}
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: make ${{matrix.target}}
|
||||
run: make ${{matrix.target}}
|
||||
|
||||
- name: parameter & events metadata
|
||||
run: |
|
||||
make ${{matrix.target}} ver_gen events_json actuators_json
|
||||
./src/lib/version/get_git_tag_or_branch_version.sh build/${{ matrix.target }} >> $GITHUB_ENV
|
||||
cd build/${{ matrix.target }}
|
||||
mkdir _metadata || true
|
||||
cp parameters.* events/*.xz actuators.json* _metadata
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: 'px4-travis'
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: 'us-west-1'
|
||||
SOURCE_DIR: 'build/${{ matrix.target }}/_metadata/'
|
||||
DEST_DIR: 'Firmware/${{ env.version }}/${{ matrix.target }}/'
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
name: EKF Change Indicator
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: checkout newest version of branch
|
||||
run: |
|
||||
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
|
||||
git checkout ${GITHUB_HEAD_REF}
|
||||
- name: main test
|
||||
run: make tests TESTFILTER=EKF
|
||||
- name: Check if there is a functional change
|
||||
run: git diff --exit-code
|
||||
working-directory: src/modules/ekf2/test/change_indication
|
||||
@@ -1,29 +0,0 @@
|
||||
name: EKF Update Change Indicator
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
env:
|
||||
GIT_COMMITTER_EMAIL: bot@px4.io
|
||||
GIT_COMMITTER_NAME: PX4BuildBot
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: main test updates change indication files
|
||||
run: make tests TESTFILTER=EKF
|
||||
- name: Check if there exists diff and save result in variable
|
||||
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV
|
||||
working-directory: src/modules/ekf2/test/change_indication
|
||||
- name: auto-commit any changes to change indication
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: '[AUTO COMMIT] update change indication'
|
||||
commit_user_name: ${GIT_COMMITTER_NAME}
|
||||
commit_user_email: ${GIT_COMMITTER_EMAIL}
|
||||
- if: ${{env.CHANGE_INDICATED}}
|
||||
name: if there is a functional change, fail check
|
||||
run: exit 1
|
||||
@@ -1,139 +0,0 @@
|
||||
name: MAVROS Mission Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {vehicle: "iris", mission: "MC_mission_box", build_type: "RelWithDebInfo"}
|
||||
- {vehicle: "rover", mission: "rover_mission_1", build_type: "RelWithDebInfo"}
|
||||
#- {vehicle: "plane", mission: "FW_mission_1", build_type: "RelWithDebInfo"}
|
||||
#- {vehicle: "plane_catapult",mission: "FW_mission_1", build_type: "RelWithDebInfo"}
|
||||
#- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "Coverage"}
|
||||
#- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "AddressSanitizer"}
|
||||
#- {vehicle: "tailsitter", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
|
||||
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
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: 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
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: Build PX4 and sitl_gazebo
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
ccache -z
|
||||
make px4_sitl_default
|
||||
make px4_sitl_default sitl_gazebo
|
||||
ccache -s
|
||||
|
||||
- name: Core dump settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run SITL tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}}
|
||||
timeout-minutes: 45
|
||||
|
||||
- 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: ecl EKF analysis
|
||||
if: always()
|
||||
run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true
|
||||
|
||||
- name: Upload logs to flight review
|
||||
if: always()
|
||||
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
- name: Store PX4 log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: px4_log
|
||||
path: ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Store ROS log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ros_log
|
||||
path: ~/.ros/**/rostest-*.log
|
||||
|
||||
# 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: mavros_mission
|
||||
file: coverage/lcov.info
|
||||
@@ -1,134 +0,0 @@
|
||||
name: MAVROS Offboard Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {test_file: "mavros_posix_tests_offboard_posctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
|
||||
#- {test_file: "mavros_posix_tests_offboard_attctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
|
||||
#- {test_file: "mavros_posix_tests_offboard_rpyrt_ctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
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: 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
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: Build PX4 and sitl_gazebo
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
ccache -z
|
||||
make px4_sitl_default
|
||||
make px4_sitl_default sitl_gazebo
|
||||
ccache -s
|
||||
|
||||
- name: Core dump settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run SITL tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
./test/rostest_px4_run.sh ${{matrix.config.test_file}} vehicle:=${{matrix.config.vehicle}}
|
||||
timeout-minutes: 45
|
||||
|
||||
- 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: ecl EKF analysis
|
||||
if: always()
|
||||
run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true
|
||||
|
||||
- name: Upload logs to flight review
|
||||
if: always()
|
||||
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
- name: Store PX4 log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: px4_log
|
||||
path: ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Store ROS log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ros_log
|
||||
path: ~/.ros/**/rostest-*.log
|
||||
|
||||
# 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: mavros_offboard
|
||||
file: coverage/lcov.info
|
||||
@@ -1,157 +0,0 @@
|
||||
name: Metadata
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'release/*'
|
||||
- 'pr-metadata-test'
|
||||
|
||||
jobs:
|
||||
|
||||
airframe:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: airframe metadata
|
||||
run: |
|
||||
make airframe_metadata
|
||||
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
|
||||
cd build/px4_sitl_default/docs
|
||||
# TODO: deploy to userguide gitbook
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: 'px4-travis'
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: 'us-west-1'
|
||||
SOURCE_DIR: 'build/px4_sitl_default/docs/'
|
||||
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
|
||||
|
||||
module:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: module documentation
|
||||
run: |
|
||||
make module_documentation
|
||||
cd build/px4_sitl_default/docs
|
||||
ls -ls *
|
||||
# TODO: deploy to userguide gitbook and s3
|
||||
|
||||
parameter:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: parameter metadata
|
||||
run: |
|
||||
make parameters_metadata
|
||||
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: 'px4-travis'
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: 'us-west-1'
|
||||
SOURCE_DIR: 'build/px4_sitl_default/docs/'
|
||||
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
|
||||
|
||||
events:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: events metadata
|
||||
run: |
|
||||
make extract_events
|
||||
./src/lib/version/get_git_tag_or_branch_version.sh build/px4_sitl_default >> $GITHUB_ENV
|
||||
cd build/px4_sitl_default
|
||||
mkdir _events_full || true
|
||||
cp events/all_events_full.json.xz _events_full/all_events.json.xz
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: 'px4-travis'
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: 'us-west-1'
|
||||
SOURCE_DIR: 'build/px4_sitl_default/_events_full/'
|
||||
DEST_DIR: 'Firmware/${{ env.version }}/_general/'
|
||||
|
||||
uorb_graph:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: uORB graph
|
||||
run: |
|
||||
make uorb_graphs
|
||||
cd Tools/uorb_graph
|
||||
ls -ls *
|
||||
# TODO: deploy graph_px4_sitl.json to S3 px4-travis:Firmware/master/
|
||||
|
||||
micrortps_agent:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: microRTPS agent
|
||||
run: |
|
||||
make px4_sitl_rtps
|
||||
git clone https://github.com/PX4/micrortps_agent.git
|
||||
cp -R build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_agent/* micrortps_agent
|
||||
|
||||
ROS_msgs:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: PX4 ROS msgs
|
||||
run: |
|
||||
git clone https://github.com/PX4/px4_msgs.git
|
||||
python3 msg/tools/uorb_to_ros_msgs.py msg/ px4_msgs/msg/
|
||||
|
||||
ROS2_bridge:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: PX4 ROS2 bridge
|
||||
run: |
|
||||
git clone https://github.com/PX4/px4_ros_com.git
|
||||
./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml
|
||||
@@ -1,25 +0,0 @@
|
||||
name: Python CI Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
- name: Install Python3
|
||||
run: sudo apt-get install python3 python3-setuptools python3-pip -y
|
||||
- name: Install tools
|
||||
run: pip3 install --user mypy types-requests flake8
|
||||
- name: Check MAVSDK test scripts with mypy
|
||||
run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py
|
||||
- name: Check MAVSDK test scripts with flake8
|
||||
run: $HOME/.local/bin/flake8 test/mavsdk_tests/*.py
|
||||
@@ -1,135 +0,0 @@
|
||||
name: SITL Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
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 }}
|
||||
|
||||
- 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: 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
|
||||
|
||||
- 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
|
||||
- name: ccache post-run sitl_gazebo
|
||||
run: ccache -s
|
||||
- name: Build MAVSDK tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
DONT_RUN: 1
|
||||
run: make px4_sitl_default gazebo mavsdk_tests
|
||||
- name: ccache post-run 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 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: 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: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
# 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
|
||||
+6
-3
@@ -1,6 +1,6 @@
|
||||
[submodule "src/modules/mavlink/mavlink"]
|
||||
path = src/modules/mavlink/mavlink
|
||||
url = https://github.com/mavlink/mavlink.git
|
||||
url = https://github.com/Auterion/mavlink.git
|
||||
branch = master
|
||||
[submodule "src/drivers/uavcan/libuavcan"]
|
||||
path = src/drivers/uavcan/libuavcan
|
||||
@@ -12,8 +12,8 @@
|
||||
branch = master
|
||||
[submodule "Tools/sitl_gazebo"]
|
||||
path = Tools/sitl_gazebo
|
||||
url = https://github.com/PX4/PX4-SITL_gazebo.git
|
||||
branch = master
|
||||
url = git@github.com:Auterion/sitl_gazebo.git
|
||||
branch = develop
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/PX4-GPSDrivers.git
|
||||
@@ -53,6 +53,9 @@
|
||||
[submodule "src/lib/events/libevents"]
|
||||
path = src/lib/events/libevents
|
||||
url = https://github.com/mavlink/libevents.git
|
||||
[submodule "Tools/simulation-ignition"]
|
||||
path = Tools/simulation-ignition
|
||||
url = https://github.com/PX4/px4-simulation-ignition.git
|
||||
[submodule "src/lib/crypto/libtomcrypt"]
|
||||
path = src/lib/crypto/libtomcrypt
|
||||
url = https://github.com/PX4/libtomcrypt.git
|
||||
|
||||
Vendored
-5
@@ -6,11 +6,6 @@ CONFIG:
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_ign:
|
||||
short: px4_sitl_ign
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_ign
|
||||
px4_sitl_rtps:
|
||||
short: px4_sitl_rtps
|
||||
buildType: RelWithDebInfo
|
||||
|
||||
Vendored
+200
-10
@@ -49,18 +49,34 @@
|
||||
"group": "test"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"label": "gazebo",
|
||||
"label": "jmavsim build",
|
||||
"type": "shell",
|
||||
"command": "ant create_run_jar copy_res",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"cwd": "${workspaceFolder}/Tools/jMAVSim"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"presentation":{
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "jmavsim",
|
||||
"type": "shell",
|
||||
"dependsOn": "jmavsim build",
|
||||
"command": "java -Djava.ext.dirs= -jar jmavsim_run.jar -r 250 -lockstep -tcp localhost:4560 -qgc",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/Tools/jMAVSim/out/production",
|
||||
"env": {
|
||||
"IGN_GAZEBO_RESOURCE_PATH": "${workspaceFolder}/Tools/simulation/gazebo/models",
|
||||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "ign gazebo -v 4 -r ${workspaceFolder}/Tools/simulation/gazebo/worlds/${input:gazeboWorld}.sdf",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
@@ -88,11 +104,161 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"label": "jmavsim kill",
|
||||
"type": "shell",
|
||||
"command": "kill $(ps aux | grep jmavsim | grep -v 'grep' | awk '{print $2}')",
|
||||
"presentation": {
|
||||
"echo": false,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": false,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "gazebo build",
|
||||
"type": "shell",
|
||||
"command": "make px4_sitl_default sitl_gazebo",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"presentation":{
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "gazebo start",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo build",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceFolder}/build/px4_sitl_default/build_gazebo",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceFolder}/Tools/sitl_gazebo/models",
|
||||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "gzserver --verbose ${workspaceFolder}/Tools/sitl_gazebo/worlds/${input:gazeboWorld}.world",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": false,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "gazebo",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo start",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceFolder}/build/px4_sitl_default/build_gazebo",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceFolder}/Tools/sitl_gazebo/models",
|
||||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "gz model --verbose --spawn-file=${workspaceFolder}/Tools/sitl_gazebo/models/${input:vehicleModel}/${input:vehicleModel}.sdf --model-name=${input:vehicleModel} -x 1.01 -y 0.98 -z 0.83",
|
||||
"isBackground": false,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": false,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "gazebo client",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo build",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceFolder}/build/px4_sitl_default/build_gazebo",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceFolder}/Tools/sitl_gazebo/models",
|
||||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "gzclient --verbose",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": false,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "gazebo kill",
|
||||
"type": "shell",
|
||||
"command": "killall ign",
|
||||
"command": "killall gzserver",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "silent",
|
||||
@@ -104,7 +270,6 @@
|
||||
"problemMatcher": [],
|
||||
"dependsOn":["px4_sitl_cleanup"]
|
||||
},
|
||||
|
||||
{
|
||||
"label": "px4_sitl_cleanup",
|
||||
"type": "shell",
|
||||
@@ -170,14 +335,39 @@
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"type": "pickString",
|
||||
"id": "vehicleModel",
|
||||
"description": "gazebo model",
|
||||
"options": [
|
||||
"iris",
|
||||
"typhoon_h480",
|
||||
"plane",
|
||||
"plane_catapult",
|
||||
"plane_lidar",
|
||||
"standard_vtol",
|
||||
"tailsitter",
|
||||
"tiltrotor",
|
||||
"r1_rover",
|
||||
"boat"
|
||||
],
|
||||
"default": "iris"
|
||||
},
|
||||
{
|
||||
"type": "pickString",
|
||||
"id": "gazeboWorld",
|
||||
"description": "gazebo world",
|
||||
"options": [
|
||||
"x4"
|
||||
"baylands",
|
||||
"empty",
|
||||
"ksql_airport",
|
||||
"mcmillan_airfield",
|
||||
"sonoma_raceway",
|
||||
"warehouse",
|
||||
"windy",
|
||||
"yosemite"
|
||||
],
|
||||
"default": "x4"
|
||||
"default": "empty"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -191,6 +191,18 @@ if(${PX4_PLATFORM} STREQUAL "posix")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
option(PX4_RESTRICTED_BUILD "Enable restricted build (limit param access)" OFF)
|
||||
if(PX4_RESTRICTED_BUILD)
|
||||
add_definitions(-DPX4_RESTRICTED_BUILD)
|
||||
message(STATUS "Enabling restricted build")
|
||||
endif()
|
||||
|
||||
if(PX4_EXPORT_CONTROLLED_BUILD)
|
||||
add_definitions(-DPX4_EXPORT_CONTROLLED_BUILD)
|
||||
message(STATUS "Enabling export controlled build (with flight time and wind restrictions)")
|
||||
endif()
|
||||
|
||||
# external modules
|
||||
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
|
||||
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ First [fork and clone](https://help.github.com/articles/fork-a-repo) the project
|
||||
|
||||
### Create a feature branch
|
||||
|
||||
*Always* branch off main for new features.
|
||||
*Always* branch off master for new features.
|
||||
|
||||
```
|
||||
git checkout -b mydescriptivebranchname
|
||||
@@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
|
||||
|
||||
### Edit and build the code
|
||||
|
||||
The [developer guide](https://docs.px4.io/main/en/development/development.html) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](https://docs.px4.io/main/en/contribute/code.html) when editing files.
|
||||
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](https://dev.px4.io/master/en/contribute/code.html) when editing files.
|
||||
|
||||
### Commit your changes
|
||||
|
||||
|
||||
Vendored
+16
-23
@@ -7,8 +7,7 @@ pipeline {
|
||||
stage('Analysis') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -205,21 +204,20 @@ pipeline {
|
||||
unstash 'msg_documentation'
|
||||
unstash 'uorb_graph'
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/PX4-user_guide.git')
|
||||
sh('cp airframes.md PX4-user_guide/en/airframes/airframe_reference.md')
|
||||
sh('cp parameters.md PX4-user_guide/en/advanced_config/parameter_reference.md')
|
||||
sh('cp -R modules/*.md PX4-user_guide/en/modules/')
|
||||
sh('cp -R graph_*.json PX4-user_guide/.vuepress/public/en/middleware/')
|
||||
sh('cp -R msg_docs/*.md PX4-user_guide/en/msg_docs/')
|
||||
sh('cd PX4-user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
||||
sh('cd PX4-user_guide; git push origin main || true')
|
||||
sh('rm -rf PX4-user_guide')
|
||||
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_user_guide.git')
|
||||
sh('cp airframes.md px4_user_guide/en/airframes/airframe_reference.md')
|
||||
sh('cp parameters.md px4_user_guide/en/advanced_config/parameter_reference.md')
|
||||
sh('cp -R modules/*.md px4_user_guide/en/modules/')
|
||||
sh('cp -R graph_*.json px4_user_guide/.vuepress/public/en/middleware/')
|
||||
sh('cp -R msg_docs/*.md px4_user_guide/en/msg_docs/')
|
||||
sh('cd px4_user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
||||
sh('cd px4_user_guide; git push origin master || true')
|
||||
sh('rm -rf px4_user_guide')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -247,8 +245,7 @@ pipeline {
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -281,8 +278,7 @@ pipeline {
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -311,8 +307,7 @@ pipeline {
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -355,8 +350,7 @@ pipeline {
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -379,8 +373,7 @@ pipeline {
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,6 +129,22 @@ else
|
||||
BUILD_DIR_SUFFIX :=
|
||||
endif
|
||||
|
||||
ifdef PX4_RESTRICTED_BUILD
|
||||
CMAKE_ARGS += -DPX4_RESTRICTED_BUILD=ON
|
||||
BUILD_DIR_SUFFIX := $(BUILD_DIR_SUFFIX)_restricted
|
||||
endif
|
||||
|
||||
# pass the PX4_EXPORT_CONTROLLED_BUILD on to CMAKE_ARGS, and set it to 0 (OFF) by default
|
||||
PX4_EXPORT_CONTROLLED_BUILD ?= 0
|
||||
ifeq ($(PX4_EXPORT_CONTROLLED_BUILD),1)
|
||||
CMAKE_ARGS += -DPX4_EXPORT_CONTROLLED_BUILD=ON
|
||||
BUILD_DIR_SUFFIX := $(BUILD_DIR_SUFFIX)_export_controlled
|
||||
else ifeq ($(PX4_EXPORT_CONTROLLED_BUILD),0)
|
||||
CMAKE_ARGS += -DPX4_EXPORT_CONTROLLED_BUILD=OFF
|
||||
else
|
||||
$(error ERROR: Invalid value of flag PX4_EXPORT_CONTROLLED_BUILD, has to be '0' or '1')
|
||||
endif
|
||||
|
||||
# additional config parameters passed to cmake
|
||||
ifdef EXTERNAL_MODULES_LOCATION
|
||||
CMAKE_ARGS += -DEXTERNAL_MODULES_LOCATION:STRING=$(EXTERNAL_MODULES_LOCATION)
|
||||
@@ -245,6 +261,12 @@ define deprecation_warning
|
||||
$(warning $(1) has been deprecated and will be removed, please use $(2)!)
|
||||
endef
|
||||
|
||||
skynode:
|
||||
$(MAKE) px4_fmu-v5x $(ARGS)
|
||||
|
||||
skynode_rtps:
|
||||
$(MAKE) px4_fmu-v5x_rtps $(ARGS)
|
||||
|
||||
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
|
||||
.PHONY: all px4_sitl_default all_config_targets all_default_targets
|
||||
|
||||
@@ -314,7 +336,9 @@ uorb_graphs:
|
||||
@$(MAKE) --no-print-directory px4_fmu-v5_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
|
||||
|
||||
px4io_update: px4_io-v2_default cubepilot_io-v2_default
|
||||
px4io_update:
|
||||
@$(MAKE) --no-print-directory px4_io-v2_default
|
||||
@$(MAKE) --no-print-directory cubepilot_io-v2_default
|
||||
# px4_io-v2_default
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/holybro/durandal-v1/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/holybro/pix32v5/extras/px4_io-v2_default.bin
|
||||
|
||||
@@ -6,38 +6,38 @@
|
||||
|
||||
[](https://join.slack.com/t/px4/shared_invite/zt-si4xo5qs-R4baYFmMjlrT4rQK5yUnaA)
|
||||
|
||||
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/PX4-Autopilot/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
|
||||
PX4 is highly portable, OS-independent and supports Linux, NuttX and MacOS out of the box.
|
||||
|
||||
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/PX4-Autopilot/blob/main/LICENSE))
|
||||
* [Supported airframes](https://docs.px4.io/main/en/airframes/airframe_reference.html) ([portfolio](https://px4.io/ecosystem/commercial-systems/)):
|
||||
* [Multicopters](https://docs.px4.io/main/en/frames_multicopter/)
|
||||
* [Fixed wing](https://docs.px4.io/main/en/frames_plane/)
|
||||
* [VTOL](https://docs.px4.io/main/en/frames_vtol/)
|
||||
* [Autogyro](https://docs.px4.io/main/en/frames_autogyro/)
|
||||
* [Rover](https://docs.px4.io/main/en/frames_rover/)
|
||||
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/PX4-Autopilot/blob/master/LICENSE))
|
||||
* [Supported airframes](https://docs.px4.io/master/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
|
||||
* [Multicopters](https://docs.px4.io/master/en/frames_multicopter/)
|
||||
* [Fixed wing](https://docs.px4.io/master/en/frames_plane/)
|
||||
* [VTOL](https://docs.px4.io/master/en/frames_vtol/)
|
||||
* [Autogyro](https://docs.px4.io/master/en/frames_autogyro/)
|
||||
* [Rover](https://docs.px4.io/master/en/frames_rover/)
|
||||
* many more experimental types (Blimps, Boats, Submarines, High altitude balloons, etc)
|
||||
* Releases: [Downloads](https://github.com/PX4/PX4-Autopilot/releases)
|
||||
|
||||
|
||||
## Building a PX4 based drone, rover, boat or robot
|
||||
|
||||
The [PX4 User Guide](https://docs.px4.io/main/en/) explains how to assemble [supported vehicles](https://docs.px4.io/main/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
See the [forum and chat](https://docs.px4.io/main/en/#getting-help) if you need help!
|
||||
The [PX4 User Guide](https://docs.px4.io/master/en/) explains how to assemble [supported vehicles](https://docs.px4.io/master/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
See the [forum and chat](https://docs.px4.io/master/en/#support) if you need help!
|
||||
|
||||
|
||||
## Changing code and contributing
|
||||
|
||||
This [Developer Guide](https://docs.px4.io/main/en/development/development.html) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
|
||||
This [Developer Guide](https://docs.px4.io/master/en/development/development.html) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
|
||||
|
||||
Developers should read the [Guide for Contributions](https://docs.px4.io/main/en/contribute/).
|
||||
See the [forum and chat](https://docs.px4.io/main/en/#getting-help) if you need help!
|
||||
Developers should read the [Guide for Contributions](https://docs.px4.io/master/en/contribute/).
|
||||
See the [forum and chat](https://dev.px4.io/master/en/#support) if you need help!
|
||||
|
||||
|
||||
### Weekly Dev Call
|
||||
|
||||
The PX4 Dev Team syncs up on a [weekly dev call](https://docs.px4.io/main/en/contribute/).
|
||||
The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/master/en/contribute/#dev_call).
|
||||
|
||||
> **Note** The dev call is open to all interested developers (not just the core dev team). This is a great opportunity to meet the team and contribute to the ongoing development of the platform. It includes a QA session for newcomers. All regular calls are listed in the [Dronecode calendar](https://www.dronecode.org/calendar/).
|
||||
|
||||
@@ -88,43 +88,35 @@ This repository contains code supporting Pixhawk standard boards (best supported
|
||||
* FMUv6X and FMUv6U (STM32H7, 2021)
|
||||
* Various vendors will provide FMUv6X and FMUv6U based designs Q3/2021
|
||||
* FMUv5 and FMUv5X (STM32F7, 2019/20)
|
||||
* [Pixhawk 4 (FMUv5)](https://docs.px4.io/main/en/flight_controller/pixhawk4.html)
|
||||
* [Pixhawk 4 mini (FMUv5)](https://docs.px4.io/main/en/flight_controller/pixhawk4_mini.html)
|
||||
* [CUAV V5+ (FMUv5)](https://docs.px4.io/main/en/flight_controller/cuav_v5_plus.html)
|
||||
* [CUAV V5 nano (FMUv5)](https://docs.px4.io/main/en/flight_controller/cuav_v5_nano.html)
|
||||
* [Auterion Skynode (FMUv5X)](https://docs.auterion.com/skynode)
|
||||
* [Pixhawk 4 (FMUv5)](https://docs.px4.io/master/en/flight_controller/pixhawk4.html)
|
||||
* [Pixhawk 4 mini (FMUv5)](https://docs.px4.io/master/en/flight_controller/pixhawk4_mini.html)
|
||||
* [CUAV V5+ (FMUv5)](https://docs.px4.io/master/en/flight_controller/cuav_v5_plus.html)
|
||||
* [CUAV V5 nano (FMUv5)](https://docs.px4.io/master/en/flight_controller/cuav_v5_nano.html)
|
||||
* [Auterion Skynode (FMUv5X)](https://docs.px4.io/master/en/flight_controller/auterion_skynode.html)
|
||||
* FMUv4 (STM32F4, 2015)
|
||||
* [Pixracer](https://docs.px4.io/main/en/flight_controller/pixracer.html)
|
||||
* [Pixhawk 3 Pro](https://docs.px4.io/main/en/flight_controller/pixhawk3_pro.html)
|
||||
* [Pixracer](https://docs.px4.io/master/en/flight_controller/pixracer.html)
|
||||
* [Pixhawk 3 Pro](https://docs.px4.io/master/en/flight_controller/pixhawk3_pro.html)
|
||||
* FMUv3 (STM32F4, 2014)
|
||||
* [Pixhawk 2](https://docs.px4.io/main/en/flight_controller/pixhawk-2.html)
|
||||
* [Pixhawk Mini](https://docs.px4.io/main/en/flight_controller/pixhawk_mini.html)
|
||||
* [CUAV Pixhack v3](https://docs.px4.io/main/en/flight_controller/pixhack_v3.html)
|
||||
* [Pixhawk 2](https://docs.px4.io/master/en/flight_controller/pixhawk-2.html)
|
||||
* [Pixhawk Mini](https://docs.px4.io/master/en/flight_controller/pixhawk_mini.html)
|
||||
* [CUAV Pixhack v3](https://docs.px4.io/master/en/flight_controller/pixhack_v3.html)
|
||||
* FMUv2 (STM32F4, 2013)
|
||||
* [Pixhawk](https://docs.px4.io/main/en/flight_controller/pixhawk.html)
|
||||
* [Pixfalcon](https://docs.px4.io/main/en/flight_controller/pixfalcon.html)
|
||||
* [Pixhawk](https://docs.px4.io/master/en/flight_controller/pixhawk.html)
|
||||
* [Pixfalcon](https://docs.px4.io/master/en/flight_controller/pixfalcon.html)
|
||||
|
||||
### Manufacturer and Community supported
|
||||
* [Holybro Durandal](https://docs.px4.io/main/en/flight_controller/durandal.html)
|
||||
* [Hex Cube Orange](https://docs.px4.io/main/en/flight_controller/cubepilot_cube_orange.html)
|
||||
* [Hex Cube Yellow](https://docs.px4.io/main/en/flight_controller/cubepilot_cube_yellow.html)
|
||||
* [Holybro Durandal](https://docs.px4.io/master/en/flight_controller/durandal.html)
|
||||
* [Hex Cube Orange](https://docs.px4.io/master/en/flight_controller/cubepilot_cube_orange.html)
|
||||
* [Hex Cube Yellow](https://docs.px4.io/master/en/flight_controller/cubepilot_cube_yellow.html)
|
||||
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
|
||||
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/main/en/complete_vehicles/crazyflie2.html)
|
||||
* [Omnibus F4 SD](https://docs.px4.io/main/en/flight_controller/omnibus_f4_sd.html)
|
||||
* [Holybro Kakute F7](https://docs.px4.io/main/en/flight_controller/kakutef7.html)
|
||||
* [Raspberry PI with Navio 2](https://docs.px4.io/main/en/flight_controller/raspberry_pi_navio2.html)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/master/en/complete_vehicles/crazyflie2.html)
|
||||
* [Omnibus F4 SD](https://docs.px4.io/master/en/flight_controller/omnibus_f4_sd.html)
|
||||
* [Holybro Kakute F7](https://docs.px4.io/master/en/flight_controller/kakutef7.html)
|
||||
* [Raspberry PI with Navio 2](https://docs.px4.io/master/en/flight_controller/raspberry_pi_navio2.html)
|
||||
|
||||
Additional information about supported hardware can be found in [PX4 user Guide > Autopilot Hardware](https://docs.px4.io/main/en/flight_controller/).
|
||||
Additional information about supported hardware can be found in [PX4 user Guide > Autopilot Hardware](https://docs.px4.io/master/en/flight_controller/).
|
||||
|
||||
## Project Roadmap
|
||||
|
||||
A high level project roadmap is available [here](https://github.com/orgs/PX4/projects/25).
|
||||
|
||||
## Project Governance
|
||||
|
||||
The PX4 Autopilot project including all of its trademarks is hosted under [Dronecode](https://www.dronecode.org/), part of the Linux Foundation.
|
||||
|
||||
<a href="https://www.dronecode.org/" style="padding:20px" ><img src="https://mavlink.io/assets/site/logo_dronecode.png" alt="Dronecode Logo" width="110px"/></a>
|
||||
<a href="https://www.linuxfoundation.org/projects" style="padding:20px;"><img src="https://mavlink.io/assets/site/logo_linux_foundation.png" alt="Linux Foundation Logo" width="80px" /></a>
|
||||
<div style="padding:10px"> </div>
|
||||
|
||||
+15
-9
@@ -112,17 +112,23 @@ add_custom_command(
|
||||
${PX4_SOURCE_DIR}/Tools/px4airframes/xmlout.py
|
||||
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
|
||||
)
|
||||
set(romfs_extract_stamp ${CMAKE_CURRENT_BINARY_DIR}/romfs_extract.stamp)
|
||||
add_custom_command(
|
||||
OUTPUT ${romfs_extract_stamp}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_extract_stamp}
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
DEPENDS ${romfs_tar_file}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
|
||||
set(romfs_copy_stamp ${CMAKE_CURRENT_BINARY_DIR}/romfs_copy.stamp)
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${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_copy_stamp}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
|
||||
romfs_copy.stamp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
--airframes-path ${romfs_gen_root_dir}/init.d
|
||||
--start-script ${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
@@ -131,9 +137,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 ${CMAKE_COMMAND} -E touch ${romfs_copy_stamp}
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
DEPENDS ${romfs_tar_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch romfs_copy.stamp
|
||||
DEPENDS
|
||||
${romfs_extract_stamp}
|
||||
COMMENT "ROMFS: copying, generating airframes"
|
||||
)
|
||||
|
||||
@@ -305,7 +311,7 @@ add_custom_command(OUTPUT romfs_extras.stamp
|
||||
|
||||
add_custom_target(romfs_gen_files_target
|
||||
DEPENDS
|
||||
${romfs_copy_stamp}
|
||||
${romfs_extract_stamp}
|
||||
${romfs_gen_root_dir}/init.d/rc.serial
|
||||
romfs_extras.stamp
|
||||
)
|
||||
|
||||
@@ -86,28 +86,10 @@ unset BOARD_RC_SENSORS
|
||||
. ${R}etc/init.d/rc.serial
|
||||
|
||||
# Check for flow sensor
|
||||
if param compare -s SENS_EN_PX4FLOW 1
|
||||
if param compare SENS_EN_PX4FLOW 1
|
||||
then
|
||||
px4flow start -X &
|
||||
fi
|
||||
|
||||
if param compare -s IMU_GYRO_CAL_EN 1
|
||||
then
|
||||
gyro_calibration start
|
||||
fi
|
||||
|
||||
|
||||
if param compare -s MBE_ENABLE 1
|
||||
then
|
||||
# conservative mag bias estimation
|
||||
param set-default MBE_LEARN_GAIN 5
|
||||
param set-default IMU_GYRO_CUTOFF 20
|
||||
mag_bias_estimator start
|
||||
fi
|
||||
|
||||
param set-default SENS_MAG_RATE 100
|
||||
|
||||
sensors start
|
||||
|
||||
uavcannode start
|
||||
unset R
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
|
||||
|
||||
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Quadrotor SITL model for JSBSim
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
# @maintainer Jaeyoung Lim <jaeyoung@auterion.com>
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_w
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Hexacopter SITL model for JSBSim
|
||||
#
|
||||
# @type Hexarotor x
|
||||
#
|
||||
# @maintainer Jaeyoung Lim <jaeyoung@auterion.com>
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default MC_PITCHRATE_P 0.1
|
||||
param set-default MC_PITCHRATE_I 0.05
|
||||
param set-default MC_PITCH_P 6.0
|
||||
param set-default MC_ROLLRATE_P 0.15
|
||||
param set-default MC_ROLLRATE_I 0.1
|
||||
param set-default MC_ROLL_P 6.0
|
||||
param set-default MPC_XY_VEL_I_ACC 4
|
||||
param set-default MPC_XY_VEL_P_ACC 3
|
||||
|
||||
param set-default RTL_DESCEND_ALT 10
|
||||
|
||||
param set-default TRIG_INTERFACE 3
|
||||
param set-default TRIG_MODE 4
|
||||
param set-default MNT_MODE_IN 4
|
||||
param set-default MNT_DO_STAB 2
|
||||
|
||||
param set-default MAV_TYPE 13
|
||||
|
||||
set MIXER hexa_x
|
||||
@@ -18,7 +18,3 @@ param set-default LPE_FAKE_ORIGIN 1
|
||||
|
||||
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.0
|
||||
param set-default SENS_FLOW_MAXR 2.5
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
# EKF2
|
||||
param set-default EKF2_AID_MASK 2
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
|
||||
# LPE: Flow-only mode
|
||||
param set-default LPE_FUSION 242
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (Depth Camera)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
. ${R}etc/init.d-posix/airframes/10016_iris
|
||||
|
||||
# param set COM_OBS_AVOID 1
|
||||
param set-default MPC_XY_CRUISE 5.0
|
||||
@@ -62,6 +62,7 @@ param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default MC_AIRMODE 1
|
||||
param set-default MC_ROLLRATE_P 0.3
|
||||
param set-default MC_YAW_P 1.6
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
param set-default FW_T_TAS_TC 2
|
||||
|
||||
param set-default MC_AIRMODE 1
|
||||
param set-default MC_ROLLRATE_P 0.3
|
||||
|
||||
param set-default MPC_ACC_HOR_MAX 2
|
||||
|
||||
@@ -35,9 +35,7 @@ param set-default CA_SV_CS1_TYPE 2
|
||||
param set-default CA_SV_CS2_TRQ_P 1.0
|
||||
param set-default CA_SV_CS2_TYPE 3
|
||||
param set-default CA_SV_CS_COUNT 3
|
||||
param set-default CA_SV_TL0_CT 0
|
||||
param set-default CA_SV_TL1_CT 0
|
||||
param set-default CA_SV_TL2_CT 0
|
||||
param set-default CA_SV_TL3_CT 0
|
||||
param set-default CA_SV_TL_COUNT 4
|
||||
|
||||
@@ -68,6 +66,9 @@ param set-default FW_T_SINK_MAX 2.7
|
||||
param set-default FW_T_SINK_MIN 2.2
|
||||
|
||||
param set-default MC_YAW_P 1.6
|
||||
param set-default MC_AIRMODE 1
|
||||
param set-default MC_YAWRATE_P 0.3
|
||||
param set-default MC_YAWRATE_I 0.3
|
||||
|
||||
param set-default MIS_TAKEOFF_ALT 10
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Standard VTOL with gimbal
|
||||
#
|
||||
# @type Standard VTOL with gimbal
|
||||
#
|
||||
|
||||
. ${R}etc/init.d-posix/1040_standard_vtol
|
||||
|
||||
param set-default TRIG_INTERFACE 3
|
||||
param set-default TRIG_MODE 4
|
||||
param set-default MNT_MODE_IN 0
|
||||
|
||||
param set-default MAV_TYPE 22
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/standard_vtol_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
|
||||
|
||||
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
|
||||
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name VTOL Tiltrotor Tricopter
|
||||
#
|
||||
# @type VTOL Tiltrotor Tricopter
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default FW_AIRSPD_MAX 25
|
||||
param set-default FW_AIRSPD_MIN 14
|
||||
param set-default FW_AIRSPD_TRIM 16
|
||||
param set-default FW_L1_PERIOD 12
|
||||
|
||||
param set-default MC_ROLLRATE_P 0.3
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 10
|
||||
param set-default MIS_TAKEOFF_ALT 10
|
||||
param set-default MIS_YAW_TMT 10
|
||||
|
||||
param set-default MC_PITCHRATE_P 0.3
|
||||
param set-default MC_PITCH_P 5.0
|
||||
param set-default MC_ROLLRATE_P 0.4
|
||||
param set-default MC_ROLL_P 5.0
|
||||
param set-default MC_YAWRATE_P 0.8
|
||||
param set-default MC_YAW_P 1.5
|
||||
|
||||
param set-default MPC_ACC_HOR_MAX 2
|
||||
param set-default MPC_ACC_HOR_MAX 2
|
||||
param set-default MPC_MAN_Y_MAX 70
|
||||
param set-default MPC_THR_MIN 0.1
|
||||
param set-default MPC_TKO_SPEED 1
|
||||
param set-default MPC_XY_P 0.15
|
||||
param set-default MPC_XY_VEL_D 0.005
|
||||
param set-default MPC_XY_VEL_I 0.2
|
||||
param set-default MPC_XY_VEL_P 0.05
|
||||
param set-default MPC_Z_VEL_MAX_DN 1.5
|
||||
param set-default MPC_Z_VEL_P 0.8
|
||||
|
||||
param set-default NAV_ACC_RAD 5
|
||||
param set-default NAV_LOITER_RAD 80
|
||||
|
||||
param set-default VT_F_TRANS_DUR 5.0
|
||||
param set-default VT_F_TRANS_THR 0.75
|
||||
param set-default VT_TILT_FW 3.1415
|
||||
param set-default VT_TILT_TRANS 1.2
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
param set-default VT_TYPE 1
|
||||
param set-default VT_B_TRANS_DUR 8
|
||||
|
||||
param set-default MAV_TYPE 24
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/tiltrotor_tri_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Rover
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.rover_defaults
|
||||
|
||||
param set-default GND_L1_DIST 5
|
||||
param set-default GND_SP_CTRL_MODE 1
|
||||
param set-default GND_SPEED_D 0.001
|
||||
param set-default GND_SPEED_I 3
|
||||
param set-default GND_SPEED_IMAX 0.125
|
||||
param set-default GND_SPEED_P 0.25
|
||||
param set-default GND_SPEED_THR_SC 1
|
||||
param set-default GND_SPEED_TRIM 4
|
||||
param set-default GND_THR_CRUISE 0.3
|
||||
param set-default GND_THR_IDLE 0
|
||||
param set-default GND_THR_MAX 0.5
|
||||
param set-default GND_THR_MIN 0
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 0.01
|
||||
param set-default MIS_TAKEOFF_ALT 0.01
|
||||
param set-default NAV_ACC_RAD 0.5
|
||||
param set-default NAV_LOITER_RAD 2
|
||||
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
param set-default GND_MAX_ANG 0.6
|
||||
param set-default GND_WHEEL_BASE 2.0
|
||||
|
||||
param set-default TRIG_INTERFACE 3
|
||||
param set-default TRIG_MODE 4
|
||||
param set-default MNT_MODE_IN 4
|
||||
param set-default MNT_MODE_OUT 2
|
||||
param set-default MNT_DO_STAB 2
|
||||
|
||||
param set-default MAV_TYPE 10
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/rover_ackermann_sitl.main.mix
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
|
||||
|
||||
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
|
||||
@@ -1,54 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name ThunderFly TF-G2
|
||||
# ThunderFly TF-G2 autogyro airframe. Only for FlightGear simulator
|
||||
#
|
||||
# @type Autogyro
|
||||
# @class Autogyro
|
||||
#
|
||||
# @url https://github.com/ThunderFly-aerospace/TF-G2/
|
||||
#
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_AIRSPD_STALL 5
|
||||
|
||||
param set-default FW_P_RMAX_NEG 20.0
|
||||
param set-default FW_W_RMAX 10
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
param set-default FW_RR_P 0.08
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 50
|
||||
param set-default MIS_TAKEOFF_ALT 7
|
||||
|
||||
param set-default NAV_ACC_RAD 20
|
||||
param set-default NAV_DLL_ACT 2
|
||||
param set-default NAV_LOITER_RAD 50
|
||||
|
||||
param set-default RWTO_TKOFF 0
|
||||
# Parameters related to autogyro takeoff PR
|
||||
#param set-default AG_TKOFF 1
|
||||
#param set-default AG_PROT_TYPE 1
|
||||
#param set-default AG_PROT_MIN_RPM 50.0
|
||||
#param set-default AG_PROT_TRG_RPM 900.0
|
||||
#param set-defoult AG_ROTOR_RPM 900.0
|
||||
|
||||
param set-default FW_ARSP_SCALE_EN 0
|
||||
|
||||
param set-default FW_AIRSPD_MAX 35
|
||||
param set-default FW_AIRSPD_MIN 7
|
||||
|
||||
param set-default FW_P_LIM_MAX 25
|
||||
param set-default FW_P_LIM_MIN -5
|
||||
param set-default FW_R_LIM 30
|
||||
|
||||
param set-default FW_MAN_R_MAX 30.0
|
||||
|
||||
param set-default FW_THR_CRUISE 0.8
|
||||
param set-default FW_THR_IDLE 0
|
||||
param set-default COM_DISARM_PRFLT 0
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/autogyro_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Ignition Gazebo X3
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_w
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Ignition Gazebo X4
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default MC_PITCHRATE_P 0.1
|
||||
param set-default MC_ROLLRATE_P 0.05
|
||||
|
||||
set MIXER hexa_x
|
||||
@@ -20,8 +20,14 @@ param set-default MC_ROLLRATE_I 0.0400
|
||||
param set-default MC_ROLLRATE_D 0.0010
|
||||
param set-default MC_ROLL_P 9.0
|
||||
|
||||
param set-default MPC_XY_VEL_I_ACC 4
|
||||
param set-default MPC_XY_VEL_P_ACC 3
|
||||
param set-default MC_PITCHRATE_P 0.0800
|
||||
param set-default MC_PITCHRATE_I 0.0400
|
||||
param set-default MC_PITCHRATE_D 0.0010
|
||||
param set-default MC_PITCH_P 9.0
|
||||
param set-default MC_ROLLRATE_P 0.0800
|
||||
param set-default MC_ROLLRATE_I 0.0400
|
||||
param set-default MC_ROLLRATE_D 0.0010
|
||||
param set-default MC_ROLL_P 9.0
|
||||
|
||||
param set-default RTL_DESCEND_ALT 10
|
||||
param set-default RTL_LAND_DELAY 0
|
||||
|
||||
@@ -37,6 +37,9 @@ px4_add_romfs_files(
|
||||
10018_iris_foggy_lidar
|
||||
10019_omnicopter
|
||||
10020_if750a
|
||||
10020_if750a.post
|
||||
10028_quadrotor_x
|
||||
10029_hexarotor_x
|
||||
10030_px4vision
|
||||
10040_quadx
|
||||
10041_airplane
|
||||
@@ -56,6 +59,7 @@ px4_add_romfs_files(
|
||||
1020_uuv_generic
|
||||
1021_uuv_hippocampus
|
||||
1022_uuv_bluerov2_heavy
|
||||
1025_iris_depth_camera
|
||||
1030_plane
|
||||
1031_plane_cam
|
||||
1032_plane_catapult
|
||||
@@ -71,20 +75,19 @@ px4_add_romfs_files(
|
||||
1042_tiltrotor
|
||||
1043_standard_vtol_drop
|
||||
1043_standard_vtol_drop.post
|
||||
1058_standard_vtol_gimbal
|
||||
1058_standard_vtol_gimbal.post
|
||||
1059_tiltrotor_tri
|
||||
1060_rover
|
||||
1061_r1_rover
|
||||
1062_tf-r1
|
||||
1063_rover_gimbal
|
||||
1063_rover_gimbal.post
|
||||
1070_boat
|
||||
3010_quadrotor_x
|
||||
3011_hexarotor_x
|
||||
|
||||
4001_x3
|
||||
|
||||
17001_tf-g1
|
||||
17002_tf-g2
|
||||
2507_cloudship
|
||||
|
||||
6001_x4
|
||||
6011_typhoon_h480
|
||||
6011_typhoon_h480.post
|
||||
6012_typhoon_h480_ctrlalloc
|
||||
|
||||
@@ -24,6 +24,7 @@ mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
|
||||
|
||||
# API/Offboard link
|
||||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote
|
||||
mavlink stream -r 2 -s COMMAND_CANCEL -u $udp_offboard_port_local
|
||||
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
|
||||
@@ -1,33 +1,20 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
|
||||
if ignition_simulator start
|
||||
then
|
||||
|
||||
sensor_baro_sim start
|
||||
sensor_gps_sim start
|
||||
sensor_mag_sim start
|
||||
|
||||
# Check if PX4_SIM_HOSTNAME environment variable is empty
|
||||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
|
||||
# If both are empty use localhost for simulator
|
||||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
|
||||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
|
||||
echo "PX4 SIM HOST: localhost"
|
||||
simulator start -c $simulator_tcp_port
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOST_ADDR"
|
||||
simulator start -t $PX4_SIM_HOST_ADDR $simulator_tcp_port
|
||||
fi
|
||||
else
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
|
||||
# Check if PX4_SIM_HOSTNAME environment variable is empty
|
||||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
|
||||
# If both are empty use localhost for simulator
|
||||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
|
||||
|
||||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
|
||||
echo "PX4 SIM HOST: localhost"
|
||||
simulator start -c $simulator_tcp_port
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOST_ADDR"
|
||||
simulator start -t $PX4_SIM_HOST_ADDR $simulator_tcp_port
|
||||
fi
|
||||
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOSTNAME"
|
||||
simulator start -h $PX4_SIM_HOSTNAME $simulator_tcp_port
|
||||
fi
|
||||
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOSTNAME"
|
||||
simulator start -h $PX4_SIM_HOSTNAME $simulator_tcp_port
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
#set -e
|
||||
set -e
|
||||
|
||||
# PX4 commands need the 'px4-' prefix in bash.
|
||||
# (px4-alias.sh is expected to be in the PATH)
|
||||
@@ -30,6 +30,7 @@ set MIXER_FILE none
|
||||
set OUTPUT_MODE sim
|
||||
set EXTRA_MIXER_MODE none
|
||||
set PWM_OUT none
|
||||
set PWM_AUX_OUT none
|
||||
set SDCARD_MIXERS_PATH etc/mixers
|
||||
set USE_IO no
|
||||
set VEHICLE_TYPE none
|
||||
@@ -103,6 +104,7 @@ fi
|
||||
# multi-instance setup
|
||||
# shellcheck disable=SC2154
|
||||
param set MAV_SYS_ID $((px4_instance+1))
|
||||
param set MNT_MAV_SYSID $((px4_instance+1))
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
@@ -212,7 +214,6 @@ elif ! replay tryapplyparams
|
||||
then
|
||||
. px4-rc.simulator
|
||||
fi
|
||||
|
||||
load_mon start
|
||||
battery_simulator start
|
||||
tone_alarm start
|
||||
@@ -256,6 +257,12 @@ 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
|
||||
|
||||
#user defined mavlink streams for instances can be in PATH
|
||||
. px4-rc.mavlink
|
||||
|
||||
|
||||
@@ -39,8 +39,10 @@ px4_add_romfs_files(
|
||||
rc.balloon_apps
|
||||
rc.balloon_defaults
|
||||
rc.boat_defaults
|
||||
rc.autostart_ext
|
||||
rc.fw_apps
|
||||
rc.fw_defaults
|
||||
rc.heli_defaults
|
||||
rc.interface
|
||||
rc.logging
|
||||
rc.mc_apps
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Team Blacksheep Discovery
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 feed-through of RC AUX1 channel
|
||||
# @output MAIN6 feed-through of RC AUX2 channel
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
# @output AUX4 feed-through of RC FLAPS channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default MC_ROLLRATE_P 0.1
|
||||
param set-default MC_ROLLRATE_I 0.05
|
||||
param set-default MC_ROLLRATE_D 0.0017
|
||||
param set-default MC_PITCHRATE_P 0.14
|
||||
param set-default MC_PITCHRATE_I 0.1
|
||||
param set-default MC_PITCHRATE_D 0.0025
|
||||
param set-default MC_YAWRATE_P 0.28
|
||||
|
||||
set MIXER quad_w
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
# @output AUX4 feed-through of RC FLAPS channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
# TODO tune roll/pitch separately
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_I 0.05
|
||||
param set-default MC_ROLLRATE_D 0.004
|
||||
param set-default MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_I 0.05
|
||||
param set-default MC_PITCHRATE_D 0.004
|
||||
param set-default MC_YAW_P 2.5
|
||||
param set-default MC_YAWRATE_P 0.25
|
||||
param set-default MC_YAWRATE_I 0.25
|
||||
|
||||
param set-default BAT1_V_DIV 12.27559
|
||||
param set-default BAT1_A_PER_V 15.391030303103
|
||||
|
||||
set MIXER quad_w
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Team Blacksheep Discovery Endurance
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 feed-through of RC AUX1 channel
|
||||
# @output MAIN6 feed-through of RC AUX2 channel
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
# @output AUX4 feed-through of RC FLAPS channel
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default BAT1_N_CELLS 6
|
||||
param set-default BAT1_V_EMPTY 3.5
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_P 0.08
|
||||
param set-default MC_ROLLRATE_I 0.02
|
||||
param set-default MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_P 0.13
|
||||
param set-default MC_PITCHRATE_I 0.02
|
||||
param set-default MC_PITCHRATE_D 0.005
|
||||
|
||||
param set-default MPC_XY_VEL_MAX 2
|
||||
|
||||
param set-default PWM_MAIN_MIN 1080
|
||||
|
||||
set MIXER quad_w
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Caipiroshka Duo Tailsitter
|
||||
#
|
||||
# @type VTOL Duo Tailsitter
|
||||
# @class VTOL
|
||||
#
|
||||
# @output MAIN1 motor right
|
||||
# @output MAIN2 motor left
|
||||
# @output MAIN5 elevon right
|
||||
# @output MAIN6 elevon left
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board holybro_kakutef7 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default MAV_TYPE 19
|
||||
|
||||
param set-default MC_ROLL_P 6
|
||||
param set-default MC_ROLLRATE_P 0.12
|
||||
param set-default MC_ROLLRATE_I 0.002
|
||||
|
||||
param set-default MC_PITCH_P 4.5
|
||||
param set-default MC_PITCHRATE_P 0.3
|
||||
param set-default MC_PITCHRATE_I 0.002
|
||||
|
||||
param set-default MC_YAW_P 3.8
|
||||
param set-default MC_YAWRATE_P 0.22
|
||||
param set-default MC_YAWRATE_I 0.02
|
||||
|
||||
param set-default VT_IDLE_PWM_MC 1080
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
param set-default VT_MOT_ID 12
|
||||
param set-default VT_TYPE 0
|
||||
|
||||
set MIXER vtol_tailsitter_duo
|
||||
|
||||
set PWM_OUT 123456
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name BirdsEyeView Aerobotics FireFly6
|
||||
# @type VTOL Tiltrotor
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@uaventure.com>
|
||||
#
|
||||
# @output MAIN1 Front right motor bottom
|
||||
# @output MAIN2 Front right motor top
|
||||
# @output MAIN3 Back motor bottom
|
||||
# @output MAIN4 Back motor top
|
||||
# @output MAIN5 Front left motor bottom
|
||||
# @output MAIN6 Front left motor top
|
||||
# @output AUX1 Tilt servo
|
||||
# @output AUX2 Elevon 1
|
||||
# @output AUX3 Elevon 2
|
||||
# @output AUX4 Gear
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default MAV_TYPE 21
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_P 0.19
|
||||
param set-default MC_ROLLRATE_I 0.002
|
||||
param set-default MC_ROLLRATE_D 0.005
|
||||
param set-default MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_P 0.14
|
||||
param set-default MC_PITCHRATE_I 0.002
|
||||
param set-default MC_PITCHRATE_D 0.004
|
||||
param set-default MC_YAW_P 4
|
||||
param set-default MC_YAWRATE_P 0.22
|
||||
param set-default MC_YAWRATE_I 0.02
|
||||
|
||||
param set-default VT_FW_MOT_OFFID 34
|
||||
param set-default VT_IDLE_PWM_MC 1080
|
||||
param set-default VT_MOT_ID 123456
|
||||
param set-default VT_FW_MOT_OFFID 56
|
||||
param set-default VT_TILT_MC 0.08
|
||||
param set-default VT_TILT_TRANS 0.5
|
||||
param set-default VT_TILT_FW 0.9
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
param set-default VT_TYPE 1
|
||||
|
||||
set MIXER firefly6
|
||||
set MIXER_AUX firefly6
|
||||
|
||||
set PWM_OUT 12345678
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name QuadRanger
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Sander Smeets <sander@droneslab.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
|
||||
param set-default FW_THR_TRIM 65
|
||||
param set-default FW_RR_FF 0.6
|
||||
|
||||
param set-default MIS_YAW_TMT 10
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_I 0.1
|
||||
param set-default MC_ROLLRATE_D 0.004
|
||||
param set-default MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_I 0.1
|
||||
param set-default MC_PITCHRATE_D 0.004
|
||||
param set-default MC_YAW_P 3.5
|
||||
param set-default MC_YAWRATE_P 0.6
|
||||
param set-default MC_YAWRATE_I 0.04
|
||||
param set-default MC_YAWRATE_MAX 40
|
||||
|
||||
param set-default MPC_ACC_HOR_MAX 2
|
||||
param set-default MPC_LAND_SPEED 0.8
|
||||
param set-default MPC_YAWRAUTO_MAX 40
|
||||
|
||||
param set-default PWM_AUX_DIS5 950
|
||||
param set-default PWM_AUX_REV1 1
|
||||
param set-default PWM_AUX_REV2 1
|
||||
|
||||
param set-default VT_ARSP_TRANS 15
|
||||
param set-default VT_ARSP_BLEND 8
|
||||
param set-default VT_F_TRANS_THR 0.75
|
||||
param set-default VT_IDLE_PWM_MC 1080
|
||||
param set-default VT_MOT_ID 1234
|
||||
param set-default VT_FW_MOT_OFFID 1234
|
||||
param set-default VT_TYPE 2
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER_AUX vtol_AAERT
|
||||
|
||||
set PWM_OUT 1234
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Sparkle Tech Ranger VTOL
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board holybro_kakutef7 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default FW_AIRSPD_MAX 22
|
||||
param set-default FW_AIRSPD_MIN 14
|
||||
param set-default FW_AIRSPD_TRIM 16
|
||||
param set-default FW_L1_PERIOD 25
|
||||
param set-default FW_PR_P 0.060
|
||||
param set-default FW_P_RMAX_NEG 40
|
||||
param set-default FW_P_RMAX_POS 40
|
||||
param set-default FW_RR_FF 0.4
|
||||
param set-default FW_RR_P 0.04
|
||||
param set-default FW_R_RMAX 40
|
||||
|
||||
param set-default MC_PITCHRATE_D 0.004
|
||||
param set-default MC_PITCHRATE_I 0
|
||||
param set-default MC_PITCHRATE_MAX 60
|
||||
param set-default MC_PITCHRATE_P 0.21
|
||||
param set-default MC_PITCH_P 4
|
||||
param set-default MC_ROLLRATE_D 0.004
|
||||
param set-default MC_ROLLRATE_I 0.002
|
||||
param set-default MC_ROLLRATE_MAX 60
|
||||
param set-default MC_ROLLRATE_P 0.24
|
||||
param set-default MC_ROLL_P 4
|
||||
param set-default MC_YAWRATE_I 0.02
|
||||
param set-default MC_YAWRATE_MAX 40
|
||||
param set-default MC_YAWRATE_P 0.18
|
||||
|
||||
param set-default MIS_TAKEOFF_ALT 2.5
|
||||
param set-default MIS_YAW_TMT 20
|
||||
|
||||
param set-default MPC_ACC_HOR_MAX 1
|
||||
param set-default MPC_HOLD_MAX_XY 0.5
|
||||
param set-default MPC_HOLD_MAX_Z 0.5
|
||||
param set-default MPC_LAND_SPEED 1
|
||||
param set-default MPC_MANTHR_MIN 0.05
|
||||
param set-default MPC_MAN_Y_MAX 120
|
||||
param set-default MPC_THR_MIN 0.07
|
||||
param set-default MPC_TILTMAX_AIR 35
|
||||
param set-default MPC_TILTMAX_LND 20
|
||||
param set-default MPC_TKO_SPEED 1
|
||||
param set-default MPC_XY_P 0.3
|
||||
param set-default MPC_XY_VEL_MAX 3
|
||||
param set-default MPC_XY_VEL_P_ACC 1
|
||||
param set-default MPC_Z_P 0.5
|
||||
param set-default MPC_Z_VEL_P_ACC 2
|
||||
param set-default MPC_YAWRAUTO_MAX 40
|
||||
|
||||
param set-default NAV_ACC_RAD 3
|
||||
|
||||
param set-default PWM_AUX_REV1 1
|
||||
param set-default PWM_AUX_REV2 1
|
||||
param set-default PWM_AUX_REV3 1
|
||||
param set-default PWM_AUX_REV4 1
|
||||
|
||||
param set-default PWM_AUX_DIS5 950
|
||||
|
||||
param set-default VT_ARSP_TRANS 15
|
||||
param set-default VT_F_TRANS_THR 0.6
|
||||
param set-default VT_IDLE_PWM_MC 1180
|
||||
param set-default VT_MOT_ID 1234
|
||||
param set-default VT_FW_MOT_OFFID 1234
|
||||
param set-default VT_TRANS_MIN_TM 5
|
||||
param set-default VT_TRANS_TIMEOUT 30
|
||||
param set-default VT_TYPE 2
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER_AUX vtol_AAERT
|
||||
|
||||
set PWM_OUT 1234
|
||||
@@ -61,7 +61,7 @@ param set-default MPC_JERK_AUTO 4
|
||||
param set-default MPC_LAND_SPEED 1
|
||||
param set-default MPC_MAN_TILT_MAX 25
|
||||
param set-default MPC_MAN_Y_MAX 40
|
||||
param set-default COM_SPOOLUP_TIME 1.5
|
||||
param set-default MPC_SPOOLUP_TIME 1.5
|
||||
param set-default MPC_THR_HOVER 0.45
|
||||
param set-default MPC_TILTMAX_AIR 25
|
||||
param set-default MPC_TKO_RAMP_T 1.8
|
||||
|
||||
@@ -1,54 +1,26 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Blade 130X
|
||||
# @name Generic Helicopter (Tail ESC)
|
||||
#
|
||||
# @type Helicopter
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Bart Slinger <bartslinger@gmail.com>
|
||||
#
|
||||
# @output MAIN1 main motor
|
||||
# @output MAIN2 front swashplate servo
|
||||
# @output MAIN3 right swashplate servo
|
||||
# @output MAIN4 left swashplate servo
|
||||
# @output MAIN5 tail-rotor servo
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
. ${R}etc/init.d/rc.heli_defaults
|
||||
|
||||
# Configure as helicopter (number 4 defined in commander_helper.cpp)
|
||||
param set-default MAV_TYPE 4
|
||||
|
||||
set MIXER blade130
|
||||
|
||||
set PWM_OUT none
|
||||
|
||||
param set-default ATT_BIAS_MAX 0
|
||||
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set-default MC_ROLL_P 5
|
||||
# Disable PID gains for initial setup. These should be enabled after setting the FF gain.
|
||||
# P is expected to be lower than FF.
|
||||
param set-default MC_ROLLRATE_P 0
|
||||
param set-default MC_ROLLRATE_I 0
|
||||
param set-default MC_ROLLRATE_D 0
|
||||
param set-default MC_ROLLRATE_FF 0.15
|
||||
param set-default MC_ROLLRATE_FF 0.1
|
||||
param set-default MC_PITCHRATE_P 0
|
||||
param set-default MC_PITCHRATE_I 0
|
||||
param set-default MC_PITCHRATE_D 0
|
||||
param set-default MC_PITCHRATE_FF 0.15
|
||||
param set-default MC_YAW_P 3
|
||||
param set-default MC_YAWRATE_P 0.1
|
||||
param set-default MC_YAWRATE_I 0
|
||||
param set-default MC_ROLLRATE_MAX 720
|
||||
param set-default MC_PITCHRATE_MAX 720
|
||||
param set-default MC_YAWRATE_MAX 400
|
||||
param set-default MC_ACRO_R_MAX 360
|
||||
param set-default MC_ACRO_P_MAX 360
|
||||
param set-default MC_PITCHRATE_FF 0.1
|
||||
|
||||
param set-default MPC_THR_MIN 0.06
|
||||
param set-default MPC_MANTHR_MIN 0.06
|
||||
|
||||
param set-default PWM_MAIN_MIN 1075
|
||||
param set-default CA_AIRFRAME 10
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name ThunderFly Auto-G2
|
||||
#
|
||||
# @type Autogyro
|
||||
# @class Autogyro
|
||||
#
|
||||
# @output MAIN1 rotor_head_L
|
||||
# @output MAIN2 rotor_head_R
|
||||
# @output MAIN3 elevator
|
||||
# @output MAIN4 rudder
|
||||
# @output MAIN5 rudder (second, optional)
|
||||
# @output MAIN6 throttle
|
||||
# @output MAIN7 wheel
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel for prerotator (optional)
|
||||
# @output AUX2 feed-through of RC AUX2 channel for release device (optional)
|
||||
#
|
||||
# @url https://github.com/ThunderFly-aerospace/Auto-G2/
|
||||
# @maintainer ThunderFly s.r.o., Roman Dvorak <dvorakroman@thunderfly.cz>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
|
||||
param set-default BAT1_CAPACITY 2500
|
||||
param set-default BAT1_N_CELLS 3
|
||||
|
||||
param set-default PWM_AUX_RATE 50
|
||||
param set-default PWM_MAIN_RATE 50
|
||||
|
||||
param set-default SENS_BOARD_ROT 8
|
||||
|
||||
param set-default FW_AIRSPD_MAX 20
|
||||
param set-default FW_AIRSPD_MIN 7
|
||||
param set-default FW_AIRSPD_TRIM 13
|
||||
param set-default FW_THR_TRIM 0.8
|
||||
|
||||
param set-default FW_MAN_P_MAX 25
|
||||
param set-default FW_MAN_R_MAX 25
|
||||
param set-default FW_PR_I 0.02
|
||||
param set-default FW_R_LIM 40
|
||||
param set-default FW_P_LIM_MAX 25
|
||||
param set-default FW_P_LIM_MIN -5
|
||||
param set-default FW_P_RMAX_NEG 20
|
||||
|
||||
set MIXER TF-AutoG2
|
||||
set MIXER_AUX pass
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name ThunderFly TF-G2
|
||||
#
|
||||
# @type Autogyro
|
||||
# @class Autogyro
|
||||
#
|
||||
# @output MAIN2 rotor_head_L
|
||||
# @output MAIN3 rotor_head_R
|
||||
# @output MAIN4 rudder
|
||||
# @output MAIN5 throttle
|
||||
#
|
||||
#
|
||||
# @url https://github.com/ThunderFly-aerospace/TF-G2/
|
||||
# @maintainer ThunderFly s.r.o., Roman Dvorak <dvorakroman@thunderfly.cz>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
|
||||
param set-default BAT1_CAPACITY 3300
|
||||
param set-default BAT1_N_CELLS 3
|
||||
|
||||
param set-default PWM_AUX_RATE 50
|
||||
param set-default PWM_MAIN_RATE 50
|
||||
|
||||
param set-default SENS_BOARD_ROT 4
|
||||
|
||||
param set-default FW_AIRSPD_MAX 20
|
||||
param set-default FW_AIRSPD_MIN 7
|
||||
param set-default FW_AIRSPD_TRIM 13
|
||||
param set-default FW_THR_TRIM 0.8
|
||||
|
||||
param set-default FW_MAN_P_MAX 25
|
||||
param set-default FW_MAN_R_MAX 25
|
||||
param set-default FW_PR_I 0.02
|
||||
param set-default FW_R_LIM 40
|
||||
param set-default FW_P_LIM_MAX 25
|
||||
param set-default FW_P_LIM_MIN -5
|
||||
param set-default FW_P_RMAX_NEG 20
|
||||
|
||||
set MIXER TF-G2
|
||||
set MIXER_AUX pass
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Bormatec Maja
|
||||
#
|
||||
# @type Standard Plane
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 aileron
|
||||
# @output MAIN2 aileron
|
||||
# @output MAIN3 elevator
|
||||
# @output MAIN4 rudder
|
||||
# @output MAIN5 throttle
|
||||
# @output MAIN6 wheel
|
||||
# @output MAIN7 flaps
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_MAN_P_MAX 55
|
||||
param set-default FW_MAN_R_MAX 55
|
||||
param set-default FW_R_LIM 55
|
||||
|
||||
param set-default FW_WR_FF 0.2
|
||||
param set-default FW_WR_I 0.2
|
||||
param set-default FW_WR_IMAX 0.8
|
||||
param set-default FW_WR_P 1
|
||||
param set-default FW_W_RMAX 0
|
||||
|
||||
# set disarmed value for the ESC
|
||||
param set-default PWM_MAIN_DISARM 1000
|
||||
|
||||
|
||||
set MIXER AAERTWF
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 5
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name X-UAV Mini Talon
|
||||
#
|
||||
# @type Plane V-Tail
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 aileron right
|
||||
# @output MAIN2 aileron left
|
||||
# @output MAIN3 v-tail right
|
||||
# @output MAIN4 v-tail left
|
||||
# @output MAIN5 throttle
|
||||
# @output MAIN6 wheel
|
||||
# @output MAIN7 flaps right
|
||||
# @output MAIN8 flaps left
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_MAN_P_MAX 55
|
||||
param set-default FW_MAN_R_MAX 55
|
||||
param set-default FW_R_LIM 55
|
||||
|
||||
param set-default FW_WR_FF 0.2
|
||||
param set-default FW_WR_I 0.2
|
||||
param set-default FW_WR_IMAX 0.8
|
||||
param set-default FW_WR_P 1
|
||||
param set-default FW_W_RMAX 0
|
||||
|
||||
# set disarmed value for the ESC
|
||||
param set-default PWM_MAIN_DISARM 1000
|
||||
|
||||
# The Mini Talon does not have a wheel and
|
||||
# no flaps. I leave them here because the mixer
|
||||
# computes also wheel and flap controls.
|
||||
set MIXER AAVVTWFF_vtail
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 5
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Phantom FPV Flying Wing
|
||||
#
|
||||
# @url https://docs.px4.io/main/en/frames_plane/wing_wing_z84.html
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 left aileron
|
||||
# @output MAIN2 right aileron
|
||||
# @output MAIN4 throttle
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_AIRSPD_MIN 13
|
||||
param set-default FW_AIRSPD_MAX 25
|
||||
param set-default FW_R_TC 0.3
|
||||
param set-default FW_P_TC 0.3
|
||||
param set-default FW_L1_PERIOD 15
|
||||
param set-default FW_PR_FF 0.2
|
||||
param set-default FW_PR_IMAX 0.2
|
||||
param set-default FW_PR_P 0.03
|
||||
param set-default FW_P_LIM_MAX 50
|
||||
param set-default FW_P_LIM_MIN -50
|
||||
param set-default FW_RR_P 0.08
|
||||
param set-default FW_R_LIM 50
|
||||
param set-default FW_R_RMAX 50
|
||||
|
||||
param set-default PWM_MAIN_DISARM 1000
|
||||
|
||||
# Bottom of bay and nominal zero-pitch attitude differ
|
||||
# the payload bay is pitched up about 7 degrees
|
||||
param set-default SENS_BOARD_Y_OFF 7
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Skywalker X5 Flying Wing
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 left aileron
|
||||
# @output MAIN2 right aileron
|
||||
# @output MAIN4 throttle
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Julian Oes <julian@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_AIRSPD_MIN 15
|
||||
param set-default FW_AIRSPD_TRIM 20
|
||||
param set-default FW_AIRSPD_MAX 40
|
||||
param set-default FW_R_TC 0.3
|
||||
param set-default FW_P_TC 0.3
|
||||
param set-default FW_L1_DAMPING 0.74
|
||||
param set-default FW_L1_PERIOD 16
|
||||
param set-default FW_LND_ANG 15
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_PR_FF 0.35
|
||||
param set-default FW_RR_FF 0.6
|
||||
param set-default FW_RR_P 0.04
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Wing Wing (aka Z-84) Flying Wing
|
||||
#
|
||||
# @url https://docs.px4.io/main/en/frames_plane/wing_wing_z84.html
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 left aileron
|
||||
# @output MAIN2 right aileron
|
||||
# @output MAIN4 throttle
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default BAT1_N_CELLS 2
|
||||
param set-default FW_AIRSPD_MAX 15
|
||||
param set-default FW_AIRSPD_TRIM 13
|
||||
param set-default FW_R_TC 0.3
|
||||
param set-default FW_P_TC 0.3
|
||||
param set-default FW_L1_DAMPING 0.74
|
||||
param set-default FW_L1_PERIOD 16
|
||||
param set-default FW_LND_ANG 15
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_PR_FF 0.35
|
||||
param set-default FW_RR_FF 0.6
|
||||
param set-default FW_RR_P 0.04
|
||||
|
||||
param set-default PWM_MAIN_DISARM 1000
|
||||
|
||||
# Set mixer.
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
# Provide ESC a constant 1000 us pulse.
|
||||
set PWM_OUT 4
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Sparkle Tech Pigeon
|
||||
#
|
||||
# @url http://www.sparkletech.hk/
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 left aileron
|
||||
# @output MAIN2 right aileron
|
||||
# @output MAIN4 throttle
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_AIRSPD_MIN 15
|
||||
param set-default FW_AIRSPD_TRIM 20
|
||||
param set-default FW_AIRSPD_MAX 27
|
||||
param set-default FW_ATT_TC 0.3
|
||||
param set-default FW_PR_FF 0.35
|
||||
param set-default FW_PR_IMAX 0.2
|
||||
param set-default FW_PR_P 0.05
|
||||
param set-default FW_P_TC 0.3
|
||||
param set-default FW_RR_FF 0.3
|
||||
param set-default FW_RR_P 0.03
|
||||
param set-default FW_R_LIM 40
|
||||
param set-default FW_R_RMAX 50
|
||||
param set-default FW_R_TC 0.3
|
||||
|
||||
param set-default PWM_MAIN_DISARM 1000
|
||||
|
||||
# Bottom of bay and nominal zero-pitch attitude differ
|
||||
# the payload bay is pitched up about 7 degrees
|
||||
param set-default SENS_BOARD_Y_OFF 11.9
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name TBS Caipirinha
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 left aileron
|
||||
# @output MAIN2 right aileron
|
||||
# @output MAIN4 throttle
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_AIRSPD_MAX 25
|
||||
param set-default FW_AIRSPD_MIN 12.5
|
||||
param set-default FW_AIRSPD_TRIM 16.5
|
||||
param set-default FW_L1_PERIOD 15
|
||||
param set-default FW_LND_ANG 15
|
||||
param set-default FW_LND_FLALT 8
|
||||
param set-default FW_P_LIM_MAX 20
|
||||
param set-default FW_R_LIM 45
|
||||
param set-default FW_PR_FF 0.45
|
||||
param set-default FW_PR_P 0.005
|
||||
param set-default FW_RR_FF 0.45
|
||||
param set-default FW_RR_P 0.013
|
||||
param set-default FW_P_RMAX_NEG 70
|
||||
param set-default FW_P_RMAX_POS 70
|
||||
param set-default FW_R_RMAX 70
|
||||
param set-default FW_THR_TRIM 0.55
|
||||
|
||||
param set-default LNDFW_AIRSPD_MAX 6
|
||||
param set-default LNDFW_XYACC_MAX 4
|
||||
param set-default LNDFW_VEL_XY_MAX 3
|
||||
param set-default LNDFW_VEL_Z_MAX 5
|
||||
|
||||
param set-default MIS_TAKEOFF_ALT 50
|
||||
|
||||
param set-default NAV_LOITER_RAD 30
|
||||
|
||||
param set-default PWM_MAIN_REV1 1
|
||||
param set-default PWM_MAIN_REV2 1
|
||||
param set-default PWM_MAIN_MIN 900
|
||||
param set-default PWM_MAIN_MAX 2100
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
set PWM_OUT 1234
|
||||
@@ -69,7 +69,6 @@ param set-default CP_DIST 6
|
||||
param set-default MPC_ACC_DOWN_MAX 5
|
||||
param set-default MPC_ACC_HOR_MAX 10
|
||||
param set-default MPC_ACC_UP_MAX 4
|
||||
param set-default MPC_MANTHR_MIN 0
|
||||
param set-default MPC_MAN_Y_MAX 120
|
||||
param set-default MPC_TILTMAX_AIR 45
|
||||
param set-default MPC_THR_HOVER 0.3
|
||||
@@ -104,6 +103,7 @@ param set-default SDLOG_PROFILE 131
|
||||
param set-default SENS_CM8JL65_CFG 104
|
||||
param set-default SENS_FLOW_MAXHGT 25
|
||||
param set-default SENS_FLOW_MINHGT 0.5
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
param set-default IMU_GYRO_CUTOFF 100
|
||||
param set-default SENS_EN_PMW3901 1
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ param set-default MC_ROLLRATE_MAX 1600
|
||||
param set-default MC_PITCHRATE_MAX 1600
|
||||
param set-default MC_YAWRATE_MAX 1000
|
||||
|
||||
param set-default MPC_MANTHR_MIN 0
|
||||
param set-default MPC_MAN_TILT_MAX 60
|
||||
|
||||
# use thrust curve factor (instead of TPA)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Spedix S250AQ
|
||||
# @url https://docs.px4.io/main/en/frames_multicopter/spedix_s250_pixracer.html
|
||||
# @url https://docs.px4.io/master/en/frames_multicopter/spedix_s250_pixracer.html
|
||||
#
|
||||
# @type Quadrotor asymmetric
|
||||
# @class Copter
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name HolyBro QAV250
|
||||
#
|
||||
# @url https://docs.px4.io/main/en/frames_multicopter/holybro_qav250_pixhawk4_mini.html
|
||||
# @url https://docs.px4.io/master/en/frames_multicopter/holybro_qav250_pixhawk4_mini.html
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
|
||||
@@ -47,7 +47,6 @@ param set-default COM_RC_LOSS_T 3
|
||||
|
||||
# ekf2
|
||||
param set-default EKF2_AID_MASK 33
|
||||
param set-default EKF2_TERR_MASK 1
|
||||
param set-default EKF2_BARO_DELAY 0
|
||||
param set-default EKF2_BARO_NOISE 2.0
|
||||
|
||||
@@ -174,7 +173,7 @@ param set-default RC1_TRIM 1000
|
||||
param set-default SENS_FLOW_MAXR 7.4
|
||||
param set-default SENS_FLOW_MINHGT 0.15
|
||||
param set-default SENS_FLOW_MAXHGT 5.0
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
|
||||
# ignore the SD card errors and use normal startup sound
|
||||
set STARTUP_TUNE "1"
|
||||
|
||||
@@ -44,19 +44,12 @@ px4_add_romfs_files(
|
||||
|
||||
# [2000, 2999] Standard planes"
|
||||
2100_standard_plane
|
||||
2105_maja
|
||||
2106_albatross
|
||||
2200_mini_talon
|
||||
|
||||
2507_cloudship
|
||||
|
||||
# [3000, 3999] Flying wing"
|
||||
3000_generic_wing
|
||||
3031_phantom
|
||||
3032_skywalker_x5
|
||||
3033_wingwing
|
||||
3036_pigeon
|
||||
3100_tbs_caipirinha
|
||||
|
||||
# [4000, 4999] Quadrotor x"
|
||||
4001_quad_x
|
||||
@@ -67,8 +60,6 @@ px4_add_romfs_files(
|
||||
4016_holybro_px4vision
|
||||
4017_nxp_hovergames
|
||||
4019_x500_v2
|
||||
4030_3dr_solo
|
||||
4031_3dr_quad
|
||||
4040_reaper
|
||||
4041_beta75x
|
||||
4050_generic_250
|
||||
@@ -77,11 +68,8 @@ px4_add_romfs_files(
|
||||
4053_holybro_kopis2
|
||||
4061_atl_mantis_edu
|
||||
4071_ifo
|
||||
4072_draco
|
||||
4073_ifo-s
|
||||
4080_zmr250
|
||||
4090_nanomind
|
||||
4100_tiltquadrotor
|
||||
4500_clover4
|
||||
4900_crazyflie
|
||||
4901_crazyflie21
|
||||
@@ -102,10 +90,6 @@ px4_add_romfs_files(
|
||||
# [9000, 9999] Octorotor +"
|
||||
9001_octo_+
|
||||
|
||||
# [10000, 10999] Quadrotor Wide arm / H frame"
|
||||
10015_tbs_discovery
|
||||
10016_3dr_iris
|
||||
10018_tbs_endurance
|
||||
|
||||
# [11000, 11999] Hexa Cox
|
||||
11001_hexa_cox
|
||||
@@ -115,45 +99,31 @@ px4_add_romfs_files(
|
||||
|
||||
# [13000, 13999] VTOL
|
||||
13000_generic_vtol_standard
|
||||
13001_caipirinha_vtol
|
||||
13002_firefly6
|
||||
13003_quad_tailsitter
|
||||
13004_quad+_tailsitter
|
||||
13005_vtol_AAERT_quad
|
||||
13006_vtol_standard_delta
|
||||
13007_vtol_AAVVT_quad
|
||||
13008_QuadRanger
|
||||
13009_vtol_spt_ranger
|
||||
13100_generic_vtol_tiltrotor
|
||||
13012_convergence
|
||||
13013_deltaquad
|
||||
13014_vtol_babyshark
|
||||
13030_generic_vtol_quad_tiltrotor
|
||||
13050_generic_vtol_octo
|
||||
13200_generic_vtol_tailsitter
|
||||
|
||||
# [14000, 14999] Tri Y
|
||||
14001_tri_y_yaw+
|
||||
14002_tri_y_yaw-
|
||||
|
||||
15001_coax_heli
|
||||
|
||||
16001_helicopter
|
||||
|
||||
# [17000, 17999] Autogyro
|
||||
17002_TF-AutoG2
|
||||
17003_TF-G2
|
||||
|
||||
|
||||
# [18000, 18999] High-altitude balloons
|
||||
18001_TF-B1
|
||||
|
||||
# [22000, 22999] Reserve for custom models
|
||||
|
||||
24001_dodeca_cox
|
||||
|
||||
50000_generic_ground_vehicle
|
||||
50003_aion_robotics_r1_rover
|
||||
50004_nxpcup_car_dfrobot_gpx
|
||||
|
||||
# [60000, 61000] (Unmanned) Underwater Robots
|
||||
60000_uuv_generic
|
||||
|
||||
@@ -14,7 +14,7 @@ param set-default MAV_TYPE 1
|
||||
# Default parameters for fixed wing UAVs.
|
||||
#
|
||||
param set-default COM_POS_FS_DELAY 5
|
||||
param set-default COM_POS_FS_EPH 15
|
||||
param set-default COM_POS_FS_EPH 50
|
||||
param set-default COM_POS_FS_EPV 30
|
||||
param set-default COM_VEL_FS_EVH 5
|
||||
# Disable preflight disarm to not interfere with external launching
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Helicopter default parameters.
|
||||
#
|
||||
# NOTE: Script variables are declared/initialized/unset in the rcS script.
|
||||
#
|
||||
|
||||
# Inherit from mc
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default MAV_TYPE 4
|
||||
|
||||
param set-default COM_PREARM_MODE 2
|
||||
param set-default COM_SPOOLUP_TIME 10
|
||||
|
||||
# No need for minimum collective pitch (or airmode) to keep torque authority
|
||||
param set-default MPC_MANTHR_MIN 0
|
||||
@@ -32,14 +32,17 @@ fi
|
||||
|
||||
#
|
||||
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
|
||||
# mixer to mount (override the airframe-specific MIXER_AUX setting).
|
||||
# mixer to mount if no other aux mixer has been set.
|
||||
#
|
||||
if param greater -s MNT_MODE_IN -1
|
||||
then
|
||||
if param compare -s MNT_MODE_OUT 0
|
||||
then
|
||||
set MIXER_AUX mount
|
||||
fi
|
||||
if param compare -s MNT_MODE_OUT 0
|
||||
then
|
||||
if [ $MIXER_AUX = none ]
|
||||
then
|
||||
set MIXER_AUX mount
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
||||
@@ -129,11 +129,7 @@ fi
|
||||
# Sensirion SDP3X differential pressure sensor external I2C
|
||||
if param compare -s SENS_EN_SDP3X 1
|
||||
then
|
||||
if ! sdp3x start -X
|
||||
then
|
||||
# try another common address
|
||||
sdp3x start -X -a 0x22
|
||||
fi
|
||||
sdp3x start -X -k
|
||||
fi
|
||||
|
||||
# TE MS4515 differential pressure sensor external I2C
|
||||
|
||||
@@ -10,6 +10,8 @@ set VEHICLE_TYPE vtol
|
||||
# MAV_TYPE_VTOL_FIXEDROTOR 22
|
||||
param set-default MAV_TYPE 22
|
||||
|
||||
param set-default COM_POS_FS_EPH 50
|
||||
|
||||
param set-default MIS_TAKEOFF_ALT 20
|
||||
param set-default MIS_YAW_TMT 10
|
||||
|
||||
|
||||
@@ -107,6 +107,16 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for an update
|
||||
if [ -e /fs/microsd/new ]
|
||||
then
|
||||
echo "Updating external autostart files"
|
||||
# FIXME: add NuttX support for recursive rm, then we can remove the
|
||||
# directory (for now this is done during updating via MAVLink FTP)
|
||||
#rm -r $SDCARD_EXT_PATH
|
||||
mv /fs/microsd/new $SDCARD_EXT_PATH
|
||||
fi
|
||||
|
||||
set PARAM_FILE /fs/microsd/params
|
||||
fi
|
||||
|
||||
@@ -399,6 +409,21 @@ else
|
||||
commander start
|
||||
fi
|
||||
|
||||
# PPS capture driver (before pwm_out)
|
||||
if param greater -s PPS_CAP_ENABLE 0
|
||||
then
|
||||
pps_capture start
|
||||
fi
|
||||
|
||||
# Camera capture driver (before pwm_out)
|
||||
if param greater -s CAM_CAP_FBACK 0
|
||||
then
|
||||
if camera_capture start
|
||||
then
|
||||
camera_capture on
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Configure vehicle type specific parameters.
|
||||
# Note: rc.vehicle_setup is the entry point for rc.interface,
|
||||
@@ -441,21 +466,6 @@ else
|
||||
rc_input start $RC_INPUT_ARGS
|
||||
fi
|
||||
|
||||
# PPS capture driver (before pwm_out)
|
||||
if param greater -s PPS_CAP_ENABLE 0
|
||||
then
|
||||
pps_capture start
|
||||
fi
|
||||
|
||||
# Camera capture driver (before pwm_out)
|
||||
if param greater -s CAM_CAP_FBACK 0
|
||||
then
|
||||
if camera_capture start
|
||||
then
|
||||
camera_capture on
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Play the startup tune (if not disabled or there is an error)
|
||||
#
|
||||
@@ -505,6 +515,12 @@ 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
|
||||
|
||||
#
|
||||
# Optional board supplied extras: rc.board_extras
|
||||
#
|
||||
|
||||
@@ -39,5 +39,6 @@ px4_add_romfs_files(
|
||||
quad_x_vtol.main.mix
|
||||
standard_vtol_sitl.main.mix
|
||||
tiltrotor_sitl.main.mix
|
||||
tiltrotor_tri_sitl.main.mix
|
||||
uuv_x_sitl.main.mix
|
||||
)
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
Mixer for quad tiltrotor (x motor configuration)
|
||||
================================================
|
||||
|
||||
This file defines a single mixer for a tiltrotor (SITL gazebo) with motors in X configuration. The plane has two ailerons and one elevator.
|
||||
|
||||
R: 3y 10000 10000 10000 0
|
||||
|
||||
# tilt servo motor 1 (right)
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 8 0 20000 -10000 -10000 10000
|
||||
S: 0 2 -10000 -10000 0 -10000 10000
|
||||
|
||||
# tilt servo motor 2 (left)
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 8 0 20000 -10000 -10000 10000
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
# tilt servo motor 3 (rear)
|
||||
-------------
|
||||
M: 1
|
||||
S: 1 8 0 20000 -10000 -10000 10000
|
||||
|
||||
# mixer for the left aileron
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 -10000 -10000 0 -10000 10000
|
||||
|
||||
# mixer for the right aileron
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 0 10000 10000 0 -10000 10000
|
||||
|
||||
# mixer for the elevator
|
||||
M: 1
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 1 1 10000 10000 0 -10000 10000
|
||||
@@ -1,48 +0,0 @@
|
||||
Helicopter 120 degree Cyclic-Collective-Pitch Mixing (CCPM) for PX4FMU
|
||||
==================================================
|
||||
|
||||
|
||||
Output 0 - Rear Servo Mixer
|
||||
----------------
|
||||
|
||||
Rear Servo = Collective (Thrust - 3) + Elevator (Pitch - 1)
|
||||
|
||||
M: 2
|
||||
S: 0 3 10000 10000 0 -10000 10000
|
||||
S: 0 1 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
Output 1 - Left Servo Mixer
|
||||
-----------------
|
||||
Left Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) + 0.866 * Aileron (Roll - 0)
|
||||
|
||||
M: 3
|
||||
S: 0 3 -10000 -10000 0 -10000 10000
|
||||
S: 0 1 -5000 -5000 0 -10000 10000
|
||||
S: 0 0 8660 8660 0 -10000 10000
|
||||
|
||||
|
||||
Output 2 - Right Servo Mixer
|
||||
----------------
|
||||
Right Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) - 0.866 * Aileron (Roll - 0)
|
||||
|
||||
|
||||
M: 3
|
||||
S: 0 3 -10000 -10000 0 -10000 10000
|
||||
S: 0 1 -5000 -5000 0 -10000 10000
|
||||
S: 0 0 -8660 -8660 0 -10000 10000
|
||||
|
||||
Output 3 - Tail Servo Mixer
|
||||
----------------
|
||||
Tail Servo = Yaw (control index = 2)
|
||||
|
||||
M: 1
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
Output 4 - Motor speed mixer
|
||||
-----------------
|
||||
This would be the motor speed control output from governor power demand- not sure what index to use here?
|
||||
|
||||
M: 1
|
||||
S: 0 4 0 20000 -10000 -10000 10000
|
||||
@@ -38,16 +38,11 @@ px4_add_romfs_files(
|
||||
AERT.main.mix
|
||||
AETRFG.main.mix
|
||||
babyshark.main.mix
|
||||
blade130.main.mix
|
||||
CCPM.main.mix
|
||||
cloudship.main.mix
|
||||
coax.main.mix
|
||||
delta.main.mix
|
||||
deltaquad.main.mix
|
||||
dodeca_bottom_cox.aux.mix
|
||||
dodeca_top_cox.main.mix
|
||||
firefly6.aux.mix
|
||||
firefly6.main.mix
|
||||
fw_generic_wing.main.mix
|
||||
generic_diff_rover.main.mix
|
||||
hexa_cox.main.mix
|
||||
@@ -74,7 +69,6 @@ px4_add_romfs_files(
|
||||
rover_diff_and_servo.main.mix
|
||||
rover_generic.main.mix
|
||||
standard_vtol_hitl.main.mix
|
||||
TF-AutoG2.main.mix
|
||||
tilt_quad.aux.mix
|
||||
tilt_quad.main.mix
|
||||
tri_y_yaw+.main.mix
|
||||
@@ -84,8 +78,6 @@ px4_add_romfs_files(
|
||||
vtol_AAERT.aux.mix
|
||||
vtol_AAVVT.aux.mix
|
||||
vtol_TTTTAAER.aux.mix
|
||||
vtol_convergence.main.mix
|
||||
vtol_delta.aux.mix
|
||||
vtol_tailsitter_duo.main.mix
|
||||
vtol_tailsitter_duo_sat.main.mix
|
||||
)
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
Aileron/rudder/elevator/throttle mixer for PX4FMU
|
||||
==================================================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
CH1, 2: rotor-head mixer
|
||||
-------------
|
||||
Two scalers total (output, roll).
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 -10000 -10000 0 -10000 10000
|
||||
S: 0 1 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 -10000 -10000 0 -10000 10000
|
||||
S: 0 1 -10000 -10000 0 -10000 10000
|
||||
|
||||
|
||||
CH3: Elevator, prerotator mixer
|
||||
------------
|
||||
Two scalers total (output, roll).
|
||||
|
||||
M: 1
|
||||
O: 7500 7500 0 -10000 10000
|
||||
S: 3 6 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
CH4, 5: Rudder mixer
|
||||
------------
|
||||
Two scalers total (output, yaw).
|
||||
|
||||
M: 1
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
S: 0 2 -10000 -10000 0 -10000 10000
|
||||
|
||||
CH4: Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
M: 1
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
|
||||
CH3: Wheel mixer
|
||||
------------
|
||||
Two scalers total (output, yaw).
|
||||
|
||||
M: 1
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
@@ -1,40 +0,0 @@
|
||||
TF-G2 autogyro mixer
|
||||
==================================================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
CH1: empty - fixing cuav nano jittering of 1st output.
|
||||
Z:
|
||||
|
||||
|
||||
CH2, 3: rotor-head mixer
|
||||
-------------
|
||||
Two scalers total (output, roll).
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 -10000 -10000 0 -10000 10000
|
||||
S: 0 1 10000 10000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
O: 10000 10000 0 -10000 10000
|
||||
S: 0 0 -10000 -10000 0 -10000 10000
|
||||
S: 0 1 -10000 -10000 0 -10000 10000
|
||||
|
||||
|
||||
CH4: Rudder mixer
|
||||
------------
|
||||
Two scalers total (output, yaw).
|
||||
|
||||
M: 1
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
CH5: Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
M: 1
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@@ -1,15 +0,0 @@
|
||||
Helicopter Cyclic-Collective-Pitch Mixing (CCPM) for PX4FMU
|
||||
Blade 130x helicopter has longer servo arms left and right. The front servo arm is shortest and has normalized length 10000.
|
||||
==================================================
|
||||
|
||||
H: 3
|
||||
T: 0 3000 6000 8000 10000
|
||||
P: 500 1500 2500 3500 4500
|
||||
# Swash plate servos:
|
||||
S: 0 10000 10000 0 -8000 8000
|
||||
S: 140 13054 10000 0 -8000 8000
|
||||
S: 220 13054 10000 0 -8000 8000
|
||||
|
||||
# Tail servo:
|
||||
M: 1
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
@@ -1,29 +0,0 @@
|
||||
Coaxial helicopter mixer
|
||||
- Two servomotors act on the swashplate (90 degree angle on the swashplate, decoupled effect on roll and pitch).
|
||||
- No collective pitch.
|
||||
- One motor per rotor.
|
||||
===========================
|
||||
|
||||
Left swashplate servomotor, pitch axis
|
||||
-------------
|
||||
M: 1
|
||||
S: 0 1 -10000 -10000 0 -10000 10000
|
||||
|
||||
Right swashplate servomotor, roll axis
|
||||
-------------
|
||||
M: 1
|
||||
S: 0 0 10000 10000 0 -10000 10000
|
||||
|
||||
Upper rotor (CCW)
|
||||
Mixing between yaw and thrust
|
||||
-------------
|
||||
M: 2
|
||||
S: 0 2 10000 10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
Lower rotor (CW)
|
||||
Mixing between yaw and thrust
|
||||
-------------
|
||||
M: 2
|
||||
S: 0 2 -10000 -10000 0 -10000 10000
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@@ -1,24 +0,0 @@
|
||||
# mixer for the FireFly6 tilt mechansim servo, elevons and landing gear
|
||||
=======================================================================
|
||||
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Tilt mechanism servo mixer
|
||||
---------------------------
|
||||
M: 1
|
||||
S: 1 8 0 20000 -10000 -10000 10000
|
||||
|
||||
Elevon mixers
|
||||
-------------
|
||||
M: 2
|
||||
S: 1 0 7500 7500 0 -10000 10000
|
||||
S: 1 1 8000 8000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
S: 1 0 7500 7500 0 -10000 10000
|
||||
S: 1 1 -8000 -8000 0 -10000 10000
|
||||
|
||||
Landing gear mixer
|
||||
------------------
|
||||
M: 1
|
||||
S: 3 6 10000 10000 0 -10000 10000
|
||||
@@ -1,6 +0,0 @@
|
||||
# FireFly6 mixer for PX4FMU
|
||||
#
|
||||
#===========================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
R: 6c
|
||||
@@ -5,7 +5,7 @@ Tailsitter duo mixer
|
||||
This file defines a mixer for a generic duo tailsitter VTOL (eg TBS Caipirinha tailsitter edition). This vehicle
|
||||
has two motors in total, one attached to each wing. It also has two elevons which
|
||||
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
|
||||
on the main PWM output port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
on the main PWM ouput port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
|
||||
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
Tailsitter duo mixer
|
||||
============================
|
||||
|
||||
This file defines a mixer for a generic duo tailsitter VTOL (eg TBS Caipirinha tailsitter edition). This vehicle
|
||||
has two motors in total, one attached to each wing. It also has two elevons which
|
||||
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
|
||||
on the main PWM output port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
|
||||
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
|
||||
|
||||
Motor mixer
|
||||
------------
|
||||
Channel 1 connects to the right (starboard) motor.
|
||||
Channel 2 connects to the left (port) motor.
|
||||
|
||||
R: 2-
|
||||
|
||||
Zero mixer (2x)
|
||||
---------------
|
||||
Channels 3,4 are unused.
|
||||
|
||||
Z:
|
||||
|
||||
Z:
|
||||
|
||||
Elevons mixer
|
||||
--------------
|
||||
Channel 5 connects to the right (starboard) elevon.
|
||||
Channel 6 connects to the left (port) elevon.
|
||||
Here we saturate the elevons before their full range
|
||||
to avoid roll-pitch-yaw coupling during faster maneuvers
|
||||
|
||||
M: 2
|
||||
S: 1 0 10000 10000 0 -6000 6000
|
||||
S: 1 1 10000 10000 0 -6000 6000
|
||||
|
||||
M: 2
|
||||
S: 1 0 10000 10000 0 -6000 6000
|
||||
S: 1 1 -10000 -10000 0 -6000 6000
|
||||
@@ -0,0 +1,34 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2020 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(init.d)
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2020 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
|
||||
@@ -31,6 +31,6 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_library(arch_watchdog_iwdg
|
||||
iwdg.c
|
||||
px4_add_romfs_files(
|
||||
rcS
|
||||
)
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
# Un comment and use set +e to ignore and set -e to enable 'exit on error control'
|
||||
set +e
|
||||
# Un comment the line below to help debug scripts by printing a trace of the script commands
|
||||
#set -x
|
||||
# PX4FMU startup script.
|
||||
#
|
||||
# NOTE: environment variable references:
|
||||
# If the dollar sign ('$') is followed by a left bracket ('{') then the
|
||||
# variable name is terminated with the right bracket character ('}').
|
||||
# Otherwise, the variable name goes to the end of the argument.
|
||||
#
|
||||
#
|
||||
# NOTE: COMMENT LINES ARE REMOVED BEFORE STORED IN ROMFS.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
set R /
|
||||
|
||||
#
|
||||
# Start CDC/ACM serial driver.
|
||||
#
|
||||
sercon
|
||||
|
||||
#
|
||||
# Print full system version.
|
||||
#
|
||||
ver all
|
||||
|
||||
#
|
||||
# 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 parameters.
|
||||
#
|
||||
# if the board has a storage for (factory) calibration data
|
||||
if mft query -q -k MTD -s MTD_CALDATA -v /fs/mtd_caldata
|
||||
then
|
||||
param load /fs/mtd_caldata
|
||||
fi
|
||||
|
||||
#
|
||||
# Load parameters.
|
||||
#
|
||||
param select $PARAM_FILE
|
||||
if ! param load
|
||||
then
|
||||
param reset_all
|
||||
fi
|
||||
|
||||
#
|
||||
# board mavlink: rc.mavlink
|
||||
#
|
||||
set BOARD_RC_MAVLINK ${R}etc/init.d/rc.board_mavlink
|
||||
if [ -f $BOARD_RC_MAVLINK ]
|
||||
then
|
||||
echo "Board sensors: ${BOARD_RC_MAVLINK}"
|
||||
. $BOARD_RC_MAVLINK
|
||||
fi
|
||||
unset BOARD_RC_MAVLINK
|
||||
|
||||
unset R
|
||||
|
||||
mavlink boot_complete
|
||||
|
||||
echo ""
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "!!!!!! This is the RECOVERY firmware! WARNs and ERRORs are expected! !!!!!"
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo ""
|
||||
@@ -17,7 +17,6 @@ exec find boards msg src platforms test \
|
||||
-path src/lib/crypto/monocypher -prune -o \
|
||||
-path src/lib/events/libevents -prune -o \
|
||||
-path src/lib/parameters/uthash -prune -o \
|
||||
-path src/lib/wind_estimator/python/generated -prune -o \
|
||||
-path src/modules/ekf2/EKF -prune -o \
|
||||
-path src/modules/gyro_fft/CMSIS_5 -prune -o \
|
||||
-path src/modules/mavlink/mavlink -prune -o \
|
||||
|
||||
Executable
+97
@@ -0,0 +1,97 @@
|
||||
#!/bin/bash
|
||||
# Flash PX4 to a device running AOS in the local network
|
||||
if [ "$1" == "-h" ] || [ "$1" == "--help" ] || [ $# -lt 2 ]; then
|
||||
echo "Usage: $0 -f <firmware.px4|.elf> [-c <configuration_dir>] -d <IP/Device> [-u <user>] [-p <ssh_port>]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ssh_port=22
|
||||
ssh_user=root
|
||||
|
||||
while getopts ":f:c:d:p:u:" opt; do
|
||||
case ${opt} in
|
||||
f )
|
||||
if [ -n "$OPTARG" ]; then
|
||||
firmware_file="$OPTARG"
|
||||
else
|
||||
echo "ERROR: -f requires a non-empty option argument."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
c )
|
||||
if [ -f "$OPTARG/rc.autostart" ]; then
|
||||
config_dir="$OPTARG"
|
||||
else
|
||||
echo "ERROR: -c configuration directory is empty or does not contain a valid rc.autostart"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
d )
|
||||
if [ "$OPTARG" ]; then
|
||||
device="$OPTARG"
|
||||
else
|
||||
echo "ERROR: -d requires a non-empty option argument."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
p )
|
||||
if [[ "$OPTARG" =~ ^[0-9]+$ ]]; then
|
||||
ssh_port="$OPTARG"
|
||||
else
|
||||
echo "ERROR: -p ssh_port must be a number."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
u )
|
||||
if [ "$OPTARG" ]; then
|
||||
ssh_user="$OPTARG"
|
||||
else
|
||||
echo "ERROR: -u requires a non-empty option argument."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
target_dir=/shared_container_dir/fmu
|
||||
|
||||
# create update-dev.tar
|
||||
target_file_name="update-dev.tar"
|
||||
tmp_dir="$(mktemp -d)"
|
||||
config_path=""
|
||||
firmware_path=""
|
||||
|
||||
if [ -d "$config_dir" ]; then
|
||||
cp -r "$config_dir" "$tmp_dir/config"
|
||||
config_path=config
|
||||
fi
|
||||
|
||||
if [ -f "$firmware_file" ]; then
|
||||
extension="${firmware_file##*.}"
|
||||
cp "$firmware_file" "$tmp_dir/firmware.$extension"
|
||||
if [ "$extension" == "elf" ]; then
|
||||
# ensure the file is stripped to reduce file size
|
||||
arm-none-eabi-strip "$tmp_dir/firmware.$extension"
|
||||
fi
|
||||
firmware_path="firmware.$extension"
|
||||
fi
|
||||
|
||||
if [ -z "$device" ]; then
|
||||
echo "Error: missing device"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd "$tmp_dir" &>/dev/null
|
||||
|
||||
if [ -z $firmware_path ] && [ -z $config_path ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tar -C "$tmp_dir" --sort=name --owner=root:0 --group=root:0 --mtime='2019-01-01 00:00:00' -cvf $target_file_name $firmware_path $config_path
|
||||
scp -P $ssh_port "$target_file_name" $ssh_user@"$device":$target_dir
|
||||
popd &>/dev/null
|
||||
rm -rf "$tmp_dir"
|
||||
|
||||
# grab status output
|
||||
cmd="tail --follow=name $target_dir/update_status 2>/dev/null || true"
|
||||
ssh -t -p $ssh_port $ssh_user@$device "$cmd"
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$(dirname $(readlink -f $0))"
|
||||
PX4_BINARY_FILE="$1"
|
||||
DEFAULT_AUTOPILOT_HOST=10.41.0.1
|
||||
DEFAULT_AUTOPILOT_PORT=33333
|
||||
DEFAULT_AUTOPILOT_USER=auterion
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
case $i in
|
||||
--default-ip=*)
|
||||
DEFAULT_AUTOPILOT_HOST="${i#*=}"
|
||||
;;
|
||||
--default-port=*)
|
||||
DEFAULT_AUTOPILOT_PORT="${i#*=}"
|
||||
;;
|
||||
--default-user=*)
|
||||
DEFAULT_AUTOPILOT_USER="${i#*=}"
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# allow these to be overridden
|
||||
[ -z "$AUTOPILOT_HOST" ] && AUTOPILOT_HOST=$DEFAULT_AUTOPILOT_HOST
|
||||
[ -z "$AUTOPILOT_PORT" ] && AUTOPILOT_PORT=$DEFAULT_AUTOPILOT_PORT
|
||||
[ -z "$AUTOPILOT_USER" ] && AUTOPILOT_USER=$DEFAULT_AUTOPILOT_USER
|
||||
|
||||
echo "Uploading to $AUTOPILOT_HOST..."
|
||||
|
||||
"$DIR"/remote_update_fmu.sh -f "$PX4_BINARY_FILE" -d "$AUTOPILOT_HOST" -p $AUTOPILOT_PORT -u $AUTOPILOT_USER
|
||||
|
||||
exit 0
|
||||
@@ -6,10 +6,17 @@
|
||||
# For example gazebo can be run like this:
|
||||
#./Tools/gazebo_sitl_multiple_run.sh -n 10 -m iris
|
||||
|
||||
SUPPORTED_MODELS=("iris" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480", "shieldai_nova2", "skydio_x2d")
|
||||
|
||||
function cleanup() {
|
||||
pkill -x px4
|
||||
pkill gzclient
|
||||
pkill gzserver
|
||||
|
||||
if [[ -n "$HEADLESS" ]]; then
|
||||
exit
|
||||
else
|
||||
pkill gzclient
|
||||
fi
|
||||
}
|
||||
|
||||
function spawn_model() {
|
||||
@@ -20,10 +27,9 @@ function spawn_model() {
|
||||
X=${X:=0.0}
|
||||
Y=${Y:=$((3*${N}))}
|
||||
|
||||
SUPPORTED_MODELS=("iris" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480")
|
||||
if [[ " ${SUPPORTED_MODELS[*]} " != *"$MODEL"* ]];
|
||||
then
|
||||
echo "ERROR: Currently only vehicle model $MODEL is not supported!"
|
||||
echo "ERROR: Currently vehicle model '$MODEL' is not supported!"
|
||||
echo " Supported Models: [${SUPPORTED_MODELS[@]}]"
|
||||
trap "cleanup" SIGINT SIGTERM EXIT
|
||||
exit 1
|
||||
@@ -34,8 +40,19 @@ function spawn_model() {
|
||||
|
||||
pushd "$working_dir" &>/dev/null
|
||||
echo "starting instance $N in $(pwd)"
|
||||
|
||||
if [[ -n "${PX4_VIDEO_HOST_IP}" ]]; then
|
||||
export PX4_VIDEO_HOST_IP=${PX4_VIDEO_HOST_IP%.*}.$((7+$N))
|
||||
echo "PX4_VIDEO_HOST_IP '$PX4_VIDEO_HOST_IP'"
|
||||
fi
|
||||
|
||||
if [[ -n "${PX4_SIM_REMOTE_HOST}" ]]; then
|
||||
export PX4_SIM_REMOTE_HOST=${PX4_SIM_REMOTE_HOST%.*}.$((7+$N))
|
||||
echo "PX4_SIM_REMOTE_HOST '$PX4_SIM_REMOTE_HOST'"
|
||||
fi
|
||||
|
||||
../bin/px4 -i $N -d "$build_path/etc" -w sitl_${MODEL}_${N} -s etc/init.d-posix/rcS >out.log 2>err.log &
|
||||
python3 ${src_path}/Tools/sitl_gazebo/scripts/jinja_gen.py ${src_path}/Tools/sitl_gazebo/models/${MODEL}/${MODEL}.sdf.jinja ${src_path}/Tools/sitl_gazebo --mavlink_tcp_port $((4560+${N})) --mavlink_udp_port $((14560+${N})) --mavlink_id $((1+${N})) --gst_udp_port $((5600+${N})) --video_uri $((5600+${N})) --mavlink_cam_udp_port $((14530+${N})) --output-file /tmp/${MODEL}_${N}.sdf
|
||||
python3 ${src_path}/Tools/sitl_gazebo/scripts/jinja_gen.py ${src_path}/Tools/sitl_gazebo/models/${MODEL}/${MODEL}.sdf.jinja ${src_path}/Tools/sitl_gazebo --mavlink_tcp_port $((4560+${N})) --mavlink_udp_port $((14560+${N})) --mavlink_id $((1+${N})) --gst_udp_host 172.5.0.$((7+${N})) --gst_udp_port $((5600)) --video_uri $((5600+${N})) --mavlink_cam_udp_port $((14530+${N})) --udp_onboard_gimbal_port_local $((13030+${N})) --output-file /tmp/${MODEL}_${N}.sdf --vehicle_id ${N}
|
||||
|
||||
echo "Spawning ${MODEL}_${N} at ${X} ${Y}"
|
||||
|
||||
@@ -47,12 +64,13 @@ function spawn_model() {
|
||||
|
||||
if [ "$1" == "-h" ] || [ "$1" == "--help" ]
|
||||
then
|
||||
echo "Usage: $0 [-n <num_vehicles>] [-m <vehicle_model>] [-w <world>] [-s <script>]"
|
||||
echo "Usage: $0 [-n <num_vehicles>] [-m <vehicle_model>] [-w <world>] [-s <script>] [-c <custom_models>]"
|
||||
echo "-s flag is used to script spawning vehicles e.g. $0 -s iris:3,plane:2"
|
||||
echo "-c flag is used to allow custom models e.g. $0 -s \"my_plane my_plane_2\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while getopts n:m:w:s:t:l: option
|
||||
while getopts n:m:w:s:t:c: option
|
||||
do
|
||||
case "${option}"
|
||||
in
|
||||
@@ -61,7 +79,7 @@ do
|
||||
w) WORLD=${OPTARG};;
|
||||
s) SCRIPT=${OPTARG};;
|
||||
t) TARGET=${OPTARG};;
|
||||
l) LABEL=_${OPTARG};;
|
||||
c) CUSTOM_MODELS=${OPTARG};;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -71,6 +89,8 @@ target=${TARGET:=px4_sitl_default}
|
||||
vehicle_model=${VEHICLE_MODEL:="iris"}
|
||||
export PX4_SIM_MODEL=${vehicle_model}
|
||||
|
||||
SUPPORTED_MODELS+=(${CUSTOM_MODELS})
|
||||
|
||||
echo ${SCRIPT}
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
src_path="$SCRIPT_DIR/.."
|
||||
@@ -132,9 +152,19 @@ else
|
||||
n=$(($n + 1))
|
||||
done
|
||||
done
|
||||
|
||||
fi
|
||||
trap "cleanup" SIGINT SIGTERM EXIT
|
||||
|
||||
echo "Starting gazebo client"
|
||||
gzclient
|
||||
if [[ -n "$HEADLESS" ]]; then
|
||||
trap "cleanup" SIGINT SIGTERM
|
||||
|
||||
while :
|
||||
do
|
||||
|
||||
sleep 5
|
||||
done
|
||||
else
|
||||
trap "cleanup" SIGINT SIGTERM EXIT
|
||||
|
||||
echo "Starting gazebo client"
|
||||
gzclient
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/bin/python3
|
||||
|
||||
import parse_cmake.parsing as cmp
|
||||
import glob
|
||||
import pprint
|
||||
import re
|
||||
import os
|
||||
|
||||
__location__ = os.path.realpath(
|
||||
os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
||||
serial_regex = r"(\D\D\D\d):(/dev/ttyS\d+)"
|
||||
io_regex = r"IO (.*)"
|
||||
romfs_regex = r"ROMFSROOT (.*)"
|
||||
arch_regex = r"ARCHITECTURE (.*)"
|
||||
toolchain_regex = r"TOOLCHAIN (.*)"
|
||||
|
||||
|
||||
|
||||
def stripComments(code):
|
||||
code = str(code)
|
||||
return re.sub(r'(?m) *#.*\n?', '', code)
|
||||
|
||||
lut = {}
|
||||
with open(os.path.join(__location__, "cmake_kconfig_lut.txt"),'r') as lookup:
|
||||
for line in lookup:
|
||||
if ',' in line:
|
||||
key, value = line.strip().split(',')
|
||||
lut[key] = value
|
||||
|
||||
#for name in glob.glob('boards/*/*/*.cmake'):
|
||||
px4_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))
|
||||
|
||||
for name in glob.glob(px4_dir + '/boards/*/*/*.cmake'):
|
||||
print(name)
|
||||
with open(name, 'r') as f:
|
||||
romfs_set = False
|
||||
w = open(name.replace(".cmake",".px4board"), "w")
|
||||
for line in f:
|
||||
clean_line = stripComments(line.strip())
|
||||
value = lut.get(clean_line)
|
||||
if value is not None:
|
||||
print(value, file=w)
|
||||
print(value)
|
||||
else:
|
||||
matches = re.finditer(serial_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_SERIAL_" + match.groups()[0] + "=\"" + match.groups()[1] + "\"")
|
||||
print("CONFIG_BOARD_SERIAL_" + match.groups()[0] + "=\"" + match.groups()[1] + "\"", file=w)
|
||||
matches = re.finditer(io_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_IO=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_IO=\"" + match.groups()[0] + "\"", file=w)
|
||||
matches = re.finditer(romfs_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"" + match.groups()[0] + "\"", file=w)
|
||||
romfs_set = True
|
||||
matches = re.finditer(arch_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_ARCHITECTURE=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_ARCHITECTURE=\"" + match.groups()[0] + "\"", file=w)
|
||||
matches = re.finditer(toolchain_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_TOOLCHAIN=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_TOOLCHAIN=\"" + match.groups()[0] + "\"", file=w)
|
||||
|
||||
if(romfs_set == False):
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"\"", file=w)
|
||||
|
||||
|
||||
w.close()
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user