mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-25 03:37:34 +08:00
Compare commits
168 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d72d6ea28e | |||
| e265ebabc5 | |||
| 9419f9c5e8 | |||
| 08dab18a8b | |||
| 099c2d13f6 | |||
| 177ee4cbca | |||
| b1ebd16c61 | |||
| d1d5eba320 | |||
| 48f3bd4078 | |||
| 5f19eeaaa5 | |||
| 2d6bc9b6e0 | |||
| 5d9b3504f7 | |||
| f1fca0939f | |||
| 3702140e24 | |||
| 3d166d3279 | |||
| 19fa5cfe25 | |||
| baa37c1143 | |||
| 0385245ae1 | |||
| 1f61dcfb06 | |||
| 3779ff3690 | |||
| 21cf26a69f | |||
| a654c37306 | |||
| 07e38563ba | |||
| d5b60f7002 | |||
| 923af2c65b | |||
| 2d3800fa25 | |||
| 4f8c1ccfe8 | |||
| 7dd57d55f6 | |||
| 69bf437e9a | |||
| 633fbe147a | |||
| 118839e75c | |||
| 3f5a0e49a4 | |||
| 86360d076c | |||
| 3820f761b1 | |||
| 50d3af1ba1 | |||
| 867aa9d4bc | |||
| 310d166899 | |||
| 9c761d9ae5 | |||
| b3b74eaaf6 | |||
| 4c8dca738c | |||
| 4da1ec1146 | |||
| 1a5741f984 | |||
| 4d4d8ed887 | |||
| eae01a06e7 | |||
| d6a54910b4 | |||
| 362db92515 | |||
| dd4ffb3c0c | |||
| 44cdc52ef8 | |||
| dcbfc9de2d | |||
| 9a085126fd | |||
| ac6e7a1c6c | |||
| 532f370e7d | |||
| 62dc926891 | |||
| c1d3be4258 | |||
| 68a9e981b1 | |||
| f5b6656a6c | |||
| 3b7ce61901 | |||
| 3ec40a5956 | |||
| 24c2967511 | |||
| ee87257a8d | |||
| c28533677d | |||
| 2e292abfff | |||
| 269ce07cb5 | |||
| 3348869ae1 | |||
| 04b7ee43bc | |||
| 4e69952ee4 | |||
| cd4378b8c6 | |||
| ab10e68a40 | |||
| bf9758247b | |||
| d3ddbe8db5 | |||
| ecc5154a44 | |||
| cd2aceb363 | |||
| 2c6b3eeb02 | |||
| 5579a1d789 | |||
| 3c4b0c1b8c | |||
| fa9fdce6e6 | |||
| e78a4287f9 | |||
| 3b24abaa1b | |||
| feebb24106 | |||
| 783a780207 | |||
| abee13df1a | |||
| d96ba2d88a | |||
| e9a1599355 | |||
| aa0752ad86 | |||
| 5784f1d951 | |||
| 370d9ee409 | |||
| 4498509426 | |||
| 71bd35fcaa | |||
| 6ae23e7b7b | |||
| cfcc074e9d | |||
| b4e0a8396e | |||
| 5ec5a12f5e | |||
| 18dc0e4900 | |||
| 6e2343a485 | |||
| 514d4fd57b | |||
| 32d354e5fe | |||
| 92dc1a71a6 | |||
| 165420598e | |||
| 8ef10c9b38 | |||
| 199db72d5f | |||
| 4eb758edf0 | |||
| 759a60ac82 | |||
| dd0465070c | |||
| 186bc2bda4 | |||
| d2a118ee86 | |||
| 92344b96b3 | |||
| 4f52c0b6da | |||
| f16913c175 | |||
| e7fcfbf658 | |||
| 43fccece61 | |||
| 14e51098e5 | |||
| 7384bd2675 | |||
| 64688b04d8 | |||
| 96bc58f0eb | |||
| 4f098a01bc | |||
| 9980d2a556 | |||
| 757f1df068 | |||
| d62204856c | |||
| b898aabfed | |||
| b2d73dca26 | |||
| 925213db8f | |||
| 38c1ec6a9c | |||
| 0a98c5a7f4 | |||
| 1a89f165fd | |||
| 171c26373b | |||
| f6a34e1e80 | |||
| cbf34109d1 | |||
| c266c3e43a | |||
| 3664d9e4ce | |||
| cc81c7d49e | |||
| 6e9e503ee6 | |||
| 8478d1ea37 | |||
| ed0fa99198 | |||
| 59b70a881d | |||
| 5416679735 | |||
| 6df299738e | |||
| 9e2375ab91 | |||
| 5e75f17680 | |||
| fee4728b1f | |||
| c71a228f15 | |||
| 112fc5c9cd | |||
| 51f527d845 | |||
| 1730cd1971 | |||
| d631a5d39f | |||
| bff99f9794 | |||
| 371fa98579 | |||
| 1c624d20f5 | |||
| 789d91900d | |||
| f9d8c613b0 | |||
| 8b3aa46c01 | |||
| 1804cea92c | |||
| 02a4d93c74 | |||
| 399815469f | |||
| 5e7ebbe47c | |||
| 45ada2dd4c | |||
| 4865d027f9 | |||
| 29e07b1e52 | |||
| ff67da1bb4 | |||
| 3d8a35288e | |||
| 38bc46fd1a | |||
| 3b72f3b641 | |||
| 3dad16bc40 | |||
| 42108eb4af | |||
| 76e15b4a21 | |||
| 2492fb35e4 | |||
| 96c7fe4978 | |||
| 5c4582ccce | |||
| bd4839e855 |
@@ -9,10 +9,10 @@ pipeline {
|
||||
script {
|
||||
def build_nodes = [:]
|
||||
def docker_images = [
|
||||
armhf: "px4io/px4-dev-armhf:2021-02-04",
|
||||
arm64: "px4io/px4-dev-aarch64:2021-02-04",
|
||||
base: "px4io/px4-dev-base-bionic:2021-02-04",
|
||||
nuttx: "px4io/px4-dev-nuttx-focal:2021-02-04",
|
||||
armhf: "px4io/px4-dev-armhf:2021-04-29",
|
||||
arm64: "px4io/px4-dev-aarch64:2021-04-29",
|
||||
base: "px4io/px4-dev-base-bionic:2021-04-29",
|
||||
nuttx: "px4io/px4-dev-nuttx-focal:2021-04-29",
|
||||
snapdragon: "lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
||||
]
|
||||
|
||||
@@ -130,7 +130,7 @@ pipeline {
|
||||
// TODO: actually upload artifacts to S3
|
||||
// stage('S3 Upload') {
|
||||
// agent {
|
||||
// docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
// docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
// }
|
||||
// options {
|
||||
// skipDefaultCheckout()
|
||||
|
||||
+12
-12
@@ -12,7 +12,7 @@ pipeline {
|
||||
stage("build cubepilot_cubeorange_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,7 @@ pipeline {
|
||||
stage("build cuav_x7pro_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ pipeline {
|
||||
stage("build px4_fmu-v3_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -241,7 +241,7 @@ pipeline {
|
||||
stage("build px4_fmu-v4_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ pipeline {
|
||||
stage("build px4_fmu-v4pro_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -393,7 +393,7 @@ pipeline {
|
||||
stage("build px4_fmu-v5_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -469,7 +469,7 @@ pipeline {
|
||||
stage("build px4_fmu-v5_debug") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -549,7 +549,7 @@ pipeline {
|
||||
stage("build px4_fmu-v5_optimized") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -625,7 +625,7 @@ pipeline {
|
||||
stage("build px4_fmu-v5_stackcheck") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -705,7 +705,7 @@ pipeline {
|
||||
stage("build modalai_fc-v1_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -781,7 +781,7 @@ pipeline {
|
||||
stage("build holybro_durandal-v1_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -858,7 +858,7 @@ pipeline {
|
||||
stage("build nxp_fmuk66-v3_test") {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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-02-04",
|
||||
"image": "px4io/px4-dev-nuttx-focal:2021-04-29",
|
||||
|
||||
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
"parameters_metadata",
|
||||
]
|
||||
container:
|
||||
image: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
image: ghcr.io/px4/px4-dev:2021-05-06
|
||||
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-02-04
|
||||
container: px4io/px4-dev-clang:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-armhf:2021-02-04
|
||||
container: px4io/px4-dev-armhf:2021-04-29
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-aarch64:2021-02-04
|
||||
container: px4io/px4-dev-aarch64:2021-04-29
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'github-actions'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
@@ -11,7 +12,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
@@ -123,6 +124,8 @@ jobs:
|
||||
run: make ${{matrix.config}} bloaty_symbols || true
|
||||
- name: make ${{matrix.config}} bloaty_templates
|
||||
run: make ${{matrix.config}} bloaty_templates || true
|
||||
- name: make ${{matrix.config}} bloaty_ram
|
||||
run: make ${{matrix.config}} bloaty_ram || true
|
||||
- name: make ${{matrix.config}} bloaty_compare_master
|
||||
run: make ${{matrix.config}} bloaty_compare_master || true
|
||||
- name: ccache post-run
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Build and publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- 'github-actions'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
px4/px4-dev:latest
|
||||
ghcr.io/px4/px4-dev:latest
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
needs: enumerate_targets
|
||||
strategy:
|
||||
matrix: ${{fromJson(needs.enumerate_targets.outputs.matrix)}}
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-02-04
|
||||
container: px4io/px4-dev-${{ matrix.container }}:2021-04-29
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
name: MAVROS Avoidance Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {test_file: "mavros_posix_test_avoidance.test", vehicle: "iris_obs_avoid", mission: "avoidance", build_type: "RelWithDebInfo"}
|
||||
- {test_file: "mavros_posix_test_safe_landing.test", vehicle: "iris_obs_avoid", mission: "MC_safe_landing", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-02-04
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 5" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: Build PX4 and sitl_gazebo
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
ccache -z
|
||||
make px4_sitl_default
|
||||
make px4_sitl_default sitl_gazebo
|
||||
ccache -s
|
||||
|
||||
- name: Core dump settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run SITL tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
./test/rostest_avoidance_run.sh ${{matrix.config.test_file}} mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}} || true
|
||||
|
||||
- name: Look at core files
|
||||
if: failure()
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
- name: Upload px4 coredump
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
|
||||
# - name: ecl EKF analysis
|
||||
# if: always()
|
||||
# run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Upload logs to flight review
|
||||
if: always()
|
||||
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
- name: Store PX4 log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: px4_log
|
||||
path: ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Store ROS log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ros_log
|
||||
path: ~/.ros/**/rostest-*.log
|
||||
|
||||
# Report test coverage
|
||||
- name: Upload coverage
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
run: |
|
||||
git config --global credential.helper "" # disable the keychain credential helper
|
||||
git config --global --add credential.helper store # enable the local store credential helper
|
||||
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
|
||||
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
|
||||
mkdir -p coverage
|
||||
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
- name: Upload coverage information to Codecov
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: mavros_avoidance
|
||||
file: coverage/lcov.info
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-02-04
|
||||
image: px4io/px4-dev-ros-melodic:2021-04-29
|
||||
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-02-04
|
||||
image: px4io/px4-dev-ros-melodic:2021-04-29
|
||||
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-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
module:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
|
||||
parameter:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
|
||||
uorb_graph:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2021-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
|
||||
micrortps_agent:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
|
||||
ROS_msgs:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
|
||||
ROS2_bridge:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-02-04
|
||||
container: ghcr.io/px4/px4-dev:2021-05-06
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- {latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo", model: "tailsitter" } # Florida
|
||||
- {latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage", model: "standard_vtol" } # Zurich
|
||||
container:
|
||||
image: px4io/px4-dev-simulation-focal:2021-02-04
|
||||
image: px4io/px4-dev-simulation-focal:2021-04-29
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -28,9 +28,9 @@ jobs:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Download MAVSDK
|
||||
run: wget https://github.com/mavlink/MAVSDK/releases/download/v0.38.0/mavsdk_0.38.0_ubuntu20.04_amd64.deb
|
||||
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/mavsdk_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
- name: Install MAVSDK
|
||||
run: dpkg -i mavsdk_0.38.0_ubuntu20.04_amd64.deb
|
||||
run: dpkg -i "mavsdk_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
|
||||
+5
-1
@@ -33,7 +33,7 @@
|
||||
[submodule "src/modules/micrortps_bridge/micro-CDR"]
|
||||
path = src/modules/micrortps_bridge/micro-CDR
|
||||
url = https://github.com/PX4/Micro-CDR.git
|
||||
branch = px4
|
||||
branch = master
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
url = https://github.com/PX4/NuttX.git
|
||||
@@ -63,3 +63,7 @@
|
||||
[submodule "src/drivers/uavcannode_gps_demo/libcanard"]
|
||||
path = src/drivers/uavcannode_gps_demo/libcanard
|
||||
url = https://github.com/UAVCAN/libcanard.git
|
||||
[submodule "src/drivers/uavcan_v1/legacy_data_types"]
|
||||
path = src/drivers/uavcan_v1/legacy_data_types
|
||||
url = https://github.com/px4/public_regulated_data_types/
|
||||
branch = legacy
|
||||
|
||||
@@ -185,6 +185,8 @@ if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "Coverage")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O0)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Sanitizer")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O1)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O3)
|
||||
else()
|
||||
if(px4_constrained_flash_build)
|
||||
set(MAX_CUSTOM_OPT_LEVEL -Os)
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# PX4 development environment
|
||||
#
|
||||
|
||||
FROM ubuntu:20.04
|
||||
LABEL maintainer="Daniel Agar <daniel@agar.ca>"
|
||||
|
||||
COPY Tools/setup/ubuntu.sh /tmp/ubuntu.sh
|
||||
COPY Tools/setup/requirements.txt /tmp/requirements.txt
|
||||
RUN DEBIAN_FRONTEND=noninteractive /tmp/ubuntu.sh --no-sim-tools \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean autoclean \
|
||||
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
|
||||
|
||||
# create user with id 1001 (jenkins docker workflow default)
|
||||
RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout user
|
||||
|
||||
ENV CCACHE_UMASK=000
|
||||
ENV PATH="/usr/lib/ccache:$PATH"
|
||||
|
||||
# SITL UDP PORTS
|
||||
EXPOSE 14556/udp
|
||||
EXPOSE 14557/udp
|
||||
|
||||
# create and start as LOCAL_USER_ID
|
||||
COPY Tools/setup/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Vendored
+12
-12
@@ -15,7 +15,7 @@ pipeline {
|
||||
// stage('Catkin build on ROS workspace') {
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'px4io/px4-dev-ros-melodic:2021-02-04'
|
||||
// image 'px4io/px4-dev-ros-melodic:2021-04-29'
|
||||
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
// }
|
||||
// }
|
||||
@@ -56,7 +56,7 @@ pipeline {
|
||||
stage('Colcon build on ROS2 workspace') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros2-foxy:2021-02-04'
|
||||
image 'px4io/px4-dev-ros2-foxy:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ pipeline {
|
||||
|
||||
stage('Airframe') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -105,7 +105,7 @@ pipeline {
|
||||
|
||||
stage('Parameter') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -125,7 +125,7 @@ pipeline {
|
||||
|
||||
stage('Module') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean'
|
||||
@@ -146,7 +146,7 @@ pipeline {
|
||||
stage('uORB graphs') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-02-04'
|
||||
image 'px4io/px4-dev-nuttx-focal:2021-04-29'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ pipeline {
|
||||
|
||||
stage('Userguide') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -206,7 +206,7 @@ pipeline {
|
||||
|
||||
stage('QGroundControl') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -234,7 +234,7 @@ pipeline {
|
||||
|
||||
stage('microRTPS agent') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -264,7 +264,7 @@ pipeline {
|
||||
|
||||
stage('PX4 ROS msgs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -293,7 +293,7 @@ pipeline {
|
||||
|
||||
stage('PX4 ROS2 bridge') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -336,7 +336,7 @@ pipeline {
|
||||
|
||||
stage('S3') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-02-04' }
|
||||
docker { image 'ghcr.io/px4/px4-dev:2021-05-06' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
|
||||
@@ -469,6 +469,7 @@ validate_module_configs:
|
||||
|
||||
clean:
|
||||
@rm -rf "$(SRC_DIR)"/build
|
||||
@git submodule foreach git clean -df
|
||||
|
||||
submodulesclean:
|
||||
@git submodule foreach --quiet --recursive git clean -ff -x -d
|
||||
@@ -486,7 +487,7 @@ gazeboclean:
|
||||
|
||||
distclean: gazeboclean
|
||||
@git submodule deinit -f .
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
|
||||
@git clean -ff -x -d -e ".cproject" -e ".idea" -e ".project" -e ".settings" -e ".vscode"
|
||||
|
||||
# Help / Error
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
add_subdirectory(airframes)
|
||||
|
||||
px4_add_romfs_files(
|
||||
px4-rc.params
|
||||
px4-rc.simulator
|
||||
px4-rc.mavlink
|
||||
rc.replay
|
||||
rcS
|
||||
)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
udp_offboard_port_local=$((14580+px4_instance))
|
||||
udp_offboard_port_remote=$((14540+px4_instance))
|
||||
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
|
||||
udp_onboard_payload_port_local=$((14280+px4_instance))
|
||||
udp_onboard_payload_port_remote=$((14030+px4_instance))
|
||||
udp_onboard_gimbal_port_local=$((13030+px4_instance))
|
||||
udp_onboard_gimbal_port_remote=$((13280+px4_instance))
|
||||
udp_gcs_port_local=$((18570+px4_instance))
|
||||
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
|
||||
|
||||
# API/Offboard link
|
||||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote
|
||||
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
|
||||
# Onboard link to gimbal
|
||||
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
#param set MAV_SYS_ID $((px4_instance+1))
|
||||
#param set IMU_INTEG_RATE 250
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
|
||||
# Check if PX4_SIM_HOSTNAME environment variable is empty
|
||||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
|
||||
# If both are empty use localhost for simulator
|
||||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
|
||||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
|
||||
echo "PX4 SIM HOST: localhost"
|
||||
simulator start -c $simulator_tcp_port
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOST_ADDR"
|
||||
simulator start -t $PX4_SIM_HOST_ADDR $simulator_tcp_port
|
||||
fi
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOSTNAME"
|
||||
simulator start -h $PX4_SIM_HOSTNAME $simulator_tcp_port
|
||||
fi
|
||||
@@ -5,7 +5,8 @@
|
||||
# shellcheck disable=SC1091
|
||||
. px4-alias.sh
|
||||
|
||||
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
|
||||
#search path for sourcing px4-rc.*
|
||||
PATH="$PATH:${R}etc/init.d-posix"
|
||||
|
||||
#
|
||||
# Main SITL startup script
|
||||
@@ -45,9 +46,9 @@ else
|
||||
# Find the matching Autostart ID (file name has the form: [0-9]+_${PX4_SIM_MODEL})
|
||||
# TODO: unify with rc.autostart generation
|
||||
# shellcheck disable=SC2012
|
||||
REQUESTED_AUTOSTART=$(ls "$SCRIPT_DIR/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
|
||||
REQUESTED_AUTOSTART=$(ls "${R}etc/init.d-posix/airframes" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
|
||||
if [ -z "$REQUESTED_AUTOSTART" ]; then
|
||||
echo "Error: Unknown model $PX4_SIM_MODEL (not found by name on $SCRIPT_DIR/airframes)"
|
||||
echo "Error: Unknown model $PX4_SIM_MODEL (not found by name on ${R}etc/init.d-posix/airframes)"
|
||||
exit 1
|
||||
else
|
||||
echo "Info: found model autostart file as SYS_AUTOSTART=$REQUESTED_AUTOSTART"
|
||||
@@ -104,15 +105,6 @@ fi
|
||||
# multi-instance setup
|
||||
# shellcheck disable=SC2154
|
||||
param set MAV_SYS_ID $((px4_instance+1))
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
udp_offboard_port_local=$((14580+px4_instance))
|
||||
udp_offboard_port_remote=$((14540+px4_instance))
|
||||
[ $px4_instance -gt 9 ] && udp_offboard_port_remote=14549 # use the same ports for more than 10 instances to avoid port overlaps
|
||||
udp_onboard_payload_port_local=$((14280+px4_instance))
|
||||
udp_onboard_payload_port_remote=$((14030+px4_instance))
|
||||
udp_onboard_gimbal_port_local=$((13030+px4_instance))
|
||||
udp_onboard_gimbal_port_remote=$((13280+px4_instance))
|
||||
udp_gcs_port_local=$((18570+px4_instance))
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
@@ -216,25 +208,14 @@ fi
|
||||
# Simulator IMU data provided at 250 Hz
|
||||
param set IMU_INTEG_RATE 250
|
||||
|
||||
#user defined params for instances can be in PATH
|
||||
. px4-rc.params
|
||||
|
||||
dataman start
|
||||
# only start the simulator if not in replay mode, as both control the lockstep time
|
||||
if ! replay tryapplyparams
|
||||
then
|
||||
# Check if PX4_SIM_HOSTNAME environment variable is empty
|
||||
# If empty check if PX4_SIM_HOST_ADDR environment variable is empty
|
||||
# If both are empty use localhost for simulator
|
||||
if [ -z "${PX4_SIM_HOSTNAME}" ]; then
|
||||
if [ -z "${PX4_SIM_HOST_ADDR}" ]; then
|
||||
echo "PX4 SIM HOST: localhost"
|
||||
simulator start -c $simulator_tcp_port
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOST_ADDR"
|
||||
simulator start -t $PX4_SIM_HOST_ADDR $simulator_tcp_port
|
||||
fi
|
||||
else
|
||||
echo "PX4 SIM HOST: $PX4_SIM_HOSTNAME"
|
||||
simulator start -h $PX4_SIM_HOSTNAME $simulator_tcp_port
|
||||
fi
|
||||
. px4-rc.simulator
|
||||
fi
|
||||
load_mon start
|
||||
battery_simulator start
|
||||
@@ -272,32 +253,8 @@ fi
|
||||
#
|
||||
. ${R}etc/init.d/rc.vehicle_setup
|
||||
|
||||
if [ -e etc/init.d-posix/rc.mavlink_override ]
|
||||
then
|
||||
echo "Running non-default mavlink config rc.mavlink_override"
|
||||
. ${R}etc/init.d-posix/rc.mavlink_override
|
||||
else
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000 -f
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
|
||||
|
||||
# API/Offboard link
|
||||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -f -m onboard -o $udp_offboard_port_remote
|
||||
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
|
||||
# Onboard link to gimbal
|
||||
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
|
||||
fi
|
||||
#user defined mavlink streams for instances can be in PATH
|
||||
. px4-rc.mavlink
|
||||
|
||||
# execute autostart post script if any
|
||||
[ -e "$autostart_file".post ] && . "$autostart_file".post
|
||||
|
||||
@@ -16,6 +16,8 @@ param set-default COM_POS_FS_EPV 30
|
||||
param set-default COM_POS_FS_GAIN 0
|
||||
param set-default COM_POS_FS_PROB 1
|
||||
param set-default COM_VEL_FS_EVH 5
|
||||
# Disable preflight disarm to not interfere with external launching
|
||||
param set-default COM_DISARM_PRFLT -1
|
||||
|
||||
param set-default EKF2_ARSP_THR 8
|
||||
param set-default EKF2_FUSE_BETA 1
|
||||
|
||||
@@ -144,11 +144,6 @@ then
|
||||
set OUTPUT_DEV /dev/uavcan/esc
|
||||
fi
|
||||
|
||||
if [ $OUTPUT_MODE = vesc ]
|
||||
then
|
||||
set OUTPUT_DEV /dev/vesc
|
||||
fi
|
||||
|
||||
if mixer load ${OUTPUT_DEV} ${MIXER_FILE}
|
||||
then
|
||||
echo "INFO [init] Mixer: ${MIXER_FILE} on ${OUTPUT_DEV}"
|
||||
|
||||
@@ -23,6 +23,7 @@ param set-default MPC_XY_ERR_MAX 5
|
||||
param set-default MPC_XY_VEL_MAX 4
|
||||
param set-default MPC_Z_VEL_MAX_DN 1.5
|
||||
param set-default MPC_JERK_MAX 4.5
|
||||
param set-default MPC_YAW_MODE 4
|
||||
|
||||
param set-default NAV_ACC_RAD 3
|
||||
|
||||
|
||||
@@ -282,11 +282,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if param greater -s VESC_PORT 0
|
||||
then
|
||||
set OUTPUT_MODE vesc
|
||||
fi
|
||||
|
||||
#
|
||||
# Check if PX4IO present and update firmware if needed.
|
||||
# Assumption IOFW set to firmware file and IO_PRESENT = no
|
||||
|
||||
@@ -59,7 +59,7 @@ if [ ! -f $HOOK_FILE ] && [ "$CI" != "true" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
${DIR}/files_to_check_code_style.sh | xargs -n 1 -P 8 -I % ${DIR}/check_code_style.sh %
|
||||
${DIR}/files_to_check_code_style.sh | xargs -P 8 -I % ${DIR}/check_code_style.sh %
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Format checks passed"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
custom_data_source: {
|
||||
name: "bloaty_static_ram"
|
||||
base_data_source: "sections"
|
||||
|
||||
rewrite: {
|
||||
pattern: "^\\.bss"
|
||||
replacement: "ram"
|
||||
}
|
||||
rewrite: {
|
||||
pattern: "^\\.data"
|
||||
replacement: "ram"
|
||||
}
|
||||
}
|
||||
+3
-5
@@ -2,10 +2,7 @@
|
||||
|
||||
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-02-04"
|
||||
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*pilotpi.default ]]; then
|
||||
if [[ $@ =~ .*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-02-04"
|
||||
elif [[ $@ =~ .*pilotpi.arm64 ]]; then
|
||||
@@ -30,7 +27,7 @@ fi
|
||||
|
||||
# otherwise default to nuttx
|
||||
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2020-09-14"
|
||||
PX4_DOCKER_REPO="ghcr.io/px4/px4-dev:2021-05-06"
|
||||
fi
|
||||
|
||||
# docker hygiene
|
||||
@@ -67,4 +64,5 @@ docker run -it --rm -w "${SRC_DIR}" \
|
||||
--publish 14556:14556/udp \
|
||||
--volume=${CCACHE_DIR}:${CCACHE_DIR}:rw \
|
||||
--volume=${SRC_DIR}:${SRC_DIR}:rw \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -h $HOSTNAME
|
||||
${PX4_DOCKER_REPO} /bin/bash -c "$1 $2 $3"
|
||||
|
||||
+1
-1
Submodule Tools/jMAVSim updated: 358b6cca40...2b610caab8
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
@@ -7,6 +7,7 @@ import os
|
||||
import math
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import scipy as sp
|
||||
|
||||
from pyulog import *
|
||||
|
||||
@@ -63,6 +64,9 @@ def resampleWithDeltaX(x,y):
|
||||
|
||||
return resampledX,resampledY
|
||||
|
||||
def median_filter(data):
|
||||
return sp.signal.medfilt(data, 31)
|
||||
|
||||
parser = argparse.ArgumentParser(description='Reads in IMU data from a static thermal calibration test and performs a curve fit of gyro, accel and baro bias vs temperature')
|
||||
parser.add_argument('filename', metavar='file.ulg', help='ULog input file')
|
||||
parser.add_argument('--no_resample', dest='noResample', action='store_const',
|
||||
@@ -184,12 +188,16 @@ if num_gyros >= 1 and not math.isnan(sensor_gyro_0['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(gyro_0_params['TC_G0_TMIN']-gyro_0_params['TC_G0_TREF'], gyro_0_params['TC_G0_TMAX']-gyro_0_params['TC_G0_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + gyro_0_params['TC_G0_TREF']
|
||||
|
||||
sensor_gyro_0['x'] = median_filter(sensor_gyro_0['x'])
|
||||
sensor_gyro_0['y'] = median_filter(sensor_gyro_0['y'])
|
||||
sensor_gyro_0['z'] = median_filter(sensor_gyro_0['z'])
|
||||
|
||||
# fit X axis
|
||||
if noResample:
|
||||
coef_gyro_0_x = np.polyfit(temp_rel,sensor_gyro_0['x'],3)
|
||||
coef_gyro_0_x = np.polyfit(temp_rel, sensor_gyro_0['x'], 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_0['x'])
|
||||
coef_gyro_0_x = np.polyfit(temp, sens ,3)
|
||||
temp, sens = resampleWithDeltaX(temp_rel, sensor_gyro_0['x'])
|
||||
coef_gyro_0_x = np.polyfit(temp, sens, 3)
|
||||
|
||||
gyro_0_params['TC_G0_X3_0'] = coef_gyro_0_x[0]
|
||||
gyro_0_params['TC_G0_X2_0'] = coef_gyro_0_x[1]
|
||||
@@ -200,10 +208,10 @@ if num_gyros >= 1 and not math.isnan(sensor_gyro_0['temperature'][0]):
|
||||
|
||||
# fit Y axis
|
||||
if noResample:
|
||||
coef_gyro_0_y = np.polyfit(temp_rel,sensor_gyro_0['y'],3)
|
||||
coef_gyro_0_y = np.polyfit(temp_rel, sensor_gyro_0['y'], 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_0['y'])
|
||||
coef_gyro_0_y = np.polyfit(temp, sens ,3)
|
||||
coef_gyro_0_y = np.polyfit(temp, sens, 3)
|
||||
|
||||
gyro_0_params['TC_G0_X3_1'] = coef_gyro_0_y[0]
|
||||
gyro_0_params['TC_G0_X2_1'] = coef_gyro_0_y[1]
|
||||
@@ -214,9 +222,9 @@ if num_gyros >= 1 and not math.isnan(sensor_gyro_0['temperature'][0]):
|
||||
|
||||
# fit Z axis
|
||||
if noResample:
|
||||
coef_gyro_0_z = np.polyfit(temp_rel,sensor_gyro_0['z'],3)
|
||||
coef_gyro_0_z = np.polyfit(temp_rel, sensor_gyro_0['z'],3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_0['z'])
|
||||
temp, sens = resampleWithDeltaX(temp_rel, sensor_gyro_0['z'])
|
||||
coef_gyro_0_z = np.polyfit(temp, sens ,3)
|
||||
|
||||
gyro_0_params['TC_G0_X3_2'] = coef_gyro_0_z[0]
|
||||
@@ -292,6 +300,10 @@ if num_gyros >= 2 and not math.isnan(sensor_gyro_1['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(gyro_1_params['TC_G1_TMIN']-gyro_1_params['TC_G1_TREF'], gyro_1_params['TC_G1_TMAX']-gyro_1_params['TC_G1_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + gyro_1_params['TC_G1_TREF']
|
||||
|
||||
sensor_gyro_1['x'] = median_filter(sensor_gyro_1['x'])
|
||||
sensor_gyro_1['y'] = median_filter(sensor_gyro_1['y'])
|
||||
sensor_gyro_1['z'] = median_filter(sensor_gyro_1['z'])
|
||||
|
||||
# fit X axis
|
||||
if noResample:
|
||||
coef_gyro_1_x = np.polyfit(temp_rel,sensor_gyro_1['x'],3)
|
||||
@@ -400,6 +412,10 @@ if num_gyros >= 3 and not math.isnan(sensor_gyro_2['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(gyro_2_params['TC_G2_TMIN']-gyro_2_params['TC_G2_TREF'], gyro_2_params['TC_G2_TMAX']-gyro_2_params['TC_G2_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + gyro_2_params['TC_G2_TREF']
|
||||
|
||||
sensor_gyro_2['x'] = median_filter(sensor_gyro_2['x'])
|
||||
sensor_gyro_2['y'] = median_filter(sensor_gyro_2['y'])
|
||||
sensor_gyro_2['z'] = median_filter(sensor_gyro_2['z'])
|
||||
|
||||
# fit X axis
|
||||
if noResample:
|
||||
coef_gyro_2_x = np.polyfit(temp_rel,sensor_gyro_2['x'],3)
|
||||
@@ -416,10 +432,10 @@ if num_gyros >= 3 and not math.isnan(sensor_gyro_2['temperature'][0]):
|
||||
|
||||
# fit Y axis
|
||||
if noResample:
|
||||
coef_gyro_2_y = np.polyfit(temp_rel,sensor_gyro_2['y'],3)
|
||||
coef_gyro_2_y = np.polyfit(temp_rel, sensor_gyro_2['y'], 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_2['y'])
|
||||
coef_gyro_2_y = np.polyfit(temp, sens ,3)
|
||||
temp, sens = resampleWithDeltaX(temp_rel, sensor_gyro_2['y'])
|
||||
coef_gyro_2_y = np.polyfit(temp, sens, 3)
|
||||
|
||||
gyro_2_params['TC_G2_X3_1'] = coef_gyro_2_y[0]
|
||||
gyro_2_params['TC_G2_X2_1'] = coef_gyro_2_y[1]
|
||||
@@ -430,10 +446,10 @@ if num_gyros >= 3 and not math.isnan(sensor_gyro_2['temperature'][0]):
|
||||
|
||||
# fit Z axis
|
||||
if noResample:
|
||||
coef_gyro_2_z = np.polyfit(temp_rel,sensor_gyro_2['z'],3)
|
||||
coef_gyro_2_z = np.polyfit(temp_rel,sensor_gyro_2['z'], 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,sensor_gyro_2['z'])
|
||||
coef_gyro_2_z = np.polyfit(temp, sens ,3)
|
||||
coef_gyro_2_z = np.polyfit(temp, sens, 3)
|
||||
|
||||
gyro_2_params['TC_G2_X3_2'] = coef_gyro_2_z[0]
|
||||
gyro_2_params['TC_G2_X2_2'] = coef_gyro_2_z[1]
|
||||
@@ -508,8 +524,12 @@ if num_gyros >= 4 and not math.isnan(sensor_gyro_3['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(gyro_3_params['TC_G3_TMIN']-gyro_3_params['TC_G3_TREF'], gyro_3_params['TC_G3_TMAX']-gyro_3_params['TC_G3_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + gyro_3_params['TC_G3_TREF']
|
||||
|
||||
sensor_gyro_3['x'] = median_filter(sensor_gyro_3['x'])
|
||||
sensor_gyro_3['y'] = median_filter(sensor_gyro_3['y'])
|
||||
sensor_gyro_3['z'] = median_filter(sensor_gyro_3['z'])
|
||||
|
||||
# fit X axis
|
||||
coef_gyro_3_x = np.polyfit(temp_rel,sensor_gyro_3['x'],3)
|
||||
coef_gyro_3_x = np.polyfit(temp_rel,sensor_gyro_3['x'], 3)
|
||||
gyro_3_params['TC_G3_X3_0'] = coef_gyro_3_x[0]
|
||||
gyro_3_params['TC_G3_X2_0'] = coef_gyro_3_x[1]
|
||||
gyro_3_params['TC_G3_X1_0'] = coef_gyro_3_x[2]
|
||||
@@ -518,7 +538,7 @@ if num_gyros >= 4 and not math.isnan(sensor_gyro_3['temperature'][0]):
|
||||
gyro_3_x_resample = fit_coef_gyro_3_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
coef_gyro_3_y = np.polyfit(temp_rel,sensor_gyro_3['y'],3)
|
||||
coef_gyro_3_y = np.polyfit(temp_rel,sensor_gyro_3['y'], 3)
|
||||
gyro_3_params['TC_G3_X3_1'] = coef_gyro_3_y[0]
|
||||
gyro_3_params['TC_G3_X2_1'] = coef_gyro_3_y[1]
|
||||
gyro_3_params['TC_G3_X1_1'] = coef_gyro_3_y[2]
|
||||
@@ -527,7 +547,7 @@ if num_gyros >= 4 and not math.isnan(sensor_gyro_3['temperature'][0]):
|
||||
gyro_3_y_resample = fit_coef_gyro_3_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
coef_gyro_3_z = np.polyfit(temp_rel,sensor_gyro_3['z'],3)
|
||||
coef_gyro_3_z = np.polyfit(temp_rel,sensor_gyro_3['z'], 3)
|
||||
gyro_3_params['TC_G3_X3_2'] = coef_gyro_3_z[0]
|
||||
gyro_3_params['TC_G3_X2_2'] = coef_gyro_3_z[1]
|
||||
gyro_3_params['TC_G3_X1_2'] = coef_gyro_3_z[2]
|
||||
@@ -540,8 +560,8 @@ if num_gyros >= 4 and not math.isnan(sensor_gyro_3['temperature'][0]):
|
||||
|
||||
# draw plots
|
||||
plt.subplot(3,1,1)
|
||||
plt.plot(sensor_gyro_3['temperature'],sensor_gyro_3['x'],'b')
|
||||
plt.plot(temp_resample,gyro_3_x_resample,'r')
|
||||
plt.plot(sensor_gyro_3['temperature'],sensor_gyro_3['x'], 'b')
|
||||
plt.plot(temp_resample,gyro_3_x_resample, 'r')
|
||||
plt.title('Gyro 2 ({}) Bias vs Temperature'.format(gyro_3_params['TC_G3_ID']))
|
||||
plt.ylabel('X bias (rad/s)')
|
||||
plt.xlabel('temperature (degC)')
|
||||
@@ -601,13 +621,17 @@ if num_accels >= 1 and not math.isnan(sensor_accel_0['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(accel_0_params['TC_A0_TMIN']-accel_0_params['TC_A0_TREF'], accel_0_params['TC_A0_TMAX']-accel_0_params['TC_A0_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + accel_0_params['TC_A0_TREF']
|
||||
|
||||
sensor_accel_0['x'] = median_filter(sensor_accel_0['x'])
|
||||
sensor_accel_0['y'] = median_filter(sensor_accel_0['y'])
|
||||
sensor_accel_0['z'] = median_filter(sensor_accel_0['z'])
|
||||
|
||||
# fit X axis
|
||||
correction_x = sensor_accel_0['x'] - np.median(sensor_accel_0['x'])
|
||||
if noResample:
|
||||
coef_accel_0_x = np.polyfit(temp_rel,correction_x,3)
|
||||
coef_accel_0_x = np.polyfit(temp_rel,correction_x, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_x)
|
||||
coef_accel_0_x = np.polyfit(temp, sens ,3)
|
||||
coef_accel_0_x = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_0_params['TC_A0_X3_0'] = coef_accel_0_x[0]
|
||||
accel_0_params['TC_A0_X2_0'] = coef_accel_0_x[1]
|
||||
@@ -617,12 +641,12 @@ if num_accels >= 1 and not math.isnan(sensor_accel_0['temperature'][0]):
|
||||
correction_x_resample = fit_coef_accel_0_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
correction_y = sensor_accel_0['y']-np.median(sensor_accel_0['y'])
|
||||
correction_y = sensor_accel_0['y'] - np.median(sensor_accel_0['y'])
|
||||
if noResample:
|
||||
coef_accel_0_y = np.polyfit(temp_rel,correction_y,3)
|
||||
coef_accel_0_y = np.polyfit(temp_rel, correction_y, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_y)
|
||||
coef_accel_0_y = np.polyfit(temp, sens ,3)
|
||||
coef_accel_0_y = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_0_params['TC_A0_X3_1'] = coef_accel_0_y[0]
|
||||
accel_0_params['TC_A0_X2_1'] = coef_accel_0_y[1]
|
||||
@@ -632,12 +656,12 @@ if num_accels >= 1 and not math.isnan(sensor_accel_0['temperature'][0]):
|
||||
correction_y_resample = fit_coef_accel_0_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
correction_z = sensor_accel_0['z']-np.median(sensor_accel_0['z'])
|
||||
correction_z = sensor_accel_0['z'] - np.median(sensor_accel_0['z'])
|
||||
if noResample:
|
||||
coef_accel_0_z = np.polyfit(temp_rel,correction_z,3)
|
||||
coef_accel_0_z = np.polyfit(temp_rel,correction_z, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_z)
|
||||
coef_accel_0_z = np.polyfit(temp, sens ,3)
|
||||
coef_accel_0_z = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_0_params['TC_A0_X3_2'] = coef_accel_0_z[0]
|
||||
accel_0_params['TC_A0_X2_2'] = coef_accel_0_z[1]
|
||||
@@ -712,13 +736,17 @@ if num_accels >= 2 and not math.isnan(sensor_accel_1['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(accel_1_params['TC_A1_TMIN']-accel_1_params['TC_A1_TREF'], accel_1_params['TC_A1_TMAX']-accel_1_params['TC_A1_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + accel_1_params['TC_A1_TREF']
|
||||
|
||||
sensor_accel_1['x'] = median_filter(sensor_accel_1['x'])
|
||||
sensor_accel_1['y'] = median_filter(sensor_accel_1['y'])
|
||||
sensor_accel_1['z'] = median_filter(sensor_accel_1['z'])
|
||||
|
||||
# fit X axis
|
||||
correction_x = sensor_accel_1['x']-np.median(sensor_accel_1['x'])
|
||||
correction_x = sensor_accel_1['x'] - np.median(sensor_accel_1['x'])
|
||||
if noResample:
|
||||
coef_accel_1_x = np.polyfit(temp_rel,correction_x,3)
|
||||
coef_accel_1_x = np.polyfit(temp_rel, correction_x, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_x)
|
||||
coef_accel_1_x = np.polyfit(temp, sens ,3)
|
||||
temp, sens = resampleWithDeltaX(temp_rel, correction_x)
|
||||
coef_accel_1_x = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_1_params['TC_A1_X3_0'] = coef_accel_1_x[0]
|
||||
accel_1_params['TC_A1_X2_0'] = coef_accel_1_x[1]
|
||||
@@ -728,7 +756,7 @@ if num_accels >= 2 and not math.isnan(sensor_accel_1['temperature'][0]):
|
||||
correction_x_resample = fit_coef_accel_1_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
correction_y = sensor_accel_1['y']-np.median(sensor_accel_1['y'])
|
||||
correction_y = sensor_accel_1['y'] - np.median(sensor_accel_1['y'])
|
||||
if noResample:
|
||||
coef_accel_1_y = np.polyfit(temp_rel,correction_y,3)
|
||||
else:
|
||||
@@ -743,12 +771,12 @@ if num_accels >= 2 and not math.isnan(sensor_accel_1['temperature'][0]):
|
||||
correction_y_resample = fit_coef_accel_1_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
correction_z = (sensor_accel_1['z'])-np.median(sensor_accel_1['z'])
|
||||
correction_z = sensor_accel_1['z'] - np.median(sensor_accel_1['z'])
|
||||
if noResample:
|
||||
coef_accel_1_z = np.polyfit(temp_rel,correction_z,3)
|
||||
coef_accel_1_z = np.polyfit(temp_rel,correction_z, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_z)
|
||||
coef_accel_1_z = np.polyfit(temp, sens ,3)
|
||||
coef_accel_1_z = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_1_params['TC_A1_X3_2'] = coef_accel_1_z[0]
|
||||
accel_1_params['TC_A1_X2_2'] = coef_accel_1_z[1]
|
||||
@@ -824,13 +852,17 @@ if num_accels >= 3 and not math.isnan(sensor_accel_2['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(accel_2_params['TC_A2_TMIN']-accel_2_params['TC_A2_TREF'], accel_2_params['TC_A2_TMAX']-accel_2_params['TC_A2_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + accel_2_params['TC_A2_TREF']
|
||||
|
||||
sensor_accel_2['x'] = median_filter(sensor_accel_2['x'])
|
||||
sensor_accel_2['y'] = median_filter(sensor_accel_2['y'])
|
||||
sensor_accel_2['z'] = median_filter(sensor_accel_2['z'])
|
||||
|
||||
# fit X axis
|
||||
correction_x = sensor_accel_2['x']-np.median(sensor_accel_2['x'])
|
||||
correction_x = sensor_accel_2['x'] - np.median(sensor_accel_2['x'])
|
||||
if noResample:
|
||||
coef_accel_2_x = np.polyfit(temp_rel,correction_x,3)
|
||||
coef_accel_2_x = np.polyfit(temp_rel,correction_x, 3)
|
||||
else:
|
||||
temp, sens = resampleWithDeltaX(temp_rel,correction_x)
|
||||
coef_accel_2_x = np.polyfit(temp, sens ,3)
|
||||
temp, sens = resampleWithDeltaX(temp_rel, correction_x)
|
||||
coef_accel_2_x = np.polyfit(temp, sens, 3)
|
||||
|
||||
accel_2_params['TC_A2_X3_0'] = coef_accel_2_x[0]
|
||||
accel_2_params['TC_A2_X2_0'] = coef_accel_2_x[1]
|
||||
@@ -840,7 +872,7 @@ if num_accels >= 3 and not math.isnan(sensor_accel_2['temperature'][0]):
|
||||
correction_x_resample = fit_coef_accel_2_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
correction_y = sensor_accel_2['y']-np.median(sensor_accel_2['y'])
|
||||
correction_y = sensor_accel_2['y'] - np.median(sensor_accel_2['y'])
|
||||
if noResample:
|
||||
coef_accel_2_y = np.polyfit(temp_rel,correction_y,3)
|
||||
else:
|
||||
@@ -855,7 +887,7 @@ if num_accels >= 3 and not math.isnan(sensor_accel_2['temperature'][0]):
|
||||
correction_y_resample = fit_coef_accel_2_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
correction_z = sensor_accel_2['z']-np.median(sensor_accel_2['z'])
|
||||
correction_z = sensor_accel_2['z'] - np.median(sensor_accel_2['z'])
|
||||
if noResample:
|
||||
coef_accel_2_z = np.polyfit(temp_rel,correction_z,3)
|
||||
else:
|
||||
@@ -935,9 +967,13 @@ if num_accels >= 4 and not math.isnan(sensor_accel_3['temperature'][0]):
|
||||
temp_rel_resample = np.linspace(accel_3_params['TC_A3_TMIN']-accel_3_params['TC_A3_TREF'], accel_3_params['TC_A3_TMAX']-accel_3_params['TC_A3_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + accel_3_params['TC_A3_TREF']
|
||||
|
||||
sensor_accel_3['x'] = median_filter(sensor_accel_3['x'])
|
||||
sensor_accel_3['y'] = median_filter(sensor_accel_3['y'])
|
||||
sensor_accel_3['z'] = median_filter(sensor_accel_3['z'])
|
||||
|
||||
# fit X axis
|
||||
correction_x = sensor_accel_3['x']-np.median(sensor_accel_3['x'])
|
||||
coef_accel_3_x = np.polyfit(temp_rel,correction_x,3)
|
||||
correction_x = sensor_accel_3['x'] - np.median(sensor_accel_3['x'])
|
||||
coef_accel_3_x = np.polyfit(temp_rel, correction_x, 3)
|
||||
accel_3_params['TC_A3_X3_0'] = coef_accel_3_x[0]
|
||||
accel_3_params['TC_A3_X2_0'] = coef_accel_3_x[1]
|
||||
accel_3_params['TC_A3_X1_0'] = coef_accel_3_x[2]
|
||||
@@ -946,8 +982,8 @@ if num_accels >= 4 and not math.isnan(sensor_accel_3['temperature'][0]):
|
||||
correction_x_resample = fit_coef_accel_3_x(temp_rel_resample)
|
||||
|
||||
# fit Y axis
|
||||
correction_y = sensor_accel_3['y']-np.median(sensor_accel_3['y'])
|
||||
coef_accel_3_y = np.polyfit(temp_rel,correction_y,3)
|
||||
correction_y = sensor_accel_3['y'] - np.median(sensor_accel_3['y'])
|
||||
coef_accel_3_y = np.polyfit(temp_rel, correction_y, 3)
|
||||
accel_3_params['TC_A3_X3_1'] = coef_accel_3_y[0]
|
||||
accel_3_params['TC_A3_X2_1'] = coef_accel_3_y[1]
|
||||
accel_3_params['TC_A3_X1_1'] = coef_accel_3_y[2]
|
||||
@@ -956,8 +992,8 @@ if num_accels >= 4 and not math.isnan(sensor_accel_3['temperature'][0]):
|
||||
correction_y_resample = fit_coef_accel_3_y(temp_rel_resample)
|
||||
|
||||
# fit Z axis
|
||||
correction_z = sensor_accel_3['z']-np.median(sensor_accel_3['z'])
|
||||
coef_accel_3_z = np.polyfit(temp_rel,correction_z,3)
|
||||
correction_z = sensor_accel_3['z'] - np.median(sensor_accel_3['z'])
|
||||
coef_accel_3_z = np.polyfit(temp_rel, correction_z, 3)
|
||||
accel_3_params['TC_A3_X3_2'] = coef_accel_3_z[0]
|
||||
accel_3_params['TC_A3_X2_2'] = coef_accel_3_z[1]
|
||||
accel_3_params['TC_A3_X1_2'] = coef_accel_3_z[2]
|
||||
@@ -1024,8 +1060,10 @@ temp_rel = sensor_baro_0['temperature'] - baro_0_params['TC_B0_TREF']
|
||||
temp_rel_resample = np.linspace(baro_0_params['TC_B0_TMIN']-baro_0_params['TC_B0_TREF'], baro_0_params['TC_B0_TMAX']-baro_0_params['TC_B0_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + baro_0_params['TC_B0_TREF']
|
||||
|
||||
sensor_baro_0['pressure'] = median_filter(sensor_baro_0['pressure'])
|
||||
|
||||
# fit data
|
||||
median_pressure = np.median(sensor_baro_0['pressure']);
|
||||
median_pressure = np.median(sensor_baro_0['pressure'])
|
||||
if noResample:
|
||||
coef_baro_0_x = np.polyfit(temp_rel,100*(sensor_baro_0['pressure']-median_pressure),5) # convert from hPa to Pa
|
||||
else:
|
||||
@@ -1081,8 +1119,10 @@ if num_baros >= 2:
|
||||
temp_rel_resample = np.linspace(baro_1_params['TC_B1_TMIN']-baro_1_params['TC_B1_TREF'], baro_1_params['TC_B1_TMAX']-baro_1_params['TC_B1_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + baro_1_params['TC_B1_TREF']
|
||||
|
||||
sensor_baro_1['pressure'] = median_filter(sensor_baro_1['pressure'])
|
||||
|
||||
# fit data
|
||||
median_pressure = np.median(sensor_baro_1['pressure']);
|
||||
median_pressure = np.median(sensor_baro_1['pressure'])
|
||||
if noResample:
|
||||
coef_baro_1_x = np.polyfit(temp_rel,100*(sensor_baro_1['pressure']-median_pressure),5) # convert from hPa to Pa
|
||||
else:
|
||||
@@ -1139,8 +1179,10 @@ if num_baros >= 3:
|
||||
temp_rel_resample = np.linspace(baro_2_params['TC_B2_TMIN']-baro_2_params['TC_B2_TREF'], baro_2_params['TC_B2_TMAX']-baro_2_params['TC_B2_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + baro_2_params['TC_B2_TREF']
|
||||
|
||||
sensor_baro_2['pressure'] = median_filter(sensor_baro_2['pressure'])
|
||||
|
||||
# fit data
|
||||
median_pressure = np.median(sensor_baro_2['pressure']);
|
||||
median_pressure = np.median(sensor_baro_2['pressure'])
|
||||
if noResample:
|
||||
coef_baro_2_x = np.polyfit(temp_rel,100*(sensor_baro_2['pressure']-median_pressure),5) # convert from hPa to Pa
|
||||
else:
|
||||
@@ -1197,6 +1239,8 @@ if num_baros >= 4:
|
||||
temp_rel_resample = np.linspace(baro_3_params['TC_B3_TMIN']-baro_3_params['TC_B3_TREF'], baro_3_params['TC_B3_TMAX']-baro_3_params['TC_B3_TREF'], 100)
|
||||
temp_resample = temp_rel_resample + baro_3_params['TC_B3_TREF']
|
||||
|
||||
sensor_baro_3['pressure'] = median_filter(sensor_baro_3['pressure'])
|
||||
|
||||
# fit data
|
||||
median_pressure = np.median(sensor_baro_3['pressure'])
|
||||
coef_baro_3_x = np.polyfit(temp_rel,100*(sensor_baro_3['pressure']-median_pressure),5) # convert from hPa to Pa
|
||||
|
||||
@@ -98,6 +98,8 @@ class ParameterGroup(object):
|
||||
return "Boat"
|
||||
elif (self.name == "Balloon"):
|
||||
return "Balloon"
|
||||
elif (self.name == "Vectored 6 DOF UUV"):
|
||||
return "Vectored6DofUUV"
|
||||
return "AirframeUnknown"
|
||||
|
||||
def GetParams(self):
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
.PHONY: docker_build docker_push all
|
||||
|
||||
DATE := $(shell date +%Y-%m-%d)
|
||||
|
||||
docker_build:
|
||||
docker build -f Dockerfile -t px4-dev:${DATE} .
|
||||
|
||||
docker_push: build
|
||||
docker push px4io/px4-dev:${DATE}
|
||||
|
||||
all: docker_build
|
||||
Regular → Executable
+1
-2
@@ -155,8 +155,7 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
||||
# fix VMWare 3D graphics acceleration for gazebo
|
||||
exportline="export SVGA_VGPU10=0"
|
||||
|
||||
if grep -Fxq "$exportline" $HOME/.profile; then
|
||||
else
|
||||
if !grep -Fxq "$exportline" $HOME/.profile; then
|
||||
echo $exportline >> $HOME/.profile;
|
||||
fi
|
||||
fi
|
||||
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start virtual X server in the background
|
||||
# - DISPLAY default is :99, set in dockerfile
|
||||
# - Users can override with `-e DISPLAY=` in `docker run` command to avoid
|
||||
# running Xvfb and attach their screen
|
||||
if [[ -x "$(command -v Xvfb)" && "$DISPLAY" == ":99" ]]; then
|
||||
echo "Starting Xvfb"
|
||||
Xvfb :99 -screen 0 1600x1200x24+32 &
|
||||
fi
|
||||
|
||||
# Check if the ROS_DISTRO is passed and use it
|
||||
# to source the ROS environment
|
||||
if [ -n "${ROS_DISTRO}" ]; then
|
||||
source "/opt/ros/$ROS_DISTRO/setup.bash"
|
||||
fi
|
||||
|
||||
# Use the LOCAL_USER_ID if passed in at runtime
|
||||
if [ -n "${LOCAL_USER_ID}" ]; then
|
||||
echo "Starting with UID : $LOCAL_USER_ID"
|
||||
# modify existing user's id
|
||||
usermod -u $LOCAL_USER_ID user
|
||||
# run as user
|
||||
exec gosu user "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
@@ -45,7 +45,7 @@ fi
|
||||
|
||||
# Python dependencies
|
||||
echo "Installing PX4 Python3 dependencies"
|
||||
pip3 install --user -r ${DIR}/requirements.txt
|
||||
python3 -m pip install --user -r ${DIR}/requirements.txt
|
||||
|
||||
# Optional, but recommended additional simulation tools:
|
||||
if [[ $INSTALL_SIM == "--sim-tools" ]]; then
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
argcomplete
|
||||
argparse>=1.2
|
||||
argparse
|
||||
cerberus
|
||||
coverage
|
||||
empy>=3.3
|
||||
jinja2>=2.8
|
||||
jsonschema
|
||||
kconfiglib
|
||||
matplotlib>=3.0.*
|
||||
numpy>=1.13
|
||||
nunavut
|
||||
nunavut>=1.1.0
|
||||
packaging
|
||||
pandas>=0.21
|
||||
pkgconfig
|
||||
psutil
|
||||
pygments
|
||||
wheel>=0.31.1
|
||||
pymavlink
|
||||
pyros-genmsg
|
||||
pyserial>=3.0
|
||||
pyulog>=0.5.0
|
||||
pyyaml
|
||||
requests
|
||||
serial
|
||||
setuptools>=39.2.0
|
||||
six>=1.12.0
|
||||
toml>=0.9
|
||||
wheel>=0.31.1
|
||||
|
||||
+31
-34
@@ -31,10 +31,9 @@ done
|
||||
# detect if running in docker
|
||||
if [ -f /.dockerenv ]; then
|
||||
echo "Running within docker, installing initial dependencies";
|
||||
apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \
|
||||
apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -q -y --no-install-recommends install \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
lsb-core \
|
||||
gosu \
|
||||
sudo \
|
||||
wget \
|
||||
;
|
||||
@@ -53,7 +52,7 @@ fi
|
||||
|
||||
# check ubuntu version
|
||||
# otherwise warn and point to docker?
|
||||
UBUNTU_RELEASE="`lsb_release -rs`"
|
||||
UBUNTU_RELEASE=$(cat /etc/os-release | grep VERSION_ID | cut -d "\"" -f 2)
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "14.04" ]]; then
|
||||
echo "Ubuntu 14.04 is no longer supported"
|
||||
@@ -63,16 +62,18 @@ elif [[ "${UBUNTU_RELEASE}" == "16.04" ]]; then
|
||||
exit 1
|
||||
elif [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
||||
echo "Ubuntu 18.04"
|
||||
|
||||
elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
echo "Ubuntu 20.04"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo
|
||||
echo "Installing PX4 general dependencies"
|
||||
|
||||
sudo apt-get update -y --quiet
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
sudo apt-get -qq update
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y --no-install-recommends install \
|
||||
astyle \
|
||||
build-essential \
|
||||
ccache \
|
||||
@@ -93,20 +94,23 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends i
|
||||
python3-wheel \
|
||||
rsync \
|
||||
shellcheck \
|
||||
unzip \
|
||||
zip \
|
||||
;
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "16.04" ]]; then
|
||||
echo "Installing Ubuntu 16.04 PX4-compatible ccache version"
|
||||
wget -O /tmp/ccache_3.4.1-1_amd64.deb http://launchpadlibrarian.net/356662933/ccache_3.4.1-1_amd64.deb
|
||||
wget -q -O /tmp/ccache_3.4.1-1_amd64.deb http://launchpadlibrarian.net/356662933/ccache_3.4.1-1_amd64.deb
|
||||
sudo dpkg -i /tmp/ccache_3.4.1-1_amd64.deb
|
||||
fi
|
||||
|
||||
# Python3 dependencies
|
||||
echo
|
||||
echo "Installing PX4 Python3 dependencies"
|
||||
python3 -m pip install --user -r ${DIR}/requirements.txt
|
||||
if [ -f /.dockerenv ]; then
|
||||
# system wide for docker
|
||||
python3 -m pip install -r ${DIR}/requirements.txt
|
||||
else
|
||||
python3 -m pip install --user --quiet -r ${DIR}/requirements.txt
|
||||
fi
|
||||
|
||||
# NuttX toolchain (arm-none-eabi-gcc)
|
||||
if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
@@ -114,17 +118,11 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
echo
|
||||
echo "Installing NuttX dependencies"
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
autoconf \
|
||||
automake \
|
||||
bison \
|
||||
bzip2 \
|
||||
file \
|
||||
flex \
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y --no-install-recommends install \
|
||||
g++-multilib \
|
||||
gcc-multilib \
|
||||
gdb-multiarch \
|
||||
gperf \
|
||||
libncurses-dev \
|
||||
libtool \
|
||||
genromfs \
|
||||
pkg-config \
|
||||
screen \
|
||||
vim-common \
|
||||
@@ -150,7 +148,7 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
|
||||
else
|
||||
echo "Installing arm-none-eabi-gcc-${NUTTX_GCC_VERSION}";
|
||||
wget -O /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${NUTTX_GCC_VERSION_SHORT}/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-${INSTALL_ARCH}-linux.tar.bz2 && \
|
||||
wget -q -O /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${NUTTX_GCC_VERSION_SHORT}/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-${INSTALL_ARCH}-linux.tar.bz2 && \
|
||||
sudo tar -jxf /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 -C /opt/;
|
||||
|
||||
# add arm-none-eabi-gcc to user's PATH
|
||||
@@ -171,37 +169,36 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
||||
echo "Installing PX4 simulation dependencies"
|
||||
|
||||
# General simulation dependencies
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y --no-install-recommends install \
|
||||
bc \
|
||||
;
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
||||
java_version=11
|
||||
gazebo_version=9
|
||||
MAVSDK_VERSION=0.39.0
|
||||
wget -q "https://github.com/mavlink/MAVSDK/releases/download/v${MAVSDK_VERSION}/mavsdk_{MAVSDK_VERSION})_ubuntu18.04_amd64.deb" -O /tmp/mavsdk.deb && sudo dpkg -i /tmp/mavsdk.deb
|
||||
elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
java_version=14
|
||||
gazebo_version=11
|
||||
MAVSDK_VERSION=0.39.0
|
||||
wget -q "https://github.com/mavlink/MAVSDK/releases/download/v{MAVSDK_VERSION}/mavsdk_{MAVSDK_VERSION}_ubuntu20.04_amd64.deb" -O /tmp/mavsdk.deb && sudo dpkg -i /tmp/mavsdk.deb
|
||||
else
|
||||
java_version=14
|
||||
gazebo_version=11
|
||||
fi
|
||||
|
||||
# Java (jmavsim or fastrtps)
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y --no-install-recommends install \
|
||||
ant \
|
||||
openjdk-$java_version-jre \
|
||||
openjdk-$java_version-jdk \
|
||||
default-jre-headless \
|
||||
default-jdk-headless \
|
||||
libvecmath-java \
|
||||
;
|
||||
|
||||
# Set Java 11 as default
|
||||
sudo update-alternatives --set java $(update-alternatives --list java | grep "java-$java_version")
|
||||
|
||||
# Gazebo
|
||||
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
|
||||
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
||||
wget -q http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
||||
# Update list, since new gazebo-stable.list has been added
|
||||
sudo apt-get update -y --quiet
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
sudo apt-get update -qq
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y --no-install-recommends install \
|
||||
dmidecode \
|
||||
gazebo$gazebo_version \
|
||||
gstreamer1.0-plugins-bad \
|
||||
|
||||
+1
-1
Submodule Tools/sitl_gazebo updated: 05e2cd9c03...4c27fc7dd6
@@ -49,7 +49,7 @@ px4_add_board(
|
||||
imu/invensense/mpu9250
|
||||
#magnetometer/hmc5883
|
||||
qshell/qurt
|
||||
spektrum_rc
|
||||
snapdragon_spektrum_rc
|
||||
MODULES
|
||||
airspeed_selector
|
||||
attitude_estimator_q
|
||||
|
||||
@@ -49,7 +49,7 @@ px4_add_board(
|
||||
imu/invensense/mpu9250
|
||||
magnetometer/hmc5883
|
||||
qshell/qurt
|
||||
spektrum_rc
|
||||
snapdragon_spektrum_rc
|
||||
MODULES
|
||||
airspeed_selector
|
||||
attitude_estimator_q
|
||||
|
||||
@@ -90,7 +90,7 @@ static int configure_switch(void);
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -116,6 +116,7 @@ CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
|
||||
@@ -106,7 +106,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -116,6 +116,7 @@ CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
|
||||
@@ -106,7 +106,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -97,7 +97,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -97,7 +97,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -117,6 +117,7 @@ CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
|
||||
@@ -138,7 +138,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -120,7 +120,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -116,6 +116,7 @@ CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
|
||||
@@ -139,7 +139,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -115,6 +115,7 @@ CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
|
||||
@@ -137,7 +137,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -128,7 +128,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -128,7 +128,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
/* RC Serial port */
|
||||
#define RC_SERIAL_PORT "/dev/ttyS4"
|
||||
#define RC_SERIAL_SINGLEWIRE
|
||||
#define BOARD_SUPPORTS_RC_SERIAL_PORT_OUTPUT
|
||||
|
||||
#define GPIO_RSSI_IN /* PC1 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN1)
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -26,6 +26,7 @@ CONFIG_BOARD_LOOPSPERMSEC=15175
|
||||
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_C99_BOOL8=y
|
||||
CONFIG_CAN_CONNS=1
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_BULKIN_REQLEN=96
|
||||
CONFIG_CDCACM_PRODUCTID=0x001c
|
||||
@@ -123,6 +124,7 @@ CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_CAN=y
|
||||
CONFIG_NET_CAN_NOTIFIER=y
|
||||
CONFIG_NET_CAN_RAW_FILTER_MAX=0
|
||||
CONFIG_NET_CAN_RAW_TX_DEADLINE=y
|
||||
CONFIG_NET_CAN_SOCK_OPTS=y
|
||||
CONFIG_NET_ICMP=y
|
||||
|
||||
@@ -339,7 +339,7 @@ __END_DECLS
|
||||
#define LED_TIM3_CH4OUT /* PTC8 RGB_B */ PIN_FTM3_CH4_1
|
||||
|
||||
/* This board provides a DMA pool and APIs */
|
||||
#define BOARD_DMA_ALLOC_POOL_SIZE 5120
|
||||
#define BOARD_DMA_ALLOC_POOL_SIZE 2048
|
||||
|
||||
/* This board provides the board_on_reset interface */
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ __END_DECLS
|
||||
void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -25,6 +25,7 @@ CONFIG_BOARD_LOOPSPERMSEC=15175
|
||||
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_C99_BOOL8=y
|
||||
CONFIG_CAN_CONNS=1
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_BULKIN_REQLEN=96
|
||||
CONFIG_CDCACM_PRODUCTID=0x001c
|
||||
@@ -122,6 +123,7 @@ CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_CAN=y
|
||||
CONFIG_NET_CAN_NOTIFIER=y
|
||||
CONFIG_NET_CAN_RAW_FILTER_MAX=0
|
||||
CONFIG_NET_CAN_RAW_TX_DEADLINE=y
|
||||
CONFIG_NET_CAN_SOCK_OPTS=y
|
||||
CONFIG_NET_ICMP=y
|
||||
|
||||
@@ -343,7 +343,7 @@ __END_DECLS
|
||||
#define LED_TIM3_CH4OUT /* PTC8 RGB_B */ PIN_FTM3_CH4_1
|
||||
|
||||
/* This board provides a DMA pool and APIs */
|
||||
#define BOARD_DMA_ALLOC_POOL_SIZE 5120
|
||||
#define BOARD_DMA_ALLOC_POOL_SIZE 2048
|
||||
|
||||
/* This board provides the board_on_reset interface */
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ __END_DECLS
|
||||
void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -90,6 +90,12 @@
|
||||
#define BOARD_LED_G_BIT (1 << BOARD_LED_G)
|
||||
#define BOARD_LED_B_BIT (1 << BOARD_LED_B)
|
||||
|
||||
/* Board revision detection pin
|
||||
* 0 equals UCANS32K146-01
|
||||
* 1 equals UCANS32K146B
|
||||
*/
|
||||
#define BOARD_REVISION_DETECT_PIN (GPIO_INPUT | PIN_PORTA | PIN10 )
|
||||
|
||||
/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LEDs on board
|
||||
* the UCANS32K146. The following definitions describe how NuttX
|
||||
* controls the LEDs:
|
||||
@@ -152,11 +158,9 @@
|
||||
/* CAN selections ***********************************************************/
|
||||
#define PIN_CAN0_TX PIN_CAN0_TX_4 /* PTE5 */
|
||||
#define PIN_CAN0_RX PIN_CAN0_RX_4 /* PTE4 */
|
||||
#define PIN_CAN0_ENABLE (GPIO_OUTPUT | PIN_PORTE | PIN11 )
|
||||
#define CAN0_ENABLE_OUT 0
|
||||
#define PIN_CAN0_STB (GPIO_OUTPUT | PIN_PORTE | PIN11 )
|
||||
#define PIN_CAN1_TX PIN_CAN1_TX_1 /* PTA13 */
|
||||
#define PIN_CAN1_RX PIN_CAN1_RX_1 /* PTA12 */
|
||||
#define PIN_CAN1_ENABLE (GPIO_OUTPUT | PIN_PORTE | PIN10 )
|
||||
#define CAN1_ENABLE_OUT 0
|
||||
#define PIN_CAN1_STB (GPIO_OUTPUT | PIN_PORTE | PIN10 )
|
||||
|
||||
#endif /* __BOARDS_ARM_RDDRONE_UAVCAN146_INCLUDE_BOARD_H */
|
||||
|
||||
@@ -151,5 +151,20 @@ int s32k1xx_bringup(void)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_S32K1XX_FLEXCAN
|
||||
s32k1xx_pinconfig(BOARD_REVISION_DETECT_PIN);
|
||||
|
||||
if (s32k1xx_gpioread(BOARD_REVISION_DETECT_PIN)) {
|
||||
/* STB high -> active CAN phy */
|
||||
s32k1xx_pinconfig(PIN_CAN0_STB | GPIO_OUTPUT_ONE);
|
||||
|
||||
} else {
|
||||
/* STB low -> active CAN phy */
|
||||
s32k1xx_pinconfig(PIN_CAN0_STB | GPIO_OUTPUT_ZERO);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,18 @@ __EXPORT void s32k1xx_board_initialize(void)
|
||||
// Can GPIO
|
||||
s32k1xx_pinconfig(PIN_CAN0_TX);
|
||||
s32k1xx_pinconfig(PIN_CAN0_RX);
|
||||
s32k1xx_pinconfig(PIN_CAN0_ENABLE | GPIO_OUTPUT_ZERO);
|
||||
|
||||
s32k1xx_pinconfig(BOARD_REVISION_DETECT_PIN);
|
||||
|
||||
if (s32k1xx_gpioread(BOARD_REVISION_DETECT_PIN)) {
|
||||
/* STB high -> active CAN phy */
|
||||
s32k1xx_pinconfig(PIN_CAN0_STB | GPIO_OUTPUT_ONE);
|
||||
|
||||
} else {
|
||||
/* STB low -> active CAN phy */
|
||||
s32k1xx_pinconfig(PIN_CAN0_STB | GPIO_OUTPUT_ZERO);
|
||||
}
|
||||
|
||||
//s32k1xx_gpiowrite
|
||||
#if defined(OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO)
|
||||
s32k1xx_pinconfig(GPIO_GETNODEINFO_JUMPER);
|
||||
@@ -101,7 +112,14 @@ void board_deinitialize(void)
|
||||
} while ((regval & CAN_MCR_LPMACK) == 0);
|
||||
|
||||
|
||||
s32k1xx_pinconfig(PIN_CAN0_ENABLE | GPIO_OUTPUT_ONE);
|
||||
if (s32k1xx_gpioread(BOARD_REVISION_DETECT_PIN)) {
|
||||
/* STB high -> standby CAN phy */
|
||||
s32k1xx_pinconfig(PIN_CAN0_STB | GPIO_OUTPUT_ZERO);
|
||||
|
||||
} else {
|
||||
/* STB low -> standby CAN phy */
|
||||
s32k1xx_pinconfig(PIN_CAN0_STB | GPIO_OUTPUT_ONE);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -51,7 +51,6 @@ px4_add_board(
|
||||
telemetry # all available telemetry drivers
|
||||
tone_alarm
|
||||
uavcan
|
||||
vesc
|
||||
MODULES
|
||||
airspeed_selector
|
||||
attitude_estimator_q
|
||||
@@ -90,7 +89,7 @@ px4_add_board(
|
||||
vtol_att_control
|
||||
SYSTEMCMDS
|
||||
bl_update
|
||||
dmesg
|
||||
#dmesg
|
||||
dumpfile
|
||||
esc_calib
|
||||
gpio
|
||||
|
||||
@@ -98,8 +98,6 @@
|
||||
#define GPIO_TONE_ALARM_IDLE (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN15)
|
||||
#define GPIO_TONE_ALARM (GPIO_ALT|GPIO_AF1|GPIO_SPEED_2MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN15)
|
||||
|
||||
#define BOARD_ENABLE_CONSOLE_BUFFER
|
||||
|
||||
/**
|
||||
* PWM:
|
||||
*
|
||||
|
||||
@@ -25,7 +25,7 @@ px4_add_board(
|
||||
distance_sensor # all available distance sensor drivers
|
||||
dshot
|
||||
gps
|
||||
#heater
|
||||
heater
|
||||
#imu # all available imu drivers
|
||||
imu/analog_devices/adis16448
|
||||
imu/bosch/bmi055
|
||||
|
||||
@@ -116,6 +116,7 @@ CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
|
||||
@@ -37,7 +37,7 @@ px4_add_board(
|
||||
imu/invensense/icm20602
|
||||
imu/invensense/icm20689
|
||||
imu/invensense/icm20948 # required for ak09916 mag
|
||||
irlock
|
||||
#irlock
|
||||
lights # all available light drivers
|
||||
#lights/rgbled_pwm
|
||||
#magnetometer # all available magnetometer drivers
|
||||
@@ -91,7 +91,7 @@ px4_add_board(
|
||||
#rover_pos_control
|
||||
sensors
|
||||
#sih
|
||||
temperature_compensation
|
||||
#temperature_compensation
|
||||
#uuv_att_control
|
||||
#uuv_pos_control
|
||||
#vmount
|
||||
|
||||
@@ -139,7 +139,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -146,6 +146,7 @@ CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_TELNET=y
|
||||
CONFIG_NSH_TELNET_LOGIN=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
|
||||
@@ -143,7 +143,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -140,7 +140,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -128,7 +128,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NET_UDP_CHECKSUMS=y
|
||||
CONFIG_NET_UDP_WRITE_BUFFERS=y
|
||||
CONFIG_NFILE_DESCRIPTORS=12
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_ARCHROMFS=y
|
||||
CONFIG_NSH_ARGCAT=y
|
||||
|
||||
@@ -140,7 +140,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -121,7 +121,7 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT_PULL_DOWN(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
if (status >= 0) {
|
||||
|
||||
@@ -71,6 +71,13 @@ if (BLOATY_PROGRAM)
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
# bloaty statically allocated RAM
|
||||
add_custom_target(bloaty_ram
|
||||
COMMAND ${BLOATY_PROGRAM} -c ${PX4_SOURCE_DIR}/Tools/bloaty_static_ram.bloaty -d bloaty_static_ram,compileunits --source-filter ^ram$ ${BLOATY_OPTS} $<TARGET_FILE:px4>
|
||||
DEPENDS px4
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
# bloaty compare with last master build
|
||||
add_custom_target(bloaty_compare_master
|
||||
COMMAND wget -c -N --no-verbose https://s3.amazonaws.com/px4-travis/Firmware/master/${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_${PX4_BOARD_LABEL}.elf -O master.elf
|
||||
|
||||
Submodule mavlink/include/mavlink/v2.0 updated: a1c60151a4...3a3aea8fe5
@@ -3,6 +3,7 @@ uint64 timestamp # time since system start (microseconds)
|
||||
uint32 device_id
|
||||
|
||||
bool heater_on
|
||||
bool temperature_target_met
|
||||
|
||||
float32 temperature_sensor
|
||||
float32 temperature_target
|
||||
|
||||
@@ -10,3 +10,5 @@ uint8 TAKEOFF_STATE_RAMPUP = 4
|
||||
uint8 TAKEOFF_STATE_FLIGHT = 5
|
||||
|
||||
uint8 takeoff_state
|
||||
|
||||
float32 tilt_limit # limited tilt feasability during takeoff, contains maximum tilt otherwise
|
||||
|
||||
@@ -28,7 +28,6 @@ uint32 tx_buffer_overruns # number of TX buffer overruns
|
||||
|
||||
float32 rx_rate_avg # transmit rate average (Bytes/s)
|
||||
uint32 rx_message_count # count of total messages received
|
||||
uint32 rx_message_count_supported # count of total messages received from supported systems and components (for loss statistics)
|
||||
uint32 rx_message_lost_count
|
||||
uint32 rx_buffer_overruns # number of RX buffer overruns
|
||||
uint32 rx_parse_errors # number of parse errors
|
||||
|
||||
@@ -5,3 +5,8 @@ bool ground_contact # true if vehicle has ground contact but is not landed (1. s
|
||||
bool maybe_landed # true if the vehicle might have landed (2. stage)
|
||||
bool landed # true if vehicle is currently landed on the ground (3. stage)
|
||||
bool in_ground_effect # indicates if from the perspective of the landing detector the vehicle might be in ground effect (baro). This flag will become true if the vehicle is not moving horizontally and is descending (crude assumption that user is landing).
|
||||
bool in_descend
|
||||
bool has_low_throttle
|
||||
bool vertical_movement
|
||||
bool horizontal_movement
|
||||
bool close_to_ground_or_skipped_check
|
||||
|
||||
@@ -17,6 +17,7 @@ bool condition_home_position_valid # indicates a valid home position (a valid h
|
||||
bool condition_power_input_valid # set if input power is valid
|
||||
bool condition_battery_healthy # set if battery is available and not low
|
||||
bool condition_escs_error # set to true if one or more ESCs reporting esc_status are offline
|
||||
bool condition_escs_failure # set to true if one or more ESCs reporting esc_status has a failure
|
||||
|
||||
bool circuit_breaker_engaged_power_check
|
||||
bool circuit_breaker_engaged_airspd_check
|
||||
|
||||
@@ -48,7 +48,7 @@ struct wq_config_t {
|
||||
|
||||
namespace wq_configurations
|
||||
{
|
||||
static constexpr wq_config_t rate_ctrl{"wq:rate_ctrl", 1920, 0}; // PX4 inner loop highest priority
|
||||
static constexpr wq_config_t rate_ctrl{"wq:rate_ctrl", 1952, 0}; // PX4 inner loop highest priority
|
||||
static constexpr wq_config_t ctrl_alloc{"wq:ctrl_alloc", 9500, 0}; // PX4 control allocation, same priority as rate_ctrl
|
||||
|
||||
static constexpr wq_config_t SPI0{"wq:SPI0", 2336, -1};
|
||||
@@ -66,7 +66,7 @@ static constexpr wq_config_t I2C3{"wq:I2C3", 2336, -11};
|
||||
static constexpr wq_config_t I2C4{"wq:I2C4", 2336, -12};
|
||||
|
||||
// PX4 att/pos controllers, highest priority after sensors.
|
||||
static constexpr wq_config_t nav_and_controllers{"wq:nav_and_controllers", 2164, -13};
|
||||
static constexpr wq_config_t nav_and_controllers{"wq:nav_and_controllers", 2240, -13};
|
||||
|
||||
static constexpr wq_config_t INS0{"wq:INS0", 6000, -14};
|
||||
static constexpr wq_config_t INS1{"wq:INS1", 6000, -15};
|
||||
|
||||
@@ -91,7 +91,7 @@ bool Subscription::ChangeInstance(uint8_t instance)
|
||||
DeviceMaster *device_master = uORB::Manager::get_instance()->get_device_master();
|
||||
|
||||
if (device_master != nullptr) {
|
||||
if (!device_master->deviceNodeExists(_orb_id, _instance)) {
|
||||
if (!device_master->deviceNodeExists(_orb_id, instance)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
# https://launchpad.net/gcc-arm-embedded and building them with correct flags.
|
||||
# Note that Python support is not required if no per-task sampling is needed.
|
||||
#
|
||||
# Usage with PX4:
|
||||
# 0) See above regarding flamegraph.pl
|
||||
# 1) Connect your device, e.g. Pixhawk 4
|
||||
# 2) Build PX4: make px4_fmu-v5_default
|
||||
# 3) Flash PX4: make px4_fmu-v5_default upload
|
||||
# 4) Connect a JTAG/SWD debugger, e.g. a DroneCode Probe
|
||||
# 5) Profile: make px4_fmu-v5_default profile
|
||||
|
||||
set -e
|
||||
root=$(dirname $0)
|
||||
@@ -33,7 +40,11 @@ function usage()
|
||||
exit 1
|
||||
}
|
||||
|
||||
which flamegraph.pl > /dev/null || die "Install flamegraph.pl first"
|
||||
if [ -z `which flamegraph.pl` ]; then
|
||||
echo "Install flamegraph.pl first. Available from:"
|
||||
echo -e "\thttps://github.com/brendangregg/FlameGraph"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Parsing the arguments. Read this section for usage info.
|
||||
@@ -45,6 +56,7 @@ elf=
|
||||
append=0
|
||||
fgfontsize=10
|
||||
fgwidth=1900
|
||||
gdbdev=`ls /dev/serial/by-id/*Black_Magic_Probe*-if00`
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
@@ -70,6 +82,9 @@ do
|
||||
--fgwidth=*)
|
||||
fgwidth="${i#*=}"
|
||||
;;
|
||||
--gdbdev=*)
|
||||
gdbdev="${i#*=}"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
@@ -104,7 +119,7 @@ then
|
||||
then
|
||||
arm-none-eabi-gdb $elf --nx --quiet --batch \
|
||||
-ex "set print asm-demangle on" \
|
||||
-ex "target extended /dev/ttyACM0" \
|
||||
-ex "target extended $gdbdev" \
|
||||
-ex "monitor swdp_scan" \
|
||||
-ex "attach 1" \
|
||||
-ex bt \
|
||||
@@ -114,7 +129,7 @@ then
|
||||
else
|
||||
arm-none-eabi-gdb $elf --nx --quiet --batch \
|
||||
-ex "set print asm-demangle on" \
|
||||
-ex "target extended /dev/ttyACM0" \
|
||||
-ex "target extended $gdbdev" \
|
||||
-ex "monitor swdp_scan" \
|
||||
-ex "attach 1" \
|
||||
-ex "source $root/Nuttx.py" \
|
||||
@@ -137,7 +152,7 @@ fi
|
||||
#
|
||||
# Folding the stacks.
|
||||
#
|
||||
[ -f $stacksfile ] || die "Where are the stack samples?"
|
||||
[ -f $stacksfile ] || die "Where are the stack samples? Expected file not found: $stacksfile"
|
||||
|
||||
cat << 'EOF' > /tmp/pmpn-folder.py
|
||||
#
|
||||
|
||||
Submodule platforms/nuttx/NuttX/nuttx updated: 405cfa2571...bf06434168
@@ -104,10 +104,10 @@ int up_pwm_servo_init(uint32_t channel_mask)
|
||||
return OK;
|
||||
}
|
||||
|
||||
void up_pwm_servo_deinit(void)
|
||||
void up_pwm_servo_deinit(uint32_t channel_mask)
|
||||
{
|
||||
/* disable the timers */
|
||||
up_pwm_servo_arm(false);
|
||||
up_pwm_servo_arm(false, channel_mask);
|
||||
}
|
||||
|
||||
int up_pwm_servo_set_rate_group_update(unsigned channel, unsigned rate)
|
||||
@@ -154,8 +154,8 @@ uint32_t up_pwm_servo_get_rate_group(unsigned group)
|
||||
}
|
||||
|
||||
void
|
||||
up_pwm_servo_arm(bool armed)
|
||||
up_pwm_servo_arm(bool armed, uint32_t channel_mask)
|
||||
{
|
||||
io_timer_set_enable(armed, IOTimerChanMode_OneShot, IO_TIMER_ALL_MODES_CHANNELS);
|
||||
io_timer_set_enable(armed, IOTimerChanMode_PWMOut, IO_TIMER_ALL_MODES_CHANNELS);
|
||||
io_timer_set_enable(armed, IOTimerChanMode_OneShot, channel_mask);
|
||||
io_timer_set_enable(armed, IOTimerChanMode_PWMOut, channel_mask);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,8 @@ int kinetis_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, boo
|
||||
#define px4_arch_gpiosetevent(pinset,r,f,e,fp,a) kinetis_gpiosetevent(pinset,r,f,e,fp,a)
|
||||
|
||||
#define _PX4_MAKE_GPIO(pin_ftmx, io) ((((uint32_t)(pin_ftmx)) & ~(_PIN_MODE_MASK | _PIN_OPTIONS_MASK)) |(io))
|
||||
#define PX4_MAKE_GPIO_INPUT(gpio) _PX4_MAKE_GPIO(gpio, GPIO_PULLUP)
|
||||
#define PX4_MAKE_GPIO_OUTPUT(gpio) _PX4_MAKE_GPIO(gpio, GPIO_HIGHDRIVE)
|
||||
#define PX4_MAKE_GPIO_INPUT(gpio) _PX4_MAKE_GPIO((gpio), GPIO_PULLUP)
|
||||
#define PX4_MAKE_GPIO_INPUT_PULL_DOWN(gpio) _PX4_MAKE_GPIO((gpio), GPIO_PULLDOWN)
|
||||
#define PX4_MAKE_GPIO_OUTPUT(gpio) _PX4_MAKE_GPIO((gpio), GPIO_HIGHDRIVE)
|
||||
|
||||
__END_DECLS
|
||||
|
||||
@@ -105,10 +105,10 @@ int up_pwm_servo_init(uint32_t channel_mask)
|
||||
return OK;
|
||||
}
|
||||
|
||||
void up_pwm_servo_deinit(void)
|
||||
void up_pwm_servo_deinit(uint32_t channel_mask)
|
||||
{
|
||||
/* disable the timers */
|
||||
up_pwm_servo_arm(false);
|
||||
up_pwm_servo_arm(false, channel_mask);
|
||||
}
|
||||
|
||||
int up_pwm_servo_set_rate_group_update(unsigned group, unsigned rate)
|
||||
@@ -155,8 +155,8 @@ uint32_t up_pwm_servo_get_rate_group(unsigned group)
|
||||
}
|
||||
|
||||
void
|
||||
up_pwm_servo_arm(bool armed)
|
||||
up_pwm_servo_arm(bool armed, uint32_t channel_mask)
|
||||
{
|
||||
io_timer_set_enable(armed, IOTimerChanMode_OneShot, IO_TIMER_ALL_MODES_CHANNELS);
|
||||
io_timer_set_enable(armed, IOTimerChanMode_PWMOut, IO_TIMER_ALL_MODES_CHANNELS);
|
||||
io_timer_set_enable(armed, IOTimerChanMode_OneShot, channel_mask);
|
||||
io_timer_set_enable(armed, IOTimerChanMode_PWMOut, channel_mask);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user