mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-31 21:50:04 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bccbfecb4 |
+18
-8
@@ -9,10 +9,11 @@ pipeline {
|
||||
script {
|
||||
def build_nodes = [:]
|
||||
def docker_images = [
|
||||
armhf: "px4io/px4-dev-armhf:2021-09-08",
|
||||
arm64: "px4io/px4-dev-aarch64:2021-09-08",
|
||||
base: "px4io/px4-dev-base-bionic:2021-09-08",
|
||||
nuttx: "px4io/px4-dev-nuttx-focal:2021-09-08",
|
||||
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",
|
||||
snapdragon: "lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
||||
]
|
||||
|
||||
def armhf_builds = [
|
||||
@@ -38,7 +39,6 @@ pipeline {
|
||||
"airmind_mindpx-v2_default",
|
||||
"ark_can-flow_canbootloader",
|
||||
"ark_can-flow_default",
|
||||
"atl_mantis-edu_default",
|
||||
"av_x-v1_default",
|
||||
"bitcraze_crazyflie_default",
|
||||
"bitcraze_crazyflie21_default",
|
||||
@@ -72,8 +72,8 @@ pipeline {
|
||||
"nxp_fmuk66-v3_rtps",
|
||||
"nxp_fmuk66-v3_socketcan",
|
||||
"nxp_fmurt1062-v1_default",
|
||||
"nxp_ucans32k146_canbootloader",
|
||||
"nxp_ucans32k146_default",
|
||||
"nxp_ucans32k146_canbootloader",
|
||||
"omnibus_f4sd_default",
|
||||
"px4_fmu-v2_default",
|
||||
"px4_fmu-v2_fixedwing",
|
||||
@@ -106,8 +106,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++) {
|
||||
@@ -127,7 +133,7 @@ pipeline {
|
||||
// TODO: actually upload artifacts to S3
|
||||
// stage('S3 Upload') {
|
||||
// agent {
|
||||
// docker { image 'px4io/px4-dev-base-focal:2021-09-08' }
|
||||
// docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
// }
|
||||
// options {
|
||||
// skipDefaultCheckout()
|
||||
@@ -159,7 +165,11 @@ pipeline {
|
||||
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') {
|
||||
|
||||
+519
-636
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-09-08",
|
||||
"image": "px4io/px4-dev-nuttx-focal:2021-05-04",
|
||||
|
||||
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or Slack (you can find an invite link on this project README).
|
||||
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/).
|
||||
|
||||
**Describe problem solved by the proposed feature**
|
||||
A clear and concise description of the problem, if any, this feature will solve. E.g. I'm always frustrated when ...
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="20">
|
||||
<linearGradient id="smooth" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
|
||||
<mask id="round">
|
||||
<rect width="90" height="20" rx="3" fill="#fff"/>
|
||||
</mask>
|
||||
|
||||
<g mask="url(#round)">
|
||||
<rect width="42" height="20" fill="#555"/>
|
||||
<rect x="42" width="48" height="20" fill="#E01563"/>
|
||||
<rect width="90" height="20" fill="url(#smooth)"/>
|
||||
</g>
|
||||
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="22" y="15" fill="#010101" fill-opacity=".3">slack</text>
|
||||
<text x="22" y="14">slack</text>
|
||||
<text x="65" y="15" fill="#010101" fill-opacity=".3">Join us!</text>
|
||||
<text x="65" y="14">Join us!</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 894 B |
@@ -29,7 +29,7 @@ jobs:
|
||||
"parameters_metadata",
|
||||
]
|
||||
container:
|
||||
image: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||
image: px4io/px4-dev-nuttx-focal:2021-05-04
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-clang:2021-09-08
|
||||
container: px4io/px4-dev-clang:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-armhf:2021-09-08
|
||||
container: px4io/px4-dev-armhf:2021-05-04
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-aarch64:2021-09-08
|
||||
container: px4io/px4-dev-aarch64:2021-05-04
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -11,51 +11,84 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||
container: px4io/px4-dev-nuttx-focal:2021-05-04
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
airmind_mindpx-v2,
|
||||
ark_can-flow,
|
||||
ark_can-gps,
|
||||
atl_mantis-edu,
|
||||
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,
|
||||
ark_can-gps_canbootloader,
|
||||
ark_can-gps_debug,
|
||||
ark_can-gps_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_x7pro_default,
|
||||
cubepilot_cubeorange_default,
|
||||
cubepilot_cubeorange_test,
|
||||
cubepilot_cubeyellow_default,
|
||||
cubepilot_cubeyellow_test,
|
||||
cubepilot_io-v2_default,
|
||||
freefly_can-rtk-gps_canbootloader,
|
||||
freefly_can-rtk-gps_default,
|
||||
holybro_can-gps-v1_canbootloader,
|
||||
holybro_can-gps-v1_debug,
|
||||
holybro_can-gps-v1_default,
|
||||
holybro_durandal-v1_default,
|
||||
holybro_kakutef7_default,
|
||||
holybro_pix32v5_default,
|
||||
modalai_fc-v1_default,
|
||||
modalai_fc-v1_rtps,
|
||||
modalai_fc-v2_default,
|
||||
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-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-v6x_default,
|
||||
px4_io-v2_default,
|
||||
spracing_h7extreme_default,
|
||||
uvify_core_default
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -84,8 +117,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
|
||||
@@ -104,7 +137,7 @@ jobs:
|
||||
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,16 +11,15 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||
container: px4io/px4-dev-nuttx-focal:2021-05-04
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
ark_can-flow_default,
|
||||
ark_can-gps_default,
|
||||
cuav_can-gps-v1_default,
|
||||
freefly_can-rtk-gps_default,
|
||||
holybro_can-gps-v1_default,
|
||||
nxp_ucans32k146_default,
|
||||
#nxp_ucans32k146_default,
|
||||
px4_fmu-v4_cannode
|
||||
]
|
||||
steps:
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
needs: enumerate_targets
|
||||
strategy:
|
||||
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}}
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-09-08
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -5,17 +5,16 @@ on: pull_request
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
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
|
||||
run: cd ${GITHUB_WORKSPACE}/src/lib/ecl; make test
|
||||
working-directory: src/lib/ecl
|
||||
- name: Check if there is a functional change
|
||||
run: git diff --exit-code
|
||||
working-directory: src/modules/ekf2/test/change_indication
|
||||
working-directory: src/lib/ecl/test/change_indication
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
name: EKF Build Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
Linux-GCC:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: main build
|
||||
run: make
|
||||
working-directory: src/lib/ecl
|
||||
- name: clean build
|
||||
run: make clean
|
||||
working-directory: src/lib/ecl
|
||||
- name: main test
|
||||
run: make test
|
||||
working-directory: src/lib/ecl
|
||||
Linux-Clang:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-clang:2021-05-04
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: main build
|
||||
run: make
|
||||
working-directory: src/lib/ecl
|
||||
- name: clean build
|
||||
run: make clean
|
||||
working-directory: src/lib/ecl
|
||||
- name: main test
|
||||
run: make test
|
||||
working-directory: src/lib/ecl
|
||||
Mac-OS:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: main build
|
||||
run: make
|
||||
working-directory: src/lib/ecl
|
||||
- name: clean build
|
||||
run: make clean
|
||||
working-directory: src/lib/ecl
|
||||
- name: main test
|
||||
run: make test
|
||||
working-directory: src/lib/ecl
|
||||
@@ -5,19 +5,17 @@ on: push
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
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
|
||||
run: cd ${GITHUB_WORKSPACE}/src/lib/ecl; make test
|
||||
- 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
|
||||
working-directory: src/lib/ecl/test/change_indication
|
||||
- name: auto-commit any changes to change indication
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-09-08
|
||||
image: px4io/px4-dev-ros-melodic:2021-05-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-09-08
|
||||
image: px4io/px4-dev-ros-melodic:2021-05-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-09-08
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
|
||||
module:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
parameter:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
|
||||
events:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -103,7 +103,7 @@ jobs:
|
||||
|
||||
uorb_graph:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-09-08
|
||||
container: px4io/px4-dev-nuttx-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -118,7 +118,7 @@ jobs:
|
||||
|
||||
micrortps_agent:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -132,7 +132,7 @@ jobs:
|
||||
|
||||
ROS_msgs:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
|
||||
ROS2_bridge:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
container: px4io/px4-dev-base-focal:2021-05-04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -154,4 +154,4 @@ jobs:
|
||||
- name: PX4 ROS2 bridge
|
||||
run: |
|
||||
git clone https://github.com/PX4/px4_ros_com.git
|
||||
./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml
|
||||
./msg/tools/uorb_to_ros_rtps_ids.py -i msg/tools/uorb_rtps_message_ids.yaml -o px4_ros_com/templates/uorb_rtps_message_ids.yaml
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-simulation-focal:2021-09-08
|
||||
image: px4io/px4-dev-simulation-focal:2021-05-04
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
+9
-5
@@ -18,6 +18,10 @@
|
||||
path = src/lib/matrix
|
||||
url = https://github.com/PX4/PX4-Matrix.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
|
||||
@@ -29,11 +33,14 @@
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
url = https://github.com/PX4/NuttX.git
|
||||
branch = px4_firmware_nuttx-10.1.0+
|
||||
branch = px4_firmware_nuttx-10.0.0+
|
||||
[submodule "platforms/nuttx/NuttX/apps"]
|
||||
path = platforms/nuttx/NuttX/apps
|
||||
url = https://github.com/PX4/NuttX-apps.git
|
||||
branch = px4_firmware_nuttx-10.1.0+
|
||||
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
|
||||
@@ -63,6 +70,3 @@
|
||||
[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
|
||||
|
||||
Vendored
-5
@@ -96,11 +96,6 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-gps_canbootloader
|
||||
atl_mantis-edu_default:
|
||||
short: atl_mantis-edu
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: atl_mantis-edu_default
|
||||
av_x-v1_default:
|
||||
short: av_x-v1
|
||||
buildType: MinSizeRel
|
||||
|
||||
Vendored
+1
@@ -31,6 +31,7 @@
|
||||
"esc"
|
||||
],
|
||||
"debug.toolBarLocation": "docked",
|
||||
"editor.acceptSuggestionOnEnter": "off",
|
||||
"editor.defaultFormatter": "chiehyu.vscode-astyle",
|
||||
"editor.dragAndDrop": false,
|
||||
"editor.insertSpaces": false,
|
||||
|
||||
+1
-3
@@ -443,10 +443,8 @@ endforeach()
|
||||
|
||||
add_custom_command(OUTPUT ${uorb_graph_config}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/uorb_graph/create.py
|
||||
${graph_module_list} --src-path src/lib
|
||||
--merge-depends
|
||||
${graph_module_list}
|
||||
--exclude-path src/examples
|
||||
--exclude-path src/lib/parameters # FIXME: enable & fix
|
||||
--file ${PX4_SOURCE_DIR}/Tools/uorb_graph/graph_${uorb_graph_config}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
COMMENT "Generating uORB graph"
|
||||
|
||||
Vendored
+3
-25
@@ -143,24 +143,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('msg file docs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
|
||||
}
|
||||
steps {
|
||||
sh 'mkdir -p build/msg_docs; ./msg/tools/generate_msg_docs.py -d build/msg_docs'
|
||||
dir('build') {
|
||||
archiveArtifacts(artifacts: 'msg_docs/*.md')
|
||||
stash includes: 'msg_docs/*.md', name: 'msg_documentation'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('uORB graphs') {
|
||||
agent {
|
||||
docker {
|
||||
@@ -174,8 +156,8 @@ pipeline {
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make uorb_graphs'
|
||||
dir('Tools/uorb_graph') {
|
||||
archiveArtifacts(artifacts: 'graph_*.json')
|
||||
stash includes: 'graph_*.json', name: 'uorb_graph'
|
||||
archiveArtifacts(artifacts: 'graph_px4_sitl.json')
|
||||
stash includes: 'graph_px4_sitl.json', name: 'uorb_graph'
|
||||
}
|
||||
}
|
||||
post {
|
||||
@@ -201,15 +183,11 @@ pipeline {
|
||||
unstash 'metadata_airframes'
|
||||
unstash 'metadata_parameters'
|
||||
unstash 'metadata_module_documentation'
|
||||
unstash 'msg_documentation'
|
||||
unstash 'uorb_graph'
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_user_guide.git')
|
||||
sh('cp airframes.md px4_user_guide/en/airframes/airframe_reference.md')
|
||||
sh('cp parameters.md px4_user_guide/en/advanced_config/parameter_reference.md')
|
||||
sh('cp -R modules/*.md px4_user_guide/en/modules/')
|
||||
sh('cp -R graph_*.json px4_user_guide/.vuepress/public/en/middleware/')
|
||||
sh('cp -R msg_docs/*.md px4_user_guide/en/msg_docs/')
|
||||
sh('cd px4_user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
||||
sh('cd px4_user_guide; git push origin master || true')
|
||||
sh('rm -rf px4_user_guide')
|
||||
@@ -323,7 +301,7 @@ pipeline {
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_ros_com.git -b ${BRANCH_NAME}")
|
||||
// deploy uORB RTPS ID map
|
||||
sh('./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml')
|
||||
sh('./msg/tools/uorb_to_ros_rtps_ids.py -i msg/tools/uorb_rtps_message_ids.yaml -o px4_ros_com/templates/uorb_rtps_message_ids.yaml')
|
||||
sh('cd px4_ros_com; git status; git add .; git commit -a -m "Update uORB RTPS ID map `date`" || true')
|
||||
sh('cd px4_ros_com; git push origin ${BRANCH_NAME} || true')
|
||||
// deploy uORB RTPS required tools
|
||||
|
||||
@@ -174,7 +174,6 @@ endif
|
||||
# --------------------------------------------------------------------
|
||||
# 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 +213,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 +221,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 +243,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
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
@@ -293,17 +306,10 @@ 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/parameters --merge-depends --file Tools/uorb_graph/graph_full
|
||||
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib/parameters --exclude-path src/modules/mavlink --merge-depends --file Tools/uorb_graph/graph_full_no_mavlink
|
||||
@./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
|
||||
@$(MAKE) --no-print-directory px4_fmu-v4_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_fmu-v5_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
|
||||
|
||||
|
||||
@@ -354,6 +360,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)
|
||||
@@ -481,7 +488,6 @@ submodulesupdate:
|
||||
@git submodule update --quiet --init --recursive --jobs 4 || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive --jobs 4
|
||||
@git fetch --all --tags --recurse-submodules=yes --jobs=4
|
||||
|
||||
gazeboclean:
|
||||
@rm -rf ~/.gazebo/*
|
||||
@@ -491,7 +497,7 @@ distclean: gazeboclean
|
||||
@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/"
|
||||
|
||||
# Help / Error / Misc
|
||||
# Help / Error
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
|
||||
@@ -505,7 +511,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."
|
||||
@@ -525,18 +531,3 @@ check_px4: $(call make_list,nuttx,"px4") \
|
||||
|
||||
check_nxp: $(call make_list,nuttx,"nxp") \
|
||||
sizes
|
||||
|
||||
ifneq ($(ROS2_WS_DIR),)
|
||||
ROS2_WS_DIR := $(basename ${ROS2_WS_DIR})
|
||||
else
|
||||
ROS2_WS_DIR := ~/colcon_ws
|
||||
endif
|
||||
|
||||
update_ros2_bridge:
|
||||
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --all
|
||||
|
||||
update_px4_ros_com:
|
||||
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --px4_ros_com
|
||||
|
||||
update_px4_msgs:
|
||||
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --px4_msgs
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
[](https://github.com/PX4/PX4-Autopilot/actions?query=workflow%3A%22Nuttx+Targets%22?branch=master) [](https://github.com/PX4/PX4-Autopilot/actions?query=workflow%3A%22SITL+Tests%22)
|
||||
|
||||
[](https://join.slack.com/t/px4/shared_invite/zt-si4xo5qs-R4baYFmMjlrT4rQK5yUnaA)
|
||||
[](http://slack.px4.io)
|
||||
|
||||
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)):
|
||||
|
||||
@@ -120,7 +120,6 @@ add_custom_command(
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_extract_stamp}
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
DEPENDS ${romfs_tar_file}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
|
||||
@@ -15,6 +15,10 @@ set +e
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
set R /
|
||||
#
|
||||
# Mount the procfs.
|
||||
#
|
||||
mount -t procfs /proc
|
||||
|
||||
#
|
||||
# Start CDC/ACM serial driver.
|
||||
|
||||
@@ -34,10 +34,9 @@
|
||||
add_subdirectory(airframes)
|
||||
|
||||
px4_add_romfs_files(
|
||||
px4-rc.mavlink
|
||||
px4-rc.params
|
||||
px4-rc.rtps
|
||||
px4-rc.simulator
|
||||
px4-rc.mavlink
|
||||
rc.replay
|
||||
rcS
|
||||
)
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default MC_PITCHRATE_P 0.1
|
||||
param set-default MC_ROLLRATE_P 0.05
|
||||
param set-default MC_ROLLRATE_P 0.1
|
||||
|
||||
set MIXER quad_x
|
||||
|
||||
@@ -11,6 +11,8 @@ param set-default NAV_DLL_ACT 0
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
#param set CBRK_GPSFAIL 240024
|
||||
|
||||
set MAV_TYPE 12
|
||||
param set MAV_TYPE ${MAV_TYPE}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ param set-default NAV_DLL_ACT 0
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
#param set CBRK_GPSFAIL 240024
|
||||
|
||||
set MAV_TYPE 12
|
||||
param set MAV_TYPE ${MAV_TYPE}
|
||||
|
||||
|
||||
@@ -42,9 +42,15 @@ param set-default NAV_LOITER_RAD 50
|
||||
|
||||
param set-default RWTO_TKOFF 1
|
||||
|
||||
# fix takeoff failure for JSBsim in autonomous mission mode.
|
||||
#param set FW_THR_SLEW_MAX 0.3
|
||||
|
||||
param set-default RWTO_MAX_PITCH 20
|
||||
param set-default RWTO_MAX_ROLL 10
|
||||
|
||||
# fix takeoff failure for JSBsim in autonomous mission mode.
|
||||
#param set-default RWTO_MAX_THR 0.6
|
||||
|
||||
param set-default RWTO_PSP 8
|
||||
param set-default RWTO_AIRSPD_SCL 1.8
|
||||
|
||||
|
||||
@@ -42,9 +42,15 @@ param set-default NAV_LOITER_RAD 50
|
||||
|
||||
param set-default RWTO_TKOFF 1
|
||||
|
||||
# fix takeoff failure for JSBsim in autonomous mission mode.
|
||||
#param set FW_THR_SLEW_MAX 0.3
|
||||
|
||||
param set-default RWTO_MAX_PITCH 20
|
||||
param set-default RWTO_MAX_ROLL 10
|
||||
|
||||
# fix takeoff failure for JSBsim in autonomous mission mode.
|
||||
#param set RWTO_MAX_THR 0.6
|
||||
|
||||
param set-default RWTO_PSP 8
|
||||
param set-default RWTO_AIRSPD_SCL 1.8
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
#param set-default MAV_SYS_ID $((px4_instance+1))
|
||||
#param set-default IMU_INTEG_RATE 250
|
||||
#param set MAV_SYS_ID $((px4_instance+1))
|
||||
#param set IMU_INTEG_RATE 250
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
|
||||
@@ -21,6 +21,8 @@ then
|
||||
fi
|
||||
|
||||
# initialize script variables
|
||||
set AUX_MODE none
|
||||
set AUX_BANK2 none
|
||||
set IO_PRESENT no
|
||||
set MAV_TYPE none
|
||||
set MIXER none
|
||||
@@ -226,7 +228,8 @@ navigator start
|
||||
# Try to start the micrortps_client with UDP transport if module exists
|
||||
if px4-micrortps_client status > /dev/null 2>&1
|
||||
then
|
||||
. px4-rc.rtps
|
||||
# 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
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -26,5 +26,3 @@ param set-default CBRK_SUPPLY_CHK 894281
|
||||
# - without safety switch
|
||||
param set-default COM_PREARM_MODE 0
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set SIH_VEHICLE_TYPE 0
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name SIH plane AERT
|
||||
#
|
||||
# @type Simulation
|
||||
# @class Plane
|
||||
#
|
||||
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
set MIXER AERT
|
||||
set PWM_OUT 1234
|
||||
|
||||
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
|
||||
param set-default SYS_HITL 2
|
||||
|
||||
# disable some checks to allow to fly:
|
||||
# - with usb
|
||||
param set-default CBRK_USB_CHK 197848
|
||||
# - without real battery
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
# - without safety switch
|
||||
param set-default COM_PREARM_MODE 0
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set-default BAT_N_CELLS 3
|
||||
|
||||
param set SIH_T_MAX 6.0
|
||||
param set SIH_MASS 0.3
|
||||
param set SIH_IXX 0.00402
|
||||
param set SIH_IYY 0.0144
|
||||
param set SIH_IZZ 0.0177
|
||||
param set SIH_IXZ 0.00046
|
||||
param set SIH_KDV 0.2
|
||||
|
||||
param set SIH_VEHICLE_TYPE 1 # sih as fixed wing
|
||||
@@ -21,8 +21,8 @@
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
|
||||
param set-default BAT1_CAPACITY 3300
|
||||
param set-default BAT1_N_CELLS 3
|
||||
param set-default BAT_CAPACITY 3300
|
||||
param set-default BAT_N_CELLS 3
|
||||
|
||||
param set-default PWM_AUX_RATE 50
|
||||
param set-default PWM_MAIN_RATE 50
|
||||
|
||||
@@ -26,8 +26,7 @@ param set-default GPS_UBX_DYNMODEL 8
|
||||
param set-default SER_TEL2_BAUD 9600
|
||||
|
||||
param set-default SENS_BOARD_ROT 0
|
||||
set MAV_TYPE 8
|
||||
param set MAV_TYPE ${MAV_TYPE}
|
||||
param set MAV_TYPE 8 # MAV_TYPE_FREE_BALLOON
|
||||
|
||||
|
||||
set MIXER IO_pass
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
# @maintainer William Peale <develop707@gmail.com>
|
||||
#
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
set VEHICLE_TYPE mc
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Lumenier QAV-R (raceblade) 5" arms
|
||||
# @name Lumenier QAV-R (raceblade) 5inch arms
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Advanced Technology Labs (ATL) Mantis EDU
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
#
|
||||
# @maintainer
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER none
|
||||
set MIXER_AUX none
|
||||
|
||||
|
||||
# Battery settings
|
||||
param set-default BAT_CRIT_THR 0.20
|
||||
param set-default BAT_EMERGEN_THR 0.05
|
||||
param set-default BAT_LOW_THR 0.25
|
||||
|
||||
param set-default BAT1_CAPACITY 2800.0
|
||||
param set-default BAT1_N_CELLS 3
|
||||
param set-default BAT1_R_INTERNAL 0.02
|
||||
param set-default BAT1_V_CHARGED 4.26
|
||||
param set-default BAT1_V_EMPTY 3.45
|
||||
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
|
||||
param set-default COM_DISARM_LAND 0.1
|
||||
param set-default COM_DISARM_PRFLT 3
|
||||
param set-default COM_DL_LOSS_T 10
|
||||
param set-default COM_FLTMODE1 -1
|
||||
param set-default COM_FLTMODE2 -1
|
||||
param set-default COM_FLTMODE3 -1
|
||||
param set-default COM_FLTMODE4 2
|
||||
param set-default COM_FLTMODE5 -1
|
||||
param set-default COM_FLTMODE6 6
|
||||
param set-default COM_RC_LOSS_T 3
|
||||
param set-default COM_RC_OVERRIDE 1
|
||||
|
||||
|
||||
# ekf2
|
||||
param set-default EKF2_AID_MASK 35
|
||||
param set-default EKF2_BARO_DELAY 0
|
||||
param set-default EKF2_BARO_NOISE 2.0
|
||||
|
||||
param set-default EKF2_BCOEF_X 31.5
|
||||
param set-default EKF2_BCOEF_Y 25.5
|
||||
|
||||
param set-default EKF2_GPS_DELAY 100
|
||||
param set-default EKF2_GPS_POS_X 0.06
|
||||
param set-default EKF2_GPS_POS_Y 0.0
|
||||
param set-default EKF2_GPS_POS_Z 0.0
|
||||
param set-default EKF2_GPS_V_NOISE 0.5
|
||||
|
||||
param set-default EKF2_IMU_POS_X 0.06
|
||||
param set-default EKF2_IMU_POS_Y 0.0
|
||||
param set-default EKF2_IMU_POS_Z 0.0
|
||||
|
||||
param set-default EKF2_MAG_DELAY 0
|
||||
param set-default EKF2_MAG_NOISE 0.1
|
||||
|
||||
param set-default EKF2_MIN_RNG 0.15
|
||||
|
||||
param set-default EKF2_OF_DELAY 38
|
||||
param set-default EKF2_OF_GATE 2.0
|
||||
param set-default EKF2_OF_POS_X -0.035
|
||||
param set-default EKF2_OF_POS_Y 0.0
|
||||
param set-default EKF2_OF_POS_Z 0.033
|
||||
|
||||
param set-default EKF2_PCOEF_XN -0.3
|
||||
param set-default EKF2_PCOEF_XP -0.4
|
||||
param set-default EKF2_PCOEF_YN -0.4
|
||||
param set-default EKF2_PCOEF_YP -0.4
|
||||
param set-default EKF2_PCOEF_Z 0.0
|
||||
|
||||
param set-default EKF2_RNG_A_VMAX 1.0
|
||||
param set-default EKF2_RNG_AID 0
|
||||
param set-default EKF2_RNG_DELAY 55
|
||||
param set-default EKF2_RNG_POS_X -0.035
|
||||
param set-default EKF2_RNG_POS_Y 0.0
|
||||
param set-default EKF2_RNG_POS_Z 0.033
|
||||
|
||||
param set-default EKF2_TERR_NOISE 1.0
|
||||
|
||||
|
||||
# Maximum allowed angle velocity in the landed state
|
||||
param set-default LNDMC_ROT_MAX 40.0
|
||||
|
||||
# Maximum vertical velocity allowed in the landed state
|
||||
param set-default LNDMC_Z_VEL_MAX 0.7
|
||||
|
||||
|
||||
# filtering
|
||||
param set-default IMU_DGYRO_CUTOFF 50
|
||||
param set-default IMU_GYRO_CUTOFF 65
|
||||
|
||||
|
||||
# Pitch angle & rate setting
|
||||
param set-default MC_PITCHRATE_P 0.075
|
||||
param set-default MC_PITCHRATE_I 0.1
|
||||
param set-default MC_PITCHRATE_D 0.0005
|
||||
param set-default MC_PITCHRATE_MAX 360.0
|
||||
param set-default MC_PITCH_P 8.0
|
||||
|
||||
# Roll angle & rate setting
|
||||
param set-default MC_ROLLRATE_P 0.055
|
||||
param set-default MC_ROLLRATE_I 0.1
|
||||
param set-default MC_ROLLRATE_D 0.0005
|
||||
param set-default MC_ROLLRATE_MAX 360.0
|
||||
param set-default MC_ROLL_P 8.0
|
||||
|
||||
# Yaw angle & rate setting
|
||||
param set-default MC_YAWRATE_P 0.1
|
||||
param set-default MC_YAWRATE_I 0.1
|
||||
param set-default MC_YAWRATE_MAX 120.0
|
||||
param set-default MC_YAW_P 2.5
|
||||
|
||||
param set-default MPC_ACC_DOWN_MAX 2.0
|
||||
param set-default MPC_ACC_HOR 3.0
|
||||
param set-default MPC_ACC_HOR_MAX 10.0
|
||||
param set-default MPC_ACC_UP_MAX 3.0
|
||||
param set-default MPC_ALT_MODE 0
|
||||
param set-default MPC_LAND_SPEED 0.5
|
||||
param set-default MPC_LAND_VEL_XY 10
|
||||
param set-default MPC_MAN_TILT_MAX 20
|
||||
param set-default MPC_YAWRAUTO_MAX 80.0
|
||||
param set-default MPC_POS_MODE 4
|
||||
param set-default MPC_THR_HOVER 0.54
|
||||
param set-default MPC_THR_MAX 0.9
|
||||
param set-default MPC_THR_MIN 0.06
|
||||
param set-default MPC_TILTMAX_AIR 30
|
||||
param set-default MPC_XY_P 1.0
|
||||
param set-default MPC_XY_VEL_D 0.005
|
||||
param set-default MPC_XY_VEL_I 0.02
|
||||
param set-default MPC_XY_VEL_P 0.15
|
||||
param set-default MPC_Z_P 2.0
|
||||
param set-default MPC_Z_VEL_D 0.0
|
||||
param set-default MPC_Z_VEL_I 0.02
|
||||
param set-default MPC_Z_VEL_MAX_DN 2.0
|
||||
param set-default MPC_Z_VEL_MAX_UP 3.0
|
||||
param set-default MPC_Z_VEL_P 0.27
|
||||
|
||||
|
||||
# gimbal configuration
|
||||
param set-default MNT_MODE_IN 1
|
||||
param set-default MNT_MODE_OUT 2
|
||||
param set-default MNT_MAN_PITCH 1
|
||||
|
||||
|
||||
# RC
|
||||
param set-default RC_CHAN_CNT 12
|
||||
|
||||
param set-default RC_MAP_THROTTLE 1
|
||||
param set-default RC_MAP_ROLL 2
|
||||
param set-default RC_MAP_PITCH 3
|
||||
param set-default RC_MAP_YAW 4
|
||||
param set-default RC_MAP_FLTMODE 5
|
||||
param set-default RC_MAP_AUX1 7
|
||||
|
||||
param set-default RC1_DZ 10
|
||||
param set-default RC1_MAX 3413
|
||||
param set-default RC1_MIN 683
|
||||
param set-default RC1_REV 1
|
||||
param set-default RC1_TRIM 683
|
||||
param set-default RC2_DZ 10
|
||||
param set-default RC2_MAX 3413
|
||||
param set-default RC2_MIN 683
|
||||
param set-default RC2_REV -1
|
||||
param set-default RC2_TRIM 2048
|
||||
param set-default RC3_DZ 10
|
||||
param set-default RC3_MAX 3413
|
||||
param set-default RC3_MIN 683
|
||||
param set-default RC3_REV 1
|
||||
param set-default RC3_TRIM 2048
|
||||
param set-default RC4_DZ 10
|
||||
param set-default RC4_MAX 3413
|
||||
param set-default RC4_MIN 683
|
||||
param set-default RC4_REV -1
|
||||
param set-default RC4_TRIM 2048
|
||||
param set-default RC5_DZ 10
|
||||
param set-default RC5_MAX 3414
|
||||
param set-default RC5_MIN 2048
|
||||
param set-default RC5_REV 1
|
||||
param set-default RC5_TRIM 2048
|
||||
param set-default RC7_DZ 10
|
||||
param set-default RC7_MAX 3413
|
||||
param set-default RC7_MIN 683
|
||||
param set-default RC7_REV 1
|
||||
param set-default RC7_TRIM 2048
|
||||
|
||||
|
||||
# optical flow
|
||||
param set-default SENS_FLOW_MAXR 7.4
|
||||
param set-default SENS_FLOW_MINHGT 0.15
|
||||
param set-default SENS_FLOW_MAXHGT 5.0
|
||||
param set-default SENS_FLOW_ROT 4
|
||||
|
||||
|
||||
mixer load /dev/tap_esc /etc/mixers/quad_x.main.mix
|
||||
@@ -27,29 +27,48 @@ set PWM_OUT 1234
|
||||
|
||||
|
||||
# Attitude & rate gains
|
||||
#param set MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_P 0.15
|
||||
#param set MC_ROLLRATE_I 0.9
|
||||
param set-default MC_ROLLRATE_D 0.0013
|
||||
|
||||
#param set MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_P 0.15
|
||||
#param set MC_PITCHRATE_I 1.1
|
||||
param set-default MC_PITCHRATE_D 0.0016
|
||||
|
||||
param set-default MC_YAW_P 2.8
|
||||
param set-default MC_YAWRATE_P 0.2
|
||||
#param set MC_YAWRATE_I 0.15
|
||||
param set-default MC_YAWRATE_D 0
|
||||
param set-default MC_YAW_FF 0.5
|
||||
|
||||
#param set MC_ROLL_TC 0.19
|
||||
#param set MC_PITCH_TC 0.16
|
||||
|
||||
# Manual mode settings: Unleash Draco R's power :)
|
||||
#param set MPC_MAN_TILT_MAX 70
|
||||
#param set MC_PITCHRATE_MAX 1600
|
||||
#param set MC_ROLLRATE_MAX 1600
|
||||
#param set MC_YAWRATE_MAX 700
|
||||
param set-default MPC_MANTHR_MAX 0.9
|
||||
param set-default MPC_MANTHR_MIN 0.08
|
||||
#param set MPC_MAN_TILT_MAX 35
|
||||
#param set MPC_TILTMAX_AIR 20
|
||||
|
||||
# Filter settings
|
||||
param set-default IMU_DGYRO_CUTOFF 90
|
||||
param set-default IMU_GYRO_CUTOFF 100
|
||||
|
||||
# Thrust curve (avoids the need for TPA)
|
||||
#param set THR_MDL_FAC 0.25
|
||||
|
||||
# System
|
||||
param set-default PWM_MAIN_MAX 1950
|
||||
param set-default PWM_MAIN_MIN 1100
|
||||
param set-default PWM_MAIN_RATE 0
|
||||
|
||||
#param set SYS_FMU_TASK 1
|
||||
param set-default SENS_BOARD_ROT 10
|
||||
|
||||
# EKF2
|
||||
@@ -77,6 +96,7 @@ 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 CBRK_IO_SAFETY 22027
|
||||
param set-default COM_DISARM_LAND 2
|
||||
|
||||
# Filter settings
|
||||
@@ -86,6 +106,9 @@ param set-default IMU_DGYRO_CUTOFF 70
|
||||
# Don't try to be intelligent on RC loss: just cut the motors
|
||||
param set-default NAV_RCL_ACT 6
|
||||
|
||||
# enable to use high-rate logging for better rate tracking analysis
|
||||
# param set SDLOG_PROFILE 19
|
||||
|
||||
# TELEM1 ttyS1 - Wifi module
|
||||
param set-default MAV_0_CONFIG 101
|
||||
param set-default MAV_0_RATE 0
|
||||
|
||||
@@ -75,11 +75,23 @@ param set-default SENS_BOARD_ROT 2
|
||||
|
||||
param set-default BAT1_SOURCE 0
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
#param set COM_DISARM_LAND 3
|
||||
|
||||
# Filter settings
|
||||
param set-default IMU_GYRO_CUTOFF 90
|
||||
param set-default IMU_DGYRO_CUTOFF 100
|
||||
|
||||
# Don't try to be intelligent on RC loss: just cut the motors
|
||||
#param set NAV_RCL_ACT 6
|
||||
|
||||
# enable to use high-rate logging for better rate tracking analysis
|
||||
param set-default SDLOG_PROFILE 27
|
||||
|
||||
# TELEM1 ttyS1
|
||||
#param set MAV_0_CONFIG 101
|
||||
#param set MAV_0_MODE 2 # onboard
|
||||
#param set MAV_0_RATE 20000
|
||||
#param set SER_TEL1_BAUD 921600
|
||||
|
||||
# TELEM2 ttyS2
|
||||
#param set MAV_1_CONFIG 0
|
||||
|
||||
@@ -27,21 +27,44 @@ set PWM_OUT 1234
|
||||
|
||||
|
||||
# Attitude & rate gains
|
||||
#param set MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_P 0.15
|
||||
#param set MC_ROLLRATE_I 0.9
|
||||
param set-default MC_ROLLRATE_D 0.0013
|
||||
|
||||
#param set MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_P 0.15
|
||||
#param set MC_PITCHRATE_I 1.1
|
||||
param set-default MC_PITCHRATE_D 0.0016
|
||||
|
||||
param set-default MC_YAW_P 2.8
|
||||
param set-default MC_YAWRATE_P 0.2
|
||||
#param set MC_YAWRATE_I 0.15
|
||||
param set-default MC_YAWRATE_D 0
|
||||
|
||||
#param set MC_ROLL_TC 0.19
|
||||
#param set MC_PITCH_TC 0.16
|
||||
|
||||
# Manual mode settings: Unleash Draco R's power :)
|
||||
#param set MPC_MAN_TILT_MAX 70
|
||||
#param set MC_PITCHRATE_MAX 1600
|
||||
#param set MC_ROLLRATE_MAX 1600
|
||||
#param set MC_YAWRATE_MAX 700
|
||||
param set-default MPC_MANTHR_MIN 0.08
|
||||
#param set MPC_MAN_TILT_MAX 35
|
||||
#param set MPC_TILTMAX_AIR 20
|
||||
|
||||
# Filter settings
|
||||
param set-default IMU_GYRO_CUTOFF 100
|
||||
|
||||
# Thrust curve (avoids the need for TPA)
|
||||
#param set THR_MDL_FAC 0.25
|
||||
|
||||
# Obsolete
|
||||
#param set PWM_MAIN_MAX 1950
|
||||
#param set PWM_MAIN_MIN 1100
|
||||
#param set PWM_MAIN_RATE 0
|
||||
|
||||
# Sensors
|
||||
param set-default SENS_BOARD_ROT 10
|
||||
# Yaw 180
|
||||
@@ -83,6 +106,7 @@ 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 CBRK_IO_SAFETY 22027
|
||||
param set-default COM_DISARM_LAND 2
|
||||
|
||||
# Filter settings
|
||||
@@ -91,6 +115,9 @@ param set-default IMU_GYRO_CUTOFF 90
|
||||
# Don't try to be intelligent on RC loss: just cut the motors
|
||||
param set-default NAV_RCL_ACT 6
|
||||
|
||||
# enable to use high-rate logging for better rate tracking analysis
|
||||
# param set SDLOG_PROFILE 19
|
||||
|
||||
# TELEM1 ttyS1 - Wifi module
|
||||
param set-default MAV_0_CONFIG 101
|
||||
param set-default MAV_0_RATE 0
|
||||
|
||||
@@ -38,6 +38,8 @@ param set-default MC_ACRO_R_MAX 1000
|
||||
param set-default MC_ACRO_P_MAX 1000
|
||||
param set-default MC_ACRO_Y_MAX 1000
|
||||
|
||||
# param set NAV_RCL_ACT 6 # Lockdown
|
||||
|
||||
param set-default PWM_MAIN_MIN 1075
|
||||
param set-default PWM_MAIN_RATE 400
|
||||
param set-default PWM_MAIN_DISARM 900
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
#Parameters here:
|
||||
param set LED_RGB_MAXBRT 8
|
||||
|
||||
|
||||
# Configure this as Quadrotor
|
||||
# set MAV_TYPE 14
|
||||
|
||||
@@ -189,7 +189,7 @@ param set-default CAL_ACC1_PRIO 0
|
||||
param set-default CAL_GYRO0_PRIO 255
|
||||
param set-default CAL_GYRO1_PRIO 0
|
||||
# Logger mode. Default(1) + estimator replay(2) + thermal calibration(4)
|
||||
param set-default SDLOG_PROFILE 6
|
||||
param set SDLOG_PROFILE 6
|
||||
|
||||
# Do not start frsky_telemetry on port ttyS6 by default, PGA460 lives there. 500 is in arbitrary unused number.
|
||||
param set TEL_FRSKY_CONFIG 500
|
||||
|
||||
@@ -24,6 +24,7 @@ param set-default SYS_HAS_MAG 0
|
||||
param set-default EKF2_AID_MASK 2
|
||||
param set-default EKF2_MAG_TYPE 5
|
||||
|
||||
param set-default BAT_N_CELLS 1
|
||||
param set-default BAT1_N_CELLS 1
|
||||
param set-default BAT1_SOURCE 1
|
||||
|
||||
@@ -53,6 +54,8 @@ param set-default MPC_Z_VEL_P_ACC 8
|
||||
param set-default MPC_Z_VEL_I_ACC 6
|
||||
param set-default MPC_HOLD_MAX_XY 0.1
|
||||
param set-default MPC_MAX_FLOW_HGT 3
|
||||
#param set IMU_GYRO_NF_FREQ 10
|
||||
#param set IMU_GYRO_NF_BW 20
|
||||
|
||||
param set-default NAV_RCL_ACT 3
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ param set-default GND_MAX_ANG 3.1415
|
||||
param set-default RBCLW_BAUD 8
|
||||
param set-default RBCLW_COUNTS_REV 1200
|
||||
param set-default RBCLW_ADDRESS 128
|
||||
# param set SER_TEL4_BAUD 115200
|
||||
# 104 corresponds to Telem 4
|
||||
param set-default RBCLW_SER_CFG 104
|
||||
# Start this driver after setting parameters, because the driver uses some of those parameters.
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -20,6 +20,7 @@ param set-default NAV_DLL_ACT 0
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
#param set CBRK_GPSFAIL 240024
|
||||
set MAV_TYPE 12
|
||||
param set MAV_TYPE ${MAV_TYPE}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ param set-default NAV_DLL_ACT 0
|
||||
# disable circuit breaker for airspeed sensor
|
||||
param set-default CBRK_AIRSPD_CHK 162128
|
||||
|
||||
#param set CBRK_GPSFAIL 240024
|
||||
set MAV_TYPE 12
|
||||
param set MAV_TYPE ${MAV_TYPE}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ px4_add_romfs_files(
|
||||
1001_rc_quad_x.hil
|
||||
1002_standard_vtol.hil
|
||||
1100_rc_quad_x_sih.hil
|
||||
1101_rc_plane_sih.hil
|
||||
|
||||
# [2000, 2999] Standard planes"
|
||||
2100_standard_plane
|
||||
@@ -81,7 +80,6 @@ px4_add_romfs_files(
|
||||
4052_holybro_qav250
|
||||
4053_holybro_kopis2
|
||||
4060_dji_matrice_100
|
||||
4061_atl_mantis_edu
|
||||
4071_ifo
|
||||
4072_draco
|
||||
4073_ifo-s
|
||||
|
||||
@@ -29,6 +29,12 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# USE_IO is set to 'no' for all boards w/o px4io driver or SYS_USE_IO disabled
|
||||
if [ $USE_IO = no -a $AUX_BANK2 = none ]
|
||||
then
|
||||
set AUX_MODE none
|
||||
fi
|
||||
|
||||
#
|
||||
# Set the default output mode if none was set.
|
||||
#
|
||||
@@ -70,6 +76,15 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $OUTPUT_MODE = $OUTPUT_CMD ]
|
||||
then
|
||||
if ! $OUTPUT_CMD mode_$FMU_MODE
|
||||
then
|
||||
echo "$OUTPUT_CMD start failed"
|
||||
tune_control play error
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $OUTPUT_MODE = uavcan_esc ]
|
||||
then
|
||||
if param compare UAVCAN_ENABLE 0
|
||||
@@ -83,15 +98,6 @@ then
|
||||
. ${R}etc/init.d/rc.io
|
||||
fi
|
||||
|
||||
if [ $OUTPUT_MODE = $OUTPUT_CMD -o $OUTPUT_MODE = io ]
|
||||
then
|
||||
if ! $OUTPUT_CMD start
|
||||
then
|
||||
echo "$OUTPUT_CMD start failed"
|
||||
tune_control play error
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Start IO for RC input if needed.
|
||||
#
|
||||
@@ -155,7 +161,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $MIXER_AUX != none ]
|
||||
if [ $MIXER_AUX != none -a $AUX_MODE != none ]
|
||||
then
|
||||
#
|
||||
# Load aux mixer.
|
||||
@@ -173,26 +179,34 @@ then
|
||||
|
||||
if [ $MIXER_AUX_FILE != none ]
|
||||
then
|
||||
# Append aux mixer to main device.
|
||||
if param greater SYS_HITL 0
|
||||
# Start the output module
|
||||
if $OUTPUT_CMD mode_${AUX_MODE}
|
||||
then
|
||||
if mixer append ${OUTPUT_DEV} ${MIXER_AUX_FILE}
|
||||
# Append aux mixer to main device.
|
||||
if param greater SYS_HITL 0
|
||||
then
|
||||
echo "INFO [init] Mixer: ${MIXER_AUX_FILE} appended to ${OUTPUT_DEV}"
|
||||
else
|
||||
echo "ERROR [init] Failed appending mixer: ${MIXER_AUX_FILE}"
|
||||
if mixer append ${OUTPUT_DEV} ${MIXER_AUX_FILE}
|
||||
then
|
||||
echo "INFO [init] Mixer: ${MIXER_AUX_FILE} appended to ${OUTPUT_DEV}"
|
||||
else
|
||||
echo "ERROR [init] Failed appending mixer: ${MIXER_AUX_FILE}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -e $OUTPUT_AUX_DEV -a $OUTPUT_MODE != hil ]
|
||||
then
|
||||
if mixer load ${OUTPUT_AUX_DEV} ${MIXER_AUX_FILE}
|
||||
if [ -e $OUTPUT_AUX_DEV -a $OUTPUT_MODE != hil ]
|
||||
then
|
||||
echo "INFO [init] Mixer: ${MIXER_AUX_FILE} on ${OUTPUT_AUX_DEV}"
|
||||
if mixer load ${OUTPUT_AUX_DEV} ${MIXER_AUX_FILE}
|
||||
then
|
||||
echo "INFO [init] Mixer: ${MIXER_AUX_FILE} on ${OUTPUT_AUX_DEV}"
|
||||
else
|
||||
echo "ERROR [init] Failed loading mixer: ${MIXER_AUX_FILE}"
|
||||
fi
|
||||
else
|
||||
echo "ERROR [init] Failed loading mixer: ${MIXER_AUX_FILE}"
|
||||
echo "INFO [init] setting PWM_AUX_OUT none"
|
||||
set PWM_AUX_OUT none
|
||||
fi
|
||||
else
|
||||
echo "INFO [init] setting PWM_AUX_OUT none"
|
||||
echo "ERROR: Could not start: pwm_out mode_pwm"
|
||||
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
|
||||
set PWM_AUX_OUT none
|
||||
fi
|
||||
|
||||
@@ -214,6 +228,36 @@ fi
|
||||
|
||||
param set PWM_AUX_OUT ${PWM_AUX_OUT}
|
||||
|
||||
if [ $MIXER_AUX != none -a $AUX_MODE = none -a -e $OUTPUT_AUX_DEV ]
|
||||
then
|
||||
#
|
||||
# Load aux mixer.
|
||||
#
|
||||
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER_AUX}.aux.mix ]
|
||||
then
|
||||
set MIXER_AUX_FILE ${SDCARD_MIXERS_PATH}/${MIXER_AUX}.aux.mix
|
||||
else
|
||||
|
||||
if [ -f /etc/mixers/${MIXER_AUX}.aux.mix ]
|
||||
then
|
||||
set MIXER_AUX_FILE /etc/mixers/${MIXER_AUX}.aux.mix
|
||||
fi
|
||||
fi
|
||||
|
||||
if mixer load ${OUTPUT_AUX_DEV} ${MIXER_AUX_FILE}
|
||||
then
|
||||
echo "INFO [init] Mixer: ${MIXER_AUX_FILE} on ${OUTPUT_AUX_DEV}"
|
||||
|
||||
# Set PWM_AUX output frequency.
|
||||
if [ $PWM_AUX_RATE != none ]
|
||||
then
|
||||
pwm rate -c ${PWM_AUX_OUT} -r ${PWM_AUX_RATE} -d ${OUTPUT_AUX_DEV}
|
||||
fi
|
||||
else
|
||||
echo "ERROR [init] Failed loading mixer: ${MIXER_AUX_FILE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $OUTPUT_MODE = pwm_out -o $OUTPUT_MODE = io ]
|
||||
then
|
||||
if [ $PWM_OUT != none ]
|
||||
|
||||
@@ -127,34 +127,6 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Eagle Tree airspeed sensor external I2C
|
||||
if param compare -s SENS_EN_ETSASPD 1
|
||||
then
|
||||
ets_airspeed start -X
|
||||
fi
|
||||
|
||||
# Sensirion SDP3X differential pressure sensor external I2C
|
||||
if param compare -s SENS_EN_SDP3X 1
|
||||
then
|
||||
if ! sdp3x_airspeed start -X
|
||||
then
|
||||
# try another common address
|
||||
sdp3x_airspeed start -X -a 0x22
|
||||
fi
|
||||
fi
|
||||
|
||||
# TE MS4525 differential pressure sensor external I2C
|
||||
if param compare -s SENS_EN_MS4525 1
|
||||
then
|
||||
ms4525_airspeed start -X
|
||||
fi
|
||||
|
||||
# TE MS5525 differential pressure sensor external I2C
|
||||
if param compare -s SENS_EN_MS5525 1
|
||||
then
|
||||
ms5525_airspeed start -X
|
||||
fi
|
||||
|
||||
# probe for optional external I2C devices
|
||||
if param compare SENS_EXT_I2C_PRB 1
|
||||
then
|
||||
@@ -171,6 +143,30 @@ then
|
||||
|
||||
# start last (wait for possible icm20948 passthrough mode)
|
||||
ak09916 -X -q start
|
||||
|
||||
# differential pressure sensors
|
||||
if [ ${VEHICLE_TYPE} = fw -o ${VEHICLE_TYPE} = vtol ]
|
||||
then
|
||||
# Always try to start the airspeed sensors
|
||||
# even if their usage might be disabled
|
||||
sdp3x_airspeed start -X -q
|
||||
sdp3x_airspeed start -X -a 0x22 -q
|
||||
|
||||
# Pixhawk 2.1 has a MS5611 on I2C which gets wrongly
|
||||
# detected as MS5525 because the chip manufacturer was so
|
||||
# clever to assign the same I2C address and skip a WHO_AM_I
|
||||
# register.
|
||||
if [ $BOARD_FMUV3 = 21 ]
|
||||
then
|
||||
ms5525_airspeed start -X -b 2 -q
|
||||
else
|
||||
ms5525_airspeed start -X -q
|
||||
fi
|
||||
|
||||
ms4525_airspeed start -X -q
|
||||
|
||||
ets_airspeed start -X -q
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -22,8 +22,10 @@ set +e
|
||||
#
|
||||
set R /
|
||||
set AUTOCNF no
|
||||
set AUX_MODE pwm
|
||||
set FCONFIG /fs/microsd/etc/config.txt
|
||||
set FEXTRAS /fs/microsd/etc/extras.txt
|
||||
set FMU_MODE pwm
|
||||
set FRC /fs/microsd/etc/rc.txt
|
||||
set IOFW "/etc/extras/px4_io-v2_default.bin"
|
||||
set IO_PRESENT no
|
||||
@@ -49,6 +51,11 @@ set STARTUP_TUNE 1
|
||||
set USE_IO no
|
||||
set VEHICLE_TYPE none
|
||||
|
||||
#
|
||||
# Mount the procfs.
|
||||
#
|
||||
mount -t procfs /proc
|
||||
|
||||
#
|
||||
# Start CDC/ACM serial driver.
|
||||
#
|
||||
@@ -62,43 +69,8 @@ ver all
|
||||
#
|
||||
# Try to mount the microSD card.
|
||||
#
|
||||
set SDCARD_AVAILABLE no
|
||||
# REBOOTWORK this needs to start after the flight control loop.
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
set PX4_INIT_TEST_FILE "/fs/microsd/.px4_init_test_file"
|
||||
date >> $PX4_INIT_TEST_FILE
|
||||
|
||||
if [ -f $PX4_INIT_TEST_FILE ]
|
||||
then
|
||||
cat $PX4_INIT_TEST_FILE
|
||||
rm $PX4_INIT_TEST_FILE
|
||||
|
||||
if [ ! -f $PX4_INIT_TEST_FILE ]
|
||||
then
|
||||
set SDCARD_AVAILABLE yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SDCARD_AVAILABLE = no ]
|
||||
then
|
||||
set STARTUP_TUNE 14 # tune 14 = SD_INIT
|
||||
if mkfatfs -F 32 /dev/mmcsd0
|
||||
then
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
set SDCARD_AVAILABLE yes
|
||||
echo "INFO [init] card formatted"
|
||||
|
||||
else
|
||||
set STARTUP_TUNE 15 # tune 15 = SD_ERROR
|
||||
echo "ERROR [init] format failed"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
then
|
||||
if hardfault_log check
|
||||
then
|
||||
@@ -109,8 +81,20 @@ then
|
||||
hardfault_log reset
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# tune SD_INIT
|
||||
set STARTUP_TUNE 14 # tune 14 = SD_INIT
|
||||
if mkfatfs /dev/mmcsd0
|
||||
then
|
||||
if mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
then
|
||||
echo "INFO [init] card formatted"
|
||||
else
|
||||
set STARTUP_TUNE 15 # tune 15 = SD_ERROR
|
||||
echo "ERROR [init] format failed"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
unset SDCARD_AVAILABLE
|
||||
|
||||
#
|
||||
# Look for an init script on the microSD card.
|
||||
@@ -144,7 +128,7 @@ else
|
||||
then
|
||||
param reset_all
|
||||
fi
|
||||
if ver hwcmp PX4_FMU_V5X PX4_FMU_V6X
|
||||
if ver hwtypecmp V5X00 V5X90 V5Xa0
|
||||
then
|
||||
netman update -i eth0
|
||||
fi
|
||||
@@ -374,9 +358,52 @@ else
|
||||
commander start
|
||||
fi
|
||||
|
||||
# Sensors on the PWM interface bank.
|
||||
if param compare -s SENS_EN_LL40LS 1
|
||||
then
|
||||
# Clear pins 5 and 6.
|
||||
set FMU_MODE pwm4
|
||||
set AUX_MODE pwm4
|
||||
fi
|
||||
|
||||
|
||||
# Check if ATS is enabled
|
||||
if param compare FD_EXT_ATS_EN 1
|
||||
then
|
||||
# Clear pins 5 and 6.
|
||||
set FMU_MODE pwm4
|
||||
set AUX_MODE pwm4
|
||||
fi
|
||||
|
||||
if param greater -s TRIG_MODE 0
|
||||
then
|
||||
if param compare TRIG_PINS_EX 0
|
||||
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
|
||||
else
|
||||
if param compare TRIG_PINS_EX 12288
|
||||
then
|
||||
set FMU_MODE pwm12
|
||||
set AUX_MODE pwm12
|
||||
fi
|
||||
fi
|
||||
|
||||
camera_trigger start
|
||||
camera_feedback start
|
||||
fi
|
||||
@@ -404,7 +431,14 @@ else
|
||||
rc_input start $RC_INPUT_ARGS
|
||||
fi
|
||||
|
||||
# Camera capture driver (before pwm_out)
|
||||
#
|
||||
# Configure vehicle type specific parameters.
|
||||
# Note: rc.vehicle_setup is the entry point for rc.interface,
|
||||
# rc.fw_apps, rc.mc_apps, rc.rover_apps, and rc.vtol_apps.
|
||||
#
|
||||
. ${R}etc/init.d/rc.vehicle_setup
|
||||
|
||||
# Camera capture driver
|
||||
if param greater -s CAM_CAP_FBACK 0
|
||||
then
|
||||
if camera_capture start
|
||||
@@ -413,13 +447,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Configure vehicle type specific parameters.
|
||||
# Note: rc.vehicle_setup is the entry point for rc.interface,
|
||||
# rc.fw_apps, rc.mc_apps, rc.rover_apps, and rc.vtol_apps.
|
||||
#
|
||||
. ${R}etc/init.d/rc.vehicle_setup
|
||||
|
||||
#
|
||||
# Start the navigator.
|
||||
#
|
||||
@@ -519,8 +546,10 @@ fi
|
||||
#
|
||||
unset R
|
||||
unset AUTOCNF
|
||||
unset AUX_MODE
|
||||
unset FCONFIG
|
||||
unset FEXTRAS
|
||||
unset FMU_MODE
|
||||
unset FRC
|
||||
unset IO_PRESENT
|
||||
unset IOFW
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Aileron/rudder/elevator/throttle mixer for PX4FMU
|
||||
==================================================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
TF-G2 autogyro mixer
|
||||
==================================================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Viper Delta-wing mixer
|
||||
=================================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Designed for Viper.
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# CruiseAder Claire Main Multirotor mixer for PX4FMU
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
#
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Delta-wing mixer for PX4FMU
|
||||
===========================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
This file defines mixers suitable for controlling a delta wing aircraft using
|
||||
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# Direct mixer
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
A: 0
|
||||
A: 1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Octo coaxial with wide arms
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
R: 8cw
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Delta-wing VTOL mixer
|
||||
=====================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
This file defines mixers suitable for controlling a delta wing VTOL aircraft using
|
||||
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Tailsitter duo mixer
|
||||
============================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
This file defines a mixer for a generic duo tailsitter VTOL (eg TBS Caipirinha tailsitter edition). This vehicle
|
||||
has two motors in total, one attached to each wing. It also has two elevons which
|
||||
|
||||
@@ -5,70 +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)
|
||||
|
||||
if "\n" in line:
|
||||
current_time = datetime.datetime.now()
|
||||
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
|
||||
else:
|
||||
print('{0}'.format(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()
|
||||
|
||||
return_code = 0
|
||||
|
||||
while True:
|
||||
while finished == 0:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if len(serial_line) > 0:
|
||||
if "ERROR" in serial_line:
|
||||
return_code = -1
|
||||
|
||||
print_line(serial_line)
|
||||
if (len(serial_line) > 0):
|
||||
print(serial_line.replace('\n', ''))
|
||||
|
||||
if "NuttShell (NSH)" in serial_line:
|
||||
sys.exit(return_code)
|
||||
elif "nsh>" in serial_line:
|
||||
sys.exit(return_code)
|
||||
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 = 30 # 30 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
-82
@@ -6,116 +6,71 @@ 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)
|
||||
|
||||
if "\n" in line:
|
||||
current_time = datetime.datetime.now()
|
||||
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
|
||||
else:
|
||||
print('{0}'.format(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.2, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 30 # 30 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
|
||||
|
||||
return_code = 0
|
||||
timeout = 30 # 30 seconds
|
||||
|
||||
while True:
|
||||
serial_line = ser.readline().decode("ascii", errors='ignore')
|
||||
|
||||
if success_cmd in serial_line:
|
||||
sys.exit(return_code)
|
||||
break
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
if "ERROR " in serial_line:
|
||||
return_code = -1
|
||||
|
||||
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:
|
||||
|
||||
+50
-89
@@ -8,61 +8,12 @@ import re
|
||||
import unittest
|
||||
import os
|
||||
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)
|
||||
|
||||
if "\n" in line:
|
||||
current_time = datetime.datetime.now()
|
||||
print('[{0}] {1}'.format(current_time.isoformat(timespec='milliseconds'), line), end='')
|
||||
else:
|
||||
print('{0}'.format(line), end='')
|
||||
|
||||
def do_test(port, baudrate, test_name):
|
||||
ser = serial.Serial(port, baudrate, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=0.2, xonxoff=True, rtscts=False, dsrdtr=False)
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 30 # 30 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(serial_line, end='')
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout waiting for prompt")
|
||||
return False
|
||||
|
||||
# clear
|
||||
ser.readlines()
|
||||
databits = serial.EIGHTBITS
|
||||
stopbits = serial.STOPBITS_ONE
|
||||
parity = serial.PARITY_NONE
|
||||
ser = serial.Serial(port, baudrate, databits, parity, stopbits, timeout=1)
|
||||
|
||||
success = False
|
||||
|
||||
@@ -71,38 +22,48 @@ def do_test(port, baudrate, test_name):
|
||||
cmd = 'tests ' + test_name
|
||||
print("| Running:", cmd)
|
||||
print('|======================================================================')
|
||||
|
||||
timeout_start = time.time()
|
||||
timeout = 2 # 2 seconds
|
||||
timeout = 10 # 10 seconds
|
||||
|
||||
# clear
|
||||
ser.write("\n".encode("ascii"))
|
||||
ser.flush()
|
||||
ser.readline()
|
||||
|
||||
# wait for command echo
|
||||
serial_cmd = '{0}\n'.format(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
|
||||
else:
|
||||
if len(serial_line) > 0:
|
||||
print_line(serial_line)
|
||||
# TODO: retry command
|
||||
# while True:
|
||||
# serial_cmd = '{0}\n'.format(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.replace('\n', ''))
|
||||
|
||||
# if time.time() > timeout_start + timeout:
|
||||
# print("Error, unable to write cmd")
|
||||
# return False
|
||||
|
||||
# time.sleep(1)
|
||||
|
||||
|
||||
# print results, wait for final result (PASSED or FAILED)
|
||||
timeout = 300 # 5 minutes
|
||||
timeout = 180 # 3 minutes
|
||||
timeout_start = time.time()
|
||||
timeout_newline = timeout_start
|
||||
|
||||
while True:
|
||||
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, end='')
|
||||
|
||||
if test_name + " PASSED" in serial_line:
|
||||
success = True
|
||||
@@ -113,7 +74,7 @@ def do_test(port, baudrate, test_name):
|
||||
|
||||
if time.time() > timeout_start + timeout:
|
||||
print("Error, timeout")
|
||||
print(test_name + f" {COLOR_RED}FAILED{COLOR_RESET}")
|
||||
print(test_name + " FAILED")
|
||||
success = False
|
||||
break
|
||||
|
||||
@@ -142,30 +103,15 @@ class TestHardwareMethods(unittest.TestCase):
|
||||
def test_bson(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "bson"))
|
||||
|
||||
def test_conv(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "conv"))
|
||||
# def test_dataman(self):
|
||||
# self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "dataman"))
|
||||
|
||||
def test_dataman(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "dataman"))
|
||||
|
||||
# def test_file(self):
|
||||
# self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "file"))
|
||||
|
||||
def test_file2(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "file2"))
|
||||
|
||||
def test_float(self):
|
||||
def floattest_float(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "float"))
|
||||
|
||||
def test_hrt(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "hrt"))
|
||||
|
||||
def test_int(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "int"))
|
||||
|
||||
def test_i2c_spi_cli(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "i2c_spi_cli"))
|
||||
|
||||
def test_IntrusiveQueue(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "IntrusiveQueue"))
|
||||
|
||||
@@ -181,6 +127,21 @@ class TestHardwareMethods(unittest.TestCase):
|
||||
def test_matrix(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "matrix"))
|
||||
|
||||
def test_microbench_atomic(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_atomic"))
|
||||
|
||||
def test_microbench_hrt(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_hrt"))
|
||||
|
||||
def test_microbench_math(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_math"))
|
||||
|
||||
def test_microbench_matrix(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_matrix"))
|
||||
|
||||
def test_microbench_uorb(self):
|
||||
self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "microbench_uorb"))
|
||||
|
||||
# def test_mixer(self):
|
||||
# self.assertTrue(do_test(self.TEST_DEVICE, self.TEST_BAUDRATE, "mixer"))
|
||||
|
||||
|
||||
@@ -12,16 +12,16 @@ exec find boards msg src platforms test \
|
||||
-path platforms/nuttx/NuttX -prune -o \
|
||||
-path platforms/qurt/dspal -prune -o \
|
||||
-path src/drivers/uavcan/libuavcan -prune -o \
|
||||
-path src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis -prune -o \
|
||||
-path src/drivers/uavcan_v1/libcanard -prune -o \
|
||||
-path src/drivers/uavcannode_gps_demo/libcanard -prune -o \
|
||||
-path src/lib/crypto/monocypher -prune -o \
|
||||
-path src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis -prune -o \
|
||||
-path src/lib/ecl -prune -o \
|
||||
-path src/lib/events/libevents -prune -o \
|
||||
-path src/lib/matrix -prune -o \
|
||||
-path src/lib/parameters/uthash -prune -o \
|
||||
-path src/modules/ekf2/EKF -prune -o \
|
||||
-path src/modules/gyro_fft/CMSIS_5 -prune -o \
|
||||
-path src/modules/micrortps_bridge/micro-CDR -prune -o \
|
||||
-path src/modules/micrortps_bridge/microRTPS_client -prune -o \
|
||||
-path test/mavsdk_tests/catch2 -prune -o \
|
||||
-path src/lib/crypto/monocypher -prune -o \
|
||||
-type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) | grep $PATTERN
|
||||
|
||||
+7
-4
@@ -4,16 +4,19 @@ if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
echo "guessing PX4_DOCKER_REPO based on input";
|
||||
if [[ $@ =~ .*px4_fmu.* ]]; then
|
||||
# nuttx-px4fmu-v{1,2,3,4,5}
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-09-08"
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-05-04"
|
||||
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*pilotpi.default ]]; then
|
||||
# beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, scumaker_pilotpi_default
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-08-18"
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-02-04"
|
||||
elif [[ $@ =~ .*pilotpi.arm64 ]]; then
|
||||
# scumaker_pilotpi_arm64
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-aarch64:latest"
|
||||
elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then
|
||||
# eagle, excelsior
|
||||
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
||||
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*bebop.* ]]; then
|
||||
# posix_rpi_cross, posix_bebop_default
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-08-18"
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-02-04"
|
||||
elif [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
|
||||
# clang tools
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-clang:2021-02-04"
|
||||
@@ -27,7 +30,7 @@ fi
|
||||
|
||||
# otherwise default to nuttx
|
||||
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-09-08"
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-05-04"
|
||||
fi
|
||||
|
||||
# docker hygiene
|
||||
|
||||
@@ -86,15 +86,8 @@ sleep 1
|
||||
|
||||
source ${src_path}/Tools/setup_gazebo.bash ${src_path} ${src_path}/build/${target}
|
||||
|
||||
# To use gazebo_ros ROS2 plugins
|
||||
if [[ -n "$ROS_VERSION" ]] && [ "$ROS_VERSION" == "2" ]; then
|
||||
ros_args="-s libgazebo_ros_init.so -s libgazebo_ros_factory.so"
|
||||
else
|
||||
ros_args=""
|
||||
fi
|
||||
|
||||
echo "Starting gazebo"
|
||||
gzserver ${src_path}/Tools/sitl_gazebo/worlds/${world}.world --verbose $ros_args &
|
||||
gzserver ${src_path}/Tools/sitl_gazebo/worlds/${world}.world --verbose &
|
||||
sleep 5
|
||||
|
||||
n=0
|
||||
|
||||
+1
-1
Submodule Tools/jMAVSim updated: 0a5375a706...0a816d8100
@@ -10,7 +10,7 @@ extra_args=
|
||||
baudrate=921600
|
||||
device=
|
||||
ip="127.0.0.1"
|
||||
while getopts ":b:d:p:qsr:f:i:loa" opt; do
|
||||
while getopts ":b:d:p:qsr:f:i:lo" opt; do
|
||||
case $opt in
|
||||
b)
|
||||
baudrate=$OPTARG
|
||||
@@ -39,9 +39,6 @@ while getopts ":b:d:p:qsr:f:i:loa" opt; do
|
||||
o)
|
||||
extra_args="$extra_args -disponly"
|
||||
;;
|
||||
a)
|
||||
extra_args="$extra_args -fw" # aircraft
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
|
||||
@@ -13,7 +13,6 @@ import datetime
|
||||
from timeit import default_timer as timer
|
||||
os.environ['MAVLINK20'] = '1' # The commands require mavlink 2
|
||||
from argparse import ArgumentParser
|
||||
import signal
|
||||
|
||||
try:
|
||||
from pymavlink import mavutil
|
||||
@@ -25,8 +24,6 @@ except ImportError as e:
|
||||
print("")
|
||||
sys.exit(1)
|
||||
|
||||
class LoggingCompleted(Exception):
|
||||
pass
|
||||
|
||||
class MavlinkLogStreaming():
|
||||
'''Streams log data via MAVLink.
|
||||
@@ -52,7 +49,6 @@ class MavlinkLogStreaming():
|
||||
self.logging_started = False
|
||||
self.num_dropouts = 0
|
||||
self.target_component = 1
|
||||
self.got_sig_int = False
|
||||
|
||||
def debug(self, s, level=1):
|
||||
'''write some debug text'''
|
||||
@@ -71,24 +67,13 @@ class MavlinkLogStreaming():
|
||||
mavutil.mavlink.MAV_CMD_LOGGING_STOP, 0,
|
||||
0, 0, 0, 0, 0, 0, 0)
|
||||
|
||||
def _int_handler(self, sig, frame):
|
||||
self.got_sig_int = True
|
||||
|
||||
def read_messages(self):
|
||||
''' main loop reading messages '''
|
||||
measure_time_start = timer()
|
||||
measured_data = 0
|
||||
|
||||
next_heartbeat_time = timer()
|
||||
old_handler = signal.signal(signal.SIGINT, self._int_handler)
|
||||
|
||||
while True:
|
||||
if self.got_sig_int:
|
||||
signal.signal(signal.SIGINT, old_handler)
|
||||
self.got_sig_int = False
|
||||
print('\nStopping log...')
|
||||
self.stop_log()
|
||||
# Continue reading until we get an ACK
|
||||
|
||||
# handle heartbeat sending
|
||||
heartbeat_time = timer()
|
||||
@@ -135,9 +120,6 @@ class MavlinkLogStreaming():
|
||||
print('Logging started. Waiting for Header...')
|
||||
else:
|
||||
raise Exception('Logging start failed', m.result)
|
||||
elif m.command == mavutil.mavlink.MAV_CMD_LOGGING_STOP and \
|
||||
m.result == mavutil.mavlink.MAV_RESULT_ACCEPTED:
|
||||
raise LoggingCompleted()
|
||||
return None, 0, 0
|
||||
|
||||
# m is either 'LOGGING_DATA_ACKED' or 'LOGGING_DATA':
|
||||
@@ -155,8 +137,7 @@ class MavlinkLogStreaming():
|
||||
|
||||
if m.get_type() == 'LOGGING_DATA':
|
||||
if not self.got_header_section:
|
||||
print('Header received in {:0.2f}s (size: {:.1f} KB)'.format(
|
||||
timer()-self.start_time, self.file.tell()/1024))
|
||||
print('Header received in {:0.2f}s'.format(timer()-self.start_time))
|
||||
self.logging_started = True
|
||||
self.got_header_section = True
|
||||
self.last_sequence = m.sequence
|
||||
@@ -275,10 +256,14 @@ def main():
|
||||
print('Starting log...')
|
||||
mav_log_streaming.start_log()
|
||||
mav_log_streaming.read_messages()
|
||||
|
||||
print('Stopping log')
|
||||
mav_log_streaming.stop_log()
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print('Aborting')
|
||||
except LoggingCompleted:
|
||||
print('Done')
|
||||
print('Stopping log')
|
||||
mav_log_streaming.stop_log()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -5,52 +5,17 @@ import html
|
||||
|
||||
class MarkdownTablesOutput():
|
||||
def __init__(self, groups, board, image_path):
|
||||
result = """# Airframes Reference
|
||||
result = ("# Airframes Reference\n"
|
||||
"> **Note** **This list is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/master/Tools/px4airframes/markdownout.py) from the source code**.\n"
|
||||
"> \n"
|
||||
"> **AUX** channels may not be present on some flight controllers.\n"
|
||||
"> If present, PWM AUX channels are commonly labelled **AUX OUT**.\n"
|
||||
"> \n"
|
||||
"\n")
|
||||
|
||||
:::note
|
||||
**This list is [auto-generated](https://github.com/PX4/PX4-Autopilot/blob/master/Tools/px4airframes/markdownout.py) from the source code** using the build command: `make airframe_metadata`.
|
||||
:::
|
||||
|
||||
This page lists all supported airframes and types including the motor assignment and numbering.
|
||||
The motors in **green** rotate clockwise, the ones in **blue** counterclockwise.
|
||||
|
||||
**AUX** channels may not be present on some flight controllers.
|
||||
If present, PWM AUX channels are commonly labelled **AUX OUT**.
|
||||
|
||||
<style>
|
||||
div.frame_common table, div.frame_common table {
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
div.frame_common table {
|
||||
float: right;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
div.frame_common img {
|
||||
max-height: 180px;
|
||||
width: 29%;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
div.frame_variant table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.frame_variant th:nth-child(1) {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
div.frame_variant tr > * {
|
||||
vertical-align : top;
|
||||
}
|
||||
|
||||
div.frame_variant td, div.frame_variant th {
|
||||
text-align : left;
|
||||
}
|
||||
</style>\n\n"""
|
||||
result += """This page lists all supported airframes and types including
|
||||
the motor assignment and numbering. The motors in **green** rotate clockwise,
|
||||
the ones in **blue** counterclockwise.\n\n"""
|
||||
|
||||
type_set = set()
|
||||
|
||||
@@ -66,9 +31,9 @@ div.frame_variant td, div.frame_variant th {
|
||||
|
||||
# Display an image of the frame
|
||||
image_name = group.GetImageName()
|
||||
result += '<div class="frame_common">\n'
|
||||
result += '<div>\n'
|
||||
image_name = image_path + image_name
|
||||
result += '<img src="%s.svg"/>\n' % (image_name)
|
||||
result += '<img src="%s.svg" width="29%%" style="max-height: 180px;"/>\n' % (image_name)
|
||||
|
||||
# check if all outputs are equal for the group: if so, show them
|
||||
# only once
|
||||
@@ -98,18 +63,19 @@ div.frame_variant td, div.frame_variant th {
|
||||
outputs_prev[i] = ''
|
||||
|
||||
if outputs_match[0] or outputs_match[1]:
|
||||
result += '<table>\n'
|
||||
result += '<table style="float: right; width: 70%; font-size:1.5rem;">\n'
|
||||
result += ' <colgroup><col></colgroup>\n'
|
||||
result += ' <thead>\n'
|
||||
result += ' <tr><th>Common Outputs</th></tr>\n'
|
||||
result += ' </thead>\n'
|
||||
result += ' <tbody>\n'
|
||||
result += '<tr>\n <td><ul>%s%s</ul></td>\n</tr>\n' % (outputs_prev[0], outputs_prev[1])
|
||||
result += '<tbody>\n'
|
||||
result += '<tr>\n <td style="vertical-align: top;"><ul>%s%s</ul></td>\n</tr>\n' % (outputs_prev[0], outputs_prev[1])
|
||||
result += '</tbody></table>\n'
|
||||
|
||||
result += '</div>\n\n'
|
||||
|
||||
result += '<div class="frame_variant">\n'
|
||||
result += '<table>\n'
|
||||
result += '<table style="width: 100%; table-layout:fixed; font-size:1.5rem;">\n'
|
||||
result += ' <colgroup><col style="width: 30%"><col style="width: 70%"></colgroup>\n'
|
||||
result += ' <thead>\n'
|
||||
result += ' <tr><th>Name</th><th></th></tr>\n'
|
||||
result += ' </thead>\n'
|
||||
@@ -124,12 +90,10 @@ div.frame_variant td, div.frame_variant th {
|
||||
maintainer = param.GetMaintainer()
|
||||
maintainer_entry = ''
|
||||
if maintainer != '':
|
||||
maintainer_entry = 'Maintainer: %s' % (html.escape(maintainer))
|
||||
maintainer_entry = '<p>Maintainer: %s</p>' % (html.escape(maintainer))
|
||||
url = param.GetFieldValue('url')
|
||||
name_anchor='%s_%s_%s' % (group.GetClass(),group.GetName(),name)
|
||||
name_anchor='id="%s_%s_%s"' % (group.GetClass(),group.GetName(),name)
|
||||
name_anchor=name_anchor.replace(' ','_').lower()
|
||||
name_anchor=name_anchor.replace('"','_').lower()
|
||||
name_anchor='id="%s"' % name_anchor
|
||||
name_entry = name
|
||||
if url != '':
|
||||
name_entry = '<a href="%s">%s</a>' % (url, name)
|
||||
@@ -156,13 +120,13 @@ div.frame_variant td, div.frame_variant th {
|
||||
else:
|
||||
outputs_entry = ''
|
||||
|
||||
result += ('<tr %s>\n <td>%s</td>\n <td>%s%s%s</td>\n</tr>\n' %
|
||||
result += ('<tr %s>\n <td style="vertical-align: top;">%s</td>\n <td style="vertical-align: top;">%s%s%s</td>\n\n</tr>\n' %
|
||||
(name_anchor, name_entry, maintainer_entry, airframe_id_entry,
|
||||
outputs_entry))
|
||||
|
||||
|
||||
#Close the table.
|
||||
result += '</tbody>\n</table>\n</div>\n\n'
|
||||
result += '</tbody></table>\n\n'
|
||||
|
||||
self.output = result
|
||||
|
||||
|
||||
@@ -221,8 +221,7 @@ class SourceParser(object):
|
||||
else:
|
||||
raise Exception("Could not extract event ID from {:}".format(args_split[0]))
|
||||
event.name = event_name
|
||||
# unescape \x, to treat the string the same as the C++ compiler
|
||||
event.message = args_split[2][1:-1].encode("utf-8").decode('unicode_escape')
|
||||
event.message = args_split[2][1:-1]
|
||||
elif call in ['reporter.healthFailure', 'reporter.armingCheckFailure']:
|
||||
assert len(args_split) == num_args + 5, \
|
||||
"Unexpected Number of arguments for: {:}, {:}".format(args_split, num_args)
|
||||
|
||||
+8
-37
@@ -682,28 +682,7 @@ class uploader(object):
|
||||
|
||||
return True
|
||||
|
||||
def send_protocol_splitter_format(self, data):
|
||||
# Header Structure:
|
||||
# bits: 1 2 3 4 5 6 7 8
|
||||
# header[0] - | Magic | (='S')
|
||||
# header[1] - |T| LenH | (T - 0: mavlink; 1: rtps)
|
||||
# header[2] - | LenL |
|
||||
# header[3] - | Checksum |
|
||||
|
||||
MAGIC = 83
|
||||
|
||||
len_bytes = len(data).to_bytes(2, "big")
|
||||
LEN_H = len_bytes[0] & 127
|
||||
LEN_L = len_bytes[1] & 255
|
||||
CHECKSUM = MAGIC ^ LEN_H ^ LEN_L
|
||||
|
||||
header_ints = [MAGIC, LEN_H, LEN_L, CHECKSUM]
|
||||
header_bytes = struct.pack("{}B".format(len(header_ints)), *header_ints)
|
||||
|
||||
self.__send(header_bytes)
|
||||
self.__send(data)
|
||||
|
||||
def send_reboot(self, use_protocol_splitter_format=False):
|
||||
def send_reboot(self):
|
||||
if (not self.__next_baud_flightstack()):
|
||||
return False
|
||||
|
||||
@@ -714,19 +693,15 @@ class uploader(object):
|
||||
print("If the board does not respond, unplug and re-plug the USB connector.", file=sys.stderr)
|
||||
|
||||
try:
|
||||
send_fct = self.__send
|
||||
if use_protocol_splitter_format:
|
||||
send_fct = self.send_protocol_splitter_format
|
||||
|
||||
# try MAVLINK command first
|
||||
self.port.flush()
|
||||
send_fct(uploader.MAVLINK_REBOOT_ID1)
|
||||
send_fct(uploader.MAVLINK_REBOOT_ID0)
|
||||
self.__send(uploader.MAVLINK_REBOOT_ID1)
|
||||
self.__send(uploader.MAVLINK_REBOOT_ID0)
|
||||
# then try reboot via NSH
|
||||
send_fct(uploader.NSH_INIT)
|
||||
send_fct(uploader.NSH_REBOOT_BL)
|
||||
send_fct(uploader.NSH_INIT)
|
||||
send_fct(uploader.NSH_REBOOT)
|
||||
self.__send(uploader.NSH_INIT)
|
||||
self.__send(uploader.NSH_REBOOT_BL)
|
||||
self.__send(uploader.NSH_INIT)
|
||||
self.__send(uploader.NSH_REBOOT)
|
||||
self.port.flush()
|
||||
self.port.baudrate = self.baudrate_bootloader
|
||||
except Exception:
|
||||
@@ -751,13 +726,9 @@ def main():
|
||||
parser.add_argument('--baud-flightstack', action="store", default="57600", help="Comma-separated list of baud rate of the serial port (default is 57600) when communicating with flight stack (Mavlink or NSH), only required for true serial ports.")
|
||||
parser.add_argument('--force', action='store_true', default=False, help='Override board type check, or silicon errata checks and continue loading')
|
||||
parser.add_argument('--boot-delay', type=int, default=None, help='minimum boot delay to store in flash')
|
||||
parser.add_argument('--use-protocol-splitter-format', action='store_true', help='use protocol splitter format for reboot')
|
||||
parser.add_argument('firmware', action="store", help="Firmware file to be uploaded")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.use_protocol_splitter_format:
|
||||
print("Using protocol splitter format to reboot pixhawk!")
|
||||
|
||||
# warn people about ModemManager which interferes badly with Pixhawk
|
||||
if os.path.exists("/usr/sbin/ModemManager"):
|
||||
print("==========================================================================================================")
|
||||
@@ -859,7 +830,7 @@ def main():
|
||||
|
||||
except Exception:
|
||||
|
||||
if not up.send_reboot(args.use_protocol_splitter_format):
|
||||
if not up.send_reboot():
|
||||
break
|
||||
|
||||
# wait for the reboot, without we might run into Serial I/O Error 5
|
||||
|
||||
Executable → Regular
@@ -1,7 +1,5 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
## Bash script to setup PX4 development environment on Ubuntu LTS (20.04, 18.04, 16.04).
|
||||
## Can also be used in docker.
|
||||
##
|
||||
@@ -195,7 +193,7 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
||||
java_version=11
|
||||
gazebo_version=9
|
||||
elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
java_version=13
|
||||
java_version=14
|
||||
gazebo_version=11
|
||||
else
|
||||
java_version=14
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Setup environment to make PX4 visible to Gazebo.
|
||||
#
|
||||
# Note, this is not necessary if using a ROS catkin workspace with the px4
|
||||
# package as the paths are exported.
|
||||
#
|
||||
# License: according to LICENSE.md in the root directory of the PX4 Firmware repository
|
||||
|
||||
if [ "$#" != 2 ]; then
|
||||
echo -e "usage: source setup_gazebo.bash src_dir build_dir\n"
|
||||
return 1
|
||||
fi
|
||||
|
||||
SRC_DIR=$1
|
||||
BUILD_DIR=$2
|
||||
|
||||
# setup Gazebo env and update package path
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${SRC_DIR}/build/px4_sitl_default/build_ign_gazebo
|
||||
export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=$IGN_GAZEBO_SYSTEM_PLUGIN_PATH:${SRC_DIR}/build/px4_sitl_default/build_ign_gazebo
|
||||
export IGN_GAZEBO_RESOURCE_PATH=$IGN_GAZEBO_RESOURCE_PATH:${SRC_DIR}/Tools/simulation-ignition/models
|
||||
|
||||
echo -e "LD_LIBRARY_PATH $LD_LIBRARY_PATH"
|
||||
Submodule Tools/simulation-ignition deleted from e78ad94a4f
+1
-1
Submodule Tools/sitl_gazebo updated: 53d606b32f...1f3f1b1dec
+1
-17
@@ -56,13 +56,6 @@ else
|
||||
follow_mode=""
|
||||
fi
|
||||
|
||||
# To use gazebo_ros ROS2 plugins
|
||||
if [[ -n "$ROS_VERSION" ]] && [ "$ROS_VERSION" == "2" ]; then
|
||||
ros_args="-s libgazebo_ros_init.so -s libgazebo_ros_factory.so"
|
||||
else
|
||||
ros_args=""
|
||||
fi
|
||||
|
||||
if [ "$program" == "jmavsim" ]; then
|
||||
jmavsim_pid=`ps aux | grep java | grep "\-jar jmavsim_run.jar" | awk '{ print $2 }'`
|
||||
if [ -n "$jmavsim_pid" ]; then
|
||||
@@ -140,7 +133,7 @@ elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]; then
|
||||
world_path="$PX4_SITL_WORLD"
|
||||
fi
|
||||
fi
|
||||
gzserver $verbose $world_path $ros_args &
|
||||
gzserver $verbose $world_path &
|
||||
SIM_PID=$!
|
||||
|
||||
# Check all paths in ${GAZEBO_MODEL_PATH} for specified model
|
||||
@@ -184,15 +177,6 @@ elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]; then
|
||||
echo "You need to have gazebo simulator installed!"
|
||||
exit 1
|
||||
fi
|
||||
elif [ "$program" == "ignition" ] && [ -z "$no_sim" ]; then
|
||||
echo "Ignition Gazebo"
|
||||
if [[ -n "$HEADLESS" ]]; then
|
||||
ignition_headless="-s"
|
||||
else
|
||||
ignition_headless=""
|
||||
fi
|
||||
source "$src_path/Tools/setup_ignition.bash" "${src_path}" "${build_path}"
|
||||
ign gazebo ${verbose} ${ignition_headless} -r "${src_path}/Tools/simulation-ignition/worlds/${model}.world"&
|
||||
elif [ "$program" == "flightgear" ] && [ -z "$no_sim" ]; then
|
||||
echo "FG setup"
|
||||
cd "${src_path}/Tools/flightgear_bridge/"
|
||||
|
||||
@@ -23,7 +23,7 @@ parser.add_argument('-e', '--exclude-path', action='append',
|
||||
help='Excluded path(s), can be specified multiple times',
|
||||
default=[])
|
||||
parser.add_argument('--merge-depends', action='store_true',
|
||||
help='Merge library topics in the modules that depend on them.')
|
||||
help='Merge library topics inte the modules that depend on them.')
|
||||
parser.add_argument('-v','--verbosity', action='count',
|
||||
help='increase output verbosity; primarily for debugging; repeat for more detail',
|
||||
default=0)
|
||||
@@ -422,7 +422,6 @@ class Graph(object):
|
||||
found_module_def = False
|
||||
found_module_depends = False
|
||||
found_library_def = False
|
||||
scope_added = False
|
||||
for line in datafile:
|
||||
if 'px4_add_module' in line: # must contain 'px4_add_module'
|
||||
found_module_def = True
|
||||
@@ -433,7 +432,6 @@ class Graph(object):
|
||||
library_name = tokens[1].split()[0].strip().rstrip(')')
|
||||
library_scope = LibraryScope(library_name)
|
||||
self._current_scope.append(library_scope)
|
||||
scope_added = True
|
||||
self._found_libraries[library_name] = library_scope
|
||||
if self._in_scope():
|
||||
log.debug(' >> found library: ' + library_name)
|
||||
@@ -445,18 +443,16 @@ class Graph(object):
|
||||
elif found_module_depends:
|
||||
# two tabs is a *sketchy* heuristic -- spacing isn't guaranteed by cmake;
|
||||
# ... but the hard-tabs *is* specified by PX4 coding standards, so it's likely to be consistent
|
||||
if line.startswith('\t\t') and not line.strip().startswith('#'):
|
||||
if line.startswith('\t\t'):
|
||||
depends = [dep.strip() for dep in line.split()]
|
||||
for name in depends:
|
||||
log.debug(' >> {:}: found module dep: {:}'
|
||||
.format(self._current_scope[-1].name, name))
|
||||
self._current_scope[-1].add_dependency(name)
|
||||
if kwargs['merge_depends']:
|
||||
if (0 < len(self._scope_whitelist)) and self._current_scope[-1].name in self._scope_whitelist:
|
||||
# if we whitelist a module with dependencies, whitelist the dependencies, too
|
||||
self._scope_whitelist.add(name)
|
||||
|
||||
elif line.strip() != "":
|
||||
else:
|
||||
found_module_depends = False ## done with the 'DEPENDS' section.
|
||||
|
||||
words = line.split()
|
||||
@@ -465,21 +461,17 @@ class Graph(object):
|
||||
module_name = words[1]
|
||||
module_scope = ModuleScope(module_name)
|
||||
self._current_scope.append(module_scope)
|
||||
scope_added = True
|
||||
self._found_modules[module_name] = module_scope
|
||||
if self._in_scope():
|
||||
log.debug(' >> Found module name: ' + module_scope.name)
|
||||
|
||||
return scope_added
|
||||
return (found_library_def or found_module_def)
|
||||
|
||||
|
||||
def _process_source_file(self, file_name):
|
||||
""" extract information from a single source file """
|
||||
|
||||
current_scope = self._get_current_scope()
|
||||
log.debug( " >> {:}extracting topics from file: {:}"
|
||||
.format(current_scope.name+": " if current_scope is not None else "",
|
||||
file_name))
|
||||
log.debug( " >> extracting topics from file: " + file_name )
|
||||
|
||||
with codecs.open(file_name, 'r', 'utf-8') as f:
|
||||
try:
|
||||
@@ -489,6 +481,7 @@ class Graph(object):
|
||||
return
|
||||
|
||||
|
||||
current_scope = self._get_current_scope()
|
||||
if current_scope:
|
||||
if current_scope.name in self._scope_blacklist:
|
||||
return
|
||||
@@ -680,7 +673,7 @@ class OutputJSON(object):
|
||||
node['color'] = topic_colors[topic]
|
||||
# url is opened when double-clicking on the node
|
||||
# TODO: does not work for multi-topics
|
||||
node['url'] = 'https://github.com/PX4/PX4-Autopilot/blob/master/msg/'+topic+'.msg'
|
||||
node['url'] = 'https://github.com/PX4/Firmware/blob/master/msg/'+topic+'.msg'
|
||||
nodes.append(node)
|
||||
|
||||
data['nodes'] = nodes
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
agent_template_files_updated=0
|
||||
code_generator_files_updated=0
|
||||
|
||||
# parse help argument
|
||||
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
|
||||
echo -e "Usage: update_px4_ros2_bridge.bash [options...] \t This script allows to update px4_ros_com and px4_msgs in a specified directory." >&2
|
||||
echo
|
||||
echo -e "\t--ws_dir \t\t Location of the ament/colcon workspace. Default: $HOME/colcon_ws."
|
||||
echo -e "\t--px4_ros_com \t\t Updates px4_ros_com microRTPS agent code generation and templates."
|
||||
echo -e "\t--px4_msgs \t\t Updates px4_msgs messages definition files."
|
||||
echo -e "\t--all \t\t Updates both px4_ros_com and px4_msgs."
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# parse the arguments
|
||||
while [ $# -gt 0 ]; do
|
||||
if [[ $1 == *"--"* ]]; then
|
||||
v="${1/--/}"
|
||||
if [ ! -z $2 ]; then
|
||||
declare $v="$2"
|
||||
else
|
||||
declare $v=1
|
||||
fi
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
# get script directory
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# get PX4-Autopilot directory
|
||||
PX4_DIR=$(cd "$(dirname "$SCRIPT_DIR")" && pwd)
|
||||
|
||||
function compare_and_update () {
|
||||
cmp -s "$1" "$2"
|
||||
if [ $? -eq 1 ]; then
|
||||
cp "$1" "$2"
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
# update microRTPS agent code generators / helpers
|
||||
function update_agent_code {
|
||||
declare -a templates=( \
|
||||
"microRTPS_agent.cpp.em" \
|
||||
"microRTPS_timesync.cpp.em" \
|
||||
"microRTPS_timesync.h.em" \
|
||||
"microRTPS_transport.cpp" \
|
||||
"microRTPS_transport.h" \
|
||||
"Publisher.cpp.em" \
|
||||
"Publisher.h.em" \
|
||||
"Subscriber.cpp.em" \
|
||||
"Subscriber.h.em" \
|
||||
"RtpsTopics.cpp.em" \
|
||||
"RtpsTopics.h.em" \
|
||||
)
|
||||
|
||||
for file in ${templates[@]}; do
|
||||
compare_and_update "$PX4_DIR/msg/templates/urtps/$file" "$ws_dir/src/px4_ros_com/templates/$file" \
|
||||
&& echo -e "--\t\t- '$ws_dir/src/px4_ros_com/templates/$file' updated" && ((agent_template_files_updated+=1))
|
||||
done
|
||||
if [ $agent_template_files_updated -eq 0 ]; then
|
||||
echo -e "--\t\t- No template files updated"
|
||||
elif [ $agent_template_files_updated -eq 1 ]; then
|
||||
echo -e "--\t\t - 1 template file updated"
|
||||
else
|
||||
echo -e "--\t\t - $agent_template_files_updated template files updated"
|
||||
fi
|
||||
}
|
||||
|
||||
# update microRTPS agent code templates
|
||||
function update_agent_templates {
|
||||
declare -a code_generators=( \
|
||||
"uorb_rtps_classifier.py" \
|
||||
"generate_microRTPS_bridge.py" \
|
||||
"px_generate_uorb_topic_files.py" \
|
||||
)
|
||||
for file in ${code_generators[@]}; do
|
||||
compare_and_update "$PX4_DIR/msg/tools/$file $ws_dir/src/px4_ros_com/scripts/$file" \
|
||||
&& echo -e "--\t\t- '$ws_dir/src/px4_ros_com/scripts/$file' updated" && ((code_generator_files_updated+=1))
|
||||
done
|
||||
if [ $code_generator_files_updated -eq 0 ]; then
|
||||
echo -e "--\t\t- No code generators / helpers files updated"
|
||||
elif [ $code_generator_files_updated -eq 1 ]; then
|
||||
echo -e "--\t\t - 1 code generator / helper file updated"
|
||||
else
|
||||
echo -e "--\t\t - $code_generator_files_updated code generator / helper files updated"
|
||||
fi
|
||||
}
|
||||
|
||||
# update px4_ros_com files
|
||||
function update_px4_ros_com {
|
||||
python3 $PX4_DIR/msg/tools/uorb_to_ros_urtps_topics.py -i $PX4_DIR/msg/tools/urtps_bridge_topics.yaml -o $ws_dir/src/px4_ros_com/templates/urtps_bridge_topics.yaml
|
||||
echo -e "--------------- \033[1mmicroRTPS agent code generation and templates update\033[0m ----------------"
|
||||
echo "-------------------------------------------------------------------------------------------------------"
|
||||
update_agent_code
|
||||
update_agent_templates
|
||||
return 0
|
||||
}
|
||||
|
||||
# function to update px4_msgs
|
||||
function update_px4_msgs {
|
||||
find "$ws_dir/src/px4_msgs/msg/" -maxdepth 1 -type f -delete
|
||||
python3 $PX4_DIR/msg/tools/uorb_to_ros_msgs.py $PX4_DIR/msg/ $ws_dir/src/px4_msgs/msg/
|
||||
}
|
||||
|
||||
# decisor
|
||||
echo "-------------------------------------------------------------------------------------------------------"
|
||||
if [ -d "${ws_dir}" ]; then
|
||||
ws_dir=$(cd "$ws_dir" && pwd)
|
||||
if [ ! -z ${all} ]; then
|
||||
update_px4_ros_com
|
||||
echo "-------------------------------------------------------------------------------------------------------"
|
||||
update_px4_msgs
|
||||
elif [ ! -z ${px4_ros_com} ]; then
|
||||
update_px4_ros_com
|
||||
echo "-------------------------------------------------------------------------------------------------------"
|
||||
elif [ ! -z ${px4_msgs} ]; then
|
||||
update_px4_msgs
|
||||
fi
|
||||
echo -e "-------------------------------- \033[0;32mUpdate successful!\033[0m ---------------------------------"
|
||||
echo "-------------------------------------------------------------------------------------------------------"
|
||||
exit 0
|
||||
else
|
||||
echo -e "-- \033[0;31mWorkspace directory doesn't exist...\033[0m"
|
||||
echo -e "---------------------------------- \033[0;31mUpdate failed!\033[0m -----------------------------------"
|
||||
echo "-------------------------------------------------------------------------------------------------------"
|
||||
exit $ERRCODE
|
||||
fi
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR airmind
|
||||
MODEL mindpx-v2
|
||||
LABEL default
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_MEMORY
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
# CONFIG_NSH_DISABLE_GET is not set
|
||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||
# CONFIG_NSH_DISABLE_SEMICOLON is not set
|
||||
# CONFIG_NSH_DISABLE_TIME is not set
|
||||
# CONFIG_STM32_CCMEXCLUDE is not set
|
||||
@@ -91,6 +90,7 @@ CONFIG_MTD_BYTE_WRITE=y
|
||||
CONFIG_MTD_PARTITION=y
|
||||
CONFIG_MTD_RAMTRON=y
|
||||
CONFIG_NAME_MAX=40
|
||||
CONFIG_NFILE_DESCRIPTORS=12
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_ARCHROMFS=y
|
||||
CONFIG_NSH_ARGCAT=y
|
||||
@@ -99,6 +99,9 @@ CONFIG_NSH_CMDPARMS=y
|
||||
CONFIG_NSH_CROMFSETC=y
|
||||
CONFIG_NSH_DISABLE_IFCONFIG=y
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
CONFIG_NSH_DISABLE_MB=y
|
||||
CONFIG_NSH_DISABLE_MH=y
|
||||
CONFIG_NSH_DISABLE_MW=y
|
||||
CONFIG_NSH_DISABLE_TELNETD=y
|
||||
CONFIG_NSH_LINELEN=128
|
||||
CONFIG_NSH_MAXARGUMENTS=15
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
/* AUX PWMs
|
||||
*/
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 8
|
||||
#define DIRECT_INPUT_TIMER_CHANNELS 8
|
||||
|
||||
/* USB OTG FS
|
||||
*
|
||||
@@ -152,6 +153,7 @@
|
||||
#define BOARD_ADC_PERIPH_5V_OC (0)
|
||||
#define BOARD_ADC_HIPOWER_5V_OC (0)
|
||||
|
||||
#define BOARD_HAS_PWM DIRECT_PWM_OUTPUT_CHANNELS
|
||||
|
||||
/* This board provides a DMA pool and APIs */
|
||||
#define BOARD_DMA_ALLOC_POOL_SIZE 5120
|
||||
|
||||
@@ -2,6 +2,9 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR ark
|
||||
MODEL can-flow
|
||||
LABEL canbootloader
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_MEMORY
|
||||
|
||||
@@ -2,6 +2,9 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR ark
|
||||
MODEL can-flow
|
||||
LABEL debug
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_MEMORY
|
||||
|
||||
@@ -2,6 +2,9 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR ark
|
||||
MODEL can-flow
|
||||
LABEL default
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_FLASH
|
||||
|
||||
@@ -36,7 +36,7 @@ CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=0
|
||||
CONFIG_MAX_TASKS=0
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_NAME_MAX=0
|
||||
CONFIG_NUNGET_CHARS=0
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
# CONFIG_NSH_DISABLE_GET is not set
|
||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||
# CONFIG_NSH_DISABLE_SEMICOLON is not set
|
||||
# CONFIG_NSH_DISABLE_TIME is not set
|
||||
# CONFIG_STM32_DMACAPABLE is not set
|
||||
@@ -71,6 +70,7 @@ CONFIG_MTD_BYTE_WRITE=y
|
||||
CONFIG_MTD_PARTITION=y
|
||||
CONFIG_MTD_RAMTRON=y
|
||||
CONFIG_NAME_MAX=40
|
||||
CONFIG_NFILE_DESCRIPTORS=12
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_ARCHROMFS=y
|
||||
CONFIG_NSH_ARGCAT=y
|
||||
@@ -79,6 +79,9 @@ CONFIG_NSH_CMDPARMS=y
|
||||
CONFIG_NSH_CROMFSETC=y
|
||||
CONFIG_NSH_DISABLE_IFCONFIG=y
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
CONFIG_NSH_DISABLE_MB=y
|
||||
CONFIG_NSH_DISABLE_MH=y
|
||||
CONFIG_NSH_DISABLE_MW=y
|
||||
CONFIG_NSH_DISABLE_TELNETD=y
|
||||
CONFIG_NSH_LINELEN=128
|
||||
CONFIG_NSH_MAXARGUMENTS=15
|
||||
|
||||
@@ -2,6 +2,9 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR ark
|
||||
MODEL can-gps
|
||||
LABEL canbootloader
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
CONSTRAINED_MEMORY
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user