mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-24 07:17:34 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bbc9a8c9bb |
+27
-10
@@ -9,10 +9,11 @@ pipeline {
|
||||
script {
|
||||
def build_nodes = [:]
|
||||
def docker_images = [
|
||||
armhf: "px4io/px4-dev-armhf:2021-05-04",
|
||||
arm64: "px4io/px4-dev-aarch64:2021-05-04",
|
||||
base: "px4io/px4-dev-base-bionic:2021-05-04",
|
||||
nuttx: "px4io/px4-dev-nuttx-focal:2021-05-04",
|
||||
armhf: "px4io/px4-dev-armhf:2021-02-04",
|
||||
arm64: "px4io/px4-dev-aarch64:2021-02-04",
|
||||
base: "px4io/px4-dev-base-bionic:2021-02-04",
|
||||
nuttx: "px4io/px4-dev-nuttx-focal:2021-02-04",
|
||||
snapdragon: "lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
||||
]
|
||||
|
||||
def armhf_builds = [
|
||||
@@ -44,19 +45,21 @@ pipeline {
|
||||
"cuav_can-gps-v1_canbootloader",
|
||||
"cuav_can-gps-v1_default",
|
||||
"cuav_nora_default",
|
||||
"cuav_nora_test",
|
||||
"cuav_x7pro_default",
|
||||
"cuav_x7pro_test",
|
||||
"cubepilot_cubeorange_console",
|
||||
"cubepilot_cubeorange_default",
|
||||
"cubepilot_cubeyellow_console",
|
||||
"cubepilot_cubeyellow_default",
|
||||
"freefly_can-rtk-gps_canbootloader",
|
||||
"freefly_can-rtk-gps_default",
|
||||
"holybro_can-gps-v1_canbootloader",
|
||||
"holybro_can-gps-v1_default",
|
||||
"holybro_durandal-v1_default",
|
||||
"holybro_durandal-v1_test",
|
||||
"holybro_kakutef7_default",
|
||||
"holybro_pix32v5_default",
|
||||
"modalai_fc-v1_default",
|
||||
"modalai_fc-v1_rtps",
|
||||
"modalai_fc-v2_default",
|
||||
"mro_ctrl-zero-f7_default",
|
||||
"mro_ctrl-zero-f7-oem_default",
|
||||
"mro_ctrl-zero-h7_default",
|
||||
@@ -78,6 +81,7 @@ pipeline {
|
||||
"px4_fmu-v2_fixedwing",
|
||||
"px4_fmu-v2_multicopter",
|
||||
"px4_fmu-v2_rover",
|
||||
"px4_fmu-v2_test",
|
||||
"px4_fmu-v3_default",
|
||||
"px4_fmu-v4_cannode",
|
||||
"px4_fmu-v4_default",
|
||||
@@ -96,6 +100,7 @@ pipeline {
|
||||
"px4_fmu-v5x_base_phy_DP83848C",
|
||||
"px4_fmu-v5x_default",
|
||||
"px4_fmu-v6u_default",
|
||||
"px4_fmu-v6u_test",
|
||||
"px4_fmu-v6x_default",
|
||||
"px4_io-v2_default",
|
||||
"spracing_h7extreme_default",
|
||||
@@ -105,8 +110,14 @@ pipeline {
|
||||
archive: true
|
||||
]
|
||||
|
||||
def snapdragon_builds = [
|
||||
target: ["atlflight_eagle_qurt", "atlflight_eagle_default"],
|
||||
image: docker_images.snapdragon,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def docker_builds = [
|
||||
armhf_builds, base_builds, nuttx_builds_archive
|
||||
armhf_builds, base_builds, nuttx_builds_archive//, snapdragon_builds
|
||||
]
|
||||
|
||||
for (def build_type = 0; build_type < docker_builds.size(); build_type++) {
|
||||
@@ -126,7 +137,7 @@ pipeline {
|
||||
// TODO: actually upload artifacts to S3
|
||||
// stage('S3 Upload') {
|
||||
// agent {
|
||||
// docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
// docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
// }
|
||||
// options {
|
||||
// skipDefaultCheckout()
|
||||
@@ -151,13 +162,19 @@ pipeline {
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '5', artifactDaysToKeepStr: '14'))
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
|
||||
def createBuildNode(Boolean archive, String docker_image, String target) {
|
||||
return {
|
||||
|
||||
// TODO: fix the snapdragon image
|
||||
bypass_entrypoint = ''
|
||||
if (docker_image == 'lorenzmeier/px4-dev-snapdragon:2020-04-01') {
|
||||
bypass_entrypoint = ' --entrypoint=""'
|
||||
}
|
||||
|
||||
node {
|
||||
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
|
||||
docker.image(docker_image).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + bypass_entrypoint) {
|
||||
|
||||
+569
-427
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/cpp
|
||||
{
|
||||
"name": "px4-dev-nuttx",
|
||||
"image": "px4io/px4-dev-nuttx-focal:2021-05-04",
|
||||
"image": "px4io/px4-dev-nuttx-focal:2021-02-04",
|
||||
|
||||
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -24,13 +23,12 @@ jobs:
|
||||
"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-05-04
|
||||
image: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@@ -11,8 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-clang:2021-05-04
|
||||
timeout-minutes: 60
|
||||
container: px4io/px4-dev-clang:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -11,8 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-armhf:2021-05-04
|
||||
timeout-minutes: 60
|
||||
container: px4io/px4-dev-armhf:2021-02-04
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -11,8 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-aarch64:2021-05-04
|
||||
timeout-minutes: 60
|
||||
container: px4io/px4-dev-aarch64:2021-02-04
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -11,7 +11,6 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-10.15
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -11,51 +11,83 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-05-04
|
||||
timeout-minutes: 60
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
airmind_mindpx-v2,
|
||||
ark_can-flow,
|
||||
ark_can-gps,
|
||||
av_x-v1,
|
||||
bitcraze_crazyflie,
|
||||
bitcraze_crazyflie21,
|
||||
cuav_can-gps-v1,
|
||||
cuav_nora,
|
||||
cuav_x7pro,
|
||||
cubepilot_cubeorange,
|
||||
cubepilot_cubeyellow,
|
||||
freefly_can-rtk-gps,
|
||||
holybro_can-gps-v1,
|
||||
holybro_durandal-v1,
|
||||
holybro_kakutef7,
|
||||
holybro_pix32v5,
|
||||
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-v6u,
|
||||
px4_fmu-v6x,
|
||||
spracing_h7extreme,
|
||||
uvify_core
|
||||
airmind_mindpx-v2_default,
|
||||
ark_can-flow_canbootloader,
|
||||
ark_can-flow_debug,
|
||||
ark_can-flow_default,
|
||||
av_x-v1_default,
|
||||
bitcraze_crazyflie21_default,
|
||||
bitcraze_crazyflie_default,
|
||||
cuav_can-gps-v1_canbootloader,
|
||||
cuav_can-gps-v1_debug,
|
||||
cuav_can-gps-v1_default,
|
||||
cuav_nora_default,
|
||||
cuav_nora_test,
|
||||
cuav_x7pro_default,
|
||||
cuav_x7pro_test,
|
||||
cubepilot_cubeorange_console,
|
||||
cubepilot_cubeorange_default,
|
||||
cubepilot_cubeyellow_console,
|
||||
cubepilot_cubeyellow_default,
|
||||
cubepilot_io-v2_default,
|
||||
holybro_can-gps-v1_canbootloader,
|
||||
holybro_can-gps-v1_debug,
|
||||
holybro_can-gps-v1_default,
|
||||
holybro_durandal-v1_default,
|
||||
holybro_durandal-v1_test,
|
||||
holybro_kakutef7_default,
|
||||
holybro_pix32v5_default,
|
||||
modalai_fc-v1_default,
|
||||
modalai_fc-v1_rtps,
|
||||
mro_ctrl-zero-f7-oem_default,
|
||||
mro_ctrl-zero-f7_default,
|
||||
mro_ctrl-zero-h7-oem_default,
|
||||
mro_ctrl-zero-h7_default,
|
||||
mro_pixracerpro_default,
|
||||
mro_x21-777_default,
|
||||
mro_x21_default,
|
||||
nxp_fmuk66-e_default,
|
||||
nxp_fmuk66-e_rtps,
|
||||
nxp_fmuk66-e_socketcan,
|
||||
nxp_fmuk66-v3_default,
|
||||
nxp_fmuk66-v3_rtps,
|
||||
nxp_fmuk66-v3_socketcan,
|
||||
nxp_fmurt1062-v1_default,
|
||||
nxp_ucans32k146_canbootloader,
|
||||
nxp_ucans32k146_default,
|
||||
omnibus_f4sd_default,
|
||||
px4_fmu-v2_default,
|
||||
px4_fmu-v2_fixedwing,
|
||||
px4_fmu-v2_multicopter,
|
||||
px4_fmu-v2_rover,
|
||||
px4_fmu-v2_test,
|
||||
px4_fmu-v3_default,
|
||||
px4_fmu-v4_cannode,
|
||||
px4_fmu-v4_default,
|
||||
px4_fmu-v4pro_default,
|
||||
px4_fmu-v5_ctrlalloc,
|
||||
px4_fmu-v5_debug,
|
||||
px4_fmu-v5_default,
|
||||
px4_fmu-v5_fixedwing,
|
||||
px4_fmu-v5_multicopter,
|
||||
px4_fmu-v5_optimized,
|
||||
px4_fmu-v5_rover,
|
||||
px4_fmu-v5_rtps,
|
||||
px4_fmu-v5_stackcheck,
|
||||
px4_fmu-v5_uavcanv0periph,
|
||||
px4_fmu-v5_uavcanv1,
|
||||
px4_fmu-v5x_base_phy_DP83848C,
|
||||
px4_fmu-v5x_default,
|
||||
px4_fmu-v6u_default,
|
||||
px4_fmu-v6u_test,
|
||||
px4_fmu-v6x_default,
|
||||
px4_io-v2_default,
|
||||
spracing_h7extreme_default,
|
||||
uvify_core_default
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -84,8 +116,8 @@ jobs:
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make all_variants_${{matrix.config}}
|
||||
run: make all_variants_${{matrix.config}}
|
||||
- name: make ${{matrix.config}}
|
||||
run: make ${{matrix.config}}
|
||||
- name: make ${{matrix.config}} bloaty_compileunits
|
||||
run: make ${{matrix.config}} bloaty_compileunits || true
|
||||
- name: make ${{matrix.config}} bloaty_inlines
|
||||
@@ -96,15 +128,13 @@ jobs:
|
||||
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
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: px4_package_${{matrix.config}}
|
||||
path: build/**/*.px4
|
||||
path: build/${{matrix.config}}/${{matrix.config}}.px4
|
||||
|
||||
@@ -11,14 +11,12 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-05-04
|
||||
timeout-minutes: 60
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
ark_can-flow_default,
|
||||
cuav_can-gps-v1_default,
|
||||
freefly_can-rtk-gps_default,
|
||||
holybro_can-gps-v1_default,
|
||||
#nxp_ucans32k146_default,
|
||||
px4_fmu-v4_cannode
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
needs: enumerate_targets
|
||||
strategy:
|
||||
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}}
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-05-04
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -56,13 +56,13 @@ jobs:
|
||||
- name: ccache post-run
|
||||
run: ccache -s
|
||||
|
||||
- name: parameter & events metadata
|
||||
- name: parameter metadata
|
||||
run: |
|
||||
make ${{matrix.target}} ver_gen events_json
|
||||
make ${{matrix.target}} ver_gen
|
||||
./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 _metadata
|
||||
cp parameters.* _metadata
|
||||
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
|
||||
@@ -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-05-04
|
||||
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-05-04
|
||||
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
|
||||
@@ -0,0 +1,131 @@
|
||||
name: MAVROS Avoidance Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {test_file: "mavros_posix_test_avoidance.test", vehicle: "iris_obs_avoid", mission: "avoidance", build_type: "RelWithDebInfo"}
|
||||
- {test_file: "mavros_posix_test_safe_landing.test", vehicle: "iris_obs_avoid", mission: "MC_safe_landing", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-02-04
|
||||
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 = 5" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.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_avoidance_run.sh ${{matrix.config.test_file}} mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}} || true
|
||||
|
||||
- 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
|
||||
|
||||
- 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_avoidance
|
||||
file: coverage/lcov.info
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-05-04
|
||||
image: px4io/px4-dev-ros-melodic:2021-02-04
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
#- {test_file: "mavros_posix_tests_offboard_rpyrt_ctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-05-04
|
||||
image: px4io/px4-dev-ros-melodic:2021-02-04
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
|
||||
airframe:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -20,24 +20,13 @@ jobs:
|
||||
- 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/'
|
||||
ls -ls *
|
||||
# TODO: deploy to userguide gitbook and s3
|
||||
|
||||
module:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -52,7 +41,7 @@ jobs:
|
||||
|
||||
parameter:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -74,36 +63,9 @@ jobs:
|
||||
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-05-04
|
||||
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-05-04
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -118,7 +80,7 @@ jobs:
|
||||
|
||||
micrortps_agent:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -132,7 +94,7 @@ jobs:
|
||||
|
||||
ROS_msgs:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -145,7 +107,7 @@ jobs:
|
||||
|
||||
ROS2_bridge:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
- 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
|
||||
run: pip3 install --user mypy 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
|
||||
|
||||
@@ -11,18 +11,16 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
|
||||
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "AddressSanitizer", model: "standard_vtol" } # Australia
|
||||
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
|
||||
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
|
||||
|
||||
- {latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo", model: "iris" } # Alaska
|
||||
- {latitude: "-38.071235", longitude: "145.281220", altitude: "31", build_type: "RelWithDebInfo", model: "standard_vtol" } # Australia
|
||||
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
|
||||
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
|
||||
container:
|
||||
image: px4io/px4-dev-simulation-focal:2021-05-04
|
||||
image: px4io/px4-dev-simulation-focal:2021-02-04
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -30,9 +28,9 @@ jobs:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Download MAVSDK
|
||||
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/mavsdk_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
run: wget https://github.com/mavlink/MAVSDK/releases/download/v0.38.0/mavsdk_0.38.0_ubuntu20.04_amd64.deb
|
||||
- name: Install MAVSDK
|
||||
run: dpkg -i "mavsdk_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
run: dpkg -i mavsdk_0.38.0_ubuntu20.04_amd64.deb
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
|
||||
@@ -108,5 +108,3 @@ src/systemcmds/topic_listener/listener_generated.cpp
|
||||
# SITL
|
||||
dataman
|
||||
eeprom/
|
||||
|
||||
!src/drivers/distance_sensor/broadcom/afbrs50/Lib/*
|
||||
|
||||
+14
-17
@@ -18,6 +18,14 @@
|
||||
path = src/lib/matrix
|
||||
url = https://github.com/PX4/PX4-Matrix.git
|
||||
branch = master
|
||||
[submodule "src/lib/ecl"]
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/PX4-ECL.git
|
||||
branch = master
|
||||
[submodule "boards/atlflight/cmake_hexagon"]
|
||||
path = boards/atlflight/cmake_hexagon
|
||||
url = https://github.com/PX4/cmake_hexagon.git
|
||||
branch = px4
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/PX4-GPSDrivers.git
|
||||
@@ -25,7 +33,7 @@
|
||||
[submodule "src/modules/micrortps_bridge/micro-CDR"]
|
||||
path = src/modules/micrortps_bridge/micro-CDR
|
||||
url = https://github.com/PX4/Micro-CDR.git
|
||||
branch = master
|
||||
branch = px4
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
url = https://github.com/PX4/NuttX.git
|
||||
@@ -34,6 +42,9 @@
|
||||
path = platforms/nuttx/NuttX/apps
|
||||
url = https://github.com/PX4/NuttX-apps.git
|
||||
branch = px4_firmware_nuttx-10.0.0+
|
||||
[submodule "platforms/qurt/dspal"]
|
||||
path = platforms/qurt/dspal
|
||||
url = https://github.com/ATLFlight/dspal.git
|
||||
[submodule "Tools/flightgear_bridge"]
|
||||
path = Tools/flightgear_bridge
|
||||
url = https://github.com/PX4/PX4-FlightGear-Bridge.git
|
||||
@@ -48,21 +59,7 @@
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types.git
|
||||
[submodule "src/drivers/uavcannode_gps_demo/public_regulated_data_types"]
|
||||
path = src/drivers/uavcannode_gps_demo/public_regulated_data_types
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types.git
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types
|
||||
[submodule "src/drivers/uavcannode_gps_demo/libcanard"]
|
||||
path = src/drivers/uavcannode_gps_demo/libcanard
|
||||
url = https://github.com/UAVCAN/libcanard.git
|
||||
[submodule "src/drivers/uavcan_v1/legacy_data_types"]
|
||||
path = src/drivers/uavcan_v1/legacy_data_types
|
||||
url = https://github.com/PX4/public_regulated_data_types.git
|
||||
branch = legacy
|
||||
[submodule "src/lib/crypto/monocypher"]
|
||||
path = src/lib/crypto/monocypher
|
||||
url = https://github.com/PX4/Monocypher.git
|
||||
branch = px4
|
||||
[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/Auterion/px4-simulation-ignition.git
|
||||
url = https://github.com/UAVCAN/libcanard
|
||||
|
||||
Vendored
+2
-47
@@ -6,16 +6,6 @@ CONFIG:
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_asan:
|
||||
short: px4_sitl (AddressSanitizer)
|
||||
buildType: AddressSanitizer
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_ubsan:
|
||||
short: px4_sitl (UndefinedBehaviorSanitizer)
|
||||
buildType: UndefinedBehaviorSanitizer
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_replay:
|
||||
short: px4_sitl_replay
|
||||
buildType: RelWithDebInfo
|
||||
@@ -61,16 +51,6 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5x_default
|
||||
px4_fmu-v6x_default:
|
||||
short: px4_fmu-v6x
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6x_default
|
||||
px4_fmu-v6x_bootloader:
|
||||
short: px4_fmu-v6x_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6x_bootloader
|
||||
airmind_mindpx-v2_default:
|
||||
short: airmind_mindpx-v2
|
||||
buildType: MinSizeRel
|
||||
@@ -86,16 +66,6 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-flow_canbootloader
|
||||
ark_can-gps_default:
|
||||
short: ark_can-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-gps_default
|
||||
ark_can-gps_canbootloader:
|
||||
short: ark_can-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-gps_canbootloader
|
||||
av_x-v1_default:
|
||||
short: av_x-v1
|
||||
buildType: MinSizeRel
|
||||
@@ -126,26 +96,16 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_x7pro_default
|
||||
cubepilot_cubeorange_test:
|
||||
cubepilot_cubeorange_console:
|
||||
short: cubepilot_cubeorange
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cubepilot_orange_test
|
||||
CONFIG: cubepilot_orange_console
|
||||
emlid_navio2_default:
|
||||
short: emlid_navio2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: emlid_navio2_default
|
||||
freefly_can-rtk-gps_default:
|
||||
short: freefly_can-rtk-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: freefly_can-rtk-gps_default
|
||||
freefly_can-rtk-gps_canbootloader:
|
||||
short: freefly_can-rtk-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: freefly_can-rtk-gps_canbootloader
|
||||
holybro_can-gps-v1_canbootloader:
|
||||
short: holybro_can-gps-v1_canbootloader
|
||||
buildType: MinSizeRel
|
||||
@@ -166,11 +126,6 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: modalai_fc-v1_default
|
||||
modalai_fc-v2_default:
|
||||
short: modalai_fc-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: modalai_fc-v2_default
|
||||
mro_ctrl-zero-f7_default:
|
||||
short: mro_ctrl-zero-f7
|
||||
buildType: MinSizeRel
|
||||
|
||||
Vendored
+4
-1
@@ -137,5 +137,8 @@
|
||||
"workbench.settings.enableNaturalLanguageSearch": false,
|
||||
"yaml.schemas": {
|
||||
"${workspaceFolder}/validation/module_schema.yaml": "${workspaceFolder}/src/modules/*/module.yaml"
|
||||
}
|
||||
},
|
||||
"python.autoComplete.extraPaths": [
|
||||
"/opt/ros/foxy/lib/python3.8/site-packages"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -129,10 +129,6 @@ define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
|
||||
BRIEF_DOCS "PX4 module paths"
|
||||
FULL_DOCS "List of paths to all PX4 modules"
|
||||
)
|
||||
define_property(GLOBAL PROPERTY PX4_SRC_FILES
|
||||
BRIEF_DOCS "src files from all PX4 modules & libs"
|
||||
FULL_DOCS "SRC files from px4_add_{module,library}"
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# configuration
|
||||
@@ -189,8 +185,6 @@ if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O0)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Sanitizer")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O1)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O3)
|
||||
else()
|
||||
if(px4_constrained_flash_build)
|
||||
set(MAX_CUSTOM_OPT_LEVEL -Os)
|
||||
@@ -421,9 +415,6 @@ foreach(module ${config_module_list})
|
||||
add_subdirectory(src/${module})
|
||||
endforeach()
|
||||
|
||||
# add events lib after modules and libs as it needs to know all source files (PX4_SRC_FILES)
|
||||
add_subdirectory(src/lib/events EXCLUDE_FROM_ALL)
|
||||
|
||||
# must be the last module before firmware
|
||||
add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
|
||||
target_link_libraries(parameters_interface INTERFACE parameters)
|
||||
|
||||
Vendored
+14
-14
@@ -15,7 +15,7 @@ pipeline {
|
||||
// stage('Catkin build on ROS workspace') {
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'px4io/px4-dev-ros-melodic:2021-05-04'
|
||||
// image 'px4io/px4-dev-ros-melodic:2021-02-04'
|
||||
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
// }
|
||||
// }
|
||||
@@ -56,7 +56,7 @@ pipeline {
|
||||
stage('Colcon build on ROS2 workspace') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros2-foxy:2021-05-04'
|
||||
image 'px4io/px4-dev-ros2-foxy:2021-02-04'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ pipeline {
|
||||
|
||||
stage('Airframe') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -105,7 +105,7 @@ pipeline {
|
||||
|
||||
stage('Parameter') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -125,7 +125,7 @@ pipeline {
|
||||
|
||||
stage('Module') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -146,7 +146,7 @@ pipeline {
|
||||
stage('uORB graphs') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-05-04'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-02-04'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ pipeline {
|
||||
|
||||
stage('Userguide') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -206,7 +206,7 @@ pipeline {
|
||||
|
||||
stage('QGroundControl') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -234,7 +234,7 @@ pipeline {
|
||||
|
||||
stage('microRTPS agent') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -264,7 +264,7 @@ pipeline {
|
||||
|
||||
stage('PX4 ROS msgs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -293,7 +293,7 @@ pipeline {
|
||||
|
||||
stage('PX4 ROS2 bridge') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -336,7 +336,7 @@ pipeline {
|
||||
|
||||
stage('S3') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -374,7 +374,7 @@ pipeline {
|
||||
GIT_COMMITTER_NAME = "PX4BuildBot"
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '20'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ all: px4_sitl_default
|
||||
space := $(subst ,, )
|
||||
|
||||
define make_list
|
||||
$(shell [ -f .github/workflows/compile_${1}.yml ] && cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
|
||||
$(shell cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
|
||||
endef
|
||||
|
||||
# Parsing
|
||||
@@ -165,16 +165,10 @@ ifdef PYTHON_EXECUTABLE
|
||||
CMAKE_ARGS += -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
|
||||
endif
|
||||
|
||||
# Check if the microRTPS agent is to be built
|
||||
ifdef BUILD_MICRORTPS_AGENT
|
||||
CMAKE_ARGS += -DBUILD_MICRORTPS_AGENT=ON
|
||||
endif
|
||||
|
||||
# Functions
|
||||
# --------------------------------------------------------------------
|
||||
# describe how to build a cmake config
|
||||
define cmake-build
|
||||
$(eval CMAKE_ARGS += -DCONFIG=$(1))
|
||||
@$(eval BUILD_DIR = "$(SRC_DIR)/build/$(1)")
|
||||
@# check if the desired cmake configuration matches the cache then CMAKE_CACHE_CHECK stays empty
|
||||
@$(call cmake-cache-check)
|
||||
@@ -214,7 +208,7 @@ define colorecho
|
||||
endef
|
||||
|
||||
# Get a list of all config targets boards/*/*.cmake
|
||||
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 -name '*.cmake' -print | sed -e 's|boards\/||' | sed -e 's|\.cmake||' | sed -e 's|\/|_|g' | sort)
|
||||
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*common*' ! -name '*sdflight*' -name '*.cmake' -print | sed -e 's|boards\/||' | sed -e 's|\.cmake||' | sed -e 's|\/|_|g' | sort)
|
||||
|
||||
# ADD CONFIGS HERE
|
||||
# --------------------------------------------------------------------
|
||||
@@ -222,12 +216,16 @@ ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 -name '*.cmake
|
||||
|
||||
# All targets.
|
||||
$(ALL_CONFIG_TARGETS):
|
||||
@$(call cmake-build,$@$(BUILD_DIR_SUFFIX))
|
||||
@$(eval PX4_CONFIG = $@)
|
||||
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
|
||||
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
|
||||
|
||||
# Filter for only default targets to allow omiting the "_default" postfix
|
||||
CONFIG_TARGETS_DEFAULT := $(patsubst %_default,%,$(filter %_default,$(ALL_CONFIG_TARGETS)))
|
||||
$(CONFIG_TARGETS_DEFAULT):
|
||||
@$(call cmake-build,$@_default$(BUILD_DIR_SUFFIX))
|
||||
@$(eval PX4_CONFIG = $@_default)
|
||||
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
|
||||
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
|
||||
|
||||
all_config_targets: $(ALL_CONFIG_TARGETS)
|
||||
all_default_targets: $(CONFIG_TARGETS_DEFAULT)
|
||||
@@ -240,6 +238,16 @@ endef
|
||||
# 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
|
||||
|
||||
# Multi- config targets.
|
||||
eagle_default: atlflight_eagle_default atlflight_eagle_qurt
|
||||
eagle_rtps: atlflight_eagle_rtps atlflight_eagle_qurt-rtps
|
||||
|
||||
excelsior_default: atlflight_excelsior_default atlflight_excelsior_qurt
|
||||
excelsior_rtps: atlflight_excelsior_rtps atlflight_excelsior_qurt-rtps
|
||||
|
||||
.PHONY: eagle_default eagle_rtps
|
||||
.PHONY: excelsior_default excelsior_rtps
|
||||
|
||||
# Other targets
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
@@ -266,6 +274,7 @@ misc_qgc_extra_firmware: \
|
||||
check_bitcraze_crazyflie_default \
|
||||
check_bitcraze_crazyflie21_default \
|
||||
check_airmind_mindpx-v2_default \
|
||||
check_px4_fmu-v2_lpe \
|
||||
sizes
|
||||
|
||||
# builds with RTPS
|
||||
@@ -293,11 +302,6 @@ check_%:
|
||||
@$(MAKE) --no-print-directory $(subst check_,,$@)
|
||||
@echo
|
||||
|
||||
all_variants_%:
|
||||
@echo 'Building all $(subst all_variants_,,$@) variants:' $(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS))
|
||||
@echo
|
||||
$(foreach a,$(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS)), $(call cmake-build,$(a)$(BUILD_DIR_SUFFIX)))
|
||||
|
||||
uorb_graphs:
|
||||
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib --file Tools/uorb_graph/graph_full
|
||||
@$(MAKE) --no-print-directory px4_fmu-v2_default uorb_graph
|
||||
@@ -311,21 +315,18 @@ coverity_scan: px4_sitl_default
|
||||
|
||||
# Documentation
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: parameters_metadata airframe_metadata module_documentation extract_events px4_metadata doxygen
|
||||
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata doxygen
|
||||
|
||||
parameters_metadata:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters ver_gen
|
||||
|
||||
airframe_metadata:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes ver_gen
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes
|
||||
|
||||
module_documentation:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_module_documentation
|
||||
|
||||
extract_events:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_extract_events ver_gen
|
||||
|
||||
px4_metadata: parameters_metadata airframe_metadata module_documentation extract_events
|
||||
px4_metadata: parameters_metadata airframe_metadata module_documentation
|
||||
|
||||
doxygen:
|
||||
@mkdir -p "$(SRC_DIR)"/build/doxygen
|
||||
@@ -352,6 +353,7 @@ format:
|
||||
.PHONY: rostest python_coverage
|
||||
|
||||
tests:
|
||||
$(eval CMAKE_ARGS += -DCONFIG=px4_sitl_test)
|
||||
$(eval CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
|
||||
$(eval ARGS += test_results)
|
||||
$(eval ASAN_OPTIONS += color=always:check_initialization_order=1:detect_stack_use_after_return=1)
|
||||
@@ -466,27 +468,25 @@ validate_module_configs:
|
||||
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
|
||||
|
||||
clean:
|
||||
@[ ! -d "$(SRC_DIR)/build" ] || find "$(SRC_DIR)/build" -mindepth 1 -maxdepth 1 -type d -exec sh -c "echo {}; cmake --build {} -- clean || rm -rf {}" \; # use generated build system to clean, wipe build directory if it fails
|
||||
@git submodule foreach git clean -dX --force # some submodules generate build artifacts in source
|
||||
@rm -rf "$(SRC_DIR)"/build
|
||||
|
||||
submodulesclean:
|
||||
@git submodule foreach --quiet --recursive git clean -ff -x -d
|
||||
@git submodule update --quiet --init --recursive --force || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive --force --jobs 4
|
||||
@git submodule update --init --recursive --force
|
||||
|
||||
submodulesupdate:
|
||||
@git submodule update --quiet --init --recursive --jobs 4 || true
|
||||
@git submodule update --quiet --init --recursive || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive --jobs 4
|
||||
@git submodule update --init --recursive
|
||||
|
||||
gazeboclean:
|
||||
@rm -rf ~/.gazebo/*
|
||||
|
||||
distclean: gazeboclean
|
||||
@git submodule deinit --force $(SRC_DIR)
|
||||
@rm -rf "$(SRC_DIR)/build"
|
||||
@git clean --force -X "$(SRC_DIR)/msg/" "$(SRC_DIR)/platforms/" "$(SRC_DIR)/posix-configs/" "$(SRC_DIR)/ROMFS/" "$(SRC_DIR)/src/" "$(SRC_DIR)/test/" "$(SRC_DIR)/Tools/"
|
||||
@git submodule deinit -f .
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
|
||||
|
||||
# Help / Error
|
||||
# --------------------------------------------------------------------
|
||||
@@ -502,7 +502,7 @@ help:
|
||||
@echo "Where <target> is one of:"
|
||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
|
||||
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
|
||||
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(Makefile)'
|
||||
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
|
||||
@echo
|
||||
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
|
||||
@echo "Use '$(MAKE) list_config_targets' for a list of configuration targets."
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
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.
|
||||
PX4 is highly portable, OS-independent and supports Linux, NuttX and QuRT out of the box.
|
||||
|
||||
* 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)):
|
||||
@@ -110,7 +110,7 @@ This repository contains code supporting Pixhawk standard boards (best supported
|
||||
* [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/master/en/complete_vehicles/crazyflie2.html)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/master/en/flight_controller/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)
|
||||
|
||||
@@ -115,7 +115,6 @@ add_custom_command(
|
||||
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}
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
add_subdirectory(airframes)
|
||||
|
||||
px4_add_romfs_files(
|
||||
px4-rc.params
|
||||
px4-rc.simulator
|
||||
px4-rc.mavlink
|
||||
rc.replay
|
||||
rcS
|
||||
)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (RTPS)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
. ${R}etc/init.d-posix/airframes/10016_iris
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
|
||||
@@ -1,54 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Plane SITL
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default EKF2_ARSP_THR 8
|
||||
param set-default EKF2_FUSE_BETA 1
|
||||
param set-default EKF2_MAG_ACCLIM 0
|
||||
param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
|
||||
param set-default FW_MAN_P_MAX 30
|
||||
|
||||
param set-default FW_PR_I 0.4
|
||||
param set-default FW_PR_P 0.9
|
||||
param set-default FW_PR_FF 0.2
|
||||
param set-default FW_PSP_OFF 2
|
||||
param set-default FW_P_LIM_MAX 32
|
||||
param set-default FW_P_LIM_MIN -15
|
||||
|
||||
param set-default FW_RR_FF 0.1
|
||||
param set-default FW_RR_P 0.3
|
||||
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_THR_CRUISE 0.25
|
||||
|
||||
param set-default FW_T_ALT_TC 2
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_HRATE_FF 0.5
|
||||
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 FW_W_EN 1
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 30
|
||||
param set-default MIS_TAKEOFF_ALT 30
|
||||
|
||||
param set-default NAV_ACC_RAD 15
|
||||
param set-default NAV_DLL_ACT 2
|
||||
param set-default NAV_LOITER_RAD 50
|
||||
|
||||
param set-default RWTO_TKOFF 1
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -14,8 +14,7 @@
|
||||
|
||||
param set-default EKF2_ARSP_THR 8
|
||||
param set-default EKF2_FUSE_BETA 1
|
||||
|
||||
param set-default FW_AIRSPD_STALL 8
|
||||
param set-default ASPD_STALL 10.0
|
||||
|
||||
param set-default FW_P_RMAX_NEG 20.0
|
||||
param set-default FW_P_RMAX_POS 60.0
|
||||
|
||||
@@ -46,6 +46,8 @@ px4_add_romfs_files(
|
||||
1014_solo
|
||||
1015_iris_obs_avoid
|
||||
1015_iris_obs_avoid.post
|
||||
1016_iris_rtps
|
||||
1016_iris_rtps.post
|
||||
1017_iris_opt_flow_mockup
|
||||
1018_iris_vision_velocity
|
||||
1019_iris_dual_gps
|
||||
@@ -60,7 +62,6 @@ px4_add_romfs_files(
|
||||
1034_rascal-electric
|
||||
1035_techpod
|
||||
1036_malolo
|
||||
1037_believer
|
||||
1040_standard_vtol
|
||||
1041_tailsitter
|
||||
1042_tiltrotor
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
udp_offboard_port_local=$((14580+px4_instance))
|
||||
udp_offboard_port_remote=$((14540+px4_instance))
|
||||
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
|
||||
udp_onboard_payload_port_local=$((14280+px4_instance))
|
||||
udp_onboard_payload_port_remote=$((14030+px4_instance))
|
||||
udp_onboard_gimbal_port_local=$((13030+px4_instance))
|
||||
udp_onboard_gimbal_port_remote=$((13280+px4_instance))
|
||||
udp_gcs_port_local=$((18570+px4_instance))
|
||||
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
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
|
||||
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
|
||||
# Onboard link to gimbal
|
||||
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
#param set MAV_SYS_ID $((px4_instance+1))
|
||||
#param set IMU_INTEG_RATE 250
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
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
|
||||
@@ -5,8 +5,7 @@
|
||||
# shellcheck disable=SC1091
|
||||
. px4-alias.sh
|
||||
|
||||
#search path for sourcing px4-rc.*
|
||||
PATH="$PATH:${R}etc/init.d-posix"
|
||||
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
|
||||
|
||||
#
|
||||
# Main SITL startup script
|
||||
@@ -46,12 +45,12 @@ else
|
||||
# Find the matching Autostart ID (file name has the form: [0-9]+_${PX4_SIM_MODEL})
|
||||
# TODO: unify with rc.autostart generation
|
||||
# shellcheck disable=SC2012
|
||||
REQUESTED_AUTOSTART=$(ls "${R}etc/init.d-posix/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
|
||||
REQUESTED_AUTOSTART=$(ls "$SCRIPT_DIR/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
|
||||
if [ -z "$REQUESTED_AUTOSTART" ]; then
|
||||
echo "ERROR [init] Unknown model $PX4_SIM_MODEL (not found by name on ${R}etc/init.d-posix/airframes)"
|
||||
echo "Error: Unknown model $PX4_SIM_MODEL (not found by name on $SCRIPT_DIR/airframes)"
|
||||
exit 1
|
||||
else
|
||||
echo "INFO [init] found model autostart file as SYS_AUTOSTART=$REQUESTED_AUTOSTART"
|
||||
echo "Info: found model autostart file as SYS_AUTOSTART=$REQUESTED_AUTOSTART"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -105,6 +104,15 @@ fi
|
||||
# multi-instance setup
|
||||
# shellcheck disable=SC2154
|
||||
param set MAV_SYS_ID $((px4_instance+1))
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
udp_offboard_port_local=$((14580+px4_instance))
|
||||
udp_offboard_port_remote=$((14540+px4_instance))
|
||||
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
|
||||
udp_onboard_payload_port_local=$((14280+px4_instance))
|
||||
udp_onboard_payload_port_remote=$((14030+px4_instance))
|
||||
udp_onboard_gimbal_port_local=$((13030+px4_instance))
|
||||
udp_onboard_gimbal_port_remote=$((13280+px4_instance))
|
||||
udp_gcs_port_local=$((18570+px4_instance))
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
@@ -126,7 +134,7 @@ then
|
||||
param set SYS_RESTART_TYPE 2
|
||||
fi
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT_N_CELLS 4
|
||||
|
||||
param set-default CBRK_AIRSPD_CHK 0
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
@@ -208,14 +216,25 @@ fi
|
||||
# Simulator IMU data provided at 250 Hz
|
||||
param set IMU_INTEG_RATE 250
|
||||
|
||||
#user defined params for instances can be in PATH
|
||||
. px4-rc.params
|
||||
|
||||
dataman start
|
||||
# only start the simulator if not in replay mode, as both control the lockstep time
|
||||
if ! replay tryapplyparams
|
||||
then
|
||||
. px4-rc.simulator
|
||||
# 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
|
||||
fi
|
||||
load_mon start
|
||||
battery_simulator start
|
||||
@@ -225,12 +244,6 @@ sensors start
|
||||
commander start
|
||||
navigator start
|
||||
|
||||
# Try to start the micrortps_client with UDP transport if module exists
|
||||
if px4-micrortps_client status > /dev/null 2>&1
|
||||
then
|
||||
# shellcheck disable=SC2154
|
||||
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
|
||||
fi
|
||||
|
||||
if param greater -s MNT_MODE_IN -1
|
||||
then
|
||||
@@ -259,8 +272,32 @@ fi
|
||||
#
|
||||
. ${R}etc/init.d/rc.vehicle_setup
|
||||
|
||||
#user defined mavlink streams for instances can be in PATH
|
||||
. px4-rc.mavlink
|
||||
if [ -e etc/init.d-posix/rc.mavlink_override ]
|
||||
then
|
||||
echo "Running non-default mavlink config rc.mavlink_override"
|
||||
. ${R}etc/init.d-posix/rc.mavlink_override
|
||||
else
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
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
|
||||
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
|
||||
# Onboard link to gimbal
|
||||
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
|
||||
fi
|
||||
|
||||
# execute autostart post script if any
|
||||
[ -e "$autostart_file".post ] && . "$autostart_file".post
|
||||
|
||||
@@ -13,13 +13,12 @@
|
||||
# @output MAIN6 gear
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 3
|
||||
param set-default BAT_N_CELLS 3
|
||||
|
||||
param set-default FW_AIRSPD_MAX 20
|
||||
param set-default FW_AIRSPD_MIN 12
|
||||
|
||||
@@ -38,9 +38,8 @@ param set-default MC_YAWRATE_P 0.25
|
||||
param set-default MC_YAWRATE_I 0.25
|
||||
param set-default MC_YAWRATE_D 0
|
||||
|
||||
param set-default BAT1_V_DIV 12.27559
|
||||
param set-default BAT1_A_PER_V 15.39103
|
||||
|
||||
param set-default BAT_V_DIV 12.27559
|
||||
param set-default BAT_A_PER_V 15.39103
|
||||
set MIXER quad_w
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT_N_CELLS 4
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_P 0.13
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
. ${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 BAT_N_CELLS 6
|
||||
param set-default BAT_V_EMPTY 3.5
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_P 0.08
|
||||
@@ -45,7 +45,6 @@ param set-default MC_YAWRATE_D 0
|
||||
param set-default MPC_XY_VEL_MAX 2
|
||||
|
||||
param set-default PWM_MAIN_MIN 1080
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 3
|
||||
param set-default BAT_N_CELLS 3
|
||||
|
||||
param set-default COM_RC_IN_MODE 1
|
||||
|
||||
|
||||
@@ -44,8 +44,7 @@ param set-default MPC_HOLD_MAX_XY 0.25
|
||||
param set-default MPC_THR_MIN 0.15
|
||||
param set-default MPC_Z_VEL_MAX_DN 2
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
|
||||
param set-default BAT_N_CELLS 4
|
||||
set MIXER octo_cox_w
|
||||
|
||||
set PWM_OUT 12345678
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
|
||||
param set-default BAT1_CAPACITY 23000
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT1_R_INTERNAL 0.0025
|
||||
param set-default BAT_CAPACITY 23000
|
||||
param set-default BAT_N_CELLS 4
|
||||
param set-default BAT_R_INTERNAL 0.0025
|
||||
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 6
|
||||
|
||||
param set-default BAT_N_CELLS 6
|
||||
|
||||
param set-default FW_AIRSPD_MAX 30
|
||||
param set-default FW_AIRSPD_MIN 19
|
||||
@@ -70,6 +71,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 MPC_POS_MODE 3
|
||||
param set-default MPC_SPOOLUP_TIME 1.5
|
||||
param set-default MPC_THR_HOVER 0.45
|
||||
param set-default MPC_TILTMAX_AIR 25
|
||||
@@ -109,6 +111,5 @@ set MAV_TYPE 22
|
||||
set MIXER babyshark
|
||||
set MIXER_AUX pass
|
||||
|
||||
# Mark outputs for the alternate rate
|
||||
# or D-Shot
|
||||
set PWM_OUT 5678
|
||||
set PWM_AUX_OUT 1234
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
|
||||
#
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
|
||||
#
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
|
||||
param set-default BAT1_CAPACITY 2500
|
||||
param set-default BAT1_N_CELLS 3
|
||||
param set-default BAT_CAPACITY 2500
|
||||
param set-default BAT_N_CELLS 3
|
||||
|
||||
param set-default PWM_AUX_RATE 50
|
||||
param set-default PWM_MAIN_RATE 50
|
||||
@@ -46,6 +46,5 @@ 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
|
||||
|
||||
@@ -48,7 +48,8 @@ param set-default PWM_MAIN_DISARM 1000
|
||||
# the payload bay is pitched up about 7 degrees
|
||||
param set-default SENS_BOARD_Y_OFF 7
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
set MIXER phantom
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default BAT1_N_CELLS 2
|
||||
param set-default BAT_N_CELLS 2
|
||||
param set-default FW_AIRSPD_MAX 15
|
||||
param set-default FW_AIRSPD_MIN 10
|
||||
param set-default FW_AIRSPD_TRIM 13
|
||||
@@ -48,7 +48,7 @@ param set-default PWM_MAIN_DISARM 1000
|
||||
set MAV_TYPE 1
|
||||
|
||||
# Set mixer.
|
||||
set MIXER fw_generic_wing
|
||||
set MIXER wingwing
|
||||
|
||||
# Provide ESC a constant 1000 us pulse.
|
||||
set PWM_OUT 4
|
||||
|
||||
@@ -27,4 +27,5 @@ param set-default FW_AIRSPD_TRIM 15
|
||||
|
||||
param set-default NAV_LOITER_RAD 150
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
set MIXER FX79
|
||||
|
||||
@@ -49,7 +49,8 @@ param set-default PWM_MAIN_DISARM 1000
|
||||
# the payload bay is pitched up about 7 degrees
|
||||
param set-default SENS_BOARD_Y_OFF 11.9
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
set MIXER phantom
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
|
||||
@@ -63,6 +63,6 @@ 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 MIXER caipi
|
||||
set PWM_OUT 1234
|
||||
|
||||
@@ -127,9 +127,9 @@ param set-default IMU_GYRO_CUTOFF 100
|
||||
param set-default SENS_EN_PMW3901 1
|
||||
|
||||
# Power Parameters
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT1_A_PER_V 36.364
|
||||
param set-default BAT1_V_DIV 18.182
|
||||
param set-default BAT_N_CELLS 4
|
||||
param set-default BAT_A_PER_V 36.364
|
||||
param set-default BAT_V_DIV 18.182
|
||||
|
||||
# Circuit breakers
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Hobbyking Micro PCB
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Thomas Gubler <thomas@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board px4_fmu-v3 exclude
|
||||
# @board px4_fmu-v4 exclude
|
||||
# @board px4_fmu-v4pro exclude
|
||||
# @board px4_fmu-v5 exclude
|
||||
# @board px4_fmu-v5x exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_P 0.1
|
||||
param set-default MC_ROLLRATE_I 0.05
|
||||
param set-default MC_ROLLRATE_D 0.003
|
||||
param set-default MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_P 0.1
|
||||
param set-default MC_PITCHRATE_I 0.05
|
||||
param set-default MC_PITCHRATE_D 0.003
|
||||
param set-default MC_YAW_P 2.8
|
||||
param set-default MC_YAWRATE_P 0.2
|
||||
param set-default MC_YAWRATE_I 0.1
|
||||
param set-default MC_YAWRATE_D 0
|
||||
|
||||
param set-default PWM_MAIN_MIN 1200
|
||||
@@ -54,7 +54,7 @@ param set-default DSHOT_CONFIG 600
|
||||
param set-default SYS_HAS_BARO 0
|
||||
param set-default SYS_HAS_MAG 0
|
||||
|
||||
param set-default BAT1_N_CELLS 2
|
||||
param set-default BAT_N_CELLS 2
|
||||
# The Whoop uses reversed props
|
||||
set MIXER quad_h
|
||||
set PWM_OUT 1234
|
||||
|
||||
@@ -20,7 +20,7 @@ set PWM_OUT 1234
|
||||
|
||||
|
||||
# The set does not include a battery, but most people will probably use 4S
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT_N_CELLS 4
|
||||
|
||||
param set-default IMU_GYRO_CUTOFF 120
|
||||
param set-default IMU_DGYRO_CUTOFF 45
|
||||
|
||||
@@ -17,7 +17,7 @@ set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT_N_CELLS 4
|
||||
|
||||
param set-default GPS_1_CONFIG 0
|
||||
param set-default RC_PORT_CONFIG 201
|
||||
|
||||
@@ -17,7 +17,7 @@ set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 6
|
||||
param set-default BAT_N_CELLS 6
|
||||
|
||||
param set-default MC_ROLL_P 6.5
|
||||
param set-default MC_ROLLRATE_P 0.05
|
||||
|
||||
@@ -92,10 +92,10 @@ param set-default MPC_TKO_RAMP_T 1
|
||||
param set-default MPC_TKO_SPEED 1.1
|
||||
param set-default MPC_VEL_MANUAL 3
|
||||
|
||||
param set-default BAT1_SOURCE 0
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT1_V_DIV 10.14
|
||||
param set-default BAT1_A_PER_V 18.18
|
||||
param set-default BAT_SOURCE 0
|
||||
param set-default BAT_N_CELLS 4
|
||||
param set-default BAT_V_DIV 10.14
|
||||
param set-default BAT_A_PER_V 18.18
|
||||
#param set CBRK_IO_SAFETY 22027
|
||||
param set-default COM_DISARM_LAND 2
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ param set-default PWM_MAIN_RATE 0
|
||||
|
||||
param set-default SENS_BOARD_ROT 2
|
||||
|
||||
param set-default BAT1_SOURCE 0
|
||||
param set-default BAT_SOURCE 0
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
#param set COM_DISARM_LAND 3
|
||||
|
||||
|
||||
@@ -102,10 +102,10 @@ param set-default MPC_TKO_RAMP_T 1
|
||||
param set-default MPC_TKO_SPEED 1.1
|
||||
param set-default MPC_VEL_MANUAL 3
|
||||
|
||||
param set-default BAT1_SOURCE 0
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT1_V_DIV 10.14
|
||||
param set-default BAT1_A_PER_V 18.18
|
||||
param set-default BAT_SOURCE 0
|
||||
param set-default BAT_N_CELLS 4
|
||||
param set-default BAT_V_DIV 10.14
|
||||
param set-default BAT_A_PER_V 18.18
|
||||
#param set CBRK_IO_SAFETY 22027
|
||||
param set-default COM_DISARM_LAND 2
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 1
|
||||
param set-default BAT_N_CELLS 1
|
||||
|
||||
param set-default MC_ROLL_P 8
|
||||
param set-default MC_ROLLRATE_P 0.19
|
||||
|
||||
@@ -32,18 +32,17 @@ set PWM_OUT 1234
|
||||
param reset_all SYS_AUTOSTART SYS_AUTOCONFIG RC* COM_FLTMODE* LND_FLIGHT_T_* TC_* CAL_ACC* CAL_GYRO* CAL_MAG* SENS_BOARD* EKF2_MAGBIAS*
|
||||
|
||||
# battery
|
||||
param set-default BAT_CAPACITY 2750
|
||||
param set-default BAT_CRIT_THR 0.15
|
||||
param set-default BAT_EMERGEN_THR 0.075
|
||||
param set-default BAT_LOW_THR 0.20
|
||||
|
||||
param set-default BAT1_CAPACITY 2750
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT1_R_INTERNAL 0.06
|
||||
param set-default BAT1_SOURCE 1
|
||||
param set-default BAT1_V_CHARGED 4.15
|
||||
param set-default BAT1_V_DIV 11.1625
|
||||
param set-default BAT1_V_EMPTY 3.65
|
||||
param set-default BAT1_V_OFFS_CURR -0.0045
|
||||
param set-default BAT_N_CELLS 4
|
||||
param set-default BAT_R_INTERNAL 0.06
|
||||
param set-default BAT_SOURCE 1
|
||||
param set-default BAT_V_CHARGED 4.15
|
||||
param set-default BAT_V_DIV 11.1625
|
||||
param set-default BAT_V_EMPTY 3.65
|
||||
param set-default BAT_V_OFFS_CURR -0.0045
|
||||
|
||||
# sensor calibration
|
||||
param set-default CAL_MAG_SIDES 63
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
set MIXER quad_x_cw
|
||||
set PWM_OUT 1234
|
||||
|
||||
param set-default BAT1_N_CELLS 1
|
||||
param set-default BAT1_CAPACITY 240
|
||||
param set-default BAT1_SOURCE 1
|
||||
param set-default BAT_N_CELLS 1
|
||||
param set-default BAT_CAPACITY 240
|
||||
param set-default BAT_SOURCE 1
|
||||
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
param set-default CBRK_USB_CHK 197848
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
. ${R}etc/init.d/rc.rover_defaults
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 2
|
||||
param set-default BAT_N_CELLS 2
|
||||
|
||||
param set-default EKF2_ANGERR_INIT 0.01
|
||||
param set-default EKF2_GBIAS_INIT 0.01
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# @name Aion Robotics R1 UGV
|
||||
#
|
||||
# @url https://www.aionrobotics.com/r1
|
||||
# @url http://docs.aionrobotics.com/en/latest/r1-ugv.html
|
||||
#
|
||||
# @type Rover
|
||||
# @class Rover
|
||||
@@ -19,7 +19,7 @@
|
||||
. ${R}etc/init.d/rc.rover_defaults
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT_N_CELLS 4
|
||||
|
||||
param set-default EKF2_GBIAS_INIT 0.01
|
||||
param set-default EKF2_ANGERR_INIT 0.01
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
. ${R}etc/init.d/rc.rover_defaults
|
||||
|
||||
|
||||
param set-default BAT1_N_CELLS 2
|
||||
param set-default BAT_N_CELLS 2
|
||||
|
||||
param set-default EKF2_GBIAS_INIT 0.01
|
||||
param set-default EKF2_ANGERR_INIT 0.01
|
||||
|
||||
@@ -116,9 +116,9 @@ param set-default COM_DISARM_LAND 3
|
||||
param set-default PWM_MAIN_RATE 0
|
||||
|
||||
# Battery
|
||||
param set-default BAT1_SOURCE 0
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT1_V_DIV 10.133
|
||||
param set-default BAT_SOURCE 0
|
||||
param set-default BAT_N_CELLS 4
|
||||
param set-default BAT_V_DIV 10.133
|
||||
|
||||
# TELEM1 ttyS1
|
||||
param set-default MAV_0_CONFIG 101
|
||||
|
||||
@@ -71,6 +71,7 @@ px4_add_romfs_files(
|
||||
4016_holybro_px4vision
|
||||
4017_nxp_hovergames
|
||||
4018_s500_ctrlalloc
|
||||
4020_hk_micro_pcb
|
||||
4030_3dr_solo
|
||||
4031_3dr_quad
|
||||
4040_reaper
|
||||
|
||||
@@ -16,8 +16,6 @@ param set-default COM_POS_FS_EPV 30
|
||||
param set-default COM_POS_FS_GAIN 0
|
||||
param set-default COM_POS_FS_PROB 1
|
||||
param set-default COM_VEL_FS_EVH 5
|
||||
# Disable preflight disarm to not interfere with external launching
|
||||
param set-default COM_DISARM_PRFLT -1
|
||||
|
||||
param set-default EKF2_ARSP_THR 8
|
||||
param set-default EKF2_FUSE_BETA 1
|
||||
|
||||
@@ -226,8 +226,6 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
param set PWM_AUX_OUT ${PWM_AUX_OUT}
|
||||
|
||||
if [ $MIXER_AUX != none -a $AUX_MODE = none -a -e $OUTPUT_AUX_DEV ]
|
||||
then
|
||||
#
|
||||
@@ -270,8 +268,6 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
param set PWM_MAIN_OUT ${PWM_OUT}
|
||||
|
||||
if [ $EXTRA_MIXER_MODE != none ]
|
||||
then
|
||||
|
||||
|
||||
@@ -26,12 +26,6 @@ then
|
||||
batt_smbus start -X
|
||||
fi
|
||||
|
||||
# Start batmon driver if enabled using BATMON_DRIVER_EN
|
||||
if param compare -s BATMON_DRIVER_EN 1
|
||||
then
|
||||
batmon start -X #start on external bus
|
||||
fi
|
||||
|
||||
# Sensors on the PWM interface bank
|
||||
if param compare -s SENS_EN_LL40LS 1
|
||||
then
|
||||
@@ -117,14 +111,7 @@ fi
|
||||
# ADIS16448 spi external IMU
|
||||
if param compare -s SENS_EN_ADIS164X 1
|
||||
then
|
||||
if param compare -s SENS_OR_ADIS164X 0
|
||||
then
|
||||
adis16448 -S start
|
||||
fi
|
||||
if param compare -s SENS_OR_ADIS164X 4
|
||||
then
|
||||
adis16448 -S start -R 4
|
||||
fi
|
||||
adis16448 -S start
|
||||
fi
|
||||
|
||||
# probe for optional external I2C devices
|
||||
|
||||
@@ -23,7 +23,6 @@ param set-default MPC_XY_ERR_MAX 5
|
||||
param set-default MPC_XY_VEL_MAX 4
|
||||
param set-default MPC_Z_VEL_MAX_DN 1.5
|
||||
param set-default MPC_JERK_MAX 4.5
|
||||
param set-default MPC_YAW_MODE 4
|
||||
|
||||
param set-default NAV_ACC_RAD 3
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ set FRC /fs/microsd/etc/rc.txt
|
||||
set IOFW "/etc/extras/px4_io-v2_default.bin"
|
||||
set IO_PRESENT no
|
||||
set LOGGER_ARGS ""
|
||||
set LOGGER_BUF 8
|
||||
set LOGGER_BUF 14
|
||||
set MAV_TYPE none
|
||||
set MIXER none
|
||||
set MIXER_AUX none
|
||||
@@ -81,6 +81,33 @@ then
|
||||
hardfault_log reset
|
||||
fi
|
||||
fi
|
||||
|
||||
# Prevent MacOS and Ubuntu from creating unnecessary temporary files on the microSD card
|
||||
|
||||
# block MacOS Spotlight indexing (.Spotlight-V100 folder)
|
||||
if [ ! -f "/fs/microsd/.metadata_never_index" ]; then
|
||||
cat > /fs/microsd/.metadata_never_index
|
||||
fi
|
||||
|
||||
# block MacOS trashes
|
||||
if [ ! -f "/fs/microsd/.Trashes" ]; then
|
||||
cat > /fs/microsd/.Trashes
|
||||
fi
|
||||
|
||||
# block MacOS logging of filesystem events
|
||||
if [ ! -d "/fs/microsd/.fseventsd" ]; then
|
||||
mkdir /fs/microsd/.fseventsd
|
||||
fi
|
||||
|
||||
if [ ! -f "/fs/microsd/.fseventsd/no_log" ]; then
|
||||
cat > /fs/microsd/.fseventsd/no_log
|
||||
fi
|
||||
|
||||
# block Ubuntu trash
|
||||
if [ ! -f "/fs/microsd/.Trash-1000" ]; then
|
||||
cat > /fs/microsd/.Trash-1000
|
||||
fi
|
||||
|
||||
else
|
||||
# tune SD_INIT
|
||||
set STARTUP_TUNE 14 # tune 14 = SD_INIT
|
||||
@@ -377,30 +404,21 @@ else
|
||||
|
||||
if param greater -s TRIG_MODE 0
|
||||
then
|
||||
if param compare TRIG_PINS_EX 0
|
||||
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
|
||||
if param compare TRIG_PINS 56
|
||||
then
|
||||
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
|
||||
if param compare TRIG_PINS 56
|
||||
then
|
||||
# clear pins 5 and 6
|
||||
set FMU_MODE pwm4
|
||||
set AUX_MODE pwm4
|
||||
else
|
||||
if param compare TRIG_PINS 78
|
||||
then
|
||||
# clear pins 7 and 8
|
||||
set FMU_MODE pwm6
|
||||
set AUX_MODE pwm6
|
||||
else
|
||||
set FMU_MODE none
|
||||
set AUX_MODE none
|
||||
fi
|
||||
fi
|
||||
# clear pins 5 and 6
|
||||
set FMU_MODE pwm4
|
||||
set AUX_MODE pwm4
|
||||
else
|
||||
if param compare TRIG_PINS_EX 12288
|
||||
if param compare TRIG_PINS 78
|
||||
then
|
||||
set FMU_MODE pwm12
|
||||
set AUX_MODE pwm12
|
||||
# clear pins 7 and 8
|
||||
set FMU_MODE pwm6
|
||||
set AUX_MODE pwm6
|
||||
else
|
||||
set FMU_MODE none
|
||||
set AUX_MODE none
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ px4_add_romfs_files(
|
||||
AETRFG.main.mix
|
||||
babyshark.main.mix
|
||||
blade130.main.mix
|
||||
caipi.main.mix
|
||||
CCPM.main.mix
|
||||
claire.aux.mix
|
||||
claire.main.mix
|
||||
@@ -52,6 +53,7 @@ px4_add_romfs_files(
|
||||
firefly6.aux.mix
|
||||
firefly6.main.mix
|
||||
fw_generic_wing.main.mix
|
||||
FX79.main.mix
|
||||
generic_diff_rover.main.mix
|
||||
hexa_cox.main.mix
|
||||
hexa_+.main.mix
|
||||
@@ -64,6 +66,7 @@ px4_add_romfs_files(
|
||||
octo_+.main.mix
|
||||
octo_x.main.mix
|
||||
pass.aux.mix
|
||||
phantom.main.mix
|
||||
quad_dc.main.mix
|
||||
quad_h.main.mix
|
||||
quad_+.main.mix
|
||||
@@ -91,4 +94,5 @@ px4_add_romfs_files(
|
||||
vtol_convergence.main.mix
|
||||
vtol_delta.aux.mix
|
||||
vtol_tailsitter_duo.main.mix
|
||||
wingwing.main.mix
|
||||
)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
FX-79 Delta-wing mixer for PX4FMU
|
||||
=================================
|
||||
|
||||
Designed for FX-79.
|
||||
|
||||
TODO (sjwilks): Add mixers for flaps.
|
||||
|
||||
This file defines mixers suitable for controlling a delta wing aircraft using
|
||||
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
|
||||
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
|
||||
assumed to be unused.
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
See the README for more information on the scaler format.
|
||||
|
||||
Elevon mixers
|
||||
-------------
|
||||
Three scalers total (output, roll, pitch).
|
||||
|
||||
On the assumption that the two elevon servos are physically reversed, the pitch
|
||||
input is inverted between the two servos.
|
||||
|
||||
The scaling factor for roll inputs is adjusted to implement differential travel
|
||||
for the elevons.
|
||||
|
||||
M: 2
|
||||
S: 0 0 8500 8500 0 -10000 10000
|
||||
S: 0 1 9500 9500 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
S: 0 0 8500 8500 0 -10000 10000
|
||||
S: 0 1 -9500 -9500 0 -10000 10000
|
||||
|
||||
Output 2
|
||||
--------
|
||||
This mixer is empty.
|
||||
|
||||
Z:
|
||||
|
||||
Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
|
||||
range. Inputs below zero are treated as zero.
|
||||
|
||||
M: 1
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@@ -2,7 +2,6 @@
|
||||
# 1-4 (main): Ailerons (Y-cable), A-tail left, Pusher, A-tail right
|
||||
# 5-8 (main): quad motors
|
||||
#=============================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
|
||||
Aileron mixer (roll)
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
Delta-wing mixer
|
||||
===========================
|
||||
|
||||
Designed for TBS Caipirinha
|
||||
|
||||
This file defines mixers suitable for controlling a delta wing aircraft using
|
||||
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
|
||||
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
|
||||
assumed to be unused.
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
See the README for more information on the scaler format.
|
||||
|
||||
Elevon mixers
|
||||
-------------
|
||||
Three scalers total (output, roll, pitch).
|
||||
|
||||
On the assumption that the two elevon servos are physically reversed, the pitch
|
||||
input is inverted between the two servos.
|
||||
|
||||
The scaling factor for roll inputs is adjusted to implement differential travel
|
||||
for the elevons.
|
||||
|
||||
M: 2
|
||||
S: 0 0 8000 8000 0 -10000 10000
|
||||
S: 0 1 9000 9000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
S: 0 0 8000 8000 0 -10000 10000
|
||||
S: 0 1 -9000 -9000 0 -10000 10000
|
||||
|
||||
Output 2
|
||||
--------
|
||||
This mixer is empty.
|
||||
|
||||
Z:
|
||||
|
||||
Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
|
||||
range. Inputs below zero are treated as zero.
|
||||
|
||||
M: 1
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@@ -1,8 +1,6 @@
|
||||
Thrust tilt/ Starboard Thrust / Port Thrust / Tail Thrust mixer for PX4FMU
|
||||
=======================================================
|
||||
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
This file defines mixers suitable for controlling an airship with
|
||||
a thrust tilt, starboard and port thruster and a tail thruster using PX4FMU.
|
||||
The configuration assumes the starboard thruster is connected to PX4FMU
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# DeltaQuad mixer for PX4FMU
|
||||
#=============================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Quad motors 1 - 4
|
||||
-------------
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Dodeca Cox
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
R: 6a
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Dodeca Cox
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
R: 6m
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# mixer for the FireFly6 tilt mechansim servo, elevons and landing gear
|
||||
=======================================================================
|
||||
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Tilt mechanism servo mixer
|
||||
---------------------------
|
||||
M: 1
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# FireFly6 mixer for PX4FMU
|
||||
#
|
||||
#===========================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
R: 6c
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
# Roll channel for mount
|
||||
M: 1
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
Phantom FX-61 mixer
|
||||
===================
|
||||
|
||||
This file defines mixers suitable for controlling a delta wing aircraft using
|
||||
PX4/Pixhawk. The configuration assumes the elevon servos are connected to
|
||||
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
|
||||
assumed to be unused.
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
See the README for more information on the scaler format.
|
||||
|
||||
Elevon mixers
|
||||
-------------
|
||||
Three scalers total (output, roll, pitch).
|
||||
|
||||
On the assumption that the two elevon servos are physically reversed, the pitch
|
||||
input is inverted between the two servos.
|
||||
|
||||
The scaling factor are set so that pitch will have more travel than roll.
|
||||
|
||||
M: 2
|
||||
S: 0 0 -6000 -6000 0 -10000 10000
|
||||
S: 0 1 6500 6500 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
S: 0 0 -6000 -6000 0 -10000 10000
|
||||
S: 0 1 -6500 -6500 0 -10000 10000
|
||||
|
||||
Output 2
|
||||
--------
|
||||
This mixer is empty.
|
||||
|
||||
Z:
|
||||
|
||||
Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
|
||||
range. Inputs below zero are treated as zero.
|
||||
|
||||
M: 1
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@@ -1,8 +1,6 @@
|
||||
Tilt-Quadrotor mixer for PX4FMU (2/2) V2
|
||||
===========================
|
||||
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
This file defines the aux outputs mixer for a Tilt-quadrotor in the + configuration.
|
||||
|
||||
# @output AUX1 Outer servo motor for rotor 2 arm
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
Tilt-Quadrotor mixer for PX4FMU (1/2) V2
|
||||
===========================
|
||||
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
This file defines the main outputs mixer for a Tilt-quadrotor in the + configuration.
|
||||
|
||||
# @output MAIN1 motor 1
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
# Motor 1
|
||||
M: 3
|
||||
S: 0 2 -4000 -4000 0 -4000 +4000
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
Mixer for an AAERT VTOL
|
||||
=======================
|
||||
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Aileron 1 mixer
|
||||
---------------
|
||||
M: 1
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
Aileron/v-tail/throttle VTOL mixer for PX4FMU
|
||||
=======================================================
|
||||
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
This file defines mixers suitable for controlling a fixed wing aircraft with
|
||||
aileron, v-tail (rudder, elevator) and throttle using PX4FMU.
|
||||
The configuration assumes the aileron servos are connected to PX4FMU
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Generic quadplane tiltrotor servo mixer
|
||||
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
# Tilt mechanism servo mixer
|
||||
---------------------------
|
||||
# front left up:2000 down:1000
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# E-flite Convergence Tricopter Y-Configuration Mixer
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
# Motors
|
||||
R: 3y
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
Delta-wing mixer for PX4FMU
|
||||
===========================
|
||||
|
||||
Designed for Wing Wing Z-84
|
||||
|
||||
This file defines mixers suitable for controlling a delta wing aircraft using
|
||||
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
|
||||
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
|
||||
assumed to be unused.
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
See the README for more information on the scaler format.
|
||||
|
||||
Elevon mixers
|
||||
-------------
|
||||
Three scalers total (output, roll, pitch).
|
||||
|
||||
On the assumption that the two elevon servos are physically reversed, the pitch
|
||||
input is inverted between the two servos.
|
||||
|
||||
The scaling factor for roll inputs is adjusted to implement differential travel
|
||||
for the elevons.
|
||||
|
||||
M: 2
|
||||
S: 0 0 -6000 -6000 0 -10000 10000
|
||||
S: 0 1 6500 6500 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
S: 0 0 -6000 -6000 0 -10000 10000
|
||||
S: 0 1 -6500 -6500 0 -10000 10000
|
||||
|
||||
Output 2
|
||||
--------
|
||||
This mixer is empty.
|
||||
|
||||
Z:
|
||||
|
||||
Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
|
||||
range. Inputs below zero are treated as zero.
|
||||
|
||||
M: 1
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
@@ -5,62 +5,46 @@ import subprocess
|
||||
from subprocess import call, Popen
|
||||
from argparse import ArgumentParser
|
||||
import re
|
||||
import sys
|
||||
import datetime
|
||||
|
||||
COLOR_RED = "\x1b[31m"
|
||||
COLOR_GREEN = "\x1b[32m"
|
||||
COLOR_YELLOW = "\x1b[33m"
|
||||
COLOR_WHITE = "\x1b[37m"
|
||||
COLOR_RESET = "\x1b[0m"
|
||||
|
||||
def print_line(line):
|
||||
if "WARNING" in line:
|
||||
line = line.replace("WARNING", f"{COLOR_YELLOW}WARNING{COLOR_RESET}", 1)
|
||||
elif "WARN" in line:
|
||||
line = line.replace("WARN", f"{COLOR_YELLOW}WARN{COLOR_RESET}", 1)
|
||||
elif "ERROR" in line:
|
||||
line = line.replace("ERROR", f"{COLOR_RED}ERROR{COLOR_RESET}", 1)
|
||||
elif "INFO" in line:
|
||||
line = line.replace("INFO", f"{COLOR_WHITE}INFO{COLOR_RESET}", 1)
|
||||
|
||||
if "PASSED" in line:
|
||||
line = line.replace("PASSED", f"{COLOR_GREEN}PASSED{COLOR_RESET}", 1)
|
||||
|
||||
if "FAILED" in line:
|
||||
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
|
||||
|
||||
current_time = datetime.datetime.now()
|
||||
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
|
||||
|
||||
def monitor_firmware_upload(port, baudrate):
|
||||
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=1, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
databits = serial.EIGHTBITS
|
||||
stopbits = serial.STOPBITS_ONE
|
||||
parity = serial.PARITY_NONE
|
||||
ser = serial.Serial(port, baudrate, databits, parity, stopbits, timeout=1)
|
||||
|
||||
timeout = 180 # 3 minutes
|
||||
finished = 0
|
||||
|
||||
timeout = 300 # 5 minutes
|
||||
timeout_start = time.time()
|
||||
timeout_newline = time.time()
|
||||
|
||||
while True:
|
||||
while finished == 0:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
if (len(serial_line) > 0):
|
||||
print(serial_line.replace('\n', ''))
|
||||
|
||||
if "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(0)
|
||||
elif "nsh>" in serial_line:
|
||||
sys.exit(0)
|
||||
finished = 1
|
||||
break
|
||||
|
||||
if time.time() - timeout_start > 10:
|
||||
if "nsh>" in serial_line:
|
||||
finished = 1
|
||||
break
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
finished = 1
|
||||
break
|
||||
|
||||
# newline every 10 seconds if still running
|
||||
if time.time() - timeout_newline > 10:
|
||||
timeout_newline = time.time()
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.write('\n'.encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
ser.close()
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=None, help='', required=True)
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
import serial, time
|
||||
import subprocess
|
||||
from subprocess import call, Popen
|
||||
from argparse import ArgumentParser
|
||||
import re
|
||||
import sys
|
||||
|
||||
COLOR_RED = "\x1b[31m"
|
||||
COLOR_GREEN = "\x1b[32m"
|
||||
COLOR_YELLOW = "\x1b[33m"
|
||||
COLOR_WHITE = "\x1b[37m"
|
||||
COLOR_RESET = "\x1b[0m"
|
||||
|
||||
def print_line(line):
|
||||
if "WARNING" in line:
|
||||
line = line.replace("WARNING", f"{COLOR_YELLOW}WARNING{COLOR_RESET}", 1)
|
||||
elif "WARN" in line:
|
||||
line = line.replace("WARN", f"{COLOR_YELLOW}WARN{COLOR_RESET}", 1)
|
||||
elif "ERROR" in line:
|
||||
line = line.replace("ERROR", f"{COLOR_RED}ERROR{COLOR_RESET}", 1)
|
||||
elif "INFO" in line:
|
||||
line = line.replace("INFO", f"{COLOR_WHITE}INFO{COLOR_RESET}", 1)
|
||||
|
||||
if "PASSED" in line:
|
||||
line = line.replace("PASSED", f"{COLOR_GREEN}PASSED{COLOR_RESET}", 1)
|
||||
|
||||
if "FAILED" in line:
|
||||
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
|
||||
|
||||
print(line, end='')
|
||||
|
||||
def do_param_set_cmd(port, baudrate, param_name, param_value):
|
||||
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.1, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 10 # 10 seconds
|
||||
|
||||
# wait for nsh prompt
|
||||
while True:
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if "nsh>" in serial_line:
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
sys.exit(1)
|
||||
|
||||
# clear
|
||||
ser.readlines()
|
||||
|
||||
# run command
|
||||
timeout_start = time.time()
|
||||
timeout = 10 # 10 seconds
|
||||
|
||||
cmd = "param set " + param_name + " " + param_value
|
||||
|
||||
# write command (param set) and wait for command echo
|
||||
serial_cmd = '{0}\r\n'.format(cmd)
|
||||
ser.write(serial_cmd.encode("ascii"))
|
||||
ser.flush()
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if cmd in serial_line:
|
||||
print_line(serial_line)
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for command echo")
|
||||
break
|
||||
|
||||
# verify param value
|
||||
cmd = "param show " + param_name
|
||||
serial_cmd = '{0}\r\n'.format(cmd)
|
||||
ser.write(serial_cmd.encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
param_show_response = param_name + " ["
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 2 # 2 seconds
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if param_show_response in serial_line:
|
||||
print_line(serial_line)
|
||||
current_param_value = serial_line.split(":")[-1].strip()
|
||||
|
||||
if (current_param_value == param_value):
|
||||
sys.exit(0)
|
||||
else:
|
||||
sys.exit(1)
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
if "nsh>" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
elif "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
|
||||
if len(serial_line) <= 0:
|
||||
ser.write("\r\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
sys.exit(-1)
|
||||
|
||||
ser.close()
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--device', "-d", nargs='?', default=None, help='', required=True)
|
||||
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="Mavlink port baud rate (default=57600)", default=57600)
|
||||
parser.add_argument("--name", "-p", dest="param_name", help="Parameter name")
|
||||
parser.add_argument("--value", "-v", dest="param_value", help="Parameter value")
|
||||
args = parser.parse_args()
|
||||
|
||||
do_param_set_cmd(args.device, args.baudrate, args.param_name, args.param_value)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+37
-72
@@ -6,89 +6,52 @@ from subprocess import call, Popen
|
||||
from argparse import ArgumentParser
|
||||
import re
|
||||
import sys
|
||||
import datetime
|
||||
|
||||
COLOR_RED = "\x1b[31m"
|
||||
COLOR_GREEN = "\x1b[32m"
|
||||
COLOR_YELLOW = "\x1b[33m"
|
||||
COLOR_WHITE = "\x1b[37m"
|
||||
COLOR_RESET = "\x1b[0m"
|
||||
|
||||
def print_line(line):
|
||||
if "WARNING" in line:
|
||||
line = line.replace("WARNING", f"{COLOR_YELLOW}WARNING{COLOR_RESET}", 1)
|
||||
elif "WARN" in line:
|
||||
line = line.replace("WARN", f"{COLOR_YELLOW}WARN{COLOR_RESET}", 1)
|
||||
elif "ERROR" in line:
|
||||
line = line.replace("ERROR", f"{COLOR_RED}ERROR{COLOR_RESET}", 1)
|
||||
elif "INFO" in line:
|
||||
line = line.replace("INFO", f"{COLOR_WHITE}INFO{COLOR_RESET}", 1)
|
||||
|
||||
if "PASSED" in line:
|
||||
line = line.replace("PASSED", f"{COLOR_GREEN}PASSED{COLOR_RESET}", 1)
|
||||
|
||||
if "FAILED" in line:
|
||||
line = line.replace("FAILED", f"{COLOR_RED}FAILED{COLOR_RESET}", 1)
|
||||
|
||||
current_time = datetime.datetime.now()
|
||||
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
|
||||
|
||||
def do_nsh_cmd(port, baudrate, cmd):
|
||||
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.1, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 10 # 10 seconds
|
||||
|
||||
# wait for nsh prompt
|
||||
while True:
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if "nsh>" in serial_line:
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
sys.exit(1)
|
||||
|
||||
# clear
|
||||
ser.readlines()
|
||||
databits = serial.EIGHTBITS
|
||||
stopbits = serial.STOPBITS_ONE
|
||||
parity = serial.PARITY_NONE
|
||||
ser = serial.Serial(port, baudrate, databits, parity, stopbits, timeout=0.1)
|
||||
|
||||
# run command
|
||||
timeout_start = time.time()
|
||||
timeout = 1 # 1 second
|
||||
timeout = 10 # 10 seconds
|
||||
|
||||
# clear
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
ser.readline()
|
||||
|
||||
success_cmd = "cmd succeeded!"
|
||||
|
||||
# wait for command echo
|
||||
serial_cmd = '{0}; echo "{1}"\r\n'.format(cmd, success_cmd)
|
||||
serial_cmd = '{0}; echo "{1}"\n'.format(cmd, success_cmd)
|
||||
ser.write(serial_cmd.encode("ascii"))
|
||||
ser.flush()
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
ser.readline()
|
||||
|
||||
if cmd in serial_line:
|
||||
break
|
||||
elif serial_line.startswith(success_cmd) and len(serial_line) <= len(success_cmd) + 2:
|
||||
print_line(serial_line)
|
||||
# we missed the echo, but command ran and succeeded
|
||||
sys.exit(0)
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
# TODO: require successful command echo
|
||||
# while True:
|
||||
# serial_cmd = '{0}; echo "{1}"\n'.format(cmd, success_cmd)
|
||||
# ser.write(serial_cmd.encode("ascii"))
|
||||
# ser.flush()
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for command echo")
|
||||
break
|
||||
# serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
# if cmd in serial_line:
|
||||
# break
|
||||
# else:
|
||||
# print(serial_line, end='')
|
||||
|
||||
# if time.time() > timeout_start + timeout:
|
||||
# print("Error, timeout")
|
||||
# sys.exit(-1)
|
||||
# break
|
||||
|
||||
# time.sleep(1)
|
||||
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 180 # 3 minutes
|
||||
timeout = 30 # 30 seconds
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
@@ -97,15 +60,17 @@ def do_nsh_cmd(port, baudrate, cmd):
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
print(serial_line, end='')
|
||||
|
||||
if "nsh>" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
#sys.exit(-1) # error, command didn't complete successfully
|
||||
break # TODO: return error on failure
|
||||
elif "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(1) # error, command didn't complete successfully
|
||||
#sys.exit(-1) # error, command didn't complete successfully
|
||||
break # TODO: return error on failure
|
||||
|
||||
if len(serial_line) <= 0:
|
||||
ser.write("\r\n".encode("ascii"))
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user