Compare commits

..

No commits in common. "v1.7.4beta" and "v1.7.2" have entirely different histories.

1121 changed files with 23488 additions and 21661 deletions

View File

@ -1,33 +0,0 @@
# How to install:
# gem install github_changelog_generator
# How to run:
# github_changelog_generator -u PX4 -p Firmware
# Description:
# The following params are sensible defaults for the PX4 project,
# if you want to do a changelog before a release you need to update since-tag and future-releases,
# Params:
# github_changelog_generator --help for all options
# max-issues
# max threshold for github api queries
# make sure you set your CHANGELOG_GITHUB_TOKEN before
# running
max-issues=1500
# exclude-tags-regex
# excludes release candidates
exclude-tags-regex=rc[0-9]{1,}|beta[0-9]{1,}
# since-tag
# version of last stable release
# you need to change this depending on what you need
# if you want a changelog between versions this is the lowest version
since-tag=1.6.5
# future-release
# version you are about to release
# if you want a changelog between a version and all unreleased changes grouped as a release
# eg: v1.6.5 to v1.7.0
future-release=v1.7.0

4
.gitmodules vendored
View File

@ -1,3 +1,7 @@
[submodule "mavlink/include/mavlink/v1.0"]
path = mavlink/include/mavlink/v1.0
url = https://github.com/mavlink/c_library_v1.git
branch = master
[submodule "mavlink/include/mavlink/v2.0"]
path = mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git

View File

@ -110,7 +110,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
#=============================================================================
# git
@ -155,9 +155,6 @@ if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE)
endif()
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${OS}/cmake)
include(platforms/${OS}/cmake/px4_impl_os.cmake)
set(config_module "configs/${CONFIG}")
include(${config_module})
@ -246,11 +243,11 @@ set(BUILD_SHARED_LIBS OFF)
#=============================================================================
# ccache
#
option(CCACHE "Use ccache if available" ON)
option(CCACHE "Use ccache if available" OFF)
find_program(CCACHE_PROGRAM ccache)
if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
if (CCACHE AND CCACHE_PROGRAM)
message(STATUS "Enabled ccache: ${CCACHE_PROGRAM}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
else()
endif()
#=============================================================================
@ -335,7 +332,7 @@ px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${CMAKE_EXE_LINKER_FLAGS};${exe_linker
px4_join(OUT CMAKE_C_FLAGS LIST "${CMAKE_C_FLAGS};${c_flags};${optimization_flags}" GLUE " ")
px4_join(OUT CMAKE_CXX_FLAGS LIST "${CMAKE_CXX_FLAGS};${cxx_flags};${optimization_flags}" GLUE " ")
include_directories(${include_dirs} ${CMAKE_CURRENT_BINARY_DIR}/src/modules/systemlib/param)
include_directories(${include_dirs})
link_directories(${link_dirs})
add_definitions(${definitions})
@ -397,13 +394,11 @@ endif()
#=============================================================================
# subdirectories
#
add_subdirectory(src/platforms/common)
foreach(module ${config_module_list})
add_subdirectory(src/${module})
endforeach()
add_subdirectory(platforms/${OS})
add_subdirectory(src/firmware/${OS})
#=============================================================================
# generate custom target to print for all executable and module cmake targets

View File

@ -41,4 +41,4 @@ Since we care about safety, we will regularly ask you for test results. Best is
Push changes to your repo and send a [pull request](https://github.com/PX4/Firmware/compare/).
MuncherMake sure to provide some testing feedback and if possible the link to a flight log file. Upload flight log files to [Flight Review](http://logs.px4.io) and link the resulting report.
Make sure to provide some testing feedback and if possible the link to a flight log file. Upload flight log files to [Log Muncher](http://dash.oznet.ch) and link the resulting report.

View File

@ -1,8 +1,8 @@
#
# Various PX4-specific macros
#
source platforms/nuttx/Debug/NuttX
source platforms/nuttx/Debug/ARMv7M
source Debug/NuttX
source Debug/ARMv7M
echo Loading PX4 GDB macros. Use 'help px4' for more information.\n

View File

@ -10,4 +10,4 @@ attach 1
monitor vector_catch disable hard
set mem inaccessible-by-default off
set print pretty
source platforms/nuttx/Debug/PX4
source Debug/PX4

View File

@ -15,7 +15,7 @@ mon poll
mon cortex_m maskisr auto
set mem inaccessible-by-default off
set print pretty
source platforms/nuttx/Debug/PX4
source Debug/PX4
echo PX4 resumed, press ctrl-c to interrupt\n
continue

View File

@ -108,7 +108,7 @@ then
>> $stacksfile
else
arm-none-eabi-gdb $elf --batch -ex "set print asm-demangle on" \
-ex "source $root/platforms/nuttx/Debug/Nuttx.py" \
-ex "source $root/Debug/Nuttx.py" \
-ex "show mybt $taskname" \
2> $gdberrfile \
| sed -n 's/0\.0:\(#.*\)/\1/p' \

View File

@ -7,7 +7,6 @@
"summary": "AEROCORE2",
"version": "0.1",
"image_size": 0,
"image_maxsize": 1032192,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "AEROFCv1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 999424,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "AUAV X2.1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "CRAZYFLIE",
"version": "0.1",
"image_size": 0,
"image_maxsize": 1032192,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "ESC35v1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 229376,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "MindPXFMUv2",
"version": "2.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "NXPHLITEv3",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2096112,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4/SAME70xplained",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2097152,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4/STM32F4Discovery",
"version": "0.1",
"image_size": 0,
"image_maxsize": 1032192,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4CANNODEv1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 122880,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4ESCv1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 475136,
"git_identity": "",
"board_revision": 0
}

View File

@ -1,13 +1,12 @@
{
"board_id": 24,
"magic": "FLOWv1",
"description": "Firmware for the PX4FlowV2 board",
"description": "Firmware for the PX4FLowV1 board",
"image": "",
"build_time": 0,
"summary": "PX4FLOWv2",
"summary": "PX4FLOWv1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4FMUv2",
"version": "0.1",
"image_size": 0,
"image_maxsize": 1032192,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4FMUv3",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4FMUv4",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4FMUv4PRO",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4FMUv5",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2064384,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4IOv2",
"version": "2.0",
"image_size": 0,
"image_maxsize": 61440,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "PX4NUCLEOF767ZIv1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2097152,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "S2740VCv1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 65536,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "TAPv1",
"version": "0.1",
"image_size": 0,
"image_maxsize": 999424,
"git_identity": "",
"board_revision": 0
}

View File

@ -7,7 +7,6 @@
"summary": "ZUBAXGNSSv1",
"version": "0.0",
"image_size": 0,
"image_maxsize": 253952,
"git_identity": "",
"board_revision": 0
}

390
Jenkinsfile vendored
View File

@ -15,11 +15,10 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-nuttx:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "git fetch --tags"
sh "make nuttx_${node_name}_default"
@ -27,7 +26,6 @@ pipeline {
sh "make sizes"
sh "ccache -s"
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
archiveArtifacts(artifacts: 'build/*/*.elf', fingerprint: true)
}
}
}
@ -40,11 +38,10 @@ pipeline {
builds["px4fmu-v2"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-nuttx:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "git fetch --tags"
sh "make px4io-v2_default"
@ -55,7 +52,6 @@ pipeline {
sh "make sizes"
sh "ccache -s"
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
archiveArtifacts(artifacts: 'build/*/*.elf', fingerprint: true)
}
}
}
@ -70,18 +66,16 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-nuttx:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "git fetch --tags"
sh "make nuttx_${node_name}_default"
sh "make sizes"
sh "ccache -s"
archiveArtifacts(artifacts: 'build/*/*.px4', fingerprint: true)
archiveArtifacts(artifacts: 'build/*/*.elf', fingerprint: true)
}
}
}
@ -97,11 +91,10 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-nuttx:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image('px4io/px4-dev-nuttx:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "make nuttx_${node_name}_default"
sh "make sizes"
@ -121,11 +114,10 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-base:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image('px4io/px4-dev-base:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "make posix_${node_name}"
sh "ccache -s"
@ -144,11 +136,10 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-raspi:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image('px4io/px4-dev-raspi:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "make posix_${node_name}"
sh "ccache -s"
@ -167,11 +158,10 @@ pipeline {
builds["${node_name}"] = {
node {
stage("Build Test ${node_name}") {
docker.image('px4io/px4-dev-armhf:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image('px4io/px4-dev-armhf:2017-10-23').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "make posix_${node_name}"
sh "ccache -s"
@ -191,11 +181,10 @@ pipeline {
node {
stage("Build Test ${node_name}") {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
docker.image("lorenzmeier/px4-dev-snapdragon:2017-12-29").inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image("lorenzmeier/px4-dev-snapdragon:2017-10-23").inside {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "make ${node_name}"
sh "ccache -s"
@ -215,11 +204,10 @@ pipeline {
builds["${node_name} (GCC7)"] = {
node {
stage("Build Test ${node_name} (GCC7)") {
docker.image('px4io/px4-dev-base-archlinux:2017-12-30').inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
docker.image('px4io/px4-dev-base-archlinux:2017-12-08').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "export"
sh "make distclean"
sh "make clean"
sh "ccache -z"
sh "make posix_${node_name}"
sh "ccache -s"
@ -230,6 +218,27 @@ pipeline {
}
}
// GCC7 nuttx
for (def option in ["px4fmu-v5_default"]) {
def node_name = "${option}"
builds["${node_name} (GCC7)"] = {
node {
stage("Build Test ${node_name} (GCC7)") {
docker.image('px4io/px4-dev-base-archlinux:2017-12-08').inside('-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw') {
stage("${node_name}") {
checkout scm
sh "make clean"
sh "ccache -z"
sh "make nuttx_${node_name}"
sh "ccache -s"
}
}
}
}
}
}
parallel builds
}
}
@ -241,12 +250,11 @@ pipeline {
stage('check style') {
agent {
docker {
image 'px4io/px4-dev-base:2017-12-30'
image 'px4io/px4-dev-base:2017-10-23'
args '-e CI=true'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make check_format'
}
}
@ -254,13 +262,12 @@ pipeline {
stage('clang analyzer') {
agent {
docker {
image 'px4io/px4-dev-clang:2017-12-30'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
image 'px4io/px4-dev-clang:2017-10-23'
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make clean'
sh 'make scan-build'
// publish html
publishHTML target: [
@ -273,25 +280,17 @@ pipeline {
reportName: 'Clang Static Analyzer'
]
}
when {
anyOf {
branch 'master'
branch 'beta'
branch 'stable'
}
}
}
stage('clang tidy') {
agent {
docker {
image 'px4io/px4-dev-clang:2017-12-30'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
image 'px4io/px4-dev-clang:2017-10-23'
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make clean'
sh 'make clang-tidy-quiet'
}
}
@ -300,12 +299,11 @@ pipeline {
agent {
docker {
image 'px4io/px4-dev-base:ubuntu17.10'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make clean'
sh 'make cppcheck'
// publish html
publishHTML target: [
@ -318,253 +316,44 @@ pipeline {
reportName: 'Cppcheck'
]
}
when {
anyOf {
branch 'master'
branch 'beta'
branch 'stable'
}
}
}
stage('tests') {
agent {
docker {
image 'px4io/px4-dev-base:2017-12-30'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
image 'px4io/px4-dev-base:2017-10-23'
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make clean'
sh 'make posix_sitl_default test_results_junit'
junit 'build/posix_sitl_default/JUnitTestResults.xml'
}
}
stage('ROS vtol mission new 1') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_new_1: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_new_1: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS vtol mission new 2') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_2 vehicle:=standard_vtol'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_new_2: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_new_2: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS vtol mission old 1') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_1 vehicle:=standard_vtol'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_1: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_1: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS vtol mission old 2') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_2 vehicle:=standard_vtol'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_2: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_2: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS vtol mission old 3') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
//sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
//sh 'git fetch --tags'
//sh 'make posix_sitl_default'
//sh 'make posix_sitl_default sitl_gazebo'
//sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_3 vehicle:=standard_vtol'
}
post {
//success {
// sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_3: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
//}
failure {
//sh './Tools/upload_log.py -q --description "ROS mission test vtol_old_3: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS MC mission box') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=multirotor_box vehicle:=iris'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS mission test multirotor_box: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS mission test multirotor_box: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS offboard att') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS offboard attitude test: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS offboard attitude test: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
stage('ROS offboard pos') {
agent {
docker {
image 'px4io/px4-dev-ros:2017-12-31'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test'
}
post {
success {
sh './Tools/upload_log.py -q --description "ROS offboard position test: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
}
failure {
sh './Tools/upload_log.py -q --description "ROS offboard position test: ${CHANGE_ID}" --feedback "${CHANGE_TITLE} - ${CHANGE_URL}" --source CI --email "${CHANGE_AUTHOR_EMAIL}" .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.ulg'
archiveArtifacts '.ros/**/rosunit-*.xml'
archiveArtifacts '.ros/**/rostest-*.log'
}
}
}
// temporarily disabled until stable
//stage('tests coverage') {
// agent {
// docker {
// image 'px4io/px4-dev-base:2017-10-23'
// args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
// }
// }
// steps {
// sh 'make clean'
// sh 'make tests_coverage'
// // publish html
// publishHTML target: [
// allowMissing: false,
// alwaysLinkToLastBuild: false,
// keepAll: true,
// reportDir: 'build/posix_sitl_default/coverage-html',
// reportFiles: '*',
// reportName: 'Coverage Report'
// ]
// }
//}
}
}
@ -575,10 +364,9 @@ pipeline {
stage('airframe') {
agent {
docker { image 'px4io/px4-dev-base:2017-12-30' }
docker { image 'px4io/px4-dev-base:2017-10-23' }
}
steps {
sh 'make distclean'
sh 'make airframe_metadata'
archiveArtifacts(artifacts: 'airframes.md, airframes.xml', fingerprint: true)
}
@ -586,10 +374,9 @@ pipeline {
stage('parameter') {
agent {
docker { image 'px4io/px4-dev-base:2017-12-30' }
docker { image 'px4io/px4-dev-base:2017-10-23' }
}
steps {
sh 'make distclean'
sh 'make parameters_metadata'
archiveArtifacts(artifacts: 'parameters.md, parameters.xml', fingerprint: true)
}
@ -597,35 +384,19 @@ pipeline {
stage('module') {
agent {
docker { image 'px4io/px4-dev-base:2017-12-30' }
docker { image 'px4io/px4-dev-base:2017-10-23' }
}
steps {
sh 'make distclean'
sh 'make module_documentation'
archiveArtifacts(artifacts: 'modules/*.md', fingerprint: true)
}
}
stage('uorb graphs') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2017-12-30'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make uorb_graphs'
archiveArtifacts(artifacts: 'Tools/uorb_graph/graph_sitl.json')
}
}
}
}
stage('S3 Upload') {
agent {
docker { image 'px4io/px4-dev-base:2017-12-30' }
docker { image 'px4io/px4-dev-base:2017-10-23' }
}
when {
@ -641,10 +412,7 @@ pipeline {
}
}
}
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
}
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
timeout(time: 60, unit: 'MINUTES')

View File

@ -252,8 +252,8 @@ coverity_scan: posix_sitl_default
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata
parameters_metadata:
@python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --markdown
@python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --xml
@python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 3 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --markdown
@python $(SRC_DIR)/src/modules/systemlib/param/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 3 -type d` --inject-xml $(SRC_DIR)/src/modules/systemlib/param/parameters_injected.xml --xml
airframe_metadata:
@python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --markdown
@ -279,7 +279,7 @@ format:
# Testing
# --------------------------------------------------------------------
.PHONY: tests tests_coverage tests_mission tests_offboard rostest
.PHONY: tests tests_coverage
tests:
@$(MAKE) --no-print-directory posix_sitl_default test_results \
@ -287,25 +287,9 @@ tests:
UBSAN_OPTIONS="color=always"
tests_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory posix_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage
@$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo PX4_CMAKE_BUILD_TYPE=Coverage
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_missions.test
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
@$(MAKE) --no-print-directory posix_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage
@echo "Open $(SRC_DIR)/build/posix_sitl_default/coverage-html/index.html to see coverage"
rostest: posix_sitl_default
@$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo
tests_mission: rostest
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_missions.test
tests_offboard: rostest
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
# static analyzers (scan-build, clang-tidy, cppcheck)
# --------------------------------------------------------------------
.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck check_stack
@ -326,12 +310,12 @@ posix_sitl_default-clang:
@$(PX4_MAKE) -C $(SRC_DIR)/build/posix_sitl_default-clang
clang-tidy: posix_sitl_default-clang
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
@cd $(SRC_DIR)/build/posix_sitl_default-clang && run-clang-tidy-4.0.py -header-filter=".*\.hpp" -j$(j) -p .
# to automatically fix a single check at a time, eg modernize-redundant-void-arg
# % run-clang-tidy-4.0.py -fix -j4 -checks=-\*,modernize-redundant-void-arg -p .
clang-tidy-fix: posix_sitl_default-clang
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -fix -p .
@cd $(SRC_DIR)/build/posix_sitl_default-clang && run-clang-tidy-4.0.py -header-filter=".*\.hpp" -j$(j) -fix -p .
# modified version of run-clang-tidy.py to return error codes and only output relevant results
clang-tidy-quiet: posix_sitl_default-clang
@ -374,8 +358,7 @@ submodulesupdate:
gazeboclean:
@rm -rf ~/.gazebo/*
distclean: gazeboclean
@git submodule deinit -f .
distclean: submodulesclean gazeboclean
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
# --------------------------------------------------------------------

View File

@ -25,7 +25,7 @@ See the [forum and chat](https://docs.px4.io/en/#support) if you need help!
## PX4 Developers
This [Developer Guide](https://dev.px4.io/) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
This [Developer Guide](https://dev.px4.io/) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, any anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
Developers should read the [Guide for Contributions](https://dev.px4.io/en/contribute/).
See the [forum and chat](https://dev.px4.io/en/#support) if you need help!
@ -35,12 +35,12 @@ See the [forum and chat](https://dev.px4.io/en/#support) if you need help!
The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribute/#dev_call).
> **Note** The dev call is open to all interested developers (not just the core dev team). This is a great opportunity to meet the team and contribute to the ongoing development of the platform. It includes a QA session for newcomers.
> **Note** The dev call is open to all interested developers (not just the core dev team). This is a great opportunity to meet the team and contribute to the ongoing development of the platform.
## Maintenance Team
* Project: Founder - [Lorenz Meier](https://github.com/LorenzMeier), Architecture: [Daniel Agar](https://github.com/dagar)
* Project / Founder - [Lorenz Meier](https://github.com/LorenzMeier)
* [Dev Call](https://github.com/PX4/Firmware/labels/devcall) - [Ramon Roche](https://github.com/mrpollo)
* Communication Architecture
* [Beat Kueng](https://github.com/bkueng)
@ -67,13 +67,15 @@ The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribut
* Vision based navigation
* [Christoph Tobler](https://github.com/ChristophTobler)
* [Mohammed Kabir](https://github.com/mhkabir)
* Obstacle Avoidance - [Martina Rivizzigno](https://github.com/mrivi)
* Obstacle Avoidance - [Vilhjalmur Vilhjalmsson](https://github.com/vilhjalmur89)
* [Snapdragon](https://github.com/PX4/Firmware/labels/snapdragon)
* [Christoph Tobler](https://github.com/ChristophTobler)
* [Mark Charlebois](https://github.com/mcharleb)
* [Intel Aero](https://github.com/PX4/Firmware/labels/intel%20aero)
* [Sugnan Prabhu](https://github.com/sugnanprabhu)
* [José Roberto de Souza](https://github.com/zehortigoza)
* [Raspberry Pi / Navio](https://github.com/PX4/Firmware/labels/raspberry_pi) - [Beat Kueng](https://github.com/bkueng)
* [Parrot Bebop](https://github.com/PX4/Firmware/labels/bebop) - [Michael Schaeuble](https://github.com/eyeam3)
* [Airmind MindPX / MindRacer](https://github.com/PX4/Firmware/labels/mindpx) - [Henry Zhang](https://github.com/iZhangHui)
* RTPS/ROS2 Interface - [Vicente Monge](https://github.com/vicenteeprosima)

View File

@ -28,29 +28,19 @@ list(APPEND romfs_dependencies
${romfs_temp_dir}/init.d/rc.autostart
)
# copy px4io binary if configured
if (config_io_board)
list(APPEND romfs_dependencies
copy_px4io_bin
${fw_io_bin}
)
endif()
# create romfs.img
# create romfs.bin
add_custom_command(OUTPUT romfs.img
COMMAND ${CMAKE_COMMAND} -E remove -f romfs.img romfs.txt
COMMAND ${GENROMFS} -f romfs.img -d ${romfs_temp_dir} -V "NSHInitVol" -v > romfs.txt 2>&1
DEPENDS ${romfs_dependencies}
)
# create nsh_romfsimg.c
# create romfs.o
add_custom_command(OUTPUT nsh_romfsimg.c
COMMAND ${CMAKE_COMMAND} -E remove -f nsh_romfsimg.c
COMMAND xxd -i romfs.img nsh_romfsimg.c
COMMAND sed 's/unsigned/const unsigned/g' nsh_romfsimg.c > nsh_romfsimg.c.tmp && mv nsh_romfsimg.c.tmp nsh_romfsimg.c
DEPENDS romfs.img
)
add_library(romfs STATIC nsh_romfsimg.c)
add_dependencies(romfs prebuild_targets)
add_dependencies(romfs platforms__common)
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)

View File

@ -40,6 +40,6 @@ then
param set BAT_A_PER_V 15.39103
fi
set MIXER quad_w
set MIXER quad_dc
set PWM_OUT 1234

View File

@ -8,6 +8,7 @@
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/4001_quad_x
sh /etc/init.d/rc.mc_defaults
set MIXER quad_x
param set SYS_HITL 1

View File

@ -17,6 +17,7 @@
# @output AUX4 Rudder
# @output AUX5 Throttle
#
# @board px4fmu-v1 exclude
sh /etc/init.d/rc.vtol_defaults

View File

@ -38,7 +38,6 @@ then
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set MAV_TYPE 19
param set VT_ELEV_MC_LOCK 0
fi
set MIXER caipirinha_vtol

View File

@ -16,8 +16,6 @@
#
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.vtol_defaults

View File

@ -24,7 +24,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set VT_TRANS_THR 0.75
param set VT_ARSP_TRANS 12
param set VT_ARSP_BLEND 6

View File

@ -22,7 +22,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set VT_TRANS_THR 0.75
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.15

View File

@ -14,7 +14,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set VT_TRANS_THR 0.75
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15

View File

@ -14,7 +14,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set VT_TRANS_THR 0.75
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1

View File

@ -19,7 +19,7 @@ then
param set VT_ARSP_TRANS 15.0
param set VT_B_TRANS_DUR 4.0
param set VT_TRANS_MIN_TM 5.0
param set VT_F_TRANS_THR 0.6
param set VT_TRANS_THR 0.6
param set VT_TRANS_TIMEOUT 30.0
param set FW_AIRSPD_MAX 22.0

View File

@ -7,8 +7,6 @@
#
# @maintainer Samay Siga <samay_s@icloud.com>
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.vtol_defaults

View File

@ -23,7 +23,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_MOT_COUNT 3
param set VT_FW_MOT_OFFID 3
param set VT_IDLE_PWM_MC 1150
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 1
param set VT_B_TRANS_DUR 1.0

View File

@ -23,7 +23,7 @@ if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 1
param set VT_TRANS_THR 1
param set VT_DWN_PITCH_MAX 8
param set VT_FW_QC_P 55
param set VT_FW_QC_R 55

View File

@ -0,0 +1,19 @@
#!nsh
#
# @name Passthrough mode for Snapdragon
#
# @type custom
# @class Tool
#
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Julian Oes <julian@oes.ch>
#
# This startup can be used on Pixhawk/Pixfalcon/Pixracer for the
# passthrough of RC input and PWM output.
set VEHICLE_TYPE passthrough

View File

@ -11,7 +11,7 @@
# @type Quadrotor x
# @class Copter
#
# @maintainer Beat Kueng <beat@px4.io>
# @maintainer Lucas de Marchi
#
sh /etc/init.d/rc.mc_defaults

View File

@ -17,15 +17,17 @@ set PWM_OUT 1234
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 2.2
param set MC_ROLLRATE_P 0.06
param set MC_ROLL_P 2.0
param set MC_ROLLRATE_P 0.05
param set MC_ROLLRATE_I 0.2
param set MC_ROLLRATE_D 0.0017
param set MC_ROLLRATE_D 0.0015
param set MC_ROLL_TC 0.18
param set MC_PITCH_P 2.2
param set MC_PITCHRATE_P 0.06
param set MC_PITCH_P 2.0
param set MC_PITCHRATE_P 0.05
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_D 0.0017
param set MC_PITCHRATE_D 0.0015
param set MC_PITCH_TC 0.18
param set MC_YAW_P 1.0
param set MC_YAWRATE_P 0.15

View File

@ -10,8 +10,6 @@
#
# @maintainer
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.ugv_defaults

View File

@ -14,8 +14,6 @@
# @output MAIN7 pass-through of control group 0, channel 6
# @output MAIN8 pass-through of control group 0, channel 7
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.axialracing_ax10_defaults

View File

@ -12,8 +12,6 @@
#
# @maintainer Marco Zorzi
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.ugv_defaults

View File

@ -120,7 +120,27 @@ then
fi
fi
if ver hwcmp MINDPX_V2 CRAZYFLIE AEROFC_V1 PX4FMU_V4 NXPHLITE_V3
if ver hwcmp MINDPX_V2
then
set MIXER_AUX none
fi
if ver hwcmp CRAZYFLIE
then
set MIXER_AUX none
fi
if ver hwcmp AEROFC_V1
then
set MIXER_AUX none
fi
if ver hwcmp PX4FMU_V4
then
set MIXER_AUX none
fi
if ver hwcmp PX4FMU_V5
then
set MIXER_AUX none
fi

View File

@ -1,33 +0,0 @@
#!nsh
# Logging
#
# Standard startup script for logging
#
if param compare SYS_LOGGER 0
then
sdlog2 start -r 100 -a -b 9 -t
else
set LOGGER_ARGS ""
if param compare SDLOG_MODE 1
then
set LOGGER_ARGS "-e"
fi
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "-f"
fi
if ver hwcmp AEROFC_V1
then
set LOGGER_ARGS "-m mavlink"
fi
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
unset LOGGER_ARGS
fi
unset LOGGER_BUF

View File

@ -31,8 +31,8 @@ else
# External SPI
ms5611 -S start
# Internal SPI (auto detect ms5611 or ms5607)
ms5611 -T 0 -s start
# Internal SPI
ms5611 -s start
# Blacksheep telemetry
bst start
@ -42,13 +42,13 @@ fi
if ver hwcmp NXPHLITE_V3
then
# Internal I2C (baro)
# Internal I2C
mpl3115a2 -I start
# Internal SPI (accel + mag)
fxos8701cq start -a 8 -R 0
# Internal SPI
fxos8700cq start -a 8 -R 0
# Internal SPI (gyro)
# Internal SPI
fxas21002c start -R 0
fi
@ -56,7 +56,6 @@ if ver hwcmp AUAV_X21
then
# External I2C bus
hmc5883 -C -T -X start
lis3mdl -X start
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
mpu6000 -R 2 -T 20608 start
@ -70,9 +69,6 @@ fi
if ver hwcmp PX4FMU_V2
then
# V2 build hwtypecmp is always false
set BOARD_FMUV3 0
# External I2C bus
hmc5883 -C -T -X start
lis3mdl -X start
@ -83,6 +79,8 @@ then
# Internal SPI bus ICM-20608-G
mpu6000 -T 20608 start
# V2 build hwtypecmp is always false
set BOARD_FMUV3 0
# V3 build hwtypecmp supports V2|V2M|V30
if ver hwtypecmp V30
then
@ -101,26 +99,6 @@ then
fi
fi
# Check if a Pixhack (which reports as V2M) is present
if ver hwtypecmp V2M
then
# Pixhawk Mini doesn't have these sensors,
# so if they are found we know its a Pixhack
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -S -R 4 start
then
set BOARD_FMUV3 20
else
# Check for Pixhack 3.1
# external MPU9250 is rotated 180 degrees yaw
if mpu9250 -S -R 4 start
then
set BOARD_FMUV3 21
fi
fi
fi
if [ $BOARD_FMUV3 != 0 ]
then
# sensor heating is available, but we disable it for now
@ -136,9 +114,9 @@ then
then
# v2.0 internal MPU6000 is rotated 180 deg roll, 270 deg yaw
mpu6000 -R 14 start
# v2.0 Has internal hmc5883 on SPI1
hmc5883 -C -T -S -R 8 start
fi
if [ $BOARD_FMUV3 == 21 ]
@ -165,8 +143,6 @@ then
l3gd20 start
lsm303d start
fi
unset BOARD_FMUV3
fi
if ver hwcmp PX4_SAME70XPLAINED_V1
@ -197,7 +173,7 @@ then
# lis3mdl internal SPI bus is rotated 90 deg yaw
else
# BMI055 gyro internal SPI bus
bmi055 -G start
bmi055 -G start
fi
fi
@ -396,49 +372,6 @@ then
teraranger start
fi
# Benewake TFMini
if param greater SENS_EN_TFMINI 0
then
if ver hwcmp PX4FMU_V2 PX4FMU_V4PRO
then
# start the driver on serial 4/5
tfmini start -d /dev/ttyS6
else
if ver hwcmp AEROFC_V1
then
# start the driver on telemetry
tfmini start -d /dev/ttyS3
else
if param compare SYS_COMPANION 0
then
# start on default mavlink companion device
tfmini start -d /dev/ttyS2
fi
fi
fi
fi
# LeddarOne
if param greater SENS_EN_LEDDAR1 0
then
if ver hwcmp PX4FMU_V2 PX4FMU_V4PRO
then
# start the driver on serial 4/5
leddar_one -d /dev/ttyS6 start
fi
if ver hwcmp AEROFC_V1
then
# start the driver on telemetry
leddar_one -d /dev/ttyS3 start
else
if param compare SYS_COMPANION 0
then
# start on default mavlink companion device
leddar_one -d /dev/ttyS2 start
fi
fi
fi
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
usleep 20000
sensors start

View File

@ -15,7 +15,7 @@ set +e
#
# UART mapping on FMUv2/3/4:
#
# UART1 /dev/ttyS0 IO debug (except v4, there ttyS0 is the wifi)
# UART1 /dev/ttyS0 IO debug
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4
@ -28,7 +28,7 @@ set +e
# UART1 /dev/ttyS0 GPS
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4 /dev/ttyS3 TELEM4
# UART4 /dev/ttyS3 ?
# USART6 /dev/ttyS4 TELEM3 (flow control)
# UART7 /dev/ttyS5 ?
# UART8 /dev/ttyS6 CONSOLE
@ -51,7 +51,7 @@ ver all
#
set MODE autostart
set TUNE_ERR "ML<<CP4CP4CP4CP4CP4"
set TUNE_ERR ML<<CP4CP4CP4CP4CP4
set LOG_FILE /fs/microsd/bootlog.txt
#
@ -60,6 +60,7 @@ set LOG_FILE /fs/microsd/bootlog.txt
# REBOOTWORK this needs to start after the flight control loop
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "[i] microSD mounted: /fs/microsd"
if hardfault_log check
then
tone_alarm error
@ -68,6 +69,9 @@ then
hardfault_log reset
tone_alarm stop
fi
else
# Start playing the startup tune
tone_alarm start
fi
else
tone_alarm MBAGP
@ -75,9 +79,9 @@ else
then
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "INFO [init] card formatted"
echo "INFO [init] MicroSD card formatted"
else
echo "ERROR [init] format failed"
echo "ERROR [init] Format failed"
tone_alarm MNBG
set LOG_FILE /dev/null
fi
@ -93,6 +97,7 @@ fi
set FRC /fs/microsd/etc/rc.txt
if [ -f $FRC ]
then
echo "INFO [init] Executing script: ${FRC}"
sh $FRC
set MODE custom
fi
@ -106,12 +111,6 @@ then
#
uorb start
# Start tone driver
tone_alarm start
# play startup tone
tune_control play -t 1
#
# Load parameters
#
@ -195,11 +194,25 @@ then
set MAV_TYPE none
set FAILSAFE none
set USE_IO no
set LOGGER_BUF 14
set LOGGER_BUF 16
if ver hwcmp PX4FMU_V4
then
param set SYS_FMU_TASK 1
fi
if ver hwcmp PX4FMU_V4PRO
then
param set SYS_FMU_TASK 1
fi
if ver hwcmp PX4FMU_V5
then
param set SYS_FMU_TASK 1
set MAVLINK_COMPANION_DEVICE /dev/ttyS3
set LOGGER_BUF 64
param set SDLOG_MODE 2
fi
if ver hwcmp CRAZYFLIE
@ -286,13 +299,6 @@ then
then
param set CBRK_IO_SAFETY 22027
fi
# Run FMU as task on Pixracer and on boards with enough RAM
if ver hwcmp PX4FMU_V4 PX4FMU_V4PRO PX4FMU_V5
then
param set SYS_FMU_TASK 1
fi
param set SYS_AUTOCONFIG 0
fi
unset AUTOCNF
@ -310,6 +316,8 @@ then
if px4io checkcrc ${IO_FILE}
then
echo "[init] PX4IO CRC OK" >> $LOG_FILE
set IO_PRESENT yes
else
tone_alarm MLL32CP8MB
@ -341,7 +349,7 @@ then
fi
else
echo "PX4IO update failed" >> $LOG_FILE
tune_control play -m ${TUNE_ERR}
tone_alarm ${TUNE_ERR}
fi
fi
fi
@ -350,7 +358,7 @@ then
if [ $IO_PRESENT == no ]
then
echo "PX4IO not found" >> $LOG_FILE
tune_control play -m ${TUNE_ERR}
tone_alarm ${TUNE_ERR}
fi
fi
@ -456,6 +464,7 @@ then
then
if param compare UAVCAN_ENABLE 0
then
echo "OVERRIDING UAVCAN_ENABLE = 3" >> $LOG_FILE
param set UAVCAN_ENABLE 3
fi
fi
@ -467,7 +476,7 @@ then
sh /etc/init.d/rc.io
else
echo "PX4IO start failed" >> $LOG_FILE
tune_control play -m ${TUNE_ERR}
tone_alarm $TUNE_ERR
fi
fi
@ -477,7 +486,7 @@ then
then
else
echo "FMU start failed" >> $LOG_FILE
tune_control play -m ${TUNE_ERR}
tone_alarm $TUNE_ERR
fi
fi
@ -496,7 +505,8 @@ then
if mkblctrl $MKBLCTRL_ARG
then
else
tune_control play -m ${TUNE_ERR}
echo "MK start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
unset MKBLCTRL_ARG
fi
@ -504,10 +514,10 @@ then
if [ $OUTPUT_MODE == hil ]
then
if pwm_out_sim start
if pwm_out_sim mode_pwm16
then
else
tune_control play -m ${TUNE_ERR}
tone_alarm $TUNE_ERR
fi
fi
@ -523,7 +533,7 @@ then
sh /etc/init.d/rc.io
else
echo "PX4IO start failed" >> $LOG_FILE
tune_control play -m ${TUNE_ERR}
tone_alarm $TUNE_ERR
fi
fi
else
@ -533,7 +543,7 @@ then
then
else
echo "FMU mode_${FMU_MODE} start failed" >> $LOG_FILE
tune_control play -m ${TUNE_ERR}
tone_alarm $TUNE_ERR
fi
fi
fi
@ -544,7 +554,7 @@ then
# Normal mode, use baudrate 57600 (default) and data rate 1000 bytes/s
set MAVLINK_F "-r 1200 -f"
# Use ttyS1 for MAVLink on FMUv4 in addition to ttyS0 (debug)
# Avoid using ttyS1 for MAVLink on FMUv4
if ver hwcmp PX4FMU_V4
then
set MAVLINK_F "-r 1200 -d /dev/ttyS1"
@ -555,16 +565,6 @@ then
if ver hwcmp AEROFC_V1
then
set MAVLINK_F "-r 1200 -d /dev/ttyS3"
# Only start mavlink if the Benewake TFMini or LeddarOne isn't being used
if param greater SENS_EN_TFMINI 0
then
set MAVLINK_F none
fi
if param greater SENS_EN_LEDDAR1 0
then
set MAVLINK_F none
fi
fi
if ver hwcmp CRAZYFLIE
@ -589,14 +589,7 @@ then
if param compare SYS_COMPANION 10
then
frsky_telemetry start -d ${MAVLINK_COMPANION_DEVICE}
else
if ver hwcmp PX4FMU_V4 PX4FMU_V4PRO MINDPX_V2
then
# This is TELEM4 on Pixhawk 3 Pro
frsky_telemetry start -d /dev/ttyS6
fi
fi
if param compare SYS_COMPANION 20
then
syslink start
@ -651,25 +644,9 @@ then
fi
if param compare SYS_COMPANION 419200
then
iridiumsbd start -d ${MAVLINK_COMPANION_DEVICE}
iridiumsbd start -d /dev/ttyS2
mavlink start -d /dev/iridium -b 19200 -m iridium -r 10
fi
if param compare SYS_COMPANION 519200
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 19200 -m minimal -r 1000
fi
if param compare SYS_COMPANION 538400
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 38400 -m minimal -r 1000
fi
if param compare SYS_COMPANION 557600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 57600 -m minimal -r 1000
fi
if param compare SYS_COMPANION 5115200
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 115200 -m minimal -r 1000
fi
if param compare SYS_COMPANION 1921600
then
mavlink start -d ${MAVLINK_COMPANION_DEVICE} -b 921600 -r 20000
@ -686,27 +663,48 @@ then
#
if param greater UAVCAN_ENABLE 0
then
# Start core UAVCAN module
if uavcan start
then
if param greater UAVCAN_ENABLE 1
then
# Reduce logger buffer to free up some RAM for UAVCAN servers
set LOGGER_BUF 6
# Start UAVCAN firmware update server and dynamic node ID allocation server
uavcan start fw
fi
set LOGGER_BUF 6
uavcan start fw
else
tone_alarm ${TUNE_ERR}
fi
fi
if ver hwcmp PX4FMU_V2 PX4FMU_V4 PX4FMU_V4PRO MINDPX_V2 PX4FMU_V5
if ver hwcmp PX4FMU_V4
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp MINDPX_V2
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp PX4FMU_V2
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp PX4FMU_V4
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp PX4FMU_V4PRO
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if ver hwcmp MINDPX_V2
then
px4flow start &
fi
if ver hwcmp AEROFC_V1
then
# don't start mavlink ttyACM0 on aerofc_v1
@ -715,6 +713,36 @@ then
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
fi
#
# Logging
#
if param compare SYS_LOGGER 0
then
sdlog2 start -r 100 -a -b 9 -t
else
set LOGGER_ARGS ""
if param compare SDLOG_MODE 1
then
set LOGGER_ARGS "-e"
fi
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "-f"
fi
if ver hwcmp AEROFC_V1
then
set LOGGER_ARGS "-m mavlink"
fi
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
unset LOGGER_BUF
unset LOGGER_ARGS
fi
#
# Fixed wing setup
#
@ -795,6 +823,7 @@ then
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
echo "Unknown MAV_TYPE"
param set MAV_TYPE 2
else
param set MAV_TYPE ${MAV_TYPE}
@ -876,6 +905,46 @@ then
sh /etc/init.d/rc.ugv_apps
fi
#
# For snapdragon, we need a passthrough mode
# Do not run any mavlink instances since we need the serial port for
# communication with Snapdragon.
#
if [ $VEHICLE_TYPE == passthrough ]
then
mavlink stop-all
commander stop
# Stop multicopter attitude controller if it is running, the controls come
# from Snapdragon.
if mc_att_control stop
then
fi
# Start snapdragon interface on serial port.
if ver hwcmp PX4FMU_V2
then
# On Pixfalcon use the standard telemetry port (Telem 1).
snapdragon_rc_pwm start -d /dev/ttyS1
px4io start
fi
if ver hwcmp PX4FMU_V4
then
# On Pixracer use Telem 2 port (TL2).
snapdragon_rc_pwm start -d /dev/ttyS2
fmu mode_pwm4 $FMU_ARGS
fi
pwm failsafe -c 1234 -p 900
pwm disarmed -c 1234 -p 900
# Arm straightaway.
pwm arm
# Use 400 Hz PWM on all channels.
pwm rate -a -r 400
fi
unset MIXER
unset MAV_TYPE
unset OUTPUT_MODE
@ -959,8 +1028,6 @@ then
fi
fi
sh /etc/init.d/rc.logging
# End of autostart
fi

View File

@ -1,81 +0,0 @@
Aileron/rudder/elevator/throttle mixer for PX4FMU
==================================================
This file defines mixers suitable for controlling a fixed wing aircraft with
aileron, rudder, elevator and throttle controls using PX4FMU. The configuration
assumes the aileron servo(s) are connected to PX4FMU servo output 0, the
elevator to output 1, the rudder to output 2 and the throttle to output 3.
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
CH1: Aileron mixer
-------------
Two scalers total (output, roll).
This mixer assumes that the aileron servos are set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
As there is only one output, if using two servos adjustments to compensate for
differences between the servos must be made mechanically. To obtain the correct
motion using a Y cable, the servos can be positioned reversed from one another.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
CH2: Elevator mixer
------------
Two scalers total (output, roll).
This mixer assumes that the elevator servo is set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
CH3: Rudder mixer
------------
Two scalers total (output, yaw).
This mixer assumes that the rudder servo is set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
CH4: Motor speed mixer
-----------------
Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
CH5: Flaps mixer
------------
Flaps are controlled automatically in position control and auto
but can also be controlled manually
M: 1
O: 5000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
Ch6: Landing gear mixer
------------
By default pass-through of gear switch
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000

View File

@ -1,21 +0,0 @@
Mixer for the gazebo tailsitter model
=====================================
R: 4x 10000 10000 10000 0
Z:
# left elevon
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
# right elevon
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
# mixer for the virtual elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 -10000 -10000 0 -10000 10000

View File

@ -1,41 +0,0 @@
Mixer for quad tiltrotor (x motor configuration)
================================================
This file defines a single mixer for a tiltrotor (SITL gazebo) with motors in X configuration. The plane has two ailerons and one elevator.
R: 4x 10000 10000 10000 0
# tilt servo motor 1
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 0 20000 -10000 -10000 10000
# tilt servo motor 2
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 0 20000 -10000 -10000 10000
# tilt servo motor 3
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 0 20000 -10000 -10000 10000
# tilt servo motor 4
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 0 20000 -10000 -10000 10000
# mixer for the left aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
# mixer for the right aileron
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
# mixer for the elevator
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000

View File

@ -8,9 +8,9 @@ then
PATTERN="$1"
fi
exec find src platforms \
-path platforms/nuttx/NuttX -prune -o \
-path platforms/nuttx/nuttx-configs -prune -o \
exec find src \
-path src/examples/attitude_estimator_ekf -prune -o \
-path src/examples/ekf_att_pos_estimator -prune -o \
-path src/lib/DriverFramework -prune -o \
-path src/lib/ecl -prune -o \
-path src/lib/matrix -prune -o \

View File

@ -4,25 +4,25 @@ if [ -z ${PX4_DOCKER_REPO+x} ]; then
echo "guessing PX4_DOCKER_REPO based on input";
if [[ $@ =~ .*px4fmu.* ]]; then
# nuttx-px4fmu-v{1,2,3,4,5}
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-12-30"
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-10-23"
elif [[ $@ =~ .*rpi.* ]] || [[ $@ =~ .*bebop.* ]]; then
# posix_rpi_cross, posix_bebop_default
PX4_DOCKER_REPO="px4io/px4-dev-raspi:2017-12-30"
PX4_DOCKER_REPO="px4io/px4-dev-raspi:2017-10-23"
elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then
# eagle, excelsior
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2017-12-29"
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2017-10-23"
elif [[ $@ =~ .*ocpoc.* ]]; then
# posix_ocpoc_ubuntu
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2017-12-30"
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2017-10-23"
elif [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
# clang tools
PX4_DOCKER_REPO="px4io/px4-dev-clang:2017-12-30"
PX4_DOCKER_REPO="px4io/px4-dev-clang:2017-10-23"
elif [[ $@ =~ .*cppcheck.* ]]; then
# TODO: remove this once px4io/px4-dev-base updates
PX4_DOCKER_REPO="px4io/px4-dev-base:ubuntu17.10"
elif [[ $@ =~ .*tests* ]]; then
# run all tests with simulation
PX4_DOCKER_REPO="px4io/px4-dev-simulation:2017-12-30"
PX4_DOCKER_REPO="px4io/px4-dev-simulation:2017-10-23"
fi
else
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
@ -30,7 +30,7 @@ fi
# otherwise default to nuttx
if [ -z ${PX4_DOCKER_REPO+x} ]; then
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-12-30"
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-10-23"
fi
# docker hygiene

View File

@ -1,19 +1,14 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import os, glob
import os
"""
Runs process_logdata_ekf.py on the .ulg files in the supplied directory. ulog files are skipped from the analysis, if a
corresponding .pdf file already exists (unless the overwrite flag was set).
Runs process_logdata_ekf.py on all the files in the suplied directory with a .ulg extension
"""
parser = argparse.ArgumentParser(description='Analyse the estimator_status and ekf2_innovation message data for the'
' .ulg files in the specified directory')
parser = argparse.ArgumentParser(description='Analyse the estimator_status and ekf2_innovation message data for all .ulg files in the specified directory')
parser.add_argument("directory_path")
parser.add_argument('-o', '--overwrite', action='store_true',
help='Whether to overwrite an already analysed file. If a file with .pdf extension exists for a .ulg'
'file, the log file will be skipped from analysis unless this flag has been set.')
def is_valid_directory(parser, arg):
if os.path.isdir(arg):
@ -24,18 +19,9 @@ def is_valid_directory(parser, arg):
args = parser.parse_args()
ulog_directory = args.directory_path
print("\n"+"analysing the .ulg files in "+ulog_directory)
# get all the ulog files found in the specified directory
ulog_files = glob.glob(os.path.join(ulog_directory, '*.ulg'))
# remove the files already analysed unless the overwrite flag was specified. A ulog file is consired to be analysed if
# a corresponding .pdf file exists.'
if not args.overwrite:
print("skipping already analysed ulg files.")
ulog_files = [ulog_file for ulog_file in ulog_files if not os.path.exists('{}.pdf'.format(ulog_file))]
# analyse all ulog files
for ulog_file in ulog_files:
print("\n"+"loading "+ulog_file +" for analysis")
os.system("python process_logdata_ekf.py '{}'".format(ulog_file))
print("\n"+"analysing all .ulog files in "+ulog_directory)
# Run the analysis script on all the log files found in the specified directory
for file in os.listdir(ulog_directory):
if file.endswith(".ulg"):
print("\n"+"loading "+file+" for analysis")
os.system("python process_logdata_ekf.py '{}'".format(os.path.join(ulog_directory, file)))

View File

@ -1146,7 +1146,7 @@ test_results = {
'yaw_sensor_status':['Pass','Yaw sensor check summary. This sensor data can be sourced from the magnetometer or an external vision system. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'vel_sensor_status':['Pass','Velocity sensor check summary. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'pos_sensor_status':['Pass','Position sensor check summary. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'hgt_sensor_status':['Pass','Height sensor check summary. This sensor data can be sourced from either Baro or GPS or range finder or external vision system. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no anomalies were detected and no further investigation is required'],
'hgt_sensor_status':['Pass','Height sensor check summary. This sensor data can be sourced from either Baro, GPS, range fidner or external vision system. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'hagl_sensor_status':['Pass','Height above ground sensor check summary. This sensor data is normally sourced from a rangefinder sensor. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'tas_sensor_status':['Pass','Airspeed sensor check summary. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],
'imu_sensor_status':['Pass','IMU sensor check summary. A Fail result indicates a significant error that caused a significant reduction in vehicle navigation performance was detected. A Warning result indicates that error levels higher than normal were detected but these errors did not significantly impact navigation performance. A Pass result indicates that no amonalies were detected and no further investigation is required'],

@ -1 +1 @@
Subproject commit b25ae5a729bb9c663cc8824cf7dac5bdd9585f4b
Subproject commit d24a1e1a68a0fbf2d90c950f9d38d1f40680eb27

View File

@ -16,7 +16,7 @@ Data can be gathered using the following sequence:
1) Power up the board and set the TC_A_ENABLE, TC_B_ENABLE and TC_G_ENABLE parameters to 1
2) Set all CAL_GYR and CAL_ACC parameters to defaults
3) Set the SYS_LOGGER parameter to 1 to use the new system logger
4) Set the SDLOG_MODE parameter to 2, and SDLOG_PROFILE parameter to 4 to enable logging of sensor data for calibration and power off
4) Set the SDLOG_MODE parameter to 2, and SDLOG_PROFILE parameter to 2 to enable logging of sensor data for calibration and power off
5) Cold soak the board for 30 minutes
6) Move to a warm dry, still air, constant pressure environment.
7) Apply power for 45 minutes, keeping the board still.
@ -24,7 +24,7 @@ Data can be gathered using the following sequence:
9) Open a terminal window in the Firmware/Tools directory and run the python calibration script script file: 'python process_sensor_caldata.py <full path name to .ulog file>
10) Power the board, connect QGC and load the parameter from the generated .params file onto the board using QGC. Due to the number of parameters, loading them may take some time.
11) TODO - we need a way for user to reliably tell when parameters have all been changed and saved.
12) After parameters have finished loading, set SDLOG_MODE and SDLOG_PROFILE to their respective values prior to step 4) and remove power.
12) After parameters have finished loading, set SDLOG_MODE to 1 to re-enable normal logging and remove power.
13) Power the board and perform a normal gyro and accelerometer sensor calibration using QGC. The board must be repowered after this step before flying due to large parameter changes and the thermal compensation parameters only being read on startup.
Outputs thermal compensation parameters in a file named <inputfilename>.params which can be loaded onto the board using QGroundControl
@ -56,16 +56,16 @@ for d in data:
if sensor_instance == 0:
sensor_gyro_0 = d.data
print('found gyro 0 data')
num_gyros = 1
num_gyros = 1
if sensor_instance == 1:
sensor_gyro_1 = d.data
print('found gyro 1 data')
num_gyros = 2
if sensor_instance == 2:
num_gyros = 2
if sensor_instance == 2:
sensor_gyro_2 = d.data
print('found gyro 2 data')
num_gyros = 3
sensor_instance = sensor_instance +1
num_gyros = 3
sensor_instance = sensor_instance +1
# extract accel data
sensor_instance = 0
@ -75,15 +75,15 @@ for d in data:
if sensor_instance == 0:
sensor_accel_0 = d.data
print('found accel 0 data')
num_accels = 1
num_accels = 1
if sensor_instance == 1:
sensor_accel_1 = d.data
print('found accel 1 data')
num_accels = 2
num_accels = 2
if sensor_instance == 2:
sensor_accel_2 = d.data
print('found accel 2 data')
num_accels = 3
num_accels = 3
sensor_instance = sensor_instance +1
# extract baro data
@ -94,11 +94,11 @@ for d in data:
if sensor_instance == 0:
sensor_baro_0 = d.data
print('found baro 0 data')
num_baros = 1
num_baros = 1
if sensor_instance == 1:
sensor_baro_1 = d.data
print('found baro 1 data')
num_baros = 2
num_baros = 2
sensor_instance = sensor_instance +1
# open file to save plots to PDF
@ -133,72 +133,72 @@ gyro_0_params = {
# curve fit the data for gyro 0 corrections
if num_gyros >= 1:
gyro_0_params['TC_G0_ID'] = int(np.median(sensor_gyro_0['device_id']))
gyro_0_params['TC_G0_ID'] = int(np.median(sensor_gyro_0['device_id']))
# find the min, max and reference temperature
gyro_0_params['TC_G0_TMIN'] = np.amin(sensor_gyro_0['temperature'])
gyro_0_params['TC_G0_TMAX'] = np.amax(sensor_gyro_0['temperature'])
gyro_0_params['TC_G0_TREF'] = 0.5 * (gyro_0_params['TC_G0_TMIN'] + gyro_0_params['TC_G0_TMAX'])
temp_rel = sensor_gyro_0['temperature'] - gyro_0_params['TC_G0_TREF']
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']
# find the min, max and reference temperature
gyro_0_params['TC_G0_TMIN'] = np.amin(sensor_gyro_0['temperature'])
gyro_0_params['TC_G0_TMAX'] = np.amax(sensor_gyro_0['temperature'])
gyro_0_params['TC_G0_TREF'] = 0.5 * (gyro_0_params['TC_G0_TMIN'] + gyro_0_params['TC_G0_TMAX'])
temp_rel = sensor_gyro_0['temperature'] - gyro_0_params['TC_G0_TREF']
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']
# fit X axis
coef_gyro_0_x = np.polyfit(temp_rel,sensor_gyro_0['x'],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]
gyro_0_params['TC_G0_X1_0'] = coef_gyro_0_x[2]
gyro_0_params['TC_G0_X0_0'] = coef_gyro_0_x[3]
fit_coef_gyro_0_x = np.poly1d(coef_gyro_0_x)
gyro_0_x_resample = fit_coef_gyro_0_x(temp_rel_resample)
# fit X axis
coef_gyro_0_x = np.polyfit(temp_rel,sensor_gyro_0['x'],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]
gyro_0_params['TC_G0_X1_0'] = coef_gyro_0_x[2]
gyro_0_params['TC_G0_X0_0'] = coef_gyro_0_x[3]
fit_coef_gyro_0_x = np.poly1d(coef_gyro_0_x)
gyro_0_x_resample = fit_coef_gyro_0_x(temp_rel_resample)
# fit Y axis
coef_gyro_0_y = np.polyfit(temp_rel,sensor_gyro_0['y'],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]
gyro_0_params['TC_G0_X1_1'] = coef_gyro_0_y[2]
gyro_0_params['TC_G0_X0_1'] = coef_gyro_0_y[3]
fit_coef_gyro_0_y = np.poly1d(coef_gyro_0_y)
gyro_0_y_resample = fit_coef_gyro_0_y(temp_rel_resample)
# fit Y axis
coef_gyro_0_y = np.polyfit(temp_rel,sensor_gyro_0['y'],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]
gyro_0_params['TC_G0_X1_1'] = coef_gyro_0_y[2]
gyro_0_params['TC_G0_X0_1'] = coef_gyro_0_y[3]
fit_coef_gyro_0_y = np.poly1d(coef_gyro_0_y)
gyro_0_y_resample = fit_coef_gyro_0_y(temp_rel_resample)
# fit Z axis
coef_gyro_0_z = np.polyfit(temp_rel,sensor_gyro_0['z'],3)
gyro_0_params['TC_G0_X3_2'] = coef_gyro_0_z[0]
gyro_0_params['TC_G0_X2_2'] = coef_gyro_0_z[1]
gyro_0_params['TC_G0_X1_2'] = coef_gyro_0_z[2]
gyro_0_params['TC_G0_X0_2'] = coef_gyro_0_z[3]
fit_coef_gyro_0_z = np.poly1d(coef_gyro_0_z)
gyro_0_z_resample = fit_coef_gyro_0_z(temp_rel_resample)
# fit Z axis
coef_gyro_0_z = np.polyfit(temp_rel,sensor_gyro_0['z'],3)
gyro_0_params['TC_G0_X3_2'] = coef_gyro_0_z[0]
gyro_0_params['TC_G0_X2_2'] = coef_gyro_0_z[1]
gyro_0_params['TC_G0_X1_2'] = coef_gyro_0_z[2]
gyro_0_params['TC_G0_X0_2'] = coef_gyro_0_z[3]
fit_coef_gyro_0_z = np.poly1d(coef_gyro_0_z)
gyro_0_z_resample = fit_coef_gyro_0_z(temp_rel_resample)
# gyro0 vs temperature
plt.figure(1,figsize=(20,13))
# gyro0 vs temperature
plt.figure(1,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['x'],'b')
plt.plot(temp_resample,gyro_0_x_resample,'r')
plt.title('Gyro 0 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['x'],'b')
plt.plot(temp_resample,gyro_0_x_resample,'r')
plt.title('Gyro 0 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['y'],'b')
plt.plot(temp_resample,gyro_0_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['y'],'b')
plt.plot(temp_resample,gyro_0_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['z'],'b')
plt.plot(temp_resample,gyro_0_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_0['temperature'],sensor_gyro_0['z'],'b')
plt.plot(temp_resample,gyro_0_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@ -229,72 +229,72 @@ gyro_1_params = {
# curve fit the data for gyro 1 corrections
if num_gyros >= 2:
gyro_1_params['TC_G1_ID'] = int(np.median(sensor_gyro_1['device_id']))
gyro_1_params['TC_G1_ID'] = int(np.median(sensor_gyro_1['device_id']))
# find the min, max and reference temperature
gyro_1_params['TC_G1_TMIN'] = np.amin(sensor_gyro_1['temperature'])
gyro_1_params['TC_G1_TMAX'] = np.amax(sensor_gyro_1['temperature'])
gyro_1_params['TC_G1_TREF'] = 0.5 * (gyro_1_params['TC_G1_TMIN'] + gyro_1_params['TC_G1_TMAX'])
temp_rel = sensor_gyro_1['temperature'] - gyro_1_params['TC_G1_TREF']
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']
# find the min, max and reference temperature
gyro_1_params['TC_G1_TMIN'] = np.amin(sensor_gyro_1['temperature'])
gyro_1_params['TC_G1_TMAX'] = np.amax(sensor_gyro_1['temperature'])
gyro_1_params['TC_G1_TREF'] = 0.5 * (gyro_1_params['TC_G1_TMIN'] + gyro_1_params['TC_G1_TMAX'])
temp_rel = sensor_gyro_1['temperature'] - gyro_1_params['TC_G1_TREF']
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']
# fit X axis
coef_gyro_1_x = np.polyfit(temp_rel,sensor_gyro_1['x'],3)
gyro_1_params['TC_G1_X3_0'] = coef_gyro_1_x[0]
gyro_1_params['TC_G1_X2_0'] = coef_gyro_1_x[1]
gyro_1_params['TC_G1_X1_0'] = coef_gyro_1_x[2]
gyro_1_params['TC_G1_X0_0'] = coef_gyro_1_x[3]
fit_coef_gyro_1_x = np.poly1d(coef_gyro_1_x)
gyro_1_x_resample = fit_coef_gyro_1_x(temp_rel_resample)
# fit X axis
coef_gyro_1_x = np.polyfit(temp_rel,sensor_gyro_1['x'],3)
gyro_1_params['TC_G1_X3_0'] = coef_gyro_1_x[0]
gyro_1_params['TC_G1_X2_0'] = coef_gyro_1_x[1]
gyro_1_params['TC_G1_X1_0'] = coef_gyro_1_x[2]
gyro_1_params['TC_G1_X0_0'] = coef_gyro_1_x[3]
fit_coef_gyro_1_x = np.poly1d(coef_gyro_1_x)
gyro_1_x_resample = fit_coef_gyro_1_x(temp_rel_resample)
# fit Y axis
coef_gyro_1_y = np.polyfit(temp_rel,sensor_gyro_1['y'],3)
gyro_1_params['TC_G1_X3_1'] = coef_gyro_1_y[0]
gyro_1_params['TC_G1_X2_1'] = coef_gyro_1_y[1]
gyro_1_params['TC_G1_X1_1'] = coef_gyro_1_y[2]
gyro_1_params['TC_G1_X0_1'] = coef_gyro_1_y[3]
fit_coef_gyro_1_y = np.poly1d(coef_gyro_1_y)
gyro_1_y_resample = fit_coef_gyro_1_y(temp_rel_resample)
# fit Y axis
coef_gyro_1_y = np.polyfit(temp_rel,sensor_gyro_1['y'],3)
gyro_1_params['TC_G1_X3_1'] = coef_gyro_1_y[0]
gyro_1_params['TC_G1_X2_1'] = coef_gyro_1_y[1]
gyro_1_params['TC_G1_X1_1'] = coef_gyro_1_y[2]
gyro_1_params['TC_G1_X0_1'] = coef_gyro_1_y[3]
fit_coef_gyro_1_y = np.poly1d(coef_gyro_1_y)
gyro_1_y_resample = fit_coef_gyro_1_y(temp_rel_resample)
# fit Z axis
coef_gyro_1_z = np.polyfit(temp_rel,sensor_gyro_1['z'],3)
gyro_1_params['TC_G1_X3_2'] = coef_gyro_1_z[0]
gyro_1_params['TC_G1_X2_2'] = coef_gyro_1_z[1]
gyro_1_params['TC_G1_X1_2'] = coef_gyro_1_z[2]
gyro_1_params['TC_G1_X0_2'] = coef_gyro_1_z[3]
fit_coef_gyro_1_z = np.poly1d(coef_gyro_1_z)
gyro_1_z_resample = fit_coef_gyro_1_z(temp_rel_resample)
# fit Z axis
coef_gyro_1_z = np.polyfit(temp_rel,sensor_gyro_1['z'],3)
gyro_1_params['TC_G1_X3_2'] = coef_gyro_1_z[0]
gyro_1_params['TC_G1_X2_2'] = coef_gyro_1_z[1]
gyro_1_params['TC_G1_X1_2'] = coef_gyro_1_z[2]
gyro_1_params['TC_G1_X0_2'] = coef_gyro_1_z[3]
fit_coef_gyro_1_z = np.poly1d(coef_gyro_1_z)
gyro_1_z_resample = fit_coef_gyro_1_z(temp_rel_resample)
# gyro1 vs temperature
plt.figure(2,figsize=(20,13))
# gyro1 vs temperature
plt.figure(2,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['x'],'b')
plt.plot(temp_resample,gyro_1_x_resample,'r')
plt.title('Gyro 1 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['x'],'b')
plt.plot(temp_resample,gyro_1_x_resample,'r')
plt.title('Gyro 1 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['y'],'b')
plt.plot(temp_resample,gyro_1_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['y'],'b')
plt.plot(temp_resample,gyro_1_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['z'],'b')
plt.plot(temp_resample,gyro_1_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_1['temperature'],sensor_gyro_1['z'],'b')
plt.plot(temp_resample,gyro_1_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@ -325,72 +325,72 @@ gyro_2_params = {
# curve fit the data for gyro 2 corrections
if num_gyros >= 3:
gyro_2_params['TC_G2_ID'] = int(np.median(sensor_gyro_2['device_id']))
gyro_2_params['TC_G2_ID'] = int(np.median(sensor_gyro_2['device_id']))
# find the min, max and reference temperature
gyro_2_params['TC_G2_TMIN'] = np.amin(sensor_gyro_2['temperature'])
gyro_2_params['TC_G2_TMAX'] = np.amax(sensor_gyro_2['temperature'])
gyro_2_params['TC_G2_TREF'] = 0.5 * (gyro_2_params['TC_G2_TMIN'] + gyro_2_params['TC_G2_TMAX'])
temp_rel = sensor_gyro_2['temperature'] - gyro_2_params['TC_G2_TREF']
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']
# find the min, max and reference temperature
gyro_2_params['TC_G2_TMIN'] = np.amin(sensor_gyro_2['temperature'])
gyro_2_params['TC_G2_TMAX'] = np.amax(sensor_gyro_2['temperature'])
gyro_2_params['TC_G2_TREF'] = 0.5 * (gyro_2_params['TC_G2_TMIN'] + gyro_2_params['TC_G2_TMAX'])
temp_rel = sensor_gyro_2['temperature'] - gyro_2_params['TC_G2_TREF']
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']
# fit X axis
coef_gyro_2_x = np.polyfit(temp_rel,sensor_gyro_2['x'],3)
gyro_2_params['TC_G2_X3_0'] = coef_gyro_2_x[0]
gyro_2_params['TC_G2_X2_0'] = coef_gyro_2_x[1]
gyro_2_params['TC_G2_X1_0'] = coef_gyro_2_x[2]
gyro_2_params['TC_G2_X0_0'] = coef_gyro_2_x[3]
fit_coef_gyro_2_x = np.poly1d(coef_gyro_2_x)
gyro_2_x_resample = fit_coef_gyro_2_x(temp_rel_resample)
# fit X axis
coef_gyro_2_x = np.polyfit(temp_rel,sensor_gyro_2['x'],3)
gyro_2_params['TC_G2_X3_0'] = coef_gyro_2_x[0]
gyro_2_params['TC_G2_X2_0'] = coef_gyro_2_x[1]
gyro_2_params['TC_G2_X1_0'] = coef_gyro_2_x[2]
gyro_2_params['TC_G2_X0_0'] = coef_gyro_2_x[3]
fit_coef_gyro_2_x = np.poly1d(coef_gyro_2_x)
gyro_2_x_resample = fit_coef_gyro_2_x(temp_rel_resample)
# fit Y axis
coef_gyro_2_y = np.polyfit(temp_rel,sensor_gyro_2['y'],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]
gyro_2_params['TC_G2_X1_1'] = coef_gyro_2_y[2]
gyro_2_params['TC_G2_X0_1'] = coef_gyro_2_y[3]
fit_coef_gyro_2_y = np.poly1d(coef_gyro_2_y)
gyro_2_y_resample = fit_coef_gyro_2_y(temp_rel_resample)
# fit Y axis
coef_gyro_2_y = np.polyfit(temp_rel,sensor_gyro_2['y'],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]
gyro_2_params['TC_G2_X1_1'] = coef_gyro_2_y[2]
gyro_2_params['TC_G2_X0_1'] = coef_gyro_2_y[3]
fit_coef_gyro_2_y = np.poly1d(coef_gyro_2_y)
gyro_2_y_resample = fit_coef_gyro_2_y(temp_rel_resample)
# fit Z axis
coef_gyro_2_z = np.polyfit(temp_rel,sensor_gyro_2['z'],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]
gyro_2_params['TC_G2_X1_2'] = coef_gyro_2_z[2]
gyro_2_params['TC_G2_X0_2'] = coef_gyro_2_z[3]
fit_coef_gyro_2_z = np.poly1d(coef_gyro_2_z)
gyro_2_z_resample = fit_coef_gyro_2_z(temp_rel_resample)
# fit Z axis
coef_gyro_2_z = np.polyfit(temp_rel,sensor_gyro_2['z'],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]
gyro_2_params['TC_G2_X1_2'] = coef_gyro_2_z[2]
gyro_2_params['TC_G2_X0_2'] = coef_gyro_2_z[3]
fit_coef_gyro_2_z = np.poly1d(coef_gyro_2_z)
gyro_2_z_resample = fit_coef_gyro_2_z(temp_rel_resample)
# gyro2 vs temperature
plt.figure(3,figsize=(20,13))
# gyro2 vs temperature
plt.figure(3,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['x'],'b')
plt.plot(temp_resample,gyro_2_x_resample,'r')
plt.title('Gyro 2 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['x'],'b')
plt.plot(temp_resample,gyro_2_x_resample,'r')
plt.title('Gyro 2 Bias vs Temperature')
plt.ylabel('X bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['y'],'b')
plt.plot(temp_resample,gyro_2_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['y'],'b')
plt.plot(temp_resample,gyro_2_y_resample,'r')
plt.ylabel('Y bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['z'],'b')
plt.plot(temp_resample,gyro_2_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_gyro_2['temperature'],sensor_gyro_2['z'],'b')
plt.plot(temp_resample,gyro_2_z_resample,'r')
plt.ylabel('Z bias (rad/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@ -421,75 +421,75 @@ accel_0_params = {
# curve fit the data for accel 0 corrections
if num_accels >= 1:
accel_0_params['TC_A0_ID'] = int(np.median(sensor_accel_0['device_id']))
accel_0_params['TC_A0_ID'] = int(np.median(sensor_accel_0['device_id']))
# find the min, max and reference temperature
accel_0_params['TC_A0_TMIN'] = np.amin(sensor_accel_0['temperature'])
accel_0_params['TC_A0_TMAX'] = np.amax(sensor_accel_0['temperature'])
accel_0_params['TC_A0_TREF'] = 0.5 * (accel_0_params['TC_A0_TMIN'] + accel_0_params['TC_A0_TMAX'])
temp_rel = sensor_accel_0['temperature'] - accel_0_params['TC_A0_TREF']
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']
# find the min, max and reference temperature
accel_0_params['TC_A0_TMIN'] = np.amin(sensor_accel_0['temperature'])
accel_0_params['TC_A0_TMAX'] = np.amax(sensor_accel_0['temperature'])
accel_0_params['TC_A0_TREF'] = 0.5 * (accel_0_params['TC_A0_TMIN'] + accel_0_params['TC_A0_TMAX'])
temp_rel = sensor_accel_0['temperature'] - accel_0_params['TC_A0_TREF']
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']
# fit X axis
correction_x = sensor_accel_0['x'] - np.median(sensor_accel_0['x'])
coef_accel_0_x = np.polyfit(temp_rel,correction_x,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]
accel_0_params['TC_A0_X1_0'] = coef_accel_0_x[2]
accel_0_params['TC_A0_X0_0'] = coef_accel_0_x[3]
fit_coef_accel_0_x = np.poly1d(coef_accel_0_x)
correction_x_resample = fit_coef_accel_0_x(temp_rel_resample)
# fit X axis
correction_x = sensor_accel_0['x'] - np.median(sensor_accel_0['x'])
coef_accel_0_x = np.polyfit(temp_rel,correction_x,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]
accel_0_params['TC_A0_X1_0'] = coef_accel_0_x[2]
accel_0_params['TC_A0_X0_0'] = coef_accel_0_x[3]
fit_coef_accel_0_x = np.poly1d(coef_accel_0_x)
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'])
coef_accel_0_y = np.polyfit(temp_rel,correction_y,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]
accel_0_params['TC_A0_X1_1'] = coef_accel_0_y[2]
accel_0_params['TC_A0_X0_1'] = coef_accel_0_y[3]
fit_coef_accel_0_y = np.poly1d(coef_accel_0_y)
correction_y_resample = fit_coef_accel_0_y(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_0['y']-np.median(sensor_accel_0['y'])
coef_accel_0_y = np.polyfit(temp_rel,correction_y,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]
accel_0_params['TC_A0_X1_1'] = coef_accel_0_y[2]
accel_0_params['TC_A0_X0_1'] = coef_accel_0_y[3]
fit_coef_accel_0_y = np.poly1d(coef_accel_0_y)
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'])
coef_accel_0_z = np.polyfit(temp_rel,correction_z,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]
accel_0_params['TC_A0_X1_2'] = coef_accel_0_z[2]
accel_0_params['TC_A0_X0_2'] = coef_accel_0_z[3]
fit_coef_accel_0_z = np.poly1d(coef_accel_0_z)
correction_z_resample = fit_coef_accel_0_z(temp_rel_resample)
# fit Z axis
correction_z = sensor_accel_0['z']-np.median(sensor_accel_0['z'])
coef_accel_0_z = np.polyfit(temp_rel,correction_z,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]
accel_0_params['TC_A0_X1_2'] = coef_accel_0_z[2]
accel_0_params['TC_A0_X0_2'] = coef_accel_0_z[3]
fit_coef_accel_0_z = np.poly1d(coef_accel_0_z)
correction_z_resample = fit_coef_accel_0_z(temp_rel_resample)
# accel 0 vs temperature
plt.figure(4,figsize=(20,13))
# accel 0 vs temperature
plt.figure(4,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_0['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 0 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_0['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 0 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_0['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_0['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_0['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_0['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@ -520,75 +520,75 @@ accel_1_params = {
# curve fit the data for accel 1 corrections
if num_accels >= 2:
accel_1_params['TC_A1_ID'] = int(np.median(sensor_accel_1['device_id']))
accel_1_params['TC_A1_ID'] = int(np.median(sensor_accel_1['device_id']))
# find the min, max and reference temperature
accel_1_params['TC_A1_TMIN'] = np.amin(sensor_accel_1['temperature'])
accel_1_params['TC_A1_TMAX'] = np.amax(sensor_accel_1['temperature'])
accel_1_params['TC_A1_TREF'] = 0.5 * (accel_1_params['TC_A1_TMIN'] + accel_1_params['TC_A1_TMAX'])
temp_rel = sensor_accel_1['temperature'] - accel_1_params['TC_A1_TREF']
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']
# find the min, max and reference temperature
accel_1_params['TC_A1_TMIN'] = np.amin(sensor_accel_1['temperature'])
accel_1_params['TC_A1_TMAX'] = np.amax(sensor_accel_1['temperature'])
accel_1_params['TC_A1_TREF'] = 0.5 * (accel_1_params['TC_A1_TMIN'] + accel_1_params['TC_A1_TMAX'])
temp_rel = sensor_accel_1['temperature'] - accel_1_params['TC_A1_TREF']
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']
# fit X axis
correction_x = sensor_accel_1['x']-np.median(sensor_accel_1['x'])
coef_accel_1_x = np.polyfit(temp_rel,correction_x,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]
accel_1_params['TC_A1_X1_0'] = coef_accel_1_x[2]
accel_1_params['TC_A1_X0_0'] = coef_accel_1_x[3]
fit_coef_accel_1_x = np.poly1d(coef_accel_1_x)
correction_x_resample = fit_coef_accel_1_x(temp_rel_resample)
# fit X axis
correction_x = sensor_accel_1['x']-np.median(sensor_accel_1['x'])
coef_accel_1_x = np.polyfit(temp_rel,correction_x,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]
accel_1_params['TC_A1_X1_0'] = coef_accel_1_x[2]
accel_1_params['TC_A1_X0_0'] = coef_accel_1_x[3]
fit_coef_accel_1_x = np.poly1d(coef_accel_1_x)
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'])
coef_accel_1_y = np.polyfit(temp_rel,correction_y,3)
accel_1_params['TC_A1_X3_1'] = coef_accel_1_y[0]
accel_1_params['TC_A1_X2_1'] = coef_accel_1_y[1]
accel_1_params['TC_A1_X1_1'] = coef_accel_1_y[2]
accel_1_params['TC_A1_X0_1'] = coef_accel_1_y[3]
fit_coef_accel_1_y = np.poly1d(coef_accel_1_y)
correction_y_resample = fit_coef_accel_1_y(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_1['y']-np.median(sensor_accel_1['y'])
coef_accel_1_y = np.polyfit(temp_rel,correction_y,3)
accel_1_params['TC_A1_X3_1'] = coef_accel_1_y[0]
accel_1_params['TC_A1_X2_1'] = coef_accel_1_y[1]
accel_1_params['TC_A1_X1_1'] = coef_accel_1_y[2]
accel_1_params['TC_A1_X0_1'] = coef_accel_1_y[3]
fit_coef_accel_1_y = np.poly1d(coef_accel_1_y)
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'])
coef_accel_1_z = np.polyfit(temp_rel,correction_z,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]
accel_1_params['TC_A1_X1_2'] = coef_accel_1_z[2]
accel_1_params['TC_A1_X0_2'] = coef_accel_1_z[3]
fit_coef_accel_1_z = np.poly1d(coef_accel_1_z)
correction_z_resample = fit_coef_accel_1_z(temp_rel_resample)
# fit Z axis
correction_z = (sensor_accel_1['z'])-np.median(sensor_accel_1['z'])
coef_accel_1_z = np.polyfit(temp_rel,correction_z,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]
accel_1_params['TC_A1_X1_2'] = coef_accel_1_z[2]
accel_1_params['TC_A1_X0_2'] = coef_accel_1_z[3]
fit_coef_accel_1_z = np.poly1d(coef_accel_1_z)
correction_z_resample = fit_coef_accel_1_z(temp_rel_resample)
# accel 1 vs temperature
plt.figure(5,figsize=(20,13))
# accel 1 vs temperature
plt.figure(5,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_1['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 1 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_1['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 1 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_1['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_1['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_1['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_1['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@ -619,75 +619,75 @@ accel_2_params = {
# curve fit the data for accel 2 corrections
if num_accels >= 3:
accel_2_params['TC_A2_ID'] = int(np.median(sensor_accel_2['device_id']))
accel_2_params['TC_A2_ID'] = int(np.median(sensor_accel_2['device_id']))
# find the min, max and reference temperature
accel_2_params['TC_A2_TMIN'] = np.amin(sensor_accel_2['temperature'])
accel_2_params['TC_A2_TMAX'] = np.amax(sensor_accel_2['temperature'])
accel_2_params['TC_A2_TREF'] = 0.5 * (accel_2_params['TC_A2_TMIN'] + accel_2_params['TC_A2_TMAX'])
temp_rel = sensor_accel_2['temperature'] - accel_2_params['TC_A2_TREF']
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']
# find the min, max and reference temperature
accel_2_params['TC_A2_TMIN'] = np.amin(sensor_accel_2['temperature'])
accel_2_params['TC_A2_TMAX'] = np.amax(sensor_accel_2['temperature'])
accel_2_params['TC_A2_TREF'] = 0.5 * (accel_2_params['TC_A2_TMIN'] + accel_2_params['TC_A2_TMAX'])
temp_rel = sensor_accel_2['temperature'] - accel_2_params['TC_A2_TREF']
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']
# fit X axis
correction_x = sensor_accel_2['x']-np.median(sensor_accel_2['x'])
coef_accel_2_x = np.polyfit(temp_rel,correction_x,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]
accel_2_params['TC_A2_X1_0'] = coef_accel_2_x[2]
accel_2_params['TC_A2_X0_0'] = coef_accel_2_x[3]
fit_coef_accel_2_x = np.poly1d(coef_accel_2_x)
correction_x_resample = fit_coef_accel_2_x(temp_rel_resample)
# fit X axis
correction_x = sensor_accel_2['x']-np.median(sensor_accel_2['x'])
coef_accel_2_x = np.polyfit(temp_rel,correction_x,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]
accel_2_params['TC_A2_X1_0'] = coef_accel_2_x[2]
accel_2_params['TC_A2_X0_0'] = coef_accel_2_x[3]
fit_coef_accel_2_x = np.poly1d(coef_accel_2_x)
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'])
coef_accel_2_y = np.polyfit(temp_rel,correction_y,3)
accel_2_params['TC_A2_X3_1'] = coef_accel_2_y[0]
accel_2_params['TC_A2_X2_1'] = coef_accel_2_y[1]
accel_2_params['TC_A2_X1_1'] = coef_accel_2_y[2]
accel_2_params['TC_A2_X0_1'] = coef_accel_2_y[3]
fit_coef_accel_2_y = np.poly1d(coef_accel_2_y)
correction_y_resample = fit_coef_accel_2_y(temp_rel_resample)
# fit Y axis
correction_y = sensor_accel_2['y']-np.median(sensor_accel_2['y'])
coef_accel_2_y = np.polyfit(temp_rel,correction_y,3)
accel_2_params['TC_A2_X3_1'] = coef_accel_2_y[0]
accel_2_params['TC_A2_X2_1'] = coef_accel_2_y[1]
accel_2_params['TC_A2_X1_1'] = coef_accel_2_y[2]
accel_2_params['TC_A2_X0_1'] = coef_accel_2_y[3]
fit_coef_accel_2_y = np.poly1d(coef_accel_2_y)
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'])
coef_accel_2_z = np.polyfit(temp_rel,correction_z,3)
accel_2_params['TC_A2_X3_2'] = coef_accel_2_z[0]
accel_2_params['TC_A2_X2_2'] = coef_accel_2_z[1]
accel_2_params['TC_A2_X1_2'] = coef_accel_2_z[2]
accel_2_params['TC_A2_X0_2'] = coef_accel_2_z[3]
fit_coef_accel_2_z = np.poly1d(coef_accel_2_z)
correction_z_resample = fit_coef_accel_2_z(temp_rel_resample)
# fit Z axis
correction_z = sensor_accel_2['z']-np.median(sensor_accel_2['z'])
coef_accel_2_z = np.polyfit(temp_rel,correction_z,3)
accel_2_params['TC_A2_X3_2'] = coef_accel_2_z[0]
accel_2_params['TC_A2_X2_2'] = coef_accel_2_z[1]
accel_2_params['TC_A2_X1_2'] = coef_accel_2_z[2]
accel_2_params['TC_A2_X0_2'] = coef_accel_2_z[3]
fit_coef_accel_2_z = np.poly1d(coef_accel_2_z)
correction_z_resample = fit_coef_accel_2_z(temp_rel_resample)
# accel 2 vs temperature
plt.figure(6,figsize=(20,13))
# accel 2 vs temperature
plt.figure(6,figsize=(20,13))
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_2['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 2 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,1)
plt.plot(sensor_accel_2['temperature'],correction_x,'b')
plt.plot(temp_resample,correction_x_resample,'r')
plt.title('Accel 2 Bias vs Temperature')
plt.ylabel('X bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_2['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,2)
plt.plot(sensor_accel_2['temperature'],correction_y,'b')
plt.plot(temp_resample,correction_y_resample,'r')
plt.ylabel('Y bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_2['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.subplot(3,1,3)
plt.plot(sensor_accel_2['temperature'],correction_z,'b')
plt.plot(temp_resample,correction_z_resample,'r')
plt.ylabel('Z bias (m/s/s)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################
@ -761,41 +761,41 @@ baro_1_params = {
if num_baros >= 2:
# curve fit the data for baro 0 corrections
baro_1_params['TC_B1_ID'] = int(np.median(sensor_baro_1['device_id']))
# curve fit the data for baro 0 corrections
baro_1_params['TC_B1_ID'] = int(np.median(sensor_baro_1['device_id']))
# find the min, max and reference temperature
baro_1_params['TC_B1_TMIN'] = np.amin(sensor_baro_1['temperature'])
baro_1_params['TC_B1_TMAX'] = np.amax(sensor_baro_1['temperature'])
baro_1_params['TC_B1_TREF'] = 0.5 * (baro_1_params['TC_B1_TMIN'] + baro_1_params['TC_B1_TMAX'])
temp_rel = sensor_baro_1['temperature'] - baro_1_params['TC_B1_TREF']
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']
# find the min, max and reference temperature
baro_1_params['TC_B1_TMIN'] = np.amin(sensor_baro_1['temperature'])
baro_1_params['TC_B1_TMAX'] = np.amax(sensor_baro_1['temperature'])
baro_1_params['TC_B1_TREF'] = 0.5 * (baro_1_params['TC_B1_TMIN'] + baro_1_params['TC_B1_TMAX'])
temp_rel = sensor_baro_1['temperature'] - baro_1_params['TC_B1_TREF']
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']
# fit data
median_pressure = np.median(sensor_baro_1['pressure']);
coef_baro_1_x = np.polyfit(temp_rel,100*(sensor_baro_1['pressure']-median_pressure),5) # convert from hPa to Pa
baro_1_params['TC_B1_X5'] = coef_baro_1_x[0]
baro_1_params['TC_B1_X4'] = coef_baro_1_x[1]
baro_1_params['TC_B1_X3'] = coef_baro_1_x[2]
baro_1_params['TC_B1_X2'] = coef_baro_1_x[3]
baro_1_params['TC_B1_X1'] = coef_baro_1_x[4]
baro_1_params['TC_B1_X0'] = coef_baro_1_x[5]
fit_coef_baro_1_x = np.poly1d(coef_baro_1_x)
baro_1_x_resample = fit_coef_baro_1_x(temp_rel_resample)
# fit data
median_pressure = np.median(sensor_baro_1['pressure']);
coef_baro_1_x = np.polyfit(temp_rel,100*(sensor_baro_1['pressure']-median_pressure),5) # convert from hPa to Pa
baro_1_params['TC_B1_X5'] = coef_baro_1_x[0]
baro_1_params['TC_B1_X4'] = coef_baro_1_x[1]
baro_1_params['TC_B1_X3'] = coef_baro_1_x[2]
baro_1_params['TC_B1_X2'] = coef_baro_1_x[3]
baro_1_params['TC_B1_X1'] = coef_baro_1_x[4]
baro_1_params['TC_B1_X0'] = coef_baro_1_x[5]
fit_coef_baro_1_x = np.poly1d(coef_baro_1_x)
baro_1_x_resample = fit_coef_baro_1_x(temp_rel_resample)
# baro 1 vs temperature
plt.figure(8,figsize=(20,13))
# baro 1 vs temperature
plt.figure(8,figsize=(20,13))
# draw plots
plt.plot(sensor_baro_1['temperature'],100*sensor_baro_1['pressure']-100*median_pressure,'b')
plt.plot(temp_resample,baro_1_x_resample,'r')
plt.title('Baro 1 Bias vs Temperature')
plt.ylabel('Z bias (Pa)')
plt.xlabel('temperature (degC)')
plt.grid()
# draw plots
plt.plot(sensor_baro_1['temperature'],100*sensor_baro_1['pressure']-100*median_pressure,'b')
plt.plot(temp_resample,baro_1_x_resample,'r')
plt.title('Baro 1 Bias vs Temperature')
plt.ylabel('Z bias (Pa)')
plt.xlabel('temperature (degC)')
plt.grid()
pp.savefig()
pp.savefig()
#################################################################################

View File

@ -52,7 +52,7 @@ The generated files will be written to the `modules` directory.
result += "%s\n" % doc
usage_string = module.usage_string()
if len(usage_string) > 0:
result += "### Usage {#%s_usage}\n```\n%s\n```\n" % (module.name(), usage_string)
result += "### Usage\n```\n%s\n```\n" % usage_string
self._outputs[category] = result

View File

@ -247,19 +247,12 @@ class SourceParser(object):
self._modules = {} # all found modules: key is the module name
self._consistency_checks_failure = False # one or more checks failed
self._comment_remove_pattern = re.compile(
r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
re.DOTALL | re.MULTILINE)
def Parse(self, scope, contents):
"""
Incrementally parse program contents and append all found documentations
to the list.
"""
# remove comments from source
contents = self._comment_remover(contents)
extracted_function_calls = [] # list of tuples: (FUNC_NAME, list(ARGS))
start_index = 0
@ -309,16 +302,6 @@ class SourceParser(object):
return True
def _comment_remover(self, text):
""" remove C++ & C style comments.
Source: https://stackoverflow.com/a/241506 """
def replacer(match):
s = match.group(0)
if s.startswith('/'):
return " " # note: a space and not an empty string
else:
return s
return re.sub(self._comment_remove_pattern, replacer, text)
def _do_consistency_check(self, contents, scope, module_doc):
"""

View File

@ -125,7 +125,7 @@ class firmware(object):
# pad image to 4-byte length
while ((len(self.image) % 4) != 0):
self.image.extend(b'\xff')
self.image.append('\xff')
def property(self, propname):
return self.desc[propname]
@ -488,13 +488,11 @@ class uploader(object):
print("FORCED WRITE, FLASHING ANYWAY!")
else:
raise IOError(msg)
# Prevent uploads where the image would overflow the flash
if self.fw_maxsize < fw.property('image_size'):
raise RuntimeError("Firmware image is too large for this board")
# OTP added in v4:
if self.bl_rev >= 4:
if self.bl_rev > 3:
for byte in range(0, 32*6, 4):
x = self.__getOTP(byte)
self.otp = self.otp + x
@ -520,43 +518,16 @@ class uploader(object):
print(binascii.hexlify(x).decode('Latin-1'), end='') # show user
print('')
print("chip: %08x" % self.__getCHIP())
if (self.bl_rev >= 5):
des = self.__getCHIPDes()
if (len(des) == 2):
print("family: %s" % des[0])
print("revision: %s" % des[1])
print("flash %d" % self.fw_maxsize)
except Exception:
# ignore bad character encodings
pass
# Silicon errata check was added in v5
if (self.bl_rev >= 5):
des = self.__getCHIPDes()
if (len(des) == 2):
print("family: %s" % des[0])
print("revision: %s" % des[1])
print("flash %d" % self.fw_maxsize)
# Prevent uploads where the maximum image size of the board config is smaller than the flash
# of the board. This is a hint the user chose the wrong config and will lack features
# for this particular board.
# This check should also check if the revision is an unaffected revision
# and thus can support the full flash, see
# https://github.com/PX4/Firmware/blob/master/src/drivers/boards/common/stm32/board_mcu_version.c#L125-L144
if self.fw_maxsize > fw.property('image_maxsize') and not force:
raise RuntimeError("Board can accept larger flash images (%u bytes) than board config (%u bytes). Please use the correct board configuration to avoid lacking critical functionality."
% (self.fw_maxsize, fw.property('image_maxsize')))
else:
# If we're still on bootloader v4 on a Pixhawk, we don't know if we
# have the silicon errata and therefore need to flash px4fmu-v2
# with 1MB flash or if it supports px4fmu-v3 with 2MB flash.
if fw.property('board_id') == 9 \
and fw.property('image_size') > 1032192 \
and not force:
raise RuntimeError("\nThe Board uses bootloader revision 4 and can therefore not determine\n"
"if flashing more than 1 MB (px4fmu-v3_default) is safe, chances are\n"
"high that it is not safe! If unsure, use px4fmu-v2_default.\n"
"\n"
"If you know you that the board does not have the silicon errata, use\n"
"this script with --force, or update the bootloader.\n")
self.__erase("Erase ")
self.__program("Program", fw)
@ -589,10 +560,7 @@ class uploader(object):
return False
print("Attempting reboot on %s with baudrate=%d..." % (self.port.port, self.port.baudrate), file=sys.stderr)
if "ttyS" in self.port.port:
print("If the board does not respond, check the connection to the Flight Controller")
else:
print("If the board does not respond, unplug and re-plug the USB connector.", file=sys.stderr)
print("If the board does not respond, unplug and re-plug the USB connector.", file=sys.stderr)
try:
# try MAVLINK command first
@ -623,7 +591,7 @@ def main():
parser.add_argument('--port', action="store", required=True, help="Comma-separated list of serial port(s) to which the FMU may be attached")
parser.add_argument('--baud-bootloader', action="store", type=int, default=115200, help="Baud rate of the serial port (default is 115200) when communicating with bootloader, only required for true serial ports.")
parser.add_argument('--baud-flightstack', action="store", default="57600", help="Comma-separated list of baud rate of the serial port (default is 57600) when communicating with flight stack (Mavlink or NSH), only required for true serial ports.")
parser.add_argument('--force', action='store_true', default=False, help='Override board type check, or silicon errata checks and continue loading')
parser.add_argument('--force', action='store_true', default=False, help='Override board type check and continue loading')
parser.add_argument('--boot-delay', type=int, default=None, help='minimum boot delay to store in flash')
parser.add_argument('firmware', action="store", help="Firmware file to be uploaded")
args = parser.parse_args()
@ -637,6 +605,7 @@ def main():
# Load the firmware file
fw = firmware(args.firmware)
print("Loaded firmware for %x,%x, size: %d bytes, waiting for the bootloader..." % (fw.property('board_id'), fw.property('board_revision'), fw.property('image_size')))
print("If the board does not respond within 1-2 seconds, unplug and re-plug the USB connector.")
# tell any GCS that might be connected to the autopilot to give up
# control of the serial port

View File

@ -1,6 +1,5 @@
#!/usr/bin/env bash
make parameters_metadata
cp parameters.xml ../qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
make airframe_metadata
cp airframes.xml ../qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
make px4fmu-v4_default
cp build/px4fmu-v4_default/parameters.xml ../qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
cp build/px4fmu-v4_default/airframes.xml ../qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml

32
Tools/scp_upload.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
# upload script for network-connected devices via scp (eg Raspberry Pi)
if [[ "$#" < 2 ]]; then
echo "usage: scp_upload.sh SRC1 [SRC2 ...] DEST"
exit
fi
if [ -z ${AUTOPILOT_HOST+x} ]; then
host=px4autopilot
echo "\$AUTOPILOT_HOST is not set (use default: $host)"
else
host=$AUTOPILOT_HOST
echo "\$AUTOPILOT_HOST is set to $host"
fi
user=pi
if [ -n "${AUTOPILOT_USER}" ]; then
user=${AUTOPILOT_USER}
fi
# Get last argument
for last; do true; done
# All except last argument
length=$(($#-1))
src_files=${@:1:$length}
echo "Uploading $src_files..."
# Upload files
scp -r $src_files ${user}@${host}:$last

@ -1 +1 @@
Subproject commit 90c9e5db3f53b0d963a4f240cc712f2ecf246bc4
Subproject commit b052c97f7c3a2c39ab8ec06ae79c66431f16c659

View File

@ -249,9 +249,9 @@ class Graph:
('mc_att_control', r'mc_att_control_main\.cpp$', r'\b_rates_sp_id=([^,)]+)', r'^_rates_sp_id$'),
('mc_att_control', r'mc_att_control_main\.cpp$', r'\b_actuators_id=([^,)]+)', r'^_actuators_id$'),
('fw_att_control', r'FixedwingAttitudeControl\.cpp$', r'\b_rates_sp_id=([^,)]+)', r'^_rates_sp_id$'),
('fw_att_control', r'FixedwingAttitudeControl\.cpp$', r'\b_actuators_id=([^,)]+)', r'^_actuators_id$'),
('fw_att_control', r'FixedwingAttitudeControl\.cpp$', r'\b_attitude_setpoint_id=([^,)]+)', r'^_attitude_setpoint_id$'),
('fw_att_control', r'fw_att_control_main\.cpp$', r'\b_rates_sp_id=([^,)]+)', r'^_rates_sp_id$'),
('fw_att_control', r'fw_att_control_main\.cpp$', r'\b_actuators_id=([^,)]+)', r'^_actuators_id$'),
('fw_att_control', r'fw_att_control_main\.cpp$', r'\b_attitude_setpoint_id=([^,)]+)', r'^_attitude_setpoint_id$'),
('uavcan', r'sensors/.*\.cpp$', r'\bUavcanCDevSensorBridgeBase\([^{]*DEVICE_PATH,([^,)]+)', r'^_orb_topic$'),
('batt_smbus', r'batt_smbus\.cpp$', r'\b_batt_orb_id=([^,)]+)', r'^_batt_orb_id$'),

131
Vagrantfile vendored Normal file
View File

@ -0,0 +1,131 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# MAVLink telemetry via UDP in SITL mode
config.vm.network "forwarded_port", guest: 14556, host: 14556, protocol: "udp"
# SITL simulation data
config.vm.network "forwarded_port", guest: 14560, host: 14560, protocol: "udp"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# NFS should be faster: https://stefanwrobel.com/how-to-make-vagrant-performance-not-suck
config.vm.synced_folder ".", "/Firmware", type: "nfs"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# This is to configure the machine to be as fast as possible
# Alternative: https://github.com/rdsubhas/vagrant-faster
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
vb.customize ["modifyvm", :id, "--ioapic", "on"]
#vb.customize ["modifyvm", :id, "--cpus", "2"]
config.vm.provider "virtualbox" do |v|
host = RbConfig::CONFIG['host_os']
# Give VM 1/4 system memory & access to all cpu cores on the host
if host =~ /darwin/
cpus = `sysctl -n hw.ncpu`.to_i
# sysctl returns Bytes and we need to convert to MB
mem = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 4
elsif host =~ /linux/
cpus = `nproc`.to_i
# meminfo shows KB and we need to convert to MB
mem = `grep 'MemTotal' /proc/meminfo | sed -e 's/MemTotal://' -e 's/ kB//'`.to_i / 1024 / 4
else # sorry Windows folks, I can't help you
cpus = 2
mem = 1024
end
v.customize ["modifyvm", :id, "--memory", mem]
v.customize ["modifyvm", :id, "--cpus", cpus]
end
# Since make and other tools freak out if they see timestamps
# from the future and we share directories, tightly lock the host and guest clocks together (clock sync if more than 2 seconds off)
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 2000]
# Do this on start and restore
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start"]
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", "1"]
# Customize the amount of memory on the VM:
#vb.memory = "2048"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", privileged: false, inline: <<-SHELL
# Ensure we start in the Firmware folder
echo "cd /Firmware" >> ~/.bashrc
# Install software
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded -y
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update
sudo apt-get install -y build-essential ccache cmake clang-3.5 lldb-3.5 g++-4.8 gcc-4.8 genromfs libc6-i386 libncurses5-dev python-argparse python-empy python-serial s3cmd texinfo zlib1g-dev git-core zip gdb gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
pushd .
cd ~
wget -q https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
tar -jxf gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
exportline="export PATH=$HOME/gcc-arm-none-eabi-4_8-2014q3/bin:\$PATH"
if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
exportline2="export HEXAGON_TOOLS_ROOT=$HOME/Qualcomm/HEXAGON_Tools/7.2.10/Tools"
if grep -Fxq "$exportline2" ~/.profile; then echo nothing to do ; else echo $exportline2 >> ~/.profile; fi
. ~/.profile
popd
# setup ccache
mkdir -p ~/bin
ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
ln -s /usr/bin/ccache ~/bin/g++-4.8
ln -s /usr/bin/ccache ~/bin/gcc-4.8
export PATH=~/bin:$PATH
# Configure hardware related bits
sudo apt-get -y remove modemmanager
sudo usermod -a -G dialout $USER
SHELL
end

View File

@ -27,7 +27,4 @@ dependencies:
test:
override:
#- NO_NINJA_BUILD=1 make -j2 quick_check
- make posix_sitl_default
- make px4fmu-v4pro_default
- make tests
- NO_NINJA_BUILD=1 make -j2 quick_check

View File

@ -332,8 +332,6 @@ function(px4_add_common_flags)
-Wunknown-pragmas
-Wunused-variable
-Wno-implicit-fallthrough # set appropriate level and update
-Wno-unused-parameter
)

View File

@ -0,0 +1,182 @@
############################################################################
#
# Copyright (c) 2017 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
#=============================================================================
#
# Defined functions in this file
#
# utility functions
#
# * px4_add_upload
# * px4_add_adb_push
# * px4_add_adb_push_to_bebop
# * px4_add_scp_push
# * px4_add_upload_aero
#
#=============================================================================
#
# px4_add_upload
#
# This function generates source code from ROS msg definitions.
#
# Usage:
# px4_add_upload(OUT <target> BUNDLE <file.px4>)
#
# Input:
# BUNDLE : the firmware.px4 file
# OS : the operating system
# BOARD : the board
#
# Output:
# OUT : the firmware target
#
# Example:
# px4_add_upload(OUT upload
# BUNDLE main.px4
# )
#
function(px4_add_upload)
px4_parse_function_args(
NAME px4_add_upload
ONE_VALUE OS BOARD OUT BUNDLE
REQUIRED OS BOARD OUT BUNDLE
ARGN ${ARGN})
set(serial_ports)
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
list(APPEND serial_ports
/dev/serial/by-id/*_PX4_*
/dev/serial/by-id/usb-3D_Robotics*
/dev/serial/by-id/usb-The_Autopilot*
/dev/serial/by-id/usb-Bitcraze*
/dev/serial/by-id/pci-3D_Robotics*
/dev/serial/by-id/pci-Bitcraze*
/dev/serial/by-id/usb-Gumstix*
)
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
list(APPEND serial_ports
/dev/tty.usbmodemPX*,/dev/tty.usbmodem*
)
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
foreach(port RANGE 32 0)
list(APPEND serial_ports
"COM${port}")
endforeach()
endif()
px4_join(OUT serial_ports LIST "${serial_ports}" GLUE ",")
add_custom_target(${OUT}
COMMAND ${PYTHON_EXECUTABLE}
${PX4_SOURCE_DIR}/Tools/px_uploader.py --port ${serial_ports} ${BUNDLE}
DEPENDS ${BUNDLE}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
function(px4_add_adb_push)
px4_parse_function_args(
NAME px4_add_upload
ONE_VALUE OS BOARD OUT DEST
MULTI_VALUE FILES DEPENDS
REQUIRED OS BOARD OUT FILES DEPENDS DEST
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${PX4_SOURCE_DIR}/Tools/adb_upload.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
function(px4_add_adb_push_to_bebop)
px4_parse_function_args(
NAME px4_add_upload_to_bebop
ONE_VALUE OS BOARD OUT DEST
MULTI_VALUE FILES DEPENDS
REQUIRED OS BOARD OUT FILES DEPENDS DEST
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${PX4_SOURCE_DIR}/Tools/adb_upload_to_bebop.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
function(px4_add_scp_push)
px4_parse_function_args(
NAME px4_add_upload
ONE_VALUE OS BOARD OUT DEST
MULTI_VALUE FILES DEPENDS
REQUIRED OS BOARD OUT FILES DEPENDS DEST
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${PX4_SOURCE_DIR}/Tools/scp_upload.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()
function(px4_add_upload_aero)
px4_parse_function_args(
NAME px4_add_upload_aero
ONE_VALUE OS BOARD OUT BUNDLE
REQUIRED OS BOARD OUT BUNDLE
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${PX4_SOURCE_DIR}/Tools/aero_upload.sh ${BUNDLE}
DEPENDS ${BUNDLE}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
)
endfunction()

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@ -7,12 +8,6 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
#drivers/magnetometer
drivers/telemetry
drivers/device
drivers/stm32
drivers/stm32/adc
@ -20,14 +15,22 @@ set(config_module_list
drivers/led
drivers/px4fmu
drivers/boards
drivers/imu/lsm303d
drivers/imu/l3gd20
drivers/lsm303d
drivers/l3gd20
drivers/ms5611
drivers/teraranger
drivers/gps
drivers/pwm_out_sim
drivers/airspeed
drivers/ets_airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/sdp3x_airspeed
#drivers/frsky_telemetry
modules/sensors
#drivers/pwm_input
#drivers/camera_trigger
drivers/bst
#
# System commands
@ -52,7 +55,7 @@ set(config_module_list
#
# Testing
#
#drivers/distance_sensor/sf0x/sf0x_tests
#drivers/sf0x/sf0x_tests
#drivers/test_ppm
#lib/rc/rc_tests
#modules/commander/commander_tests
@ -114,13 +117,21 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@ -140,6 +151,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
#examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@ -7,19 +8,19 @@ set(config_module_list
#
# Board support modules
#
drivers/aerofc_adc
drivers/boards
drivers/device
drivers/distance_sensor
drivers/gps
drivers/led
drivers/barometer/ms5611
drivers/magnetometer/hmc5883
drivers/magnetometer/ist8310
drivers/imu/mpu9250
drivers/px4fmu
drivers/stm32
drivers/led
drivers/px4fmu
drivers/boards
drivers/tap_esc
drivers/mpu9250
drivers/ms5611
drivers/hmc5883
drivers/gps
drivers/ist8310
drivers/ll40ls
drivers/aerofc_adc
modules/sensors
#
@ -51,7 +52,6 @@ set(config_module_list
#
modules/attitude_estimator_q
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@ -59,7 +59,6 @@ set(config_module_list
#
modules/mc_att_control
modules/mc_pos_control
modules/vtol_att_control # FIXME: only required for params needed by Navigator
#
# Logging
@ -84,7 +83,12 @@ set(config_module_list
lib/geo
lib/geo_lookup
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/tailsitter_recovery
lib/version
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
@ -7,35 +8,47 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/boards
drivers/camera_trigger
drivers/device
drivers/gps
drivers/led
drivers/mkblctrl
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/oreoled
drivers/pwm_input
drivers/pwm_out_sim
drivers/px4flow
drivers/px4fmu
drivers/px4io
drivers/rgbled
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/vmount
drivers/led
drivers/px4fmu
drivers/px4io
drivers/boards
drivers/rgbled
drivers/mpu6000
drivers/mpu9250
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/sf1xx
drivers/ll40ls
drivers/teraranger
drivers/gps
drivers/pwm_out_sim
drivers/hott
drivers/hott/hott_telemetry
drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/sdp3x_airspeed
drivers/frsky_telemetry
modules/sensors
drivers/mkblctrl
drivers/px4flow
drivers/oreoled
drivers/vmount
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
drivers/lis3mdl
#
# System commands
@ -57,13 +70,12 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
drivers/distance_sensor/sf0x/sf0x_tests
drivers/sf0x/sf0x_tests
drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@ -90,7 +102,6 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@ -127,12 +138,20 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@ -152,6 +171,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
#examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@ -10,8 +11,8 @@ set(config_module_list
drivers/led
drivers/px4fmu
drivers/boards
drivers/imu/mpu9250
drivers/barometer/lps25h
drivers/mpu9250
drivers/lps25h
drivers/gps
modules/sensors
@ -50,7 +51,6 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@ -61,7 +61,7 @@ set(config_module_list
# modules/fw_att_control
modules/mc_att_control
modules/mc_pos_control
modules/vtol_att_control # FIXME: only required for params needed by Navigator
# modules/vtol_att_control
#
# Logging
@ -85,11 +85,20 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@ -109,6 +118,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
#examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
add_definitions(
-DFLASH_BASED_PARAMS
@ -27,7 +28,7 @@ add_definitions(
)
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
BIN ${PX4_BINARY_DIR}/platforms/nuttx/esc35-v1.bin
BIN ${CMAKE_CURRENT_BINARY_DIR}/src/firmware/nuttx/esc35-v1.bin
HWNAME ${uavcanblid_name}
HW_MAJOR ${uavcanblid_hw_version_major}
HW_MINOR ${uavcanblid_hw_version_minor}
@ -71,4 +72,7 @@ set(config_module_list
modules/systemlib
modules/systemlib/param
modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@ -7,38 +8,50 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/boards
drivers/camera_trigger
drivers/device
drivers/gps
#drivers/hott
drivers/imu/l3gd20
drivers/led
drivers/imu/lsm303d
#drivers/mkblctrl
drivers/imu/mpu6000
drivers/imu/mpu9250
#drivers/oreoled
drivers/pwm_input
drivers/pwm_out_sim
drivers/px4flow
drivers/px4fmu
drivers/rgbled
#drivers/rgbled_pwm
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/vmount
drivers/led
drivers/px4fmu
drivers/boards
drivers/rgbled
#drivers/rgbled_pwm
drivers/mpu6000
drivers/mpu9250
drivers/lsm303d
drivers/l3gd20
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
drivers/srf02
drivers/srf02_i2c
#drivers/hc_sr04
drivers/sf0x
drivers/sf1xx
drivers/ll40ls
drivers/teraranger
drivers/gps
drivers/pwm_out_sim
#drivers/hott
#drivers/hott/hott_telemetry
#drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/sdp3x_airspeed
drivers/frsky_telemetry
modules/sensors
#drivers/mkblctrl
drivers/px4flow
#drivers/oreoled
drivers/vmount
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
#
# System commands
@ -53,7 +66,6 @@ set(config_module_list
systemcmds/hardfault_log
systemcmds/reboot
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/top
systemcmds/config
systemcmds/nshterm
@ -66,7 +78,7 @@ set(config_module_list
#
# Tests
#
drivers/distance_sensor/sf0x/sf0x_tests
drivers/sf0x/sf0x_tests
drivers/test_ppm
modules/commander/commander_tests
modules/mc_pos_control/mc_pos_control_tests
@ -94,7 +106,6 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@ -131,13 +142,21 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@ -157,6 +176,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
#examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug
@ -167,4 +190,4 @@ set(config_module_list
# Hardware test
#examples/hwtest
)
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@ -7,30 +8,41 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/airspeed
drivers/barometer/mpl3115a2
drivers/batt_smbus
drivers/blinkm
#NOT Supported drivers/bma180
#NOT Supported drivers/bmi160
drivers/bmp280
drivers/boards
drivers/bst
drivers/camera_trigger
drivers/device
drivers/imu/fxas21002c
drivers/imu/fxos8701cq
drivers/ets_airspeed
drivers/frsky_telemetry
drivers/fxos8701cq
drivers/fxas21002c
drivers/gps
drivers/hmc5883
drivers/hott
drivers/hott/hott_sensors
drivers/hott/hott_telemetry
drivers/iridiumsbd
drivers/kinetis
drivers/kinetis/adc
drivers/kinetis/tone_alarm
drivers/imu/l3gd20
drivers/l3gd20
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/lsm303d
drivers/mb12xx
drivers/mkblctrl
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/mpl3115a2
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/oreoled
# NOT Portable YET drivers/pwm_input
drivers/pwm_out_sim
@ -38,7 +50,13 @@ set(config_module_list
drivers/px4fmu
drivers/rgbled
drivers/rgbled_pwm
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
drivers/snapdragon_rc_pwm
drivers/srf02
drivers/tap_esc
drivers/teraranger
drivers/vmount
modules/sensors
@ -62,14 +80,13 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/usb_connected
systemcmds/ver
#
# Testing
#
drivers/distance_sensor/sf0x/sf0x_tests
drivers/sf0x/sf0x_tests
### NOT Portable YET drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@ -98,7 +115,6 @@ set(config_module_list
modules/attitude_estimator_q
modules/ekf2
modules/local_position_estimator
modules/landing_target_estimator
modules/position_estimator_inav
#
@ -134,15 +150,25 @@ set(config_module_list
lib/geo
lib/geo_lookup
lib/conversion
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
lib/DriverFramework/framework
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@ -166,6 +192,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
examples/px4_mavlink_debug
@ -176,4 +206,4 @@ set(config_module_list
# Hardware test
examples/hwtest
)
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m7 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@ -7,12 +8,6 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/device
drivers/samv7
#WIP drivers/samv7/adc
@ -21,14 +16,28 @@ set(config_module_list
drivers/px4fmu
drivers/boards
drivers/rgbled
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/imu/lsm303d
drivers/imu/l3gd20
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/lsm303d
drivers/l3gd20
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/ll40ls
drivers/teraranger
drivers/gps
#WIP drivers/pwm_out_sim
drivers/hott
drivers/hott/hott_telemetry
drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/frsky_telemetry
modules/sensors
#drivers/mkblctrl
drivers/px4flow
@ -36,6 +45,9 @@ set(config_module_list
## drivers/gimbal
#WIP drivers/pwm_input
#WIP drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm
drivers/lis3mdl
#
# System commands
@ -72,7 +84,6 @@ set(config_module_list
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/landing_target_estimator
modules/ekf2
#
@ -108,12 +119,21 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/rc
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@ -133,6 +153,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
#examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug
@ -143,4 +167,4 @@ set(config_module_list
# Hardware test
#examples/hwtest
)
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
@ -40,8 +41,14 @@ set(config_module_list
lib/ecl
lib/geo
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# Demo apps
@ -51,6 +58,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug
@ -61,4 +72,4 @@ set(config_module_list
# Hardware test
#examples/hwtest
)
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
add_definitions(
-DPARAM_NO_ORB
@ -25,7 +26,7 @@ add_definitions(
)
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
BIN ${PX4_BINARY_DIR}/platforms/nuttx/px4cannode-v1.bin
BIN ${PX4_BINARY_DIR}/src/firmware/nuttx/px4cannode-v1.bin
HWNAME ${uavcanblid_name}
HW_MAJOR ${uavcanblid_hw_version_major}
HW_MINOR ${uavcanblid_hw_version_minor}
@ -63,5 +64,7 @@ set(config_module_list
modules/systemlib
modules/systemlib/param
modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
add_definitions(
-DFLASH_BASED_PARAMS
@ -27,7 +28,7 @@ add_definitions(
)
px4_nuttx_make_uavcan_bootloadable(BOARD ${BOARD}
BIN ${PX4_BINARY_DIR}/platforms/nuttx/px4esc-v1.bin
BIN ${PX4_BINARY_DIR}/src/firmware/nuttx/px4esc-v1.bin
HWNAME ${uavcanblid_name}
HW_MAJOR ${uavcanblid_hw_version_major}
HW_MINOR ${uavcanblid_hw_version_minor}
@ -72,5 +73,7 @@ set(config_module_list
modules/systemlib
modules/systemlib/param
modules/uORB
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
#set(config_uavcan_num_ifaces 2)
@ -6,65 +7,63 @@ set(config_module_list
#
# Board support modules
#
#drivers/barometer
drivers/differential_pressure
#drivers/magnetometer
#drivers/telemetry
#drivers/imu/adis16448
#drivers/adis16448
drivers/airspeed
drivers/barometer/ms5611
#drivers/blinkm
#drivers/imu/bmi160
#drivers/barometer/bmp280
#drivers/bmi160
#drivers/bmp280
drivers/boards
#drivers/bst
drivers/camera_trigger
drivers/device
#drivers/frsky_telemetry
#drivers/ets_airspeed
drivers/frsky_telemetry
drivers/gps
drivers/hmc5883
#drivers/hott
#drivers/hott/hott_sensors
#drivers/hott/hott_telemetry
#drivers/iridiumsbd
#drivers/irlock
drivers/imu/l3gd20
#drivers/ist8310
drivers/l3gd20
drivers/led
drivers/imu/lsm303d
drivers/magnetometer/hmc5883
drivers/magnetometer/lis3mdl
drivers/lis3mdl
drivers/ll40ls
drivers/lsm303d
#drivers/mb12xx
#drivers/mkblctrl
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
#drivers/oreoled
#drivers/protocol_splitter
drivers/pwm_input
#drivers/pwm_out_sim
drivers/pwm_out_sim
drivers/px4flow
drivers/px4fmu
drivers/px4io
drivers/rgbled
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
#drivers/snapdragon_rc_pwm
#drivers/srf02
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
#drivers/tap_esc
drivers/teraranger
#drivers/ulanding
drivers/vmount
# distance sensors
drivers/distance_sensor/ll40ls
drivers/distance_sensor/mb12xx
drivers/distance_sensor/sf0x
drivers/distance_sensor/sf1xx
drivers/distance_sensor/srf02
drivers/distance_sensor/srf02_i2c
drivers/distance_sensor/teraranger
drivers/distance_sensor/tfmini
#drivers/distance_sensor/ulanding
modules/sensors
#
# System commands
#
#systemcmds/bl_update
systemcmds/bl_update
#systemcmds/config
#systemcmds/dumpfile
#systemcmds/esc_calib
@ -82,13 +81,12 @@ set(config_module_list
#systemcmds/sd_bench
systemcmds/top
#systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
#drivers/distance_sensor/sf0x/sf0x_tests
#drivers/sf0x/sf0x_tests
#drivers/test_ppm
#lib/controllib/controllib_test
#lib/rc/rc_tests
@ -118,15 +116,14 @@ set(config_module_list
modules/ekf2
#modules/local_position_estimator
#modules/position_estimator_inav
#modules/landing_target_estimator
#
# Vehicle Control
#
modules/fw_att_control
modules/fw_pos_control_l1
#modules/gnd_att_control
#modules/gnd_pos_control
modules/gnd_att_control
modules/gnd_pos_control
modules/mc_att_control
modules/mc_pos_control
modules/vtol_att_control
@ -154,13 +151,23 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
#lib/terrain_estimation
lib/tunes
lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@ -184,6 +191,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
#examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug

View File

@ -7,10 +7,6 @@ list(REMOVE_ITEM config_module_list
)
list(APPEND config_module_list
drivers/irlock
modules/attitude_estimator_q
modules/local_position_estimator
modules/landing_target_estimator
)

View File

@ -1,3 +1,4 @@
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_test)
@ -14,11 +15,12 @@ set(config_module_list
drivers/px4io
drivers/boards
drivers/rgbled
drivers/imu/mpu6000
#TO FIT drivers/imu/mpu9250
drivers/imu/lsm303d
drivers/imu/l3gd20
drivers/mpu6000
#TO FIT drivers/mpu9250
drivers/lsm303d
drivers/l3gd20
drivers/hmc5883
drivers/ms5611
#drivers/mb12xx
#drivers/srf02
#drivers/sf0x
@ -27,10 +29,15 @@ set(config_module_list
drivers/gps
#drivers/pwm_out_sim
#drivers/hott
#drivers/hott/hott_telemetry
#drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/barometer
drivers/differential_pressure
drivers/ets_airspeed
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/sdp3x_airspeed
drivers/frsky_telemetry
modules/sensors
#drivers/mkblctrl
drivers/px4flow
@ -39,8 +46,8 @@ set(config_module_list
drivers/pwm_input
drivers/camera_trigger
#drivers/bst
#drivers/snapdragon_rc_pwm
#drivers/lis3mdl
drivers/tfmini
#
# System commands
@ -66,7 +73,7 @@ set(config_module_list
#
# Testing
#
drivers/distance_sensor/sf0x/sf0x_tests
drivers/sf0x/sf0x_tests
drivers/test_ppm
#lib/rc/rc_tests
modules/commander/commander_tests
@ -127,12 +134,20 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
@ -152,6 +167,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
#examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug

View File

@ -2,9 +2,9 @@
# FMUv3 is FMUv2 with access to the full 2MB flash
set(BOARD px4fmu-v2 CACHE string "" FORCE)
set(FW_NAME nuttx_px4fmu-v3_default.elf CACHE string "" FORCE)
set(FW_PROTOTYPE px4fmu-v3 CACHE string "" FORCE)
set(LD_SCRIPT ld_full.script CACHE string "" FORCE)
include(nuttx/px4_impl_nuttx)
px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common IO px4io-v2)
set(config_uavcan_num_ifaces 2)
@ -13,28 +13,36 @@ set(config_module_list
#
# Board support modules
#
drivers/barometer
drivers/differential_pressure
drivers/distance_sensor
drivers/magnetometer
drivers/telemetry
drivers/adis16448
drivers/airspeed
drivers/batt_smbus
drivers/blinkm
drivers/bmi160
drivers/bmp280
drivers/boards
drivers/bst
drivers/camera_trigger
drivers/device
drivers/ets_airspeed
drivers/frsky_telemetry
drivers/gps
drivers/imu/adis16448
drivers/imu/bmi160
drivers/imu/l3gd20
drivers/imu/lsm303d
drivers/imu/mpu6000
drivers/imu/mpu9250
drivers/hmc5883
drivers/hott
drivers/hott/hott_sensors
drivers/hott/hott_telemetry
drivers/iridiumsbd
drivers/irlock
drivers/l3gd20
drivers/led
drivers/lis3mdl
drivers/ll40ls
drivers/lsm303d
drivers/mb12xx
drivers/mkblctrl
drivers/mpu6000
drivers/mpu9250
drivers/ms4525_airspeed
drivers/ms5525_airspeed
drivers/ms5611
drivers/oreoled
drivers/protocol_splitter
drivers/pwm_input
@ -43,10 +51,17 @@ set(config_module_list
drivers/px4fmu
drivers/px4io
drivers/rgbled
drivers/sdp3x_airspeed
drivers/sf0x
drivers/sf1xx
drivers/snapdragon_rc_pwm
drivers/srf02
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/tap_esc
drivers/teraranger
drivers/ulanding
drivers/vmount
modules/sensors
@ -71,13 +86,12 @@ set(config_module_list
systemcmds/sd_bench
systemcmds/top
systemcmds/topic_listener
systemcmds/tune_control
systemcmds/ver
#
# Testing
#
drivers/distance_sensor/sf0x/sf0x_tests
drivers/sf0x/sf0x_tests
drivers/test_ppm
lib/controllib/controllib_test
#lib/rc/rc_tests
@ -105,7 +119,6 @@ set(config_module_list
#
modules/attitude_estimator_q
modules/ekf2
modules/landing_target_estimator
modules/local_position_estimator
modules/position_estimator_inav
@ -143,13 +156,23 @@ set(config_module_list
lib/ecl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/led
lib/mathlib
lib/mathlib/math/filter
lib/mixer
lib/runway_takeoff
lib/tailsitter_recovery
lib/terrain_estimation
lib/tunes
lib/version
#
# Platform
#
platforms/common
platforms/nuttx
platforms/nuttx/px4_layer
#
# OBC challenge
#
@ -173,6 +196,10 @@ set(config_module_list
# https://px4.io/dev/px4_simple_app
examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
examples/px4_mavlink_debug

Some files were not shown because too many files have changed in this diff Show More