mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-12 22:10:05 +08:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f13bbacd52 | |||
| 82aa24adfc | |||
| a7969de738 | |||
| 33e86d25b9 | |||
| 805dfc4312 | |||
| ab2d595224 | |||
| ab044e274d | |||
| b0f766d90e | |||
| 2bb9d7e91f | |||
| 5f8c08db79 | |||
| a936dc291e | |||
| 42dc2bd890 | |||
| 9d878c719d | |||
| 649d4be185 | |||
| bec74085f1 | |||
| 350df41e42 | |||
| 95295b30e8 | |||
| dd044ed4be | |||
| 9b2e32c976 | |||
| e1bca8d01a |
@@ -1,160 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros-kinetic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_sitl_default'
|
||||
sh 'make px4_sitl_default sitl_gazebo'
|
||||
sh 'make px4_sitl_default package'
|
||||
sh 'ccache -s'
|
||||
stash(name: "px4_sitl_package", includes: "build/px4_sitl_default/*.bz2")
|
||||
archiveArtifacts(artifacts: "build/px4_sitl_default/*.bz2", fingerprint: true, onlyIfSuccessful: true)
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage Build
|
||||
|
||||
stage('ROS Tests') {
|
||||
steps {
|
||||
script {
|
||||
def missions = [
|
||||
[
|
||||
name: "FW",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "FW_mission_1",
|
||||
vehicle: "plane"
|
||||
],
|
||||
|
||||
[
|
||||
name: "MC_box",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "MC_mission_box",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_att",
|
||||
test: "mavros_posix_tests_offboard_attctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_pos",
|
||||
test: "mavros_posix_tests_offboard_posctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
|
||||
[
|
||||
name: "VTOL_standard",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "standard_vtol"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tailsitter",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tailsitter"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tiltrotor",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tiltrotor"
|
||||
],
|
||||
[
|
||||
name: "MC_avoidance",
|
||||
test: "mavros_posix_test_avoidance.test",
|
||||
mission: "avoidance",
|
||||
vehicle: "iris_obs_avoid",
|
||||
run_script: "rostest_avoidance_run.sh"
|
||||
],
|
||||
|
||||
]
|
||||
|
||||
def test_nodes = [:]
|
||||
for (def i = 0; i < missions.size(); i++) {
|
||||
test_nodes.put(missions[i].name, createTestNode(missions[i]))
|
||||
}
|
||||
|
||||
parallel test_nodes
|
||||
} // script
|
||||
} // steps
|
||||
} // stage ROS Tests
|
||||
|
||||
} //stages
|
||||
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
} // pipeline
|
||||
|
||||
def createTestNode(Map test_def) {
|
||||
return {
|
||||
node {
|
||||
cleanWs()
|
||||
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
|
||||
stage(test_def.name) {
|
||||
def run_script = test_def.get('run_script', 'rostest_px4_run.sh')
|
||||
def test_ok = true
|
||||
sh('export')
|
||||
|
||||
unstash('px4_sitl_package')
|
||||
sh('tar -xjpvf build/px4_sitl_default/px4-px4_sitl_default*.bz2')
|
||||
|
||||
// run test
|
||||
try {
|
||||
sh('px4-px4_sitl_default*/px4/test/' + run_script + ' ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
|
||||
|
||||
} catch (exc) {
|
||||
// save all test artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
|
||||
test_ok = false
|
||||
}
|
||||
|
||||
// log analysis
|
||||
// process ekf log data
|
||||
try {
|
||||
sh('px4-px4_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||
} catch (exc) {
|
||||
// save log analysis artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
|
||||
// FIXME: don't let the script to fail the build
|
||||
// test_ok = false
|
||||
}
|
||||
|
||||
// upload log to flight review (https://logs.px4.io/)
|
||||
sh('px4-px4_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
|
||||
|
||||
if (!test_ok) {
|
||||
error('ROS Test failed')
|
||||
}
|
||||
} // stage
|
||||
cleanWs()
|
||||
} // docker.image
|
||||
} // node
|
||||
} // return
|
||||
} // createTestNode
|
||||
@@ -1,153 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros-kinetic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_sitl_default'
|
||||
sh 'make px4_sitl_default sitl_gazebo'
|
||||
sh 'make px4_sitl_default package'
|
||||
sh 'ccache -s'
|
||||
stash(name: "px4_sitl_package", includes: "build/px4_sitl_default/*.bz2")
|
||||
//archiveArtifacts(artifacts: "build/px4_sitl_default/*.bz2", fingerprint: true, onlyIfSuccessful: true)
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage Build
|
||||
|
||||
stage('ROS Tests') {
|
||||
steps {
|
||||
script {
|
||||
def missions = [
|
||||
[
|
||||
name: "FW",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "FW_mission_1",
|
||||
vehicle: "plane"
|
||||
],
|
||||
|
||||
[
|
||||
name: "MC_box",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "MC_mission_box",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_att",
|
||||
test: "mavros_posix_tests_offboard_attctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_pos",
|
||||
test: "mavros_posix_tests_offboard_posctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
|
||||
[
|
||||
name: "VTOL_standard",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "standard_vtol"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tailsitter",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tailsitter"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tiltrotor",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tiltrotor"
|
||||
],
|
||||
|
||||
]
|
||||
|
||||
def test_nodes = [:]
|
||||
for (def i = 0; i < missions.size(); i++) {
|
||||
test_nodes.put(missions[i].name, createTestNode(missions[i]))
|
||||
}
|
||||
|
||||
parallel test_nodes
|
||||
} // script
|
||||
} // steps
|
||||
} // stage ROS Tests
|
||||
|
||||
} //stages
|
||||
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
PX4_CMAKE_BUILD_TYPE = 'AddressSanitizer'
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
} // pipeline
|
||||
|
||||
def createTestNode(Map test_def) {
|
||||
return {
|
||||
node {
|
||||
cleanWs()
|
||||
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
|
||||
stage(test_def.name) {
|
||||
def test_ok = true
|
||||
sh('export')
|
||||
|
||||
unstash('px4_sitl_package')
|
||||
sh('tar -xjpvf build/px4_sitl_default/px4-px4_sitl_default*.bz2')
|
||||
|
||||
// run test
|
||||
try {
|
||||
sh('px4-px4_sitl_default*/px4/test/rostest_px4_run.sh ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
|
||||
|
||||
} catch (exc) {
|
||||
// save all test artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
|
||||
test_ok = false
|
||||
}
|
||||
|
||||
// log analysis
|
||||
// process ekf log data
|
||||
try {
|
||||
sh('px4-px4_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||
} catch (exc) {
|
||||
// save log analysis artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
|
||||
// FIXME: don't let the script to fail the build
|
||||
// test_ok = false
|
||||
}
|
||||
|
||||
// upload log to flight review (https://logs.px4.io/)
|
||||
sh('px4-px4_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
|
||||
|
||||
if (!test_ok) {
|
||||
error('ROS Test failed')
|
||||
}
|
||||
} // stage
|
||||
cleanWs()
|
||||
} // docker.image
|
||||
} // node
|
||||
} // return
|
||||
} // createTestNode
|
||||
@@ -1,182 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
stages {
|
||||
|
||||
stage('ROS Tests') {
|
||||
steps {
|
||||
script {
|
||||
def missions = [
|
||||
[
|
||||
name: "FW",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "FW_mission_1",
|
||||
vehicle: "plane"
|
||||
],
|
||||
|
||||
[
|
||||
name: "MC_box",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "MC_mission_box",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_att",
|
||||
test: "mavros_posix_tests_offboard_attctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_pos",
|
||||
test: "mavros_posix_tests_offboard_posctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
|
||||
[
|
||||
name: "VTOL_standard",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "standard_vtol"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tailsitter",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tailsitter"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tiltrotor",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tiltrotor"
|
||||
],
|
||||
|
||||
]
|
||||
|
||||
def test_nodes = [:]
|
||||
for (def i = 0; i < missions.size(); i++) {
|
||||
test_nodes.put(missions[i].name, createTestNode(missions[i]))
|
||||
}
|
||||
|
||||
parallel test_nodes
|
||||
} // script
|
||||
} // steps
|
||||
} // stage ROS Tests
|
||||
|
||||
stage('Coverage') {
|
||||
parallel {
|
||||
|
||||
stage('code coverage (python)') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base-bionic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make python_coverage'
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F python'
|
||||
}
|
||||
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('unit tests') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base-bionic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make px4_sitl_test test_results_junit'
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F unittest'
|
||||
}
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Coverage
|
||||
|
||||
} //stages
|
||||
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
CTEST_OUTPUT_ON_FAILURE = 1
|
||||
PX4_CMAKE_BUILD_TYPE = 'Coverage'
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
} // pipeline
|
||||
|
||||
def createTestNode(Map test_def) {
|
||||
return {
|
||||
node {
|
||||
cleanWs()
|
||||
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
|
||||
stage(test_def.name) {
|
||||
def test_ok = true
|
||||
sh('export')
|
||||
|
||||
checkout(scm)
|
||||
|
||||
// run test
|
||||
try {
|
||||
sh('make distclean')
|
||||
sh('ccache -z')
|
||||
sh('make px4_sitl_default')
|
||||
sh('make px4_sitl_default sitl_gazebo')
|
||||
sh('ccache -s')
|
||||
sh('make rostest_run TEST_FILE=' + test_def.test + ' TEST_MISSION=' + test_def.mission + ' TEST_VEHICLE=' + test_def.vehicle)
|
||||
} catch (exc) {
|
||||
// save all test artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
|
||||
test_ok = false
|
||||
}
|
||||
|
||||
// log analysis
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F sitl_mission_${STAGE_NAME}'
|
||||
|
||||
// process log data (with python code coverage)
|
||||
try {
|
||||
//sh('coverage run -p Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||
sh('Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||
} catch (exc) {
|
||||
// save log analysis artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
|
||||
// FIXME: don't let the script to fail the build
|
||||
// test_ok = false
|
||||
}
|
||||
|
||||
// upload log to flight review (https://logs.px4.io/) with python code coverage
|
||||
sh('coverage run -p Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
|
||||
|
||||
// upload python code coverage to codecov.io
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -X gcov -F sitl_python_${STAGE_NAME}'
|
||||
}
|
||||
|
||||
if (!test_ok) {
|
||||
error('ROS Test failed')
|
||||
}
|
||||
} // stage
|
||||
cleanWs()
|
||||
} // docker.image
|
||||
} // node
|
||||
} // return
|
||||
} // createTestNode
|
||||
@@ -1,153 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
script {
|
||||
def build_nodes = [:]
|
||||
def docker_images = [
|
||||
armhf: "px4io/px4-dev-armhf:2019-03-08",
|
||||
base: "px4io/px4-dev-base-bionic:2019-03-08",
|
||||
nuttx: "px4io/px4-dev-nuttx:2019-03-08",
|
||||
ros: "px4io/px4-dev-ros-kinetic:2019-03-08",
|
||||
rpi: "px4io/px4-dev-raspi:2019-03-08",
|
||||
snapdragon: "lorenzmeier/px4-dev-snapdragon:2018-09-12"
|
||||
]
|
||||
|
||||
def armhf_builds = [
|
||||
target: ["aerotenna_ocpoc_ubuntu"],
|
||||
image: docker_images.armhf,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def base_builds = [
|
||||
target: ["px4_sitl_rtps"],
|
||||
image: docker_images.base,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def nuttx_builds_archive = [
|
||||
target: [
|
||||
"px4_fmu-v2_default", "px4_fmu-v2_fixedwing", "px4_fmu-v2_lpe", "px4_fmu-v2_multicopter", "px4_fmu-v2_rover", "px4_fmu-v2_test",
|
||||
"px4_fmu-v3_default",
|
||||
"px4_fmu-v4_default",
|
||||
"px4_fmu-v4pro_default",
|
||||
"px4_fmu-v5_default", "px4_fmu-v5_fixedwing", "px4_fmu-v5_multicopter", "px4_fmu-v5_rover", "px4_fmu-v5_rtps", "px4_fmu-v5_stackcheck",
|
||||
"intel_aerofc-v1_default", "auav_x21_default", "av_x-v1_default", "bitcraze_crazyflie_default", "airmind_mindpx-v2_default",
|
||||
"nxp_fmuk66-v3_default", "omnibus_f4sd_default"],
|
||||
image: docker_images.nuttx,
|
||||
archive: true
|
||||
]
|
||||
|
||||
def nuttx_builds_other = [
|
||||
target: ["px4_cannode-v1_default", "px4_esc-v1_default", "thiemar_s2740vc-v1_default"],
|
||||
image: docker_images.nuttx,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def rpi_builds = [
|
||||
target: ["emlid_navio2_cross", "parrot_bebop_default"],
|
||||
image: docker_images.rpi,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def snapdragon_builds = [
|
||||
target: ["atlflight_eagle_qurt-default", "atlflight_eagle_default"],
|
||||
image: docker_images.snapdragon,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def docker_builds = [
|
||||
armhf_builds, base_builds, nuttx_builds_archive, nuttx_builds_other, rpi_builds, snapdragon_builds
|
||||
]
|
||||
|
||||
for (def build_type = 0; build_type < docker_builds.size(); build_type++) {
|
||||
for (def build_target = 0; build_target < docker_builds[build_type].target.size(); build_target++) {
|
||||
build_nodes.put(docker_builds[build_type].target[build_target],
|
||||
createBuildNode(docker_builds[build_type].archive, docker_builds[build_type].image, docker_builds[build_type].target[build_target])
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
parallel build_nodes
|
||||
|
||||
} // script
|
||||
} // steps
|
||||
} // stage Build
|
||||
|
||||
// TODO: actually upload artifacts to S3
|
||||
// stage('S3 Upload') {
|
||||
// agent {
|
||||
// docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
// }
|
||||
// options {
|
||||
// skipDefaultCheckout()
|
||||
// }
|
||||
// when {
|
||||
// anyOf {
|
||||
// branch 'master'
|
||||
// branch 'beta'
|
||||
// branch 'stable'
|
||||
// branch 'pr-jenkins' // for testing
|
||||
// }
|
||||
// }
|
||||
// steps {
|
||||
// sh 'echo "uploading to S3"'
|
||||
// }
|
||||
// }
|
||||
|
||||
} // stages
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '2', artifactDaysToKeepStr: '14'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
|
||||
def createBuildNode(Boolean archive, String docker_image, String target) {
|
||||
return {
|
||||
|
||||
// TODO: fix the snapdragon image
|
||||
bypass_entrypoint = ''
|
||||
if (docker_image == 'lorenzmeier/px4-dev-snapdragon:2018-09-12') {
|
||||
bypass_entrypoint = ' --entrypoint=""'
|
||||
}
|
||||
|
||||
node {
|
||||
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
|
||||
docker.image(docker_image).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + bypass_entrypoint) {
|
||||
stage(target) {
|
||||
try {
|
||||
sh('export')
|
||||
checkout(scm)
|
||||
sh('make distclean')
|
||||
sh('git fetch --tags')
|
||||
sh('ccache -z')
|
||||
sh('make ' + target)
|
||||
sh('ccache -s')
|
||||
sh('make sizes')
|
||||
if (archive) {
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: 'build/*/*.px4, build/*/*.elf, build/*/*.bin', fingerprint: true, onlyIfSuccessful: true)
|
||||
}
|
||||
sh('make ' + target + ' package')
|
||||
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/*/*.tar.bz2', fingerprint: true, onlyIfSuccessful: true)
|
||||
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/*/*.deb', fingerprint: true, onlyIfSuccessful: true)
|
||||
}
|
||||
catch (exc) {
|
||||
throw (exc)
|
||||
}
|
||||
finally {
|
||||
sh('make distclean')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('px4_sitl_default (OSX)') {
|
||||
agent {
|
||||
label 'mac'
|
||||
}
|
||||
environment {
|
||||
CCACHE_BASEDIR = "${env.WORKSPACE}"
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'make px4_sitl_default'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage px4_sitl_default
|
||||
|
||||
stage('px4_fmu-v5_default (OSX)') {
|
||||
agent {
|
||||
label 'mac'
|
||||
}
|
||||
environment {
|
||||
CCACHE_BASEDIR = "${env.WORKSPACE}"
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'make px4_fmu-v5_default'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage px4_fmu-v5_default
|
||||
|
||||
stage('sitl tests (OSX)') {
|
||||
agent {
|
||||
label 'mac'
|
||||
}
|
||||
environment {
|
||||
CCACHE_BASEDIR = "${env.WORKSPACE}"
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'make tests'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage sitl tests
|
||||
|
||||
} // parallel
|
||||
} // stage Build
|
||||
|
||||
} // stages
|
||||
environment {
|
||||
CCACHE_CPP2 = '1'
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 120, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
@@ -1,366 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('px4_fmu-v2_test') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v2_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v2_default/px4_fmu-v2_default.elf', name: 'px4_fmu-v2_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v3_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v3_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v3_default/px4_fmu-v3_default.elf', name: 'px4_fmu-v3_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v4_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v4_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v4_default/px4_fmu-v4_default.elf', name: 'px4_fmu-v4_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v4pro_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v4pro_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf', name: 'px4_fmu-v4pro_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v5_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v5_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v5_default/px4_fmu-v5_default.elf', name: 'px4_fmu-v5_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v5_stackcheck') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v5_stackcheck'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf', name: 'px4_fmu-v5_stackcheck'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('nxp_fmuk66-v3_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make nxp_fmuk66-v3_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf', name: 'nxp_fmuk66-v3_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Build
|
||||
|
||||
stage('Flash and Run') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('px4_fmu-v2_test') {
|
||||
agent {
|
||||
label 'px4_fmu-v2'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v2_test'
|
||||
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v2_test/px4_fmu-v2_test.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
//sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v3_default') {
|
||||
agent {
|
||||
label 'px4_fmu-v3'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v3_default'
|
||||
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v3_default/px4_fmu-v3_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v4_default') {
|
||||
agent {
|
||||
label 'px4_fmu-v4'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v4_default'
|
||||
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v4_default/px4_fmu-v4_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v4pro_default') {
|
||||
agent {
|
||||
label 'px4_fmu-v4pro'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v4pro_default'
|
||||
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v5_default') {
|
||||
agent {
|
||||
label 'px4_fmu-v5'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v5_default'
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_default/px4_fmu-v5_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v5_stackcheck') {
|
||||
agent {
|
||||
label 'px4_fmu-v5'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v5_stackcheck'
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('nxp_fmuk66-v3_default') {
|
||||
agent {
|
||||
label 'nxp_fmuk66-v3'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'nxp_fmuk66-v3_default'
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Flash
|
||||
|
||||
} // stages
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
Checks: '*
|
||||
,-cert-dcl50-cpp
|
||||
,-cert-env33-c
|
||||
,-cert-err34-c
|
||||
,-cert-err58-cpp
|
||||
,-cert-msc30-c
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
name: ⛔ Support Question
|
||||
about: See [PX4 Discuss](http://discuss.px4.io/) for questions about using PX4.
|
||||
|
||||
---
|
||||
|
||||
We use GitHub issues only to discuss PX4 bugs and new features. For
|
||||
questions about using PX4 or related components, please use [PX4 Discuss](http://discuss.px4.io/).
|
||||
|
||||
Thanks!
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
name: ⛔ Documentation Issue
|
||||
about: See https://github.com/PX4/Devguide for documentation issues
|
||||
|
||||
---
|
||||
|
||||
PX4 has dedicated repositories for developer documentation (https://github.com/PX4/Devguide) and user documentation (https://github.com/PX4/px4_user_guide).
|
||||
|
||||
Thanks!
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
---
|
||||
name: 🚀 Feature Request
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
+49
-12
@@ -1,18 +1,55 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 90
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 60
|
||||
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 14
|
||||
# Issues with these labels will never be considered stale
|
||||
|
||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- priority-crtical
|
||||
- security
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: wontfix
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
- "[Status] Maybe Later"
|
||||
|
||||
# Set to true to ignore issues in a project (defaults to false)
|
||||
exemptProjects: true
|
||||
|
||||
# Set to true to ignore issues in a milestone (defaults to false)
|
||||
exemptMilestones: true
|
||||
|
||||
# Label to use when marking as stale
|
||||
staleLabel: status/STALE
|
||||
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
recent activity. It will be closed in 2 weeks if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: >
|
||||
Closing as stale.
|
||||
|
||||
# Comment to post when removing the stale label.
|
||||
# unmarkComment: >
|
||||
# Your comment here.
|
||||
|
||||
# Comment to post when closing a stale Issue or Pull Request.
|
||||
closeComment: >
|
||||
Closing as stale.
|
||||
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 10
|
||||
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
|
||||
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
|
||||
# pulls:
|
||||
# daysUntilStale: 30
|
||||
# markComment: >
|
||||
# This pull request has been automatically marked as stale because it has not had
|
||||
# recent activity. It will be closed if no further activity occurs. Thank you
|
||||
# for your contributions.
|
||||
|
||||
# issues:
|
||||
# exemptLabels:
|
||||
# - confirmed
|
||||
|
||||
+11
-4
@@ -8,13 +8,14 @@
|
||||
.cproject
|
||||
.DS_Store
|
||||
.gdbinit
|
||||
.gdb_history
|
||||
.project
|
||||
.settings
|
||||
.swp
|
||||
.~lock.*
|
||||
Testing/
|
||||
Packages/*
|
||||
s3deploy-branch/
|
||||
s3deploy-archive/
|
||||
build/*
|
||||
build_*/
|
||||
core
|
||||
@@ -32,11 +33,18 @@ tags
|
||||
.pydevproject
|
||||
.ropeproject
|
||||
*.orig
|
||||
src/modules/uORB/topics/*
|
||||
src/platforms/nuttx/px4_messages/*
|
||||
src/platforms/ros/px4_messages/*
|
||||
Firmware.zip
|
||||
*.generated.h
|
||||
.vagrant
|
||||
*.pretty
|
||||
xcode
|
||||
src/platforms/posix/px4_messages/
|
||||
src/platforms/posix-arm/px4_messages/
|
||||
src/platforms/qurt/px4_messages/
|
||||
ROMFS/*/*/rc.autostart
|
||||
rootfs/
|
||||
*.autosave
|
||||
CMakeLists.txt.user
|
||||
@@ -52,6 +60,8 @@ GTAGS
|
||||
.idea
|
||||
cmake-build-*/
|
||||
|
||||
.vscode
|
||||
|
||||
posix-configs/SITL/init/test/*_generated
|
||||
|
||||
/airframes.md
|
||||
@@ -59,8 +69,5 @@ posix-configs/SITL/init/test/*_generated
|
||||
/parameters.md
|
||||
/parameters.xml
|
||||
/modules
|
||||
/msg/ros/*.msg
|
||||
|
||||
*.gcov
|
||||
.coverage
|
||||
.coverage.*
|
||||
|
||||
+18
-18
@@ -2,18 +2,18 @@
|
||||
path = mavlink/include/mavlink/v2.0
|
||||
url = https://github.com/mavlink/c_library_v2.git
|
||||
branch = master
|
||||
[submodule "src/drivers/uavcan/libuavcan"]
|
||||
path = src/drivers/uavcan/libuavcan
|
||||
url = https://github.com/PX4/uavcan.git
|
||||
branch = px4
|
||||
[submodule "src/modules/uavcan/libuavcan"]
|
||||
path = src/modules/uavcan/libuavcan
|
||||
url = https://github.com/UAVCAN/libuavcan.git
|
||||
branch = master
|
||||
[submodule "msg/tools/genmsg"]
|
||||
path = msg/tools/genmsg
|
||||
url = https://github.com/PX4/genmsg.git
|
||||
branch = px4
|
||||
url = https://github.com/ros/genmsg.git
|
||||
branch = indigo-devel
|
||||
[submodule "msg/tools/gencpp"]
|
||||
path = msg/tools/gencpp
|
||||
url = https://github.com/PX4/gencpp.git
|
||||
branch = px4
|
||||
url = https://github.com/ros/gencpp.git
|
||||
branch = indigo-devel
|
||||
[submodule "Tools/jMAVSim"]
|
||||
path = Tools/jMAVSim
|
||||
url = https://github.com/PX4/jMAVSim.git
|
||||
@@ -34,26 +34,26 @@
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/ecl.git
|
||||
branch = master
|
||||
[submodule "boards/atlflight/cmake_hexagon"]
|
||||
path = boards/atlflight/cmake_hexagon
|
||||
url = https://github.com/PX4/cmake_hexagon.git
|
||||
branch = px4
|
||||
[submodule "cmake/cmake_hexagon"]
|
||||
path = cmake/cmake_hexagon
|
||||
url = https://github.com/ATLFlight/cmake_hexagon.git
|
||||
branch = master
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/GpsDrivers.git
|
||||
branch = master
|
||||
[submodule "src/modules/micrortps_bridge/micro-CDR"]
|
||||
path = src/modules/micrortps_bridge/micro-CDR
|
||||
url = https://github.com/PX4/micro-CDR.git
|
||||
branch = px4
|
||||
url = https://github.com/eProsima/micro-CDR.git
|
||||
branch = master
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
url = https://github.com/PX4/NuttX.git
|
||||
branch = px4_firmware_nuttx-7.28+
|
||||
url = https://github.com/PX4-NuttX/nuttx.git
|
||||
branch = px4_firmware_nuttx-7.22+
|
||||
[submodule "platforms/nuttx/NuttX/apps"]
|
||||
path = platforms/nuttx/NuttX/apps
|
||||
url = https://github.com/PX4/NuttX-apps.git
|
||||
branch = px4_firmware_nuttx-7.28+
|
||||
url = https://github.com/PX4-NuttX/apps.git
|
||||
branch = px4_firmware_nuttx-7.22+
|
||||
[submodule "cmake/configs/uavcan_board_ident"]
|
||||
path = cmake/configs/uavcan_board_ident
|
||||
url = https://github.com/PX4/uavcan_board_ident.git
|
||||
|
||||
+40
-11
@@ -1,26 +1,55 @@
|
||||
# Build and autotest script for PX4 Firmware
|
||||
# http://travis-ci.org
|
||||
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
language: cpp
|
||||
|
||||
git:
|
||||
depth: 100
|
||||
depth: 2000
|
||||
submodules: false
|
||||
|
||||
env:
|
||||
global:
|
||||
# COVERITY_SCAN_TOKEN
|
||||
- secure: "Q4IAcmo1r5cr/UvhcixQa6QN5e5eTcP7FeidzEbX2+BA38yo2BH5O9YQCvZe2AI1Na8ZCjVx3H2luGgDwOKgzAIAjXjZ2KbmXYc6Ns/j/BXScY05dCCzYEhXKD98NZxIKH9lLN9pYDGRA8pChGRJnVlFOr1JHHHnB801+osHy7M="
|
||||
# AWS KEY: $PX4_AWS_KEY
|
||||
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
|
||||
# AWS SECRET: $PX4_AWS_SECRET
|
||||
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- os: linux
|
||||
dist: xenial
|
||||
- env: BUILD_TARGET=coverity_scan
|
||||
dist: trusty
|
||||
if: branch = coverity_scan
|
||||
allow_failures:
|
||||
- env: BUILD_TARGET=tests_coverage
|
||||
|
||||
cache:
|
||||
ccache: true
|
||||
|
||||
before_install:
|
||||
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
|
||||
|
||||
install:
|
||||
- export PATH=$HOME/.local/bin:$PATH
|
||||
- pip install --user --upgrade pip
|
||||
- pip install --user -r Tools/setup/requirements.txt
|
||||
# install dependencies for the coverity build (target and branch), otherwise exit early
|
||||
- if [[ "${TRAVIS_BRANCH}" = "coverity_scan" ]]; then
|
||||
sudo pip install empy jinja2 numpy toml;
|
||||
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-;
|
||||
fi
|
||||
# use git:// to fetch instead of https://
|
||||
- git config --global url."git://".insteadOf https://
|
||||
|
||||
script:
|
||||
- make
|
||||
- ./Tools/docker_run.sh make ${BUILD_TARGET}
|
||||
|
||||
after_success:
|
||||
# upload code coverage
|
||||
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
|
||||
[ "${BUILD_TARGET}" = "tests_coverage" ] && bash <(curl -s https://codecov.io/bash) -F unittests;
|
||||
fi
|
||||
|
||||
addons:
|
||||
coverity_scan:
|
||||
@@ -29,5 +58,5 @@ addons:
|
||||
description: "Build submitted via Travis CI"
|
||||
notification_email: ci@px4.io
|
||||
build_command_prepend: "make distclean"
|
||||
build_command: "make px4_sitl_default"
|
||||
build_command: "make posix_sitl_default"
|
||||
branch_pattern: coverity_scan
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
.cortex-debug.peripherals.state.json
|
||||
.cortex-debug.registers.state.json
|
||||
compile_commands.json
|
||||
|
||||
# C/C++ extension does some local caching in this folder
|
||||
ipch/
|
||||
Vendored
-26
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"intelliSenseMode": "gcc-x64",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceFolder}/src/",
|
||||
"${workspaceFolder}/src/lib/",
|
||||
"${workspaceFolder}/src/lib/matrix",
|
||||
"${workspaceFolder}/src/platforms",
|
||||
"${workspaceFolder}/platforms/",
|
||||
"."
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true
|
||||
},
|
||||
"compileCommands": "${workspaceFolder}/.vscode/compile_commands.json",
|
||||
"configurationProvider": "vector-of-bool.cmake-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "PX4 detect"
|
||||
}
|
||||
]
|
||||
Vendored
-63
@@ -1,63 +0,0 @@
|
||||
CONFIG:
|
||||
default: px4_sitl_default
|
||||
choices:
|
||||
px4_sitl_default:
|
||||
short: px4_sitl
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_default_Debug:
|
||||
short: px4_sitl (Debug)
|
||||
buildType: Debug
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_default_ASan:
|
||||
short: px4_sitl (Address Sanitizer)
|
||||
buildType: AddressSanitizer
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_fmu-v2_default:
|
||||
short: px4_fmu-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v2_default
|
||||
px4_fmu-v3_default:
|
||||
short: px4_fmu-v3
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v3_default
|
||||
px4_fmu-v4_default:
|
||||
short: px4_fmu-v4
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v4_default
|
||||
px4_fmu-v4pro_default:
|
||||
short: px4_fmu-v4pro
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v4pro_default
|
||||
px4_fmu-v5_default:
|
||||
short: px4_fmu-v5
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5_default
|
||||
airmind_mindpx-v2_default:
|
||||
short: airmind_mindpx-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: airmind_mindpx-v2_default
|
||||
av_x-v1_default:
|
||||
short: av-x
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: av_x-v1_default
|
||||
intel_aerofc-v1_default:
|
||||
short: intel_aerofc-v1
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: intel_aerofc-v1_default
|
||||
nxp_fmuk66-v3_default:
|
||||
short: nxp_fmuk66-v3
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: nxp_fmuk66-v3_default
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"ajshort.ros",
|
||||
"chiehyu.vscode-astyle",
|
||||
"dan-c-underwood.arm",
|
||||
"github.vscode-pull-request-github",
|
||||
"marus25.cortex-debug",
|
||||
"ms-python.python",
|
||||
"ms-vscode.cpptools",
|
||||
"peterjausovec.vscode-docker",
|
||||
"twxs.cmake",
|
||||
"uavcan.dsdl",
|
||||
"vector-of-bool.cmake-tools",
|
||||
"wholroyd.jinja"
|
||||
]
|
||||
}
|
||||
Vendored
-194
@@ -1,194 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "SITL shell",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "shell"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SITL jmavsim iris",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "iris"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "jmavsim",
|
||||
"postDebugTask": "jmavsim kill",
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SITL gazebo iris",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "iris"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "gazebo iris",
|
||||
"postDebugTask": "gazebo kill",
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v2 (jlink) ",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F427VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v3 (jlink)",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F427VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v4 (jlink)",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F427VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v4pro (jlink)",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F469VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F469.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v5 (jlink)",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F765VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F7x5.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
]
|
||||
}
|
||||
Vendored
-91
@@ -1,91 +0,0 @@
|
||||
{
|
||||
"astyle.astylerc": "${workspaceFolder}/Tools/astyle/astylerc",
|
||||
"astyle.c.enable": true,
|
||||
"astyle.cpp.enable": true,
|
||||
"breadcrumbs.enabled": true,
|
||||
"cmake.autoRestartBuild": true,
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/${variant:CONFIG}",
|
||||
"cmake.buildBeforeRun": true,
|
||||
"cmake.configureOnOpen": true,
|
||||
"cmake.copyCompileCommands": "${workspaceFolder}/.vscode/compile_commands.json",
|
||||
"cmake.debugConfig": {
|
||||
"name": "SITL shell (gdb)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "shell"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"C_Cpp.clang_format_fallbackStyle": "none",
|
||||
"C_Cpp.configurationWarnings": "Disabled",
|
||||
"C_Cpp.default.cppStandard": "c++11",
|
||||
"C_Cpp.default.cStandard": "c99",
|
||||
"C_Cpp.default.intelliSenseMode": "gcc-x64",
|
||||
"C_Cpp.errorSquiggles": "Disabled",
|
||||
"C_Cpp.formatting": "Disabled",
|
||||
"C_Cpp.intelliSenseEngine": "Default",
|
||||
"C_Cpp.intelliSenseEngineFallback": "Disabled",
|
||||
"debug.toolBarLocation": "docked",
|
||||
"editor.insertSpaces": false,
|
||||
"editor.minimap.maxColumn": 120,
|
||||
"editor.minimap.renderCharacters": false,
|
||||
"editor.minimap.showSlider": "always",
|
||||
"editor.smoothScrolling": true,
|
||||
"editor.suggest.localityBonus": true,
|
||||
"editor.tabSize": 8,
|
||||
"editor.wordWrapColumn": 120,
|
||||
"explorer.openEditors.visible": 0,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"git.detectSubmodulesLimit": 20,
|
||||
"files.associations": {
|
||||
"*.jinja": "jinja"
|
||||
},
|
||||
"search.exclude": {
|
||||
"build/**": true
|
||||
},
|
||||
"search.showLineNumbers": true,
|
||||
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
|
||||
"workbench.editor.enablePreview": false,
|
||||
"workbench.editor.enablePreviewFromQuickOpen": false,
|
||||
"workbench.editor.highlightModifiedTabs": true,
|
||||
"workbench.settings.enableNaturalLanguageSearch": false,
|
||||
"workbench.statusBar.feedback.visible": false
|
||||
}
|
||||
Vendored
-97
@@ -1,97 +0,0 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "jmavsim",
|
||||
"type": "shell",
|
||||
"command": "Tools/jmavsim_run.sh",
|
||||
"isBackground": true,
|
||||
"args": [
|
||||
"-r",
|
||||
"500"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated"
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "jmavsim kill",
|
||||
"type": "shell",
|
||||
"command": "kill $(ps aux | grep jmavsim | grep -v 'grep' | awk '{print $2}')",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "gazebo build",
|
||||
"type": "shell",
|
||||
"command": "make px4_sitl_default sitl_gazebo",
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "gazebo iris",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo build",
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceRoot}/build/px4_sitl_default/build_gazebo",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceRoot}/Tools/sitl_gazebo/models"
|
||||
}
|
||||
},
|
||||
"command": "gzserver --verbose ${workspaceRoot}/Tools/sitl_gazebo/worlds/iris.world",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated"
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "gazebo kill",
|
||||
"type": "shell",
|
||||
"command": "killall gzserver",
|
||||
"problemMatcher": []
|
||||
},
|
||||
]
|
||||
}
|
||||
+1
-1
@@ -61,7 +61,7 @@ flags = [
|
||||
'c++',
|
||||
'-undef', # get rid of standard definitions to allow us to include arm math header
|
||||
'-I', os.path.join(os.path.expanduser("~"),'gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/include'),
|
||||
'-I', 'Build/px4_io-v2_default.build/nuttx-export/include/',
|
||||
'-I', 'Build/px4io-v2_default.build/nuttx-export/include/',
|
||||
'-I', './NuttX/nuttx/arch/arm/include',
|
||||
'-include', './src/include/visibility.h',
|
||||
'-I', './src',
|
||||
|
||||
+126
-253
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2017 - 2019 PX4 Development Team. All rights reserved.
|
||||
# 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
|
||||
@@ -40,7 +40,7 @@
|
||||
# * Common functions should be included in px_base.cmake.
|
||||
#
|
||||
# * OS/ board specific fucntions should be include in
|
||||
# px_impl_${PX4_PLATFORM}.cmake or px4_impl_${PX4_PLATFORM}_${PX4_BOARD}.cmake.
|
||||
# px_impl_${OS}.cmake or px4_impl_${OS}_${BOARD}.cmake.
|
||||
#
|
||||
# Formatting
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -92,9 +92,9 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# * If referencing a string variable, don't put it in quotes.
|
||||
# Don't do "${PX4_PLATFORM}" STREQUAL "posix",
|
||||
# instead type ${PX4_PLATFORM} STREQUAL "posix". This will throw an
|
||||
# error when ${PX4_PLATFORM} is not defined instead of silently
|
||||
# Don't do "${OS}" STREQUAL "posix",
|
||||
# instead type ${OS} STREQUAL "posix". This will throw an
|
||||
# error when ${OS} is not defined instead of silently
|
||||
# evaluating to false.
|
||||
#
|
||||
#=============================================================================
|
||||
@@ -104,16 +104,16 @@ cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
|
||||
|
||||
#=============================================================================
|
||||
# git
|
||||
#
|
||||
include(px4_git)
|
||||
include(common/px4_git)
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --always --tags
|
||||
OUTPUT_VARIABLE PX4_GIT_TAG
|
||||
OUTPUT_VARIABLE git_tag
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
@@ -132,116 +132,28 @@ define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
|
||||
# configuration
|
||||
#
|
||||
|
||||
set(CONFIG "px4_sitl_default" CACHE STRING "desired configuration")
|
||||
set(CONFIG "posix_sitl_default" CACHE STRING "desired configuration")
|
||||
|
||||
include(px4_add_module)
|
||||
set(config_module_list)
|
||||
set(config_df_driver_list)
|
||||
string(REPLACE "_" ";" config_args ${CONFIG})
|
||||
list(GET config_args 0 OS)
|
||||
list(GET config_args 1 BOARD)
|
||||
list(GET config_args 2 LABEL)
|
||||
|
||||
# find PX4 config
|
||||
# look for in tree board config that matches CONFIG input
|
||||
if(NOT PX4_CONFIG_FILE)
|
||||
|
||||
file(GLOB_RECURSE board_configs
|
||||
RELATIVE "${PX4_SOURCE_DIR}/boards"
|
||||
"boards/*.cmake"
|
||||
)
|
||||
|
||||
set(PX4_CONFIGS ${board_configs} CACHE STRING "PX4 board configs" FORCE)
|
||||
|
||||
foreach(filename ${board_configs})
|
||||
# parse input CONFIG into components to match with existing in tree configs
|
||||
# the platform prefix (eg nuttx_) is historical, and removed if present
|
||||
string(REPLACE ".cmake" "" filename_stripped ${filename})
|
||||
string(REPLACE "/" ";" config ${filename_stripped})
|
||||
list(LENGTH config config_len)
|
||||
|
||||
if(${config_len} EQUAL 3)
|
||||
|
||||
|
||||
list(GET config 0 vendor)
|
||||
list(GET config 1 model)
|
||||
list(GET config 2 label)
|
||||
|
||||
set(board "${vendor}${model}")
|
||||
|
||||
# <VENDOR>_<MODEL>_<LABEL> (eg px4_fmu-v2_default)
|
||||
# <VENDOR>_<MODEL>_default (eg px4_fmu-v2) # allow skipping label if "default"
|
||||
if ((${CONFIG} MATCHES "${vendor}_${model}_${label}") OR # match full vendor, model, label
|
||||
((${label} STREQUAL "default") AND (${CONFIG} STREQUAL "${vendor}_${model}")) # default label can be omitted
|
||||
)
|
||||
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
|
||||
break()
|
||||
endif()
|
||||
|
||||
# <BOARD>_<LABEL> (eg px4_fmu-v2_default)
|
||||
# <BOARD>_default (eg px4_fmu-v2) # allow skipping label if "default"
|
||||
if ((${CONFIG} MATCHES "${board}_${label}") OR # match full board, label
|
||||
((${label} STREQUAL "default") AND (${CONFIG} STREQUAL "${board}")) # default label can be omitted
|
||||
)
|
||||
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
|
||||
break()
|
||||
endif()
|
||||
|
||||
|
||||
# LEGACY form
|
||||
# <OS>_<BOARD>_<LABEL> (eg nuttx_px4_fmu-v2_default)
|
||||
string(REGEX REPLACE "^nuttx_|^posix_|^qurt_" "" config_no_os ${CONFIG}) # ignore OS prefix
|
||||
|
||||
if ((${config_no_os} MATCHES "${board}_${label}"))
|
||||
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
|
||||
break()
|
||||
endif()
|
||||
|
||||
|
||||
# LEGACY form special case to ease board layout transition (2018-11-18)
|
||||
# match board with model and label only: eg sitl_default -> px4_sitl_default
|
||||
if ((${config_no_os} MATCHES "${model}_${label}"))
|
||||
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
|
||||
break()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT PX4_CONFIG_FILE)
|
||||
message(FATAL_ERROR "PX4 config file not set, try one of ${PX4_CONFIGS}")
|
||||
endif()
|
||||
|
||||
message(STATUS "PX4 config file: ${PX4_CONFIG_FILE}")
|
||||
include(px4_add_board)
|
||||
include(${PX4_CONFIG_FILE})
|
||||
message(STATUS "PX4 config: ${PX4_CONFIG}")
|
||||
message(STATUS "PX4 platform: ${PX4_PLATFORM}")
|
||||
|
||||
if (ENABLE_LOCKSTEP_SCHEDULER)
|
||||
add_definitions(-DENABLE_LOCKSTEP_SCHEDULER)
|
||||
message(STATUS "PX4 lockstep: enabled")
|
||||
else()
|
||||
message(STATUS "PX4 lockstep: disabled")
|
||||
endif()
|
||||
|
||||
# external modules
|
||||
set(THREADS "4" CACHE STRING "number of threads to use for external build processes")
|
||||
set(DEBUG_PORT "/dev/ttyACM0" CACHE STRING "debugging port")
|
||||
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
|
||||
|
||||
if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY PX4_MODULE_CONFIG_FILES)
|
||||
|
||||
include(platforms/${PX4_PLATFORM}/cmake/px4_impl_os.cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake)
|
||||
|
||||
if(EXISTS "${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake/init.cmake")
|
||||
include(init)
|
||||
endif()
|
||||
include(platforms/${OS}/cmake/px4_impl_os.cmake)
|
||||
include(configs/${CONFIG})
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${OS}/cmake)
|
||||
|
||||
# CMake build type (Debug Release RelWithDebInfo MinSizeRel Coverage)
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
if (${PX4_PLATFORM} STREQUAL "nuttx")
|
||||
if (${OS} STREQUAL "nuttx")
|
||||
set(PX4_BUILD_TYPE "MinSizeRel")
|
||||
else()
|
||||
set(PX4_BUILD_TYPE "RelWithDebInfo")
|
||||
@@ -250,12 +162,13 @@ if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ${PX4_BUILD_TYPE} CACHE STRING "Build type" FORCE)
|
||||
endif()
|
||||
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage;AddressSanitizer;UndefinedBehaviorSanitizer")
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage")
|
||||
|
||||
#=============================================================================
|
||||
|
||||
message(STATUS "PX4 version: ${PX4_GIT_TAG}")
|
||||
message(STATUS "cmake build type: ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS "PX4 VERSION: ${git_tag}")
|
||||
message(STATUS "CONFIG: ${CONFIG}")
|
||||
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
#=============================================================================
|
||||
# project definition
|
||||
@@ -269,29 +182,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# For the catkin build process, unset build of dynamically-linked binaries
|
||||
# and do not change CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
||||
if (NOT CATKIN_DEVEL_PREFIX)
|
||||
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})
|
||||
else()
|
||||
SET(BUILD_SHARED_LIBS OFF)
|
||||
endif()
|
||||
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})
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# Setup install paths
|
||||
if (${PX4_PLATFORM} STREQUAL "posix")
|
||||
if (${OS} STREQUAL "posix")
|
||||
|
||||
# This makes it possible to dynamically load code which depends on symbols
|
||||
# inside the px4 executable.
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_ENABLE_EXPORTS ON)
|
||||
|
||||
include(coverage)
|
||||
include(sanitizers)
|
||||
include(common/coverage)
|
||||
include(common/sanitizers)
|
||||
|
||||
# Define GNU standard installation directories
|
||||
include(GNUInstallDirs)
|
||||
@@ -299,26 +200,38 @@ if (${PX4_PLATFORM} STREQUAL "posix")
|
||||
if (NOT CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
|
||||
endif()
|
||||
|
||||
# cmake testing only on posix
|
||||
enable_testing()
|
||||
include(CTest)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# require px4 module interface
|
||||
set(px4_required_interface
|
||||
px4_os_prebuild_targets
|
||||
px4_os_add_flags
|
||||
)
|
||||
foreach(cmd ${px4_required_interface})
|
||||
if (NOT COMMAND ${cmd})
|
||||
message(FATAL_ERROR "${CONFIG} must implement ${cmd}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(px4_required_config config_module_list)
|
||||
foreach(conf ${px4_required_config})
|
||||
if (NOT DEFINED ${conf})
|
||||
message(FATAL_ERROR "cmake/${CONFIG} must define ${conf}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#=============================================================================
|
||||
# ccache
|
||||
#
|
||||
option(CCACHE "Use ccache if available" ON)
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
|
||||
|
||||
get_filename_component(ccache_real_path ${CCACHE_PROGRAM} REALPATH)
|
||||
get_filename_component(cxx_real_path ${CMAKE_CXX_COMPILER} REALPATH)
|
||||
get_filename_component(cxx_abs_path ${CMAKE_CXX_COMPILER} ABSOLUTE)
|
||||
|
||||
if ("${ccache_real_path}" STREQUAL "${cxx_real_path}")
|
||||
message(STATUS "ccache enabled via symlink (${cxx_abs_path} -> ${cxx_real_path})")
|
||||
else()
|
||||
message(STATUS "ccache enabled (export CCACHE_DISABLE=1 to disable)")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
@@ -337,37 +250,72 @@ if (CATKIN_DEVEL_PREFIX)
|
||||
endif()
|
||||
|
||||
find_package(PythonInterp REQUIRED)
|
||||
px4_find_python_module(jinja2 REQUIRED)
|
||||
|
||||
option(PYTHON_COVERAGE "Python code coverage" OFF)
|
||||
if(PYTHON_COVERAGE)
|
||||
message(STATUS "python coverage enabled")
|
||||
set(PYTHON_EXECUTABLE coverage run -p)
|
||||
else()
|
||||
# run normally (broken under coveragepy)
|
||||
px4_find_python_module(jinja2 REQUIRED)
|
||||
endif()
|
||||
#=============================================================================
|
||||
# check required toolchain variables
|
||||
#
|
||||
|
||||
set(required_variables CMAKE_C_COMPILER_ID CMAKE_CXX_COMPILER_ID)
|
||||
foreach(var ${required_variables})
|
||||
if (NOT ${var})
|
||||
message(FATAL_ERROR "Toolchain/config must define ${var}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# print full c compiler version
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
|
||||
OUTPUT_VARIABLE c_compiler_version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
STRING(REGEX MATCH "[^\n]*" c_compiler_version_short ${c_compiler_version})
|
||||
message(STATUS "C compiler: ${c_compiler_version_short}")
|
||||
|
||||
# print full c++ compiler version
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
|
||||
OUTPUT_VARIABLE cxx_compiler_version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
STRING(REGEX MATCH "[^\n]*" cxx_compiler_version_short ${cxx_compiler_version})
|
||||
message(STATUS "C++ compiler: ${cxx_compiler_version_short}")
|
||||
|
||||
#=============================================================================
|
||||
# external libraries
|
||||
#
|
||||
px4_os_prebuild_targets(OUT prebuild_targets
|
||||
BOARD ${BOARD}
|
||||
THREADS ${THREADS})
|
||||
|
||||
#=============================================================================
|
||||
# build flags
|
||||
#
|
||||
include(px4_add_common_flags)
|
||||
px4_add_common_flags()
|
||||
px4_os_add_flags()
|
||||
px4_os_add_flags(
|
||||
BOARD ${BOARD}
|
||||
C_FLAGS c_flags
|
||||
CXX_FLAGS cxx_flags
|
||||
OPTIMIZATION_FLAGS optimization_flags
|
||||
EXE_LINKER_FLAGS exe_linker_flags
|
||||
INCLUDE_DIRS include_dirs
|
||||
LINK_DIRS link_dirs
|
||||
DEFINITIONS definitions)
|
||||
|
||||
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${CMAKE_EXE_LINKER_FLAGS};${exe_linker_flags}" GLUE " ")
|
||||
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 " ")
|
||||
|
||||
#=============================================================================
|
||||
# message, and airframe generation
|
||||
#
|
||||
include(px4_metadata)
|
||||
include(common/px4_metadata)
|
||||
|
||||
add_subdirectory(msg EXCLUDE_FROM_ALL)
|
||||
|
||||
px4_generate_airframes_xml(BOARD ${PX4_BOARD})
|
||||
px4_generate_airframes_xml(BOARD ${BOARD})
|
||||
|
||||
#=============================================================================
|
||||
# DriverFramework
|
||||
#
|
||||
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
|
||||
set(OS ${PX4_PLATFORM})
|
||||
add_subdirectory(src/lib/DriverFramework/framework)
|
||||
|
||||
# List the DriverFramework drivers
|
||||
@@ -409,56 +357,16 @@ if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# Testing - Automatic unit and integration testing with CTest
|
||||
#
|
||||
|
||||
# optionally enable cmake testing (supported only on posix)
|
||||
option(CMAKE_TESTING "Configure test targets" OFF)
|
||||
if (${PX4_CONFIG} STREQUAL "px4_sitl_test")
|
||||
set(CMAKE_TESTING ON)
|
||||
endif()
|
||||
if(CMAKE_TESTING)
|
||||
include(CTest) # sets BUILD_TESTING variable
|
||||
endif()
|
||||
|
||||
# enable test filtering to run only specific tests with the ctest -R regex functionality
|
||||
set(TESTFILTER "" CACHE STRING "Filter string for ctest to selectively only run specific tests (ctest -R)")
|
||||
|
||||
# if testing is enabled download and configure gtest
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/gtest/)
|
||||
include(px4_add_gtest)
|
||||
if(BUILD_TESTING)
|
||||
include(gtest)
|
||||
endif()
|
||||
|
||||
add_custom_target(test_results
|
||||
COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test -R ${TESTFILTER} USES_TERMINAL
|
||||
DEPENDS
|
||||
px4
|
||||
examples__dyn_hello
|
||||
test_mixer_multirotor
|
||||
USES_TERMINAL
|
||||
COMMENT "Running tests"
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR})
|
||||
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
||||
#=============================================================================
|
||||
# subdirectories
|
||||
#
|
||||
add_library(parameters_interface INTERFACE)
|
||||
|
||||
include(px4_add_library)
|
||||
add_subdirectory(src/lib EXCLUDE_FROM_ALL)
|
||||
|
||||
add_subdirectory(src/platforms EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(src/platforms/common EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(src/modules/systemlib EXCLUDE_FROM_ALL) # TODO: split into libraries in platform layer
|
||||
add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer
|
||||
add_subdirectory(src/drivers/boards EXCLUDE_FROM_ALL)
|
||||
|
||||
if(EXISTS "${PX4_BOARD_DIR}/CMakeLists.txt")
|
||||
add_subdirectory(${PX4_BOARD_DIR})
|
||||
endif()
|
||||
|
||||
foreach(module ${config_module_list})
|
||||
add_subdirectory(src/${module})
|
||||
endforeach()
|
||||
@@ -468,12 +376,26 @@ add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
|
||||
target_link_libraries(parameters_interface INTERFACE parameters)
|
||||
|
||||
# firmware added last to generate the builtin for included modules
|
||||
add_subdirectory(platforms/${PX4_PLATFORM})
|
||||
add_subdirectory(platforms/${OS})
|
||||
|
||||
#=============================================================================
|
||||
# generate custom target to print for all executable and module cmake targets
|
||||
#
|
||||
if (all_posix_cmake_targets)
|
||||
list(SORT all_posix_cmake_targets)
|
||||
px4_join(OUT posix_cmake_target_list LIST ${all_posix_cmake_targets} GLUE "\\n")
|
||||
add_custom_target(list_cmake_targets
|
||||
COMMAND sh -c "printf \"${posix_cmake_target_list}\\n\""
|
||||
COMMENT "List of cmake targets that can be matched by PX4_NO_OPTIMIZATION:"
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# uORB graph generation: add a custom target 'uorb_graph'
|
||||
#
|
||||
set(uorb_graph_config ${PX4_BOARD})
|
||||
set(uorb_graph_config ${BOARD})
|
||||
|
||||
set(graph_module_list "")
|
||||
foreach(module ${config_module_list})
|
||||
@@ -520,69 +442,20 @@ if (BUILD_DOXYGEN)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# Metadata - helpers for generating documentation
|
||||
#
|
||||
|
||||
add_custom_target(metadata_airframes
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
-v -a ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
|
||||
--markdown ${PX4_BINARY_DIR}/docs/airframes.md
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
-v -a ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
|
||||
--xml ${PX4_BINARY_DIR}/docs/airframes.xml
|
||||
COMMENT "Generating full airframe metadata (markdown and xml)"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE yaml_config_files ${PX4_SOURCE_DIR}/src/modules/*.yaml
|
||||
${PX4_SOURCE_DIR}/src/drivers/*.yaml ${PX4_SOURCE_DIR}/src/lib/*.yaml)
|
||||
add_custom_target(metadata_parameters
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py --all-ports --params-file ${PX4_SOURCE_DIR}/src/generated_serial_params.c --config-files ${yaml_config_files}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
|
||||
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
|
||||
--markdown ${PX4_BINARY_DIR}/docs/parameters.md
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
|
||||
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
|
||||
--xml ${PX4_BINARY_DIR}/docs/parameters.xml
|
||||
COMMENT "Generating full parameter metadata (markdown and xml)"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(metadata_module_documentation
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_module_doc.py -v --src-path ${PX4_SOURCE_DIR}/src
|
||||
--markdown ${PX4_BINARY_DIR}/docs/modules
|
||||
COMMENT "Generating module documentation"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(all_metadata
|
||||
DEPENDS
|
||||
metadata_airframes
|
||||
metadata_parameters
|
||||
metadata_module_documentation
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# packaging
|
||||
#
|
||||
# Important to having packaging at end of cmake file.
|
||||
#
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${PX4_CONFIG})
|
||||
set(CPACK_PACKAGE_VERSION ${PX4_GIT_TAG})
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${CONFIG})
|
||||
set(CPACK_PACKAGE_VERSION ${git_version})
|
||||
set(CPACK_PACKAGE_CONTACT ${package-contact})
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # TODO: review packaging for linux boards
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "The PX4 Pro autopilot.")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_CONFIG}-${PX4_GIT_TAG}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_GIT_TAG}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${git_tag}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${git_version}")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "")
|
||||
set(CPACK_SET_DESTDIR "OFF")
|
||||
@@ -597,4 +470,4 @@ else()
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
include(CPack)
|
||||
+1
-1
@@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
|
||||
|
||||
### Edit and build the code
|
||||
|
||||
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](https://dev.px4.io/master/en/contribute/code.html) when editing files.
|
||||
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
|
||||
|
||||
### Commit your changes
|
||||
|
||||
|
||||
+121
-2448
File diff suppressed because it is too large
Load Diff
@@ -62,7 +62,7 @@
|
||||
"name": "PX4: make and upload",
|
||||
"working_dir": "${project_path}",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"cmd": ["make upload px4_fmu-v2_default -j8"],
|
||||
"cmd": ["make upload px4fmu-v2_default -j8"],
|
||||
"shell": true
|
||||
},
|
||||
{
|
||||
|
||||
Vendored
+618
-505
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2012 - 2019, PX4 Development Team
|
||||
Copyright (c) 2012 - 2018, PX4 Development Team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 - 2019 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2015 - 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
|
||||
@@ -48,19 +48,16 @@ endif
|
||||
#
|
||||
# Example usage:
|
||||
#
|
||||
# make px4_fmu-v2_default (builds)
|
||||
# make px4_fmu-v2_default upload (builds and uploads)
|
||||
# make px4_fmu-v2_default test (builds and tests)
|
||||
# make px4fmu-v2_default (builds)
|
||||
# make px4fmu-v2_default upload (builds and uploads)
|
||||
# make px4fmu-v2_default test (builds and tests)
|
||||
#
|
||||
# This tells cmake to build the nuttx px4_fmu-v2 default config in the
|
||||
# directory build/px4_fmu-v2_default and then call make
|
||||
# This tells cmake to build the nuttx px4fmu-v2 default config in the
|
||||
# directory build/nuttx_px4fmu-v2_default and then call make
|
||||
# in that directory with the target upload.
|
||||
|
||||
# explicity set default build target
|
||||
all: px4_sitl_default
|
||||
|
||||
# define a space character to be able to explicitly find it in strings
|
||||
space := $(subst ,, )
|
||||
# explicity set default build target
|
||||
all: posix_sitl_default
|
||||
|
||||
# Parsing
|
||||
# --------------------------------------------------------------------
|
||||
@@ -101,7 +98,7 @@ else
|
||||
PX4_MAKE_ARGS = -j$(j) --no-print-directory
|
||||
endif
|
||||
|
||||
SRC_DIR := $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))")
|
||||
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
# check if replay env variable is set & set build dir accordingly
|
||||
ifdef replay
|
||||
@@ -117,61 +114,17 @@ endif
|
||||
|
||||
ifdef PX4_CMAKE_BUILD_TYPE
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=${PX4_CMAKE_BUILD_TYPE}
|
||||
else
|
||||
|
||||
# Address Sanitizer
|
||||
ifdef PX4_ASAN
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=AddressSanitizer
|
||||
endif
|
||||
|
||||
# Memory Sanitizer
|
||||
ifdef PX4_MSAN
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=MemorySanitizer
|
||||
endif
|
||||
|
||||
# Thread Sanitizer
|
||||
ifdef PX4_TSAN
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=ThreadSanitizer
|
||||
endif
|
||||
|
||||
# Undefined Behavior Sanitizer
|
||||
ifdef PX4_UBSAN
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=UndefinedBehaviorSanitizer
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Functions
|
||||
# --------------------------------------------------------------------
|
||||
# describe how to build a cmake config
|
||||
define cmake-build
|
||||
@$(eval BUILD_DIR = "$(SRC_DIR)/build/$(1)")
|
||||
@# check if the desired cmake configuration matches the cache then CMAKE_CACHE_CHECK stays empty
|
||||
@$(call cmake-cache-check)
|
||||
@# make sure to start from scratch when switching from GNU Make to Ninja
|
||||
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
|
||||
@# only excplicitly configure the first build, if cache file already exists the makefile will rerun cmake automatically if necessary
|
||||
@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ] || [ $(CMAKE_CACHE_CHECK) ]; then \
|
||||
mkdir -p $(BUILD_DIR) \
|
||||
&& cd $(BUILD_DIR) \
|
||||
&& cmake "$(SRC_DIR)" -G"$(PX4_CMAKE_GENERATOR)" $(CMAKE_ARGS) \
|
||||
|| (rm -rf $(BUILD_DIR)); \
|
||||
fi
|
||||
@# run the build for the specified target
|
||||
@cmake --build $(BUILD_DIR) -- $(PX4_MAKE_ARGS) $(ARGS)
|
||||
endef
|
||||
|
||||
# check if the options we want to build with in CMAKE_ARGS match the ones which are already configured in the cache inside BUILD_DIR
|
||||
define cmake-cache-check
|
||||
@# change to build folder which fails if it doesn't exist and CACHED_CMAKE_OPTIONS stays empty
|
||||
@# fetch all previously configured and cached options from the build folder and transform them into the OPTION=VALUE format without type (e.g. :BOOL)
|
||||
@$(eval CACHED_CMAKE_OPTIONS = $(shell cd $(BUILD_DIR) 2>/dev/null && cmake -L 2>/dev/null | sed -n 's/\([^[:blank:]]*\):[^[:blank:]]*\(=[^[:blank:]]*\)/\1\2/gp' ))
|
||||
@# transform the options in CMAKE_ARGS into the OPTION=VALUE format without -D
|
||||
@$(eval DESIRED_CMAKE_OPTIONS = $(shell echo $(CMAKE_ARGS) | sed -n 's/-D\([^[:blank:]]*=[^[:blank:]]*\)/\1/gp' ))
|
||||
@# find each currently desired option in the already cached ones making sure the complete configured string value is the same
|
||||
@$(eval VERIFIED_CMAKE_OPTIONS = $(foreach option,$(DESIRED_CMAKE_OPTIONS),$(strip $(findstring $(option)$(space),$(CACHED_CMAKE_OPTIONS)))))
|
||||
@# if the complete list of desired options is found in the list of verified options we don't need to reconfigure and CMAKE_CACHE_CHECK stays empty
|
||||
@$(eval CMAKE_CACHE_CHECK = $(if $(findstring $(DESIRED_CMAKE_OPTIONS),$(VERIFIED_CMAKE_OPTIONS)),,y))
|
||||
+@$(eval PX4_CONFIG = $(1))
|
||||
+@$(eval BUILD_DIR = $(SRC_DIR)/build/$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
|
||||
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake $(SRC_DIR) -G"$(PX4_CMAKE_GENERATOR)" $(CMAKE_ARGS) -DCONFIG=$(PX4_CONFIG) || (rm -rf $(BUILD_DIR)); fi
|
||||
+@$(PX4_MAKE) -C $(BUILD_DIR) $(PX4_MAKE_ARGS) $(ARGS)
|
||||
endef
|
||||
|
||||
COLOR_BLUE = \033[0;94m
|
||||
@@ -181,8 +134,10 @@ define colorecho
|
||||
+@echo -e '${COLOR_BLUE}${1} ${NO_COLOR}'
|
||||
endef
|
||||
|
||||
# Get a list of all config targets boards/*/*.cmake
|
||||
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*common*' ! -name '*sdflight*' -name '*.cmake' -print | sed -e 's/boards\///' | sed -e 's/\.cmake//' | sed -e 's/\//_/g' | sort)
|
||||
# Get a list of all config targets cmake/configs/*.cmake
|
||||
ALL_CONFIG_TARGETS := $(basename $(shell find "$(SRC_DIR)/cmake/configs" -maxdepth 1 ! -name '*_common*' ! -name '*_sdflight_*' -name '*.cmake' -print | sed -e 's:^.*/::' | sort))
|
||||
# Strip off leading nuttx_
|
||||
NUTTX_CONFIG_TARGETS := $(patsubst nuttx_%,%,$(filter nuttx_%,$(ALL_CONFIG_TARGETS)))
|
||||
|
||||
# ADD CONFIGS HERE
|
||||
# --------------------------------------------------------------------
|
||||
@@ -190,47 +145,32 @@ ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*comm
|
||||
|
||||
# All targets.
|
||||
$(ALL_CONFIG_TARGETS):
|
||||
@$(eval PX4_CONFIG = $@)
|
||||
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
|
||||
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
|
||||
$(call cmake-build,$@)
|
||||
|
||||
# Filter for only default targets to allow omiting the "_default" postfix
|
||||
CONFIG_TARGETS_DEFAULT := $(patsubst %_default,%,$(filter %_default,$(ALL_CONFIG_TARGETS)))
|
||||
$(CONFIG_TARGETS_DEFAULT):
|
||||
@$(eval PX4_CONFIG = $@_default)
|
||||
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
|
||||
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
|
||||
# Abbreviated config targets.
|
||||
|
||||
all_config_targets: $(ALL_CONFIG_TARGETS)
|
||||
all_default_targets: $(CONFIG_TARGETS_DEFAULT)
|
||||
# nuttx_ is left off by default; provide a rule to allow that.
|
||||
$(NUTTX_CONFIG_TARGETS):
|
||||
$(call cmake-build,nuttx_$@)
|
||||
|
||||
posix: px4_sitl_default
|
||||
all_nuttx_targets: $(NUTTX_CONFIG_TARGETS)
|
||||
|
||||
# board reorganization deprecation warnings (2018-11-22)
|
||||
define deprecation_warning
|
||||
$(warning $(1) has been deprecated and will be removed, please use $(2)!)
|
||||
endef
|
||||
|
||||
px4fmu-%_default:
|
||||
$(call deprecation_warning, ${@},$(subst px4fmu,px4_fmu,$@))
|
||||
$(MAKE) $(subst px4fmu,px4_fmu, $@)
|
||||
|
||||
posix_sitl_default:
|
||||
$(call deprecation_warning, ${@},px4_sitl_default)
|
||||
$(MAKE) px4_sitl_default
|
||||
posix: posix_sitl_default
|
||||
broadcast: posix_sitl_broadcast
|
||||
|
||||
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
|
||||
.PHONY: all posix px4_sitl_default all_config_targets all_default_targets
|
||||
.PHONY: all posix broadcast all_nuttx_targets
|
||||
|
||||
# Multi- config targets.
|
||||
eagle_default: atlflight_eagle_default atlflight_eagle_qurt-default
|
||||
eagle_rtps: atlflight_eagle_rtps atlflight_eagle_qurt-rtps
|
||||
eagle_default: posix_eagle_default qurt_eagle_default
|
||||
eagle_rtps: posix_eagle_rtps qurt_eagle_default
|
||||
eagle_legacy_default: posix_eagle_legacy qurt_eagle_legacy
|
||||
excelsior_default: posix_excelsior_default qurt_excelsior_default
|
||||
excelsior_rtps: posix_excelsior_rtps qurt_excelsior_default
|
||||
excelsior_legacy_default: posix_excelsior_legacy qurt_excelsior_legacy
|
||||
|
||||
excelsior_default: atlflight_excelsior_default atlflight_excelsior_qurt-default
|
||||
excelsior_rtps: atlflight_excelsior_rtps atlflight_excelsior_qurt-rtps
|
||||
|
||||
.PHONY: eagle_default eagle_rtps
|
||||
.PHONY: excelsior_default excelsior_rtps
|
||||
.PHONY: eagle_default eagle_rtps eagle_legacy_default
|
||||
.PHONY: excelsior_default excelsior_rtps excelsior_legacy_default
|
||||
|
||||
# Other targets
|
||||
# --------------------------------------------------------------------
|
||||
@@ -242,37 +182,41 @@ qgc_firmware: px4fmu_firmware misc_qgc_extra_firmware
|
||||
|
||||
# px4fmu NuttX firmware
|
||||
px4fmu_firmware: \
|
||||
check_px4_io-v2_default \
|
||||
check_px4_fmu-v2_default \
|
||||
check_px4_fmu-v3_default \
|
||||
check_px4_fmu-v4_default \
|
||||
check_px4_fmu-v4pro_default \
|
||||
check_px4_fmu-v5_default \
|
||||
check_px4io-v2_default \
|
||||
check_px4fmu-v2_default \
|
||||
check_px4fmu-v3_default \
|
||||
check_px4fmu-v4_default \
|
||||
check_px4fmu-v4pro_default \
|
||||
check_px4fmu-v5_default \
|
||||
sizes
|
||||
|
||||
misc_qgc_extra_firmware: \
|
||||
check_nxp_fmuk66-v3_default \
|
||||
check_intel_aerofc-v1_default \
|
||||
check_auav_x21_default \
|
||||
check_bitcraze_crazyflie_default \
|
||||
check_airmind_mindpx-v2_default \
|
||||
check_px4_fmu-v2_lpe \
|
||||
check_aerocore2_default \
|
||||
check_aerofc-v1_default \
|
||||
check_auav-x21_default \
|
||||
check_crazyflie_default \
|
||||
check_mindpx-v2_default \
|
||||
check_px4fmu-v2_lpe \
|
||||
check_tap-v1_default \
|
||||
sizes
|
||||
|
||||
# Other NuttX firmware
|
||||
alt_firmware: \
|
||||
check_px4_cannode-v1_default \
|
||||
check_px4_esc-v1_default \
|
||||
check_auav_esc35-v1_default \
|
||||
check_thiemar_s2740vc-v1_default \
|
||||
check_nxphlite-v3_default \
|
||||
check_px4-same70xplained-v1_default \
|
||||
check_px4-stm32f4discovery_default \
|
||||
check_px4cannode-v1_default \
|
||||
check_px4esc-v1_default \
|
||||
check_px4nucleoF767ZI-v1_default \
|
||||
check_s2740vc-v1_default \
|
||||
sizes
|
||||
|
||||
# builds with RTPS
|
||||
check_rtps: \
|
||||
check_px4_fmu-v3_rtps \
|
||||
check_px4_fmu-v4_rtps \
|
||||
check_px4_fmu-v4pro_rtps \
|
||||
check_px4_sitl_rtps \
|
||||
check_px4fmu-v3_rtps \
|
||||
check_px4fmu-v4_rtps \
|
||||
check_px4fmu-v4pro_rtps \
|
||||
check_posix_sitl_rtps \
|
||||
sizes
|
||||
|
||||
.PHONY: sizes check quick_check check_rtps uorb_graphs
|
||||
@@ -281,10 +225,10 @@ sizes:
|
||||
@-find build -name *.elf -type f | xargs size 2> /dev/null || :
|
||||
|
||||
# All default targets that don't require a special build environment
|
||||
check: check_px4_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware tests check_format
|
||||
check: check_posix_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware tests check_format
|
||||
|
||||
# quick_check builds a single nuttx and posix target, runs testing, and checks the style
|
||||
quick_check: check_px4_sitl_test check_px4_fmu-v5_default tests check_format
|
||||
quick_check: check_posix_sitl_default check_px4fmu-v4pro_default tests check_format
|
||||
|
||||
check_%:
|
||||
@echo
|
||||
@@ -295,153 +239,119 @@ check_%:
|
||||
uorb_graphs:
|
||||
@./Tools/uorb_graph/create_from_startupscript.sh
|
||||
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --file Tools/uorb_graph/graph_full
|
||||
@$(MAKE) --no-print-directory px4_fmu-v2_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_fmu-v4_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4fmu-v2_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4fmu-v4_default uorb_graph
|
||||
@$(MAKE) --no-print-directory posix_sitl_default uorb_graph
|
||||
|
||||
|
||||
.PHONY: coverity_scan
|
||||
|
||||
coverity_scan: px4_sitl_default
|
||||
coverity_scan: posix_sitl_default
|
||||
|
||||
# Documentation
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata doxygen
|
||||
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata
|
||||
|
||||
parameters_metadata:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters
|
||||
@python $(SRC_DIR)/src/lib/parameters/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/lib/parameters/parameters_injected.xml --markdown
|
||||
@python $(SRC_DIR)/src/lib/parameters/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/lib/parameters/parameters_injected.xml --xml
|
||||
|
||||
airframe_metadata:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes
|
||||
@python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --markdown
|
||||
@python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --xml
|
||||
|
||||
module_documentation:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_module_documentation
|
||||
@python $(SRC_DIR)/Tools/px_process_module_doc.py -v --markdown $(SRC_DIR)/modules --src-path $(SRC_DIR)/src
|
||||
|
||||
px4_metadata: parameters_metadata airframe_metadata module_documentation
|
||||
|
||||
doxygen:
|
||||
@mkdir -p "$(SRC_DIR)"/build/doxygen
|
||||
@cd "$(SRC_DIR)"/build/doxygen && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DBUILD_DOXYGEN=ON
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/doxygen
|
||||
@touch "$(SRC_DIR)"/build/doxygen/Documentation/.nojekyll
|
||||
|
||||
# Astyle
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: check_format format
|
||||
|
||||
check_format:
|
||||
$(call colorecho,'Checking formatting with astyle')
|
||||
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh
|
||||
@cd "$(SRC_DIR)" && git diff --check
|
||||
@$(SRC_DIR)/Tools/astyle/check_code_style_all.sh
|
||||
@cd $(SRC_DIR) && git diff --check
|
||||
|
||||
format:
|
||||
$(call colorecho,'Formatting with astyle')
|
||||
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh --fix
|
||||
@$(SRC_DIR)/Tools/astyle/check_code_style_all.sh --fix
|
||||
|
||||
# Testing
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard tests_avoidance
|
||||
.PHONY: rostest python_coverage
|
||||
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard rostest
|
||||
|
||||
tests:
|
||||
$(eval CMAKE_ARGS += -DCONFIG=px4_sitl_test)
|
||||
$(eval CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
|
||||
$(eval ARGS += test_results)
|
||||
$(eval ASAN_OPTIONS += color=always:check_initialization_order=1:detect_stack_use_after_return=1)
|
||||
$(eval UBSAN_OPTIONS += color=always)
|
||||
$(call cmake-build,px4_sitl_test)
|
||||
@$(MAKE) --no-print-directory posix_sitl_default test_results \
|
||||
ASAN_OPTIONS="color=always:check_initialization_order=1:detect_stack_use_after_return=1" \
|
||||
UBSAN_OPTIONS="color=always"
|
||||
|
||||
tests_coverage:
|
||||
@$(MAKE) clean
|
||||
@$(MAKE) --no-print-directory px4_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@echo "Open "$(SRC_DIR)"/build/px4_sitl_default/coverage-html/index.html to see coverage"
|
||||
@$(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: px4_sitl_default
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo
|
||||
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
|
||||
|
||||
rostest_run: px4_sitl_default
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo
|
||||
@"$(SRC_DIR)"/test/rostest_px4_run.sh $(TEST_FILE) mission:=$(TEST_MISSION) vehicle:=$(TEST_VEHICLE)
|
||||
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_missions.test
|
||||
|
||||
tests_mission_coverage:
|
||||
@$(MAKE) clean
|
||||
@$(MAKE) --no-print-directory px4_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=VTOL_mission_1 vehicle:=standard_vtol
|
||||
@$(MAKE) --no-print-directory px4_sitl_default generate_coverage
|
||||
@$(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_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol
|
||||
@$(MAKE) --no-print-directory posix_sitl_default generate_coverage
|
||||
|
||||
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
|
||||
|
||||
tests_avoidance: rostest
|
||||
@"$(SRC_DIR)"/test/rostest_avoidance_run.sh mavros_posix_test_avoidance.test
|
||||
|
||||
python_coverage:
|
||||
@mkdir -p "$(SRC_DIR)"/build/python_coverage
|
||||
@cd "$(SRC_DIR)"/build/python_coverage && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DPYTHON_COVERAGE=ON
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage metadata_airframes
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage metadata_parameters
|
||||
#@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage module_documentation # TODO: fix within coverage.py
|
||||
@coverage combine `find . -name .coverage\*`
|
||||
@coverage report -m
|
||||
|
||||
@$(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 px4_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet
|
||||
.PHONY: cppcheck shellcheck_all validate_module_configs
|
||||
.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck
|
||||
|
||||
scan-build:
|
||||
@export CCC_CC=clang
|
||||
@export CCC_CXX=clang++
|
||||
@rm -rf "$(SRC_DIR)"/build/px4_sitl_default-scan-build
|
||||
@rm -rf "$(SRC_DIR)"/build/scan-build/report_latest
|
||||
@mkdir -p "$(SRC_DIR)"/build/px4_sitl_default-scan-build
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-scan-build && scan-build cmake "$(SRC_DIR)" -GNinja -DCONFIG=px4_sitl_default
|
||||
@scan-build -o "$(SRC_DIR)"/build/scan-build cmake --build "$(SRC_DIR)"/build/px4_sitl_default-scan-build
|
||||
@find "$(SRC_DIR)"/build/scan-build -maxdepth 1 -mindepth 1 -type d -exec cp -r "{}" "$(SRC_DIR)"/build/scan-build/report_latest \;
|
||||
@rm -rf $(SRC_DIR)/build/posix_sitl_default-scan-build
|
||||
@rm -rf $(SRC_DIR)/build/scan-build/report_latest
|
||||
@mkdir -p $(SRC_DIR)/build/posix_sitl_default-scan-build
|
||||
@cd $(SRC_DIR)/build/posix_sitl_default-scan-build && scan-build cmake $(SRC_DIR) -GNinja -DCONFIG=posix_sitl_default
|
||||
@scan-build -o $(SRC_DIR)/build/scan-build cmake --build $(SRC_DIR)/build/posix_sitl_default-scan-build
|
||||
@find $(SRC_DIR)/build/scan-build -maxdepth 1 -mindepth 1 -type d -exec cp -r "{}" $(SRC_DIR)/build/scan-build/report_latest \;
|
||||
|
||||
px4_sitl_default-clang:
|
||||
@mkdir -p "$(SRC_DIR)"/build/px4_sitl_default-clang
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/px4_sitl_default-clang
|
||||
posix_sitl_default-clang:
|
||||
@mkdir -p $(SRC_DIR)/build/posix_sitl_default-clang
|
||||
@cd $(SRC_DIR)/build/posix_sitl_default-clang && cmake $(SRC_DIR) $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=posix_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
@$(PX4_MAKE) -C $(SRC_DIR)/build/posix_sitl_default-clang
|
||||
|
||||
clang-tidy: px4_sitl_default-clang
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
|
||||
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 .
|
||||
|
||||
# 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: px4_sitl_default-clang
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -fix -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 .
|
||||
|
||||
# modified version of run-clang-tidy.py to return error codes and only output relevant results
|
||||
clang-tidy-quiet: px4_sitl_default-clang
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
|
||||
clang-tidy-quiet: 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 .
|
||||
|
||||
# TODO: Fix cppcheck errors then try --enable=warning,performance,portability,style,unusedFunction or --enable=all
|
||||
cppcheck: px4_sitl_default
|
||||
@mkdir -p "$(SRC_DIR)"/build/cppcheck
|
||||
@cppcheck -i"$(SRC_DIR)"/src/examples --enable=performance --std=c++11 --std=c99 --std=posix --project="$(SRC_DIR)"/build/px4_sitl_default/compile_commands.json --xml-version=2 2> "$(SRC_DIR)"/build/cppcheck/cppcheck-result.xml > /dev/null
|
||||
@cppcheck-htmlreport --source-encoding=ascii --file="$(SRC_DIR)"/build/cppcheck/cppcheck-result.xml --report-dir="$(SRC_DIR)"/build/cppcheck --source-dir="$(SRC_DIR)"/src/
|
||||
|
||||
shellcheck_all:
|
||||
@"$(SRC_DIR)"/Tools/run-shellcheck.sh "$(SRC_DIR)"/ROMFS/px4fmu_common/
|
||||
@make px4_fmu-v5_default shellcheck
|
||||
|
||||
validate_module_configs:
|
||||
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f -print0 | xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
|
||||
cppcheck: posix_sitl_default
|
||||
@mkdir -p $(SRC_DIR)/build/cppcheck
|
||||
@cppcheck -i$(SRC_DIR)/src/examples --enable=performance --std=c++11 --std=c99 --std=posix --project=$(SRC_DIR)/build/posix_sitl_default/compile_commands.json --xml-version=2 2> $(SRC_DIR)/build/cppcheck/cppcheck-result.xml > /dev/null
|
||||
@cppcheck-htmlreport --source-encoding=ascii --file=$(SRC_DIR)/build/cppcheck/cppcheck-result.xml --report-dir=$(SRC_DIR)/build/cppcheck --source-dir=$(SRC_DIR)/src/
|
||||
|
||||
# Cleanup
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
|
||||
|
||||
clean:
|
||||
@rm -rf "$(SRC_DIR)"/build
|
||||
@rm -rf $(SRC_DIR)/build
|
||||
|
||||
submodulesclean:
|
||||
@git submodule foreach --quiet --recursive git clean -ff -x -d
|
||||
@@ -461,7 +371,6 @@ distclean: gazeboclean
|
||||
@git submodule deinit -f .
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
|
||||
|
||||
# Help / Error
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
|
||||
@@ -469,17 +378,26 @@ distclean: gazeboclean
|
||||
$(if $(filter $(FIRST_ARG),$@), \
|
||||
$(error "$@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#)
|
||||
|
||||
#help:
|
||||
# @echo
|
||||
# @echo "Type 'make ' and hit the tab key twice to see a list of the available"
|
||||
# @echo "build configurations."
|
||||
# @echo
|
||||
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
# Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069)
|
||||
help:
|
||||
@echo "Usage: $(MAKE) <target>"
|
||||
@echo "Where <target> is one of:"
|
||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
|
||||
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
|
||||
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
|
||||
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS) $(NUTTX_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
|
||||
@echo
|
||||
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
|
||||
@echo "Use '$(MAKE) list_config_targets' for a list of configuration targets."
|
||||
|
||||
# Print a list of all config targets.
|
||||
list_config_targets:
|
||||
@for targ in $(patsubst %_default,%[_default],$(ALL_CONFIG_TARGETS)); do echo $$targ; done
|
||||
@for targ in $(patsubst nuttx_%,[nuttx_]%,$(ALL_CONFIG_TARGETS)); do echo $$targ; done
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
Please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/) to align on pull requests if necessary. You can then open draft pull requests to get early feedback.
|
||||
|
||||
**Describe problem solved by the proposed pull request**
|
||||
A clear and concise description of the problem this proposed change will solve. E.g. For this use case I ran into...
|
||||
|
||||
**Test data / coverage**
|
||||
How was it tested? What cases were covered? Logs uploaded to https://review.px4.io/ and screenshots of the important plot parts.
|
||||
|
||||
**Describe your preferred solution**
|
||||
A clear and concise description of what you have implemented.
|
||||
|
||||
**Describe possible alternatives**
|
||||
A clear and concise description of alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other related context or media.
|
||||
@@ -1,12 +1,12 @@
|
||||
# PX4 Drone Autopilot
|
||||
# PX4 Pro Drone Autopilot
|
||||
|
||||
[](https://github.com/PX4/Firmware/releases) [](https://zenodo.org/badge/latestdoi/22634/PX4/Firmware)
|
||||
|
||||
[](http://ci.px4.io:8080/blue/organizations/jenkins/PX4%2FFirmware/activity)
|
||||
[](http://ci.px4.io:8080/blue/organizations/jenkins/Firmware/activity) [](https://scan.coverity.com/projects/3966?tab=overview)
|
||||
|
||||
[](http://slack.px4.io)
|
||||
|
||||
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/Firmware/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/Firmware/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
|
||||
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/Firmware/blob/master/LICENSE))
|
||||
* [Supported airframes](https://docs.px4.io/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
|
||||
@@ -19,7 +19,7 @@ This repository holds the [PX4](http://px4.io) flight control solution for drone
|
||||
|
||||
## PX4 Users
|
||||
|
||||
The [PX4 User Guide](https://docs.px4.io/en/) explains how to assemble [supported vehicles](https://docs.px4.io/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
The [PX4 User Guide](https://docs.px4.io/en/) explains how to assemble [supported vehicles](https://docs.px4.io/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
See the [forum and chat](https://docs.px4.io/en/#support) if you need help!
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribut
|
||||
* [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)
|
||||
* [Airmind MindPX / MindRacer](https://github.com/PX4/Firmware/labels/mindpx) - [Henry Zhang](https://github.com/iZhangHui)
|
||||
* RTPS/ROS2 Interface - [Nuno Marques](https://github.com/TSC21)
|
||||
* RTPS/ROS2 Interface - [Vicente Monge](https://github.com/vicenteeprosima)
|
||||
|
||||
See also [About Us](http://px4.io/about-us/#development_team) (px4.io) and the [contributors list](https://github.com/PX4/Firmware/graphs/contributors) (Github).
|
||||
|
||||
@@ -90,13 +90,13 @@ This repository contains code supporting these boards:
|
||||
* [Pixhawk](https://docs.px4.io/en/flight_controller/pixhawk.html)
|
||||
* [Pixhawk Mini](https://docs.px4.io/en/flight_controller/pixhawk_mini.html)
|
||||
* [Pixfalcon](https://docs.px4.io/en/flight_controller/pixfalcon.html)
|
||||
* FMUv3.x [Pixhawk 2](https://docs.px4.io/en/flight_controller/pixhawk-2.html)
|
||||
* FMUv3.x [Pixhawk 2](https://pixhawk.org/modules/pixhawk2)
|
||||
* FMUv4.x
|
||||
* [Pixracer](https://docs.px4.io/en/flight_controller/pixracer.html)
|
||||
* [Pixhawk 3 Pro](https://docs.px4.io/en/flight_controller/pixhawk3_pro.html)
|
||||
* FMUv5.x (ARM Cortex M7)
|
||||
* [Pixhawk 4](https://docs.px4.io/en/flight_controller/pixhawk4.html)
|
||||
* [Pixhawk 4 mini](https://docs.px4.io/en/flight_controller/pixhawk4_mini.html)
|
||||
* FMUv5.x (ARM Cortex M7, future Pixhawk)
|
||||
* [STM32F4Discovery](http://www.st.com/en/evaluation-tools/stm32f4discovery.html) (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
|
||||
* [Gumstix AeroCore](https://www.gumstix.com/aerocore-2/) (only v2)
|
||||
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
|
||||
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/en/flight_controller/crazyflie2.html)
|
||||
|
||||
+37
-185
@@ -33,11 +33,9 @@
|
||||
|
||||
message(STATUS "ROMFS: ${config_romfs_root}")
|
||||
|
||||
set(config_romfs_files_list)
|
||||
set(romfs_src_dir ${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root})
|
||||
set(romfs_gen_root_dir ${PX4_BINARY_DIR}/genromfs)
|
||||
|
||||
set_property(GLOBAL PROPERTY PX4_ROMFS_FILES)
|
||||
set_property(GLOBAL PROPERTY PX4_ROMFS_CMAKE_FILES)
|
||||
set(romfs_temp_dir ${PX4_BINARY_DIR}/genromfs/${config_romfs_root})
|
||||
|
||||
#=============================================================================
|
||||
#
|
||||
@@ -59,210 +57,64 @@ set_property(GLOBAL PROPERTY PX4_ROMFS_CMAKE_FILES)
|
||||
# )
|
||||
#
|
||||
function(px4_add_romfs_files)
|
||||
set_property(GLOBAL APPEND PROPERTY PX4_ROMFS_CMAKE_FILES ${CMAKE_CURRENT_LIST_FILE})
|
||||
|
||||
foreach(arg IN LISTS ARGN)
|
||||
set_property(GLOBAL APPEND PROPERTY PX4_ROMFS_FILES ${CMAKE_CURRENT_LIST_DIR}/${arg})
|
||||
list(APPEND config_romfs_files_list
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${arg}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
set(config_romfs_files_list ${config_romfs_files_list} CACHE INTERNAL "ROMFS file list")
|
||||
endfunction()
|
||||
|
||||
# get list of all ROMFS files
|
||||
add_subdirectory(${romfs_src_dir})
|
||||
|
||||
# directory setup
|
||||
# copy all romfs files, process airframes
|
||||
get_property(romfs_cmake_files GLOBAL PROPERTY PX4_ROMFS_CMAKE_FILES)
|
||||
get_property(romfs_copy_files GLOBAL PROPERTY PX4_ROMFS_FILES)
|
||||
get_property(module_config_files GLOBAL PROPERTY PX4_MODULE_CONFIG_FILES)
|
||||
file(GLOB jinja_templates ${PX4_SOURCE_DIR}/Tools/serial/*.jinja)
|
||||
if (px4_constrained_flash_build)
|
||||
set(added_arguments --constrained-flash)
|
||||
endif()
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/rcS
|
||||
${romfs_gen_root_dir}/init.d/rc.serial
|
||||
${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
romfs_copy.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}
|
||||
# TODO: we should only copy the files in ${romfs_copy_files}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${romfs_src_dir} ${romfs_gen_root_dir}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/init.d-posix
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/mixers-sitl
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/mixers/CMakeLists.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/init.d/CMakeLists.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/init.d/airframes/CMakeLists.txt
|
||||
# copy all romfs files, process airframes, prune comments
|
||||
add_custom_command(OUTPUT ${romfs_temp_dir}/init.d/rcS ${romfs_temp_dir}/init.d/rc.autostart
|
||||
COMMAND cmake -E copy_directory ${romfs_src_dir} ${romfs_temp_dir}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
--airframes-path ${romfs_gen_root_dir}/init.d
|
||||
--start-script ${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
--board ${PX4_BOARD}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
|
||||
--rc-dir ${romfs_gen_root_dir}/init.d
|
||||
--serial-ports ${board_serial_ports} ${added_arguments}
|
||||
--config-files ${module_config_files} #--verbose
|
||||
COMMAND ${CMAKE_COMMAND} -E touch romfs_copy.stamp
|
||||
-a ${romfs_temp_dir}/init.d
|
||||
-s ${romfs_temp_dir}/init.d/rc.autostart
|
||||
--board ${BOARD}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
|
||||
--folder ${romfs_temp_dir} --board ${BOARD}
|
||||
DEPENDS
|
||||
${jinja_templates}
|
||||
${module_config_files}
|
||||
${romfs_cmake_files}
|
||||
${romfs_copy_files}
|
||||
${config_romfs_files_list}
|
||||
${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
|
||||
${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root}/init.d/rcS
|
||||
${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
|
||||
COMMENT "ROMFS: copying, generating airframes"
|
||||
)
|
||||
|
||||
# copy extras into ROMFS
|
||||
set(extras_dependencies)
|
||||
|
||||
set(romfs_dependencies)
|
||||
list(APPEND romfs_dependencies
|
||||
${romfs_temp_dir}/init.d/rcS
|
||||
${romfs_temp_dir}/init.d/rc.autostart
|
||||
)
|
||||
|
||||
# copy px4io binary if configured
|
||||
if(config_io_board)
|
||||
list(APPEND extras_dependencies
|
||||
if (config_io_board)
|
||||
list(APPEND romfs_dependencies
|
||||
copy_px4io_bin
|
||||
${fw_io_bin}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if(config_bl_file)
|
||||
file(MAKE_DIRECTORY ${PX4_BINARY_DIR}/romfs_extras)
|
||||
configure_file(${config_bl_file} ${PX4_BINARY_DIR}/romfs_extras COPYONLY)
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
${config_bl_file}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(OPTIONAL_BOARD_RC)
|
||||
list(APPEND OPTIONAL_BOARD_RC
|
||||
rc.board_defaults
|
||||
rc.board_sensors
|
||||
rc.board_extras
|
||||
)
|
||||
|
||||
foreach(board_rc_file ${OPTIONAL_BOARD_RC})
|
||||
|
||||
if(EXISTS "${PX4_BOARD_DIR}/init/${board_rc_file}")
|
||||
message(STATUS "ROMFS: Adding ${board_rc_file}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/${board_rc_file}
|
||||
${board_rc_file}.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PX4_BOARD_DIR}/init/${board_rc_file} ${romfs_gen_root_dir}/init.d/${board_rc_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${board_rc_file}.stamp
|
||||
DEPENDS
|
||||
${PX4_BOARD_DIR}/init/${board_rc_file}
|
||||
romfs_copy.stamp
|
||||
COMMENT "ROMFS: copying ${board_rc_file}"
|
||||
)
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
${board_rc_file}.stamp
|
||||
)
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
|
||||
add_custom_command(OUTPUT romfs_extras.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${romfs_gen_root_dir}/extras/
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/romfs_extras/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PX4_BINARY_DIR}/romfs_extras/ ${romfs_gen_root_dir}/extras/
|
||||
COMMAND ${CMAKE_COMMAND} -E touch romfs_extras.stamp
|
||||
DEPENDS
|
||||
romfs_copy.stamp
|
||||
${extras_dependencies}
|
||||
COMMENT "ROMFS: copying extras"
|
||||
# create romfs.img
|
||||
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}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT romfs_pruned.stamp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py --folder ${romfs_gen_root_dir} --board ${PX4_BOARD}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch romfs_pruned.stamp
|
||||
DEPENDS
|
||||
romfs_copy.stamp
|
||||
romfs_extras.stamp
|
||||
${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
|
||||
COMMENT "ROMFS: pruning"
|
||||
# create nsh_romfsimg.c
|
||||
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
|
||||
)
|
||||
|
||||
if("${CONFIG_FS_CROMFS}" STREQUAL "y")
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/gencromfs
|
||||
COMMAND make --no-print-directory --silent -f Makefile.host gencromfs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy gencromfs ${CMAKE_BINARY_DIR}/gencromfs
|
||||
DEPENDS ${PX4_SOURCE_DIR}/platforms/nuttx/NuttX/nuttx/tools/gencromfs.c
|
||||
WORKING_DIRECTORY ${NUTTX_DIR}/tools
|
||||
)
|
||||
|
||||
# create nsh_romfsimg.c
|
||||
add_custom_command(OUTPUT nsh_romfsimg.c
|
||||
COMMAND ${CMAKE_COMMAND} -E remove -f nsh_romfsimg.c
|
||||
COMMAND ${CMAKE_BINARY_DIR}/gencromfs ${romfs_gen_root_dir} nsh_romfsimg.c
|
||||
DEPENDS
|
||||
${CMAKE_BINARY_DIR}/gencromfs
|
||||
romfs_pruned.stamp
|
||||
COMMENT "ROMFS: generating image"
|
||||
)
|
||||
|
||||
else()
|
||||
# create romfs.img
|
||||
find_program(GENROMFS genromfs)
|
||||
if(NOT GENROMFS)
|
||||
message(FATAL_ERROR "genromfs not found")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
romfs.img
|
||||
romfs.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E remove -f romfs.img romfs.txt
|
||||
COMMAND ${GENROMFS} -f romfs.img -d ${romfs_gen_root_dir} -V "NSHInitVol" -v > romfs.txt 2>&1
|
||||
DEPENDS romfs_pruned.stamp
|
||||
COMMENT "ROMFS: generating image"
|
||||
)
|
||||
|
||||
|
||||
# create nsh_romfsimg.c
|
||||
find_program(XXD xxd)
|
||||
if(NOT XXD)
|
||||
message(FATAL_ERROR "xxd not found")
|
||||
endif()
|
||||
|
||||
find_program(SED sed)
|
||||
if(NOT SED)
|
||||
message(FATAL_ERROR "sed not found")
|
||||
endif()
|
||||
|
||||
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 && ${CMAKE_COMMAND} -E rename nsh_romfsimg.c.tmp nsh_romfsimg.c
|
||||
DEPENDS romfs.img
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
add_library(romfs STATIC nsh_romfsimg.c)
|
||||
add_dependencies(romfs prebuild_targets)
|
||||
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
|
||||
|
||||
|
||||
# shellcheck
|
||||
find_program(SHELLCHECK_PATH shellcheck)
|
||||
|
||||
if(SHELLCHECK_PATH)
|
||||
|
||||
# TODO: fix SC2086, SC2166
|
||||
add_custom_target(shellcheck
|
||||
COMMAND ${SHELLCHECK_PATH} --shell=sh
|
||||
--exclude=SC2121 # SC2121: To assign a variable, use just 'var=value'
|
||||
--exclude=SC2086 # SC2086: Double quote to prevent globbing and word splitting.
|
||||
--exclude=SC2166 # SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
|
||||
--exclude=SC2154 # SC2154: <var> is referenced but not assigned (NuttX uses different asssignment)
|
||||
--exclude=SC2164 # SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
|
||||
`find ${romfs_gen_root_dir}/init.d -type f`
|
||||
DEPENDS ${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
USES_TERMINAL
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
px4fmuv3_bl.bin: Bootloader binary of the PX4 Bootloader
|
||||
(https://github.com/PX4/Bootloader)
|
||||
based on commit 184b813699a9cfd6f43a5a21556a06b4372baf5f
|
||||
for the target px4fmuv3_bl
|
||||
|
||||
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
# @maintainer Julian Oes <julian@oes.ch>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name IF750A SITL
|
||||
# InspiredFlight 750 Auterion edition. Gazebo Only.
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_x
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (Optical Flow)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
sh /etc/init.d-posix/10016_iris
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
# EKF2
|
||||
param set EKF2_AID_MASK 2
|
||||
param set EKF2_EVP_NOISE 0.05
|
||||
param set EKF2_EVA_NOISE 0.05
|
||||
|
||||
# INAV
|
||||
param set INAV_LIDAR_EST 1
|
||||
param set INAV_W_XY_FLOW 1
|
||||
param set INAV_W_XY_GPS_P 0
|
||||
param set INAV_W_XY_GPS_V 0
|
||||
param set INAV_W_Z_GPS_P 0
|
||||
|
||||
# LPE: Flow-only mode
|
||||
param set LPE_FUSION 242
|
||||
param set LPE_FAKE_ORIGIN 1
|
||||
|
||||
param set MPC_ALT_MODE 2
|
||||
fi
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 50 -s DISTANCE_SENSOR -u $udp_gcs_port_local
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (irlock)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
sh /etc/init.d-posix/10016_iris
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
# enable fusion of landing target velocity
|
||||
param set LTEST_MODE 1
|
||||
param set PLD_HACC_RAD 0.1
|
||||
fi
|
||||
|
||||
# Start up Landing Target Estimator module
|
||||
landing_target_estimator start
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (rplidar)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
sh /etc/init.d-posix/10016_iris
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set LPE_FUSION 242
|
||||
fi
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (Vision)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
sh /etc/init.d-posix/10016_iris
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
# EKF2: Vision position and heading
|
||||
param set EKF2_AID_MASK 24
|
||||
param set EKF2_EV_DELAY 5
|
||||
|
||||
# INAV: trust more on the vision input
|
||||
param set INAV_W_XY_VIS_P 9
|
||||
param set INAV_W_Z_VIS_P 7
|
||||
param set INAV_W_XY_GPS_P 0
|
||||
param set INAV_W_XY_GPS_V 0
|
||||
param set INAV_W_Z_GPS_P 0
|
||||
|
||||
# LPE: Vision + baro
|
||||
param set LPE_FUSION 132
|
||||
|
||||
# AEQ: External heading set to use vision input
|
||||
param set ATT_EXT_HDG_M 1
|
||||
fi
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 30 -s ODOMETRY -u $udp_gcs_port_local
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Solo
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (Obstacle Avoidance)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
sh /etc/init.d-posix/10016_iris
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set COM_OBS_AVOID 1
|
||||
param set MPC_XY_CRUISE 5.0
|
||||
fi
|
||||
@@ -1,2 +0,0 @@
|
||||
# shellcheck disable=SC2154
|
||||
mavlink start -x -u 14558 -r 4000000 -m onboard -o 14541 # add mavlink stream for SDK
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Hippocampus UUV
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER uuv_quad_x
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Plane SITL
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set EKF2_ARSP_THR 8
|
||||
param set EKF2_FUSE_BETA 1
|
||||
param set EKF2_MAG_ACCLIM 0
|
||||
param set EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set FW_LND_AIRSPD_SC 1
|
||||
param set FW_LND_ANG 8
|
||||
param set FW_THR_LND_MAX 0
|
||||
|
||||
param set FW_P_TC 0.5
|
||||
param set FW_PR_FF 0.40
|
||||
param set FW_PR_I 0.05
|
||||
param set FW_PR_P 0.05
|
||||
|
||||
param set FW_R_TC 0.7
|
||||
param set FW_RR_FF 0.20
|
||||
param set FW_RR_I 0.02
|
||||
param set FW_RR_P 0.22
|
||||
|
||||
param set FW_W_EN 1
|
||||
|
||||
param set MIS_LTRMIN_ALT 30
|
||||
param set MIS_TAKEOFF_ALT 30
|
||||
|
||||
param set NAV_ACC_RAD 15
|
||||
param set NAV_DLL_ACT 2
|
||||
param set NAV_LOITER_RAD 50
|
||||
|
||||
param set RWTO_TKOFF 1
|
||||
|
||||
param set WEST_EN 1
|
||||
fi
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Plane SITL with camera
|
||||
#
|
||||
|
||||
sh /etc/init.d-posix/1030_plane
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Standard VTOL
|
||||
#
|
||||
# @type Standard VTOL
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MAX 25
|
||||
param set FW_AIRSPD_MIN 14
|
||||
param set FW_AIRSPD_TRIM 16
|
||||
|
||||
param set MC_ROLLRATE_P 0.3
|
||||
|
||||
param set MIS_LTRMIN_ALT 10
|
||||
param set MIS_TAKEOFF_ALT 10
|
||||
param set MIS_YAW_TMT 10
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_THR_MIN 0.1
|
||||
param set MPC_TKO_SPEED 1
|
||||
param set MPC_XY_P 0.8
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_VEL_I 0.2
|
||||
param set MPC_XY_VEL_P 0.15
|
||||
param set MPC_Z_VEL_MAX_DN 1.5
|
||||
|
||||
param set NAV_ACC_RAD 5
|
||||
param set NAV_LOITER_RAD 80
|
||||
|
||||
param set VT_F_TRANS_DUR 5
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_ARSP_TRANS 16
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TYPE 2
|
||||
|
||||
param set WEST_EN 1
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/standard_vtol_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Quadrotor + Tailsitter
|
||||
#
|
||||
# @type VTOL Quad Tailsitter
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MAX 25
|
||||
param set FW_AIRSPD_MIN 14
|
||||
param set FW_AIRSPD_TRIM 16
|
||||
|
||||
param set MC_ROLLRATE_P 0.3
|
||||
|
||||
param set MIS_LTRMIN_ALT 10
|
||||
param set MIS_TAKEOFF_ALT 10
|
||||
param set MIS_YAW_TMT 10
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_THR_MIN 0.1
|
||||
param set MPC_TKO_SPEED 1
|
||||
param set MPC_XY_P 0.15
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_VEL_I 0.2
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_Z_VEL_MAX_DN 1.5
|
||||
param set MPC_Z_VEL_P 0.8
|
||||
|
||||
param set NAV_ACC_RAD 5
|
||||
param set NAV_LOITER_RAD 80
|
||||
|
||||
param set VT_F_TRANS_DUR 1.5
|
||||
param set VT_F_TRANS_THR 0.7
|
||||
param set VT_MOT_COUNT 0
|
||||
param set VT_TYPE 0
|
||||
|
||||
param set WEST_EN 1
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 20
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/quad_x_vtol.main.mix
|
||||
set MIXER custom
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name VTOL Tiltrotor
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MAX 25
|
||||
param set FW_AIRSPD_MIN 14
|
||||
param set FW_AIRSPD_TRIM 16
|
||||
|
||||
param set MC_ROLLRATE_P 0.3
|
||||
|
||||
param set MIS_LTRMIN_ALT 10
|
||||
param set MIS_TAKEOFF_ALT 10
|
||||
param set MIS_YAW_TMT 10
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_THR_MIN 0.1
|
||||
param set MPC_TKO_SPEED 1
|
||||
param set MPC_XY_P 0.15
|
||||
param set MPC_XY_VEL_D 0.005
|
||||
param set MPC_XY_VEL_I 0.2
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_Z_VEL_MAX_DN 1.5
|
||||
param set MPC_Z_VEL_P 0.8
|
||||
|
||||
param set NAV_ACC_RAD 5
|
||||
param set NAV_LOITER_RAD 80
|
||||
|
||||
param set VT_F_TRANS_DUR 1.5
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_TILT_FW 3.1415
|
||||
param set VT_TILT_TRANS 1.2
|
||||
param set VT_ELEV_MC_LOCK 0
|
||||
param set VT_TYPE 1
|
||||
|
||||
param set WEST_EN 1
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 21
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/tiltrotor_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Rover
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.ugv_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set GND_L1_DIST 5
|
||||
param set GND_SP_CTRL_MODE 1
|
||||
param set GND_SPEED_D 3
|
||||
param set GND_SPEED_I 0.001
|
||||
param set GND_SPEED_IMAX 0.125
|
||||
param set GND_SPEED_P 0.25
|
||||
param set GND_SPEED_THR_SC 1
|
||||
param set GND_SPEED_TRIM 4
|
||||
param set GND_THR_CRUISE 0.3
|
||||
param set GND_THR_IDLE 0
|
||||
param set GND_THR_MAX 0.5
|
||||
param set GND_THR_MIN 0
|
||||
param set GND_WR_D 1.2
|
||||
param set GND_WR_I 0.9674
|
||||
param set GND_WR_IMAX 0.1
|
||||
param set GND_WR_P 2
|
||||
|
||||
param set MIS_LTRMIN_ALT 0.01
|
||||
param set MIS_TAKEOFF_ALT 0.01
|
||||
param set NAV_ACC_RAD 0.5
|
||||
param set NAV_LOITER_RAD 2
|
||||
|
||||
param set CBRK_AIRSPD_CHK 162128
|
||||
fi
|
||||
|
||||
set MAV_TYPE 10
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/rover_sitl.main.mix
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Typhoon H480 SITL
|
||||
#
|
||||
# @type Hexarotor x
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set MC_PITCHRATE_P 0.1
|
||||
param set MC_ROLLRATE_P 0.05
|
||||
param set MPC_XY_VEL_I 0.2
|
||||
param set MPC_XY_VEL_P 0.15
|
||||
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
|
||||
param set TRIG_INTERFACE 3
|
||||
param set TRIG_MODE 4
|
||||
param set MNT_MODE_IN 0
|
||||
param set MAV_PROTO_VER 2
|
||||
fi
|
||||
|
||||
set MAV_TYPE 13
|
||||
|
||||
set MIXER hexa_x
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
|
||||
|
||||
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# EKF2 replay script
|
||||
|
||||
publisher_rules_file="orb_publisher.rules"
|
||||
cat <<EOF > "$publisher_rules_file"
|
||||
restrict_topics: sensor_combined, vehicle_gps_position, vehicle_land_detected
|
||||
module: replay
|
||||
ignore_others: false
|
||||
EOF
|
||||
|
||||
uorb start
|
||||
param set SDLOG_DIRS_MAX 7
|
||||
|
||||
ekf2 start -r
|
||||
logger start -f -t -b 1000 -p vehicle_attitude
|
||||
sleep 0.2
|
||||
replay start
|
||||
@@ -1,265 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PX4 commands need the 'px4-' prefix in bash.
|
||||
# (px4-alias.sh is expected to be in the PATH)
|
||||
# shellcheck disable=SC1091
|
||||
. px4-alias.sh
|
||||
|
||||
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
|
||||
|
||||
#
|
||||
# Main SITL startup script
|
||||
#
|
||||
|
||||
# check for ekf2 replay
|
||||
# shellcheck disable=SC2154
|
||||
if [ "$replay_mode" = "ekf2" ]
|
||||
then
|
||||
sh etc/init.d-posix/rc.replay
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# initialize script variables
|
||||
set AUX_MODE none
|
||||
set IO_PRESENT no
|
||||
set LOG_FILE bootlog.txt
|
||||
set MAV_TYPE none
|
||||
set MIXER none
|
||||
set MIXER_AUX none
|
||||
set MIXER_FILE none
|
||||
set OUTPUT_MODE sim
|
||||
set PWM_OUT none
|
||||
set SDCARD_MIXERS_PATH etc/mixers
|
||||
set USE_IO no
|
||||
set VEHICLE_TYPE none
|
||||
set LOGGER_BUF 1000
|
||||
|
||||
set RUN_MINIMAL_SHELL no
|
||||
|
||||
# Use the variable set by sitl_run.sh to choose the model settings.
|
||||
if [ "$PX4_SIM_MODEL" = "shell" ]; then
|
||||
set RUN_MINIMAL_SHELL yes
|
||||
else
|
||||
# Find the matching Autostart ID (file name has the form: [0-9]+_${PX4_SIM_MODEL})
|
||||
# TODO: unify with rc.autostart generation
|
||||
# shellcheck disable=SC2012
|
||||
REQUESTED_AUTOSTART=$(ls "$SCRIPT_DIR" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
|
||||
if [ -z "$REQUESTED_AUTOSTART" ]; then
|
||||
echo "Error: Unknown model '$PX4_SIM_MODEL'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# clear bootlog
|
||||
[ -f $LOG_FILE ] && rm $LOG_FILE
|
||||
|
||||
|
||||
uorb start
|
||||
if [ -f eeprom/parameters ]
|
||||
then
|
||||
param load
|
||||
fi
|
||||
|
||||
# exit early when the minimal shell is requested
|
||||
[ $RUN_MINIMAL_SHELL = yes ] && exit 0
|
||||
|
||||
|
||||
# Use environment variable PX4_ESTIMATOR to choose estimator.
|
||||
if [ "$PX4_ESTIMATOR" = "ekf2" ]; then
|
||||
param set SYS_MC_EST_GROUP 2
|
||||
elif [ "$PX4_ESTIMATOR" = "lpe" ]; then
|
||||
param set SYS_MC_EST_GROUP 1
|
||||
elif [ "$PX4_ESTIMATOR" = "inav" ]; then
|
||||
param set SYS_MC_EST_GROUP 0
|
||||
fi
|
||||
|
||||
if param compare SYS_AUTOSTART $REQUESTED_AUTOSTART
|
||||
then
|
||||
set AUTOCNF no
|
||||
else
|
||||
set AUTOCNF yes
|
||||
fi
|
||||
|
||||
# multi-instance setup
|
||||
# shellcheck disable=SC2154
|
||||
param set MAV_SYS_ID $((px4_instance+1))
|
||||
simulator_tcp_port=$((4560+px4_instance))
|
||||
udp_offboard_port_local=$((14580+px4_instance))
|
||||
udp_offboard_port_remote=$((14540+px4_instance))
|
||||
udp_gcs_port_local=$((14570+px4_instance))
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set SYS_AUTOSTART $REQUESTED_AUTOSTART
|
||||
|
||||
param set BAT_N_CELLS 3
|
||||
|
||||
param set CAL_ACC0_ID 1376264
|
||||
param set CAL_ACC1_ID 1310728
|
||||
param set CAL_ACC_PRIME 1376264
|
||||
|
||||
param set CAL_GYRO0_ID 2293768
|
||||
param set CAL_GYRO_PRIME 2293768
|
||||
|
||||
param set CAL_MAG0_ID 196616
|
||||
param set CAL_MAG_PRIME 196616
|
||||
|
||||
param set CBRK_AIRSPD_CHK 0
|
||||
|
||||
param set COM_DISARM_LAND 0.1
|
||||
param set COM_OBL_ACT 2
|
||||
param set COM_OBL_RC_ACT 0
|
||||
param set COM_OF_LOSS_T 5
|
||||
param set COM_RC_IN_MODE 1
|
||||
|
||||
param set EKF2_AID_MASK 1
|
||||
param set EKF2_ANGERR_INIT 0.01
|
||||
param set EKF2_HGT_MODE 0
|
||||
param set EKF2_GBIAS_INIT 0.01
|
||||
|
||||
# LPE: GPS only mode
|
||||
param set LPE_FUSION 145
|
||||
|
||||
param set MIS_TAKEOFF_ALT 2.5
|
||||
|
||||
param set MC_PITCH_P 6
|
||||
param set MC_PITCHRATE_P 0.2
|
||||
param set MC_ROLL_P 6
|
||||
param set MC_ROLLRATE_P 0.2
|
||||
|
||||
param set MPC_ALT_MODE 0
|
||||
param set MPC_HOLD_MAX_Z 2
|
||||
param set MPC_Z_VEL_I 0.15
|
||||
param set MPC_Z_VEL_P 0.6
|
||||
param set MPC_XY_P 0.8
|
||||
param set MPC_XY_VEL_P 0.2
|
||||
param set MPC_XY_VEL_I 0.02
|
||||
param set MPC_XY_VEL_D 0.016
|
||||
|
||||
param set MPC_JERK_MIN 10
|
||||
param set MPC_JERK_MAX 20
|
||||
param set MPC_ACC_HOR_MAX 3
|
||||
|
||||
param set NAV_ACC_RAD 2
|
||||
param set NAV_DLL_ACT 2
|
||||
|
||||
param set RTL_DESCEND_ALT 5
|
||||
param set RTL_LAND_DELAY 5
|
||||
param set RTL_RETURN_ALT 30
|
||||
|
||||
# By default log from boot until first disarm.
|
||||
param set SDLOG_MODE 1
|
||||
# enable default, estimator replay and vision/avoidance logging profiles
|
||||
param set SDLOG_PROFILE 131
|
||||
param set SDLOG_DIRS_MAX 7
|
||||
param set SENS_BOARD_ROT 0
|
||||
param set SENS_BOARD_X_OFF 0.000001
|
||||
param set SENS_DPRES_OFF 0.001
|
||||
param set SYS_RESTART_TYPE 2
|
||||
|
||||
param set WEST_EN 0
|
||||
fi
|
||||
|
||||
# Adapt timeout parameters if simulation runs faster or slower than realtime.
|
||||
if [ ! -z $PX4_SIM_SPEED_FACTOR ]; then
|
||||
COM_DL_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 10" | bc)
|
||||
echo "COM_DL_LOSS_T set to $COM_DL_LOSS_T_LONGER"
|
||||
param set COM_DL_LOSS_T $COM_DL_LOSS_T_LONGER
|
||||
|
||||
COM_RC_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 1" | bc)
|
||||
echo "COM_RC_LOSS_T set to $COM_RC_LOSS_T_LONGER"
|
||||
param set COM_RC_LOSS_T $COM_RC_LOSS_T_LONGER
|
||||
|
||||
COM_OF_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 10" | bc)
|
||||
echo "COM_OF_LOSS_T set to $COM_OF_LOSS_T_LONGER"
|
||||
param set COM_OF_LOSS_T $COM_OF_LOSS_T_LONGER
|
||||
fi
|
||||
|
||||
# Autostart ID
|
||||
autostart_file=''
|
||||
for f in etc/init.d-posix/"$(param show -q SYS_AUTOSTART)"_*
|
||||
do
|
||||
filename=$(basename "$f")
|
||||
case "$filename" in
|
||||
*\.*)
|
||||
# ignore files that contain a dot (e.g. <vehicle>.post)
|
||||
;;
|
||||
*)
|
||||
autostart_file="$f"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ ! -e "$autostart_file" ]; then
|
||||
echo "Error: no autostart file found ($autostart_file)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sh "$autostart_file"
|
||||
|
||||
|
||||
dataman start
|
||||
replay tryapplyparams
|
||||
simulator start -s -c $simulator_tcp_port
|
||||
tone_alarm start
|
||||
gyrosim start
|
||||
accelsim start
|
||||
barosim start
|
||||
gpssim start
|
||||
sensors start
|
||||
commander start
|
||||
navigator start
|
||||
|
||||
if param compare WEST_EN 1
|
||||
then
|
||||
wind_estimator start
|
||||
fi
|
||||
|
||||
if ! param compare MNT_MODE_IN -1
|
||||
then
|
||||
vmount start
|
||||
fi
|
||||
|
||||
if param greater TRIG_MODE 0
|
||||
then
|
||||
camera_trigger start
|
||||
camera_feedback start
|
||||
fi
|
||||
|
||||
|
||||
if [ ${VEHICLE_TYPE} = fw -o ${VEHICLE_TYPE} = vtol ]
|
||||
then
|
||||
if param compare CBRK_AIRSPD_CHK 0
|
||||
then
|
||||
measairspeedsim start
|
||||
fi
|
||||
fi
|
||||
|
||||
# Configure vehicle type specific parameters.
|
||||
# Note: rc.vehicle_setup is the entry point for rc.interface,
|
||||
# rc.fw_apps, rc.mc_apps, rc.ugv_apps, and rc.vtol_apps.
|
||||
#
|
||||
sh etc/init.d/rc.vehicle_setup
|
||||
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
|
||||
|
||||
# API/Offboard link
|
||||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -m onboard -o $udp_offboard_port_remote
|
||||
|
||||
# execute autostart post script if any
|
||||
[ -e "$autostart_file".post ] && sh "$autostart_file".post
|
||||
|
||||
# Run script to start logging
|
||||
sh etc/init.d/rc.logging
|
||||
|
||||
mavlink boot_complete
|
||||
replay trystart
|
||||
+2
-5
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name HILStar (XPlane)
|
||||
#
|
||||
@@ -17,10 +17,9 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set BAT_N_CELLS 3
|
||||
|
||||
param set FW_AIRSPD_MAX 20
|
||||
param set FW_AIRSPD_MIN 12
|
||||
param set FW_AIRSPD_TRIM 14
|
||||
@@ -42,10 +41,8 @@ then
|
||||
param set FW_RR_I 0.1
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.3
|
||||
|
||||
param set RWTO_TKOFF 1
|
||||
fi
|
||||
|
||||
param set SYS_HITL 1
|
||||
|
||||
set MIXER AERT
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Team Blacksheep Discovery
|
||||
#
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.1
|
||||
@@ -35,7 +35,7 @@ then
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.28
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
fi
|
||||
|
||||
set MIXER quad_w
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor
|
||||
#
|
||||
@@ -20,21 +20,21 @@
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
# TODO tune roll/pitch separately
|
||||
param set MC_ROLL_P 7
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.05
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_PITCH_P 7
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_YAW_P 2.5
|
||||
param set MC_YAWRATE_P 0.25
|
||||
param set MC_YAWRATE_I 0.25
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
|
||||
param set BAT_V_DIV 12.27559
|
||||
param set BAT_A_PER_V 15.39103
|
||||
+9
-8
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Steadidrone QU4D
|
||||
#
|
||||
@@ -22,22 +22,23 @@
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set BAT_N_CELLS 4
|
||||
|
||||
param set MC_ROLL_P 7
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.13
|
||||
param set MC_ROLLRATE_I 0.05
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_PITCH_P 7
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.19
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_YAW_P 4
|
||||
param set MC_YAW_P 4.0
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.5
|
||||
|
||||
param set BAT_N_CELLS 4
|
||||
fi
|
||||
|
||||
set MIXER quad_w
|
||||
+5
-6
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Team Blacksheep Discovery Endurance
|
||||
#
|
||||
@@ -22,26 +22,25 @@
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set BAT_N_CELLS 6
|
||||
param set BAT_V_EMPTY 3.5
|
||||
|
||||
param set MC_ROLL_P 7
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.08
|
||||
param set MC_ROLLRATE_I 0.02
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_PITCH_P 7
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.13
|
||||
param set MC_PITCHRATE_I 0.02
|
||||
param set MC_PITCHRATE_D 0.005
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
|
||||
param set MPC_XY_VEL_MAX 2
|
||||
|
||||
param set PWM_MIN 1080
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name HIL Quadcopter X
|
||||
#
|
||||
# @type Simulation
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/4001_quad_x
|
||||
|
||||
param set SYS_HITL 1
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Hexarotor coaxial geometry
|
||||
#
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic 10" Octo coaxial geometry
|
||||
#
|
||||
+10
-9
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Steadidrone MAVRIK
|
||||
#
|
||||
@@ -19,28 +19,29 @@
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_PITCH_P 4
|
||||
param set MC_PITCH_P 4.0
|
||||
param set MC_PITCHRATE_P 0.24
|
||||
param set MC_PITCHRATE_I 0.09
|
||||
param set MC_PITCHRATE_D 0.013
|
||||
param set MC_PITCHRATE_MAX 180
|
||||
param set MC_PITCHRATE_MAX 180.0
|
||||
|
||||
param set MC_ROLL_P 4
|
||||
param set MC_ROLL_P 4.0
|
||||
param set MC_ROLLRATE_P 0.16
|
||||
param set MC_ROLLRATE_I 0.07
|
||||
param set MC_ROLLRATE_D 0.009
|
||||
param set MC_ROLLRATE_MAX 180
|
||||
param set MC_ROLLRATE_MAX 180.0
|
||||
|
||||
param set MC_YAW_P 3
|
||||
param set MC_YAW_P 3.0
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.5
|
||||
|
||||
param set MPC_HOLD_MAX_XY 0.25
|
||||
param set MPC_THR_MIN 0.15
|
||||
param set MPC_Z_VEL_MAX_DN 2
|
||||
param set MPC_Z_VEL_MAX_DN 2.0
|
||||
|
||||
param set BAT_N_CELLS 4
|
||||
fi
|
||||
+9
-12
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Quadplane VTOL
|
||||
#
|
||||
@@ -20,21 +20,18 @@
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set PWM_AUX_DIS5 950
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER_AUX vtol_AAERT
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
+11
-14
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Caipiroshka Duo Tailsitter
|
||||
#
|
||||
@@ -15,35 +15,32 @@
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 6
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.12
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 4.5
|
||||
param set MC_PITCHRATE_P 0.3
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_FF 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_ELEV_MC_LOCK 0
|
||||
param set VT_MOT_COUNT 2
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
param set MAV_TYPE 19
|
||||
param set VT_ELEV_MC_LOCK 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 19
|
||||
|
||||
set MIXER caipirinha_vtol
|
||||
|
||||
set PWM_OUT 1234
|
||||
+18
-21
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name BirdsEyeView Aerobotics FireFly6
|
||||
# @type VTOL Tiltrotor
|
||||
@@ -20,42 +20,39 @@
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 7
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.19
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.005
|
||||
param set MC_ROLLRATE_FF 0
|
||||
param set MC_PITCH_P 7
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.14
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_YAW_P 4
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 4.0
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_FF 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set VT_FW_MOT_OFFID 34
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_MOT_COUNT 6
|
||||
param set VT_TILT_MC 0.08
|
||||
param set VT_TILT_TRANS 0.5
|
||||
param set VT_TILT_FW 0.9
|
||||
param set VT_ELEV_MC_LOCK 0
|
||||
param set VT_TYPE 1
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
param set VT_MOT_COUNT 6
|
||||
param set VT_FW_MOT_OFFID 34
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 1
|
||||
fi
|
||||
|
||||
set MAV_TYPE 21
|
||||
|
||||
set MIXER firefly6
|
||||
set PWM_OUT 12345678
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX firefly6
|
||||
|
||||
set PWM_OUT 12345678
|
||||
set MAV_TYPE 21
|
||||
@@ -0,0 +1,26 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Quadrotor X Tailsitter
|
||||
#
|
||||
# @type VTOL Quad Tailsitter
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set VT_ELEV_MC_LOCK 1
|
||||
fi
|
||||
|
||||
set MIXER quad_x_vtol
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MAX 2000
|
||||
set PWM_RATE 400
|
||||
set MAV_TYPE 20
|
||||
+10
-15
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Quadrotor + Tailsitter
|
||||
#
|
||||
@@ -16,27 +16,22 @@
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board px4fmu-v2 exclude
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set PWM_MAX 2000
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set VT_ELEV_MC_LOCK 1
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 0
|
||||
param set VT_ELEV_MC_LOCK 1
|
||||
fi
|
||||
|
||||
set MAV_TYPE 20
|
||||
|
||||
set MIXER quad_+_vtol
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_MAX 2000
|
||||
set PWM_RATE 400
|
||||
set MAV_TYPE 20
|
||||
+22
-23
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Fun Cub Quad VTOL
|
||||
#
|
||||
@@ -20,30 +20,32 @@
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set PWM_AUX_DIS5 950
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_ARSP_TRANS 12
|
||||
param set VT_ARSP_BLEND 6
|
||||
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set MC_ROLL_P 6
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_FF 0
|
||||
param set MC_PITCH_P 6
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_PITCHRATE_P 0.19
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_FF 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 40
|
||||
|
||||
param set MPC_YAWRAUTO_MAX 40
|
||||
param set MC_YAWRAUTO_MAX 40
|
||||
|
||||
param set FW_PR_FF 0.5
|
||||
param set FW_PR_I 0.02
|
||||
@@ -55,20 +57,17 @@ then
|
||||
param set FW_RR_P 0.05
|
||||
param set FW_THR_CRUISE 0.75
|
||||
|
||||
param set VT_ARSP_BLEND 6
|
||||
param set VT_ARSP_TRANS 12
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER_AUX vtol_AAERT
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
+20
-19
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic quad delta VTOL
|
||||
#
|
||||
@@ -18,45 +18,46 @@
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
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 MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.01
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.01
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.5
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_FF 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 50
|
||||
param set MC_YAWRAUTO_MAX 20
|
||||
|
||||
param set MPC_XY_P 0.8
|
||||
param set MPC_XY_VEL_P 0.1
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_YAWRAUTO_MAX 20
|
||||
|
||||
param set PWM_AUX_DIS3 950
|
||||
param set PWM_RATE 400
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER_AUX vtol_delta
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_delta
|
||||
set PWM_ACHDIS 3
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
+21
-21
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic AAVVT v-tail plane airframe with Quad VTOL.
|
||||
#
|
||||
@@ -10,42 +10,42 @@
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set MC_ROLL_P 7
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0
|
||||
param set MC_PITCH_P 7
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.12
|
||||
param set MC_PITCHRATE_I 0.002
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 2.8
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.22
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_FF 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 40
|
||||
param set MC_YAWRAUTO_MAX 40
|
||||
|
||||
param set MPC_YAWRAUTO_MAX 40
|
||||
|
||||
param set PWM_AUX_DIS5 950
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER_AUX vtol_AAVVT
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAVVT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
+45
-42
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name QuadRanger
|
||||
#
|
||||
@@ -10,9 +10,40 @@
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_THR_CRUISE 65
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
|
||||
param set PWM_AUX_REV1 1
|
||||
param set PWM_AUX_REV2 1
|
||||
|
||||
param set MC_ROLL_P 7.0
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_PITCH_P 7.0
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.1
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_YAW_P 3.5
|
||||
param set MC_YAW_FF 0.7
|
||||
param set MC_YAWRATE_P 0.6
|
||||
param set MC_YAWRATE_I 0.04
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 40.0
|
||||
param set MC_YAWRAUTO_MAX 40.0
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
param set MPC_Z_VEL_MAX_DN 1.5
|
||||
param set MPC_TKO_SPEED 1.5
|
||||
param set MPC_LAND_SPEED 0.8
|
||||
|
||||
param set FW_THR_CRUISE 65.0
|
||||
param set FW_PR_P 0.08
|
||||
param set FW_PR_FF 0.5
|
||||
param set FW_RR_P 0.05
|
||||
@@ -20,49 +51,21 @@ then
|
||||
|
||||
param set MIS_YAW_TMT 10
|
||||
|
||||
param set MC_ROLL_P 7
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLLRATE_I 0.1
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_FF 0
|
||||
param set MC_PITCH_P 7
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.1
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_YAW_P 3.5
|
||||
param set MC_YAWRATE_P 0.6
|
||||
param set MC_YAWRATE_I 0.04
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_FF 0
|
||||
param set MC_YAWRATE_MAX 40
|
||||
param set VT_ARSP_TRANS 15.0
|
||||
param set VT_ARSP_BLEND 8.0
|
||||
param set VT_B_TRANS_DUR 4.0
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_Z_VEL_MAX_DN 1.5
|
||||
param set MPC_TKO_SPEED 1.5
|
||||
param set MPC_LAND_SPEED 0.8
|
||||
param set MPC_YAWRAUTO_MAX 40
|
||||
|
||||
param set PWM_AUX_DIS5 950
|
||||
param set PWM_AUX_REV1 1
|
||||
param set PWM_AUX_REV2 1
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set VT_ARSP_TRANS 15
|
||||
param set VT_ARSP_BLEND 8
|
||||
param set VT_B_TRANS_DUR 4
|
||||
param set VT_F_TRANS_THR 0.75
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 2
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
fi
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER_AUX vtol_AAERT
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@@ -0,0 +1,87 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Sparkle Tech Ranger VTOL
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_IDLE_PWM_MC 1180
|
||||
param set MAV_TYPE 22
|
||||
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_TIMEOUT 30.0
|
||||
|
||||
param set FW_AIRSPD_MAX 22.0
|
||||
param set FW_AIRSPD_MIN 14.0
|
||||
param set FW_AIRSPD_TRIM 16.0
|
||||
param set FW_L1_PERIOD 25.0
|
||||
param set FW_PR_P 0.060
|
||||
param set FW_P_RMAX_NEG 40.0
|
||||
param set FW_P_RMAX_POS 40.0
|
||||
param set FW_RR_FF 0.4
|
||||
param set FW_RR_P 0.04
|
||||
param set FW_R_RMAX 40.0
|
||||
|
||||
param set MC_PITCHRATE_D 0.004
|
||||
param set MC_PITCHRATE_I 0.0
|
||||
param set MC_PITCHRATE_MAX 60.0
|
||||
param set MC_PITCHRATE_P 0.21
|
||||
param set MC_PITCH_P 4.0
|
||||
param set MC_ROLLRATE_D 0.004
|
||||
param set MC_ROLLRATE_I 0.002
|
||||
param set MC_ROLLRATE_MAX 60.0
|
||||
param set MC_ROLLRATE_P 0.24
|
||||
param set MC_ROLL_P 4.0
|
||||
param set MC_YAWRATE_I 0.02
|
||||
param set MC_YAWRATE_MAX 40.0
|
||||
param set MC_YAWRATE_P 0.18
|
||||
param set MC_YAWRATE_MAX 40.0
|
||||
param set MC_YAWRAUTO_MAX 40.0
|
||||
|
||||
param set MIS_TAKEOFF_ALT 2.5
|
||||
param set MIS_YAW_TMT 20.0
|
||||
|
||||
param set MPC_ACC_HOR_MAX 1.0
|
||||
param set MPC_HOLD_MAX_XY 0.5
|
||||
param set MPC_HOLD_MAX_Z 0.5
|
||||
param set MPC_LAND_SPEED 1.0
|
||||
param set MPC_MANTHR_MIN 0.05
|
||||
param set MPC_MAN_Y_MAX 120.0
|
||||
param set MPC_THR_MIN 0.07
|
||||
param set MPC_TILTMAX_AIR 35.0
|
||||
param set MPC_TILTMAX_LND 20.0
|
||||
param set MPC_TKO_SPEED 1.0
|
||||
param set MPC_XY_P 0.3
|
||||
param set MPC_XY_VEL_MAX 3.0
|
||||
param set MPC_XY_VEL_P 0.05
|
||||
param set MPC_Z_P 0.5
|
||||
param set MPC_Z_VEL_P 0.1
|
||||
|
||||
param set NAV_ACC_RAD 3.0
|
||||
|
||||
param set PWM_AUX_REV1 1
|
||||
param set PWM_AUX_REV2 1
|
||||
param set PWM_AUX_REV3 1
|
||||
param set PWM_AUX_REV4 1
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MIXER_AUX vtol_AAERT
|
||||
set PWM_ACHDIS 5
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
@@ -0,0 +1,40 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name CruiseAder Claire
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Samay Siga <samay_s@icloud.com>
|
||||
#
|
||||
# @board px4fmu-v2 exclude
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_TYPE 1
|
||||
param set VT_TILT_MC 0.08
|
||||
param set VT_TILT_TRANS 0.5
|
||||
param set VT_TILT_FW 0.9
|
||||
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_FW_MOT_OFFID 13
|
||||
param set VT_IDLE_PWM_MC 1080
|
||||
param set VT_TYPE 1
|
||||
fi
|
||||
|
||||
set MIXER claire
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
set PWM_MAX 2000
|
||||
|
||||
set MIXER_AUX claire
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_RATE 123
|
||||
set PWM_AUX_MIN 1000
|
||||
set PWM_AUX_MAX 2000
|
||||
set PWM_AUX_DISARMED 1000
|
||||
|
||||
set MAV_TYPE 21
|
||||
@@ -0,0 +1,83 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name E-flite Convergence
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Andreas Antener <andreas@uaventure.com>
|
||||
#
|
||||
# @output MAIN1 Motor right
|
||||
# @output MAIN2 Motor left
|
||||
# @output MAIN3 Motor back
|
||||
# @output MAIN4 empty
|
||||
# @output MAIN5 Tilt servo right
|
||||
# @output MAIN6 Tilt servo left
|
||||
# @output MAIN7 Elevon right
|
||||
# @output MAIN8 Elevon left
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set VT_MOT_COUNT 3
|
||||
param set VT_FW_MOT_OFFID 3
|
||||
param set VT_IDLE_PWM_MC 1200
|
||||
param set VT_TYPE 1
|
||||
|
||||
param set VT_B_TRANS_DUR 1.0
|
||||
param set VT_FW_DIFTHR_EN 1
|
||||
param set VT_FW_DIFTHR_SC 0.17
|
||||
param set VT_FW_PERM_STAB 0
|
||||
param set VT_F_TRANS_DUR 1.2
|
||||
param set VT_F_TR_OL_TM 4.0
|
||||
param set VT_TILT_FW 1.0
|
||||
param set VT_TILT_MC 0.0
|
||||
param set VT_TILT_TRANS 0.45
|
||||
param set VT_TRANS_MIN_TM 1.2
|
||||
param set VT_TRANS_P2_DUR 1.3
|
||||
|
||||
param set FW_L1_PERIOD 17
|
||||
param set FW_MAN_R_MAX 50.0
|
||||
param set FW_ACRO_X_MAX 270
|
||||
param set FW_ACRO_Y_MAX 270
|
||||
param set FW_ACRO_Z_MAX 180
|
||||
param set FW_PR_FF 0.5
|
||||
param set FW_PR_P 0.08
|
||||
param set FW_PSP_OFF 5.0
|
||||
param set FW_P_LIM_MAX 30
|
||||
param set FW_P_LIM_MIN -30
|
||||
param set FW_P_RMAX_NEG 60
|
||||
param set FW_P_RMAX_POS 60
|
||||
param set FW_RR_FF 0.33
|
||||
param set FW_RR_P 0.11
|
||||
param set FW_YR_FF 0.3
|
||||
param set FW_YR_P 0.05
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCH_P 6.0
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_P 0.15
|
||||
param set MC_ROLL_P 6.0
|
||||
param set MC_YAWRATE_MAX 120
|
||||
param set MC_YAWRATE_P 0.27
|
||||
param set MC_YAW_FF 0.35
|
||||
param set MC_YAW_P 2.5
|
||||
|
||||
param set MC_YAWRATE_P 0.3
|
||||
param set MPC_LAND_SPEED 1.2
|
||||
param set MPC_TKO_SPEED 2.5
|
||||
param set MPC_Z_VEL_MAX_UP 3.0
|
||||
|
||||
param set CBRK_AIRSPD_CHK 162128
|
||||
param set FW_ARSP_MODE 2
|
||||
|
||||
param set SENS_BOARD_ROT 8
|
||||
fi
|
||||
|
||||
set MIXER vtol_convergence
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
set MAV_TYPE 21
|
||||
+44
-84
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Vertical Technologies DeltaQuad
|
||||
# @name DeltaQuad
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
@@ -19,22 +19,21 @@
|
||||
|
||||
sh /etc/init.d/rc.vtol_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set BAT_CAPACITY 23000
|
||||
param set BAT_N_CELLS 4
|
||||
param set BAT_R_INTERNAL 0.0025
|
||||
|
||||
param set COM_DISARM_LAND 5
|
||||
|
||||
param set CBRK_AIRSPD_CHK 162128
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
|
||||
param set EKF2_GPS_POS_X -0.12
|
||||
param set EKF2_IMU_POS_X -0.12
|
||||
param set EKF2_TAU_VEL 0.5
|
||||
param set EKF2_GPS_P_GATE 10
|
||||
param set EKF2_GPS_V_GATE 10
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 1
|
||||
param set VT_DWN_PITCH_MAX 8
|
||||
param set VT_FW_QC_P 55
|
||||
param set VT_FW_QC_R 55
|
||||
param set VT_TRANS_MIN_TM 8
|
||||
param set VT_B_TRANS_DUR 5
|
||||
param set VT_WV_LND_EN 1
|
||||
param set VT_WV_LTR_EN 1
|
||||
param set VT_FWD_THRUST_SC 2
|
||||
param set VT_F_TRANS_DUR 1
|
||||
param set VT_IDLE_PWM_MC 1025
|
||||
|
||||
param set FW_ARSP_MODE 2
|
||||
param set FW_L1_PERIOD 25
|
||||
@@ -52,19 +51,14 @@ then
|
||||
param set FW_T_SINK_MAX 3
|
||||
param set FW_T_SINK_MIN 1
|
||||
param set FW_T_VERT_ACC 6
|
||||
param set FW_T_HRATE_P 0.1
|
||||
param set FW_THR_CRUISE 0.70
|
||||
param set FW_THR_CRUISE 0.68
|
||||
param set FW_THR_SLEW_MAX 1
|
||||
param set FW_MAN_P_MAX 30
|
||||
param set FW_P_LIM_MAX 15
|
||||
param set FW_P_LIM_MAX 20
|
||||
param set FW_P_LIM_MIN -25
|
||||
param set FW_P_RMAX_NEG 45
|
||||
param set FW_P_RMAX_POS 45
|
||||
param set FW_R_RMAX 50
|
||||
param set FW_THR_MIN 0.55
|
||||
param set FW_BAT_SCALE_EN 1
|
||||
param set FW_THR_ALT_SCL 2.7
|
||||
param set FW_T_RLL2THR 20
|
||||
|
||||
param set LNDMC_ALT_MAX 9999
|
||||
param set LNDMC_XY_VEL_MAX 1
|
||||
@@ -74,31 +68,28 @@ then
|
||||
param set MC_ROLLRATE_P 0.16
|
||||
param set MC_ROLLRATE_I 0.01
|
||||
param set MC_ROLLRATE_D 0.003
|
||||
param set MC_ROLLRATE_FF 0
|
||||
param set MC_ROLLRATE_FF 0.0
|
||||
param set MC_ROLLRATE_MAX 80
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_PITCHRATE_P 0.15
|
||||
param set MC_PITCHRATE_I 0.05
|
||||
param set MC_PITCHRATE_D 0.003
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_PITCHRATE_FF 0.0
|
||||
param set MC_PITCHRATE_MAX 80
|
||||
param set MC_YAW_P 3.5
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.2
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_FF 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0.0
|
||||
param set MC_YAWRATE_MAX 20
|
||||
param set MC_AIRMODE 1
|
||||
|
||||
param set MIS_DIST_1WP 100
|
||||
param set MIS_DIST_WPS 100000
|
||||
param set MIS_TAKEOFF_ALT 15
|
||||
param set MC_YAWRAUTO_MAX 20
|
||||
|
||||
param set MPC_XY_P 0.8
|
||||
param set MPC_XY_VEL_P 0.1
|
||||
param set MPC_XY_VEL_MAX 5
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_LAND_SPEED 1.2
|
||||
param set MPC_XY_VEL_MAX 4
|
||||
param set MPC_ACC_HOR_MAX 2.0
|
||||
param set MPC_LAND_SPEED 1.5
|
||||
param set MPC_MAN_R_MAX 30
|
||||
param set MPC_TILTMAX_LND 35
|
||||
param set MPC_Z_VEL_MAX 1.5
|
||||
@@ -106,59 +97,28 @@ then
|
||||
param set MPC_Z_VEL_MAX_DN 1.5
|
||||
param set MPC_HOLD_MAX_XY 0.5
|
||||
param set MPC_HOLD_MAX_Z 0.5
|
||||
param set MPC_TKO_RAMP_T 0.8
|
||||
param set MPC_XY_CRUISE 5
|
||||
param set MPC_TILTMAX_AIR 25
|
||||
param set MPC_TILTMAX_LND 25
|
||||
param set MPC_YAWRAUTO_MAX 20
|
||||
|
||||
param set NAV_DLL_ACT 0
|
||||
param set NAV_LOITER_RAD 100
|
||||
param set CBRK_AIRSPD_CHK 162128
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
|
||||
param set PWM_AUX_DISARMED 950
|
||||
param set EKF2_GPS_POS_X -0.12
|
||||
param set EKF2_IMU_POS_X -0.12
|
||||
param set EKF2_TAU_VEL 0.5
|
||||
|
||||
param set PWM_MAIN_DIS5 1500
|
||||
param set PWM_MAIN_DIS6 1500
|
||||
param set PWM_MAIN_DIS7 900
|
||||
param set PWM_MAIN_DIS8 900
|
||||
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set SENS_BOARD_ROT 18
|
||||
|
||||
# TELEM2 config
|
||||
param set MAV_1_CONFIG 102
|
||||
param set MAV_1_RATE 5000
|
||||
param set MAV_1_FORWARD 1
|
||||
param set SER_TEL2_BAUD 57600
|
||||
|
||||
param set VT_TYPE 2
|
||||
param set VT_MOT_COUNT 4
|
||||
param set VT_F_TRANS_THR 1
|
||||
param set VT_DWN_PITCH_MAX 8
|
||||
param set VT_FW_QC_P 55
|
||||
param set VT_FW_QC_R 55
|
||||
param set VT_TRANS_MIN_TM 15
|
||||
param set VT_B_TRANS_DUR 8
|
||||
param set VT_WV_LND_EN 1
|
||||
param set VT_WV_LTR_EN 1
|
||||
param set VT_FWD_THRUST_SC 4
|
||||
param set VT_F_TRANS_DUR 1
|
||||
param set VT_IDLE_PWM_MC 1025
|
||||
param set VT_B_REV_OUT 0.5
|
||||
param set VT_B_TRANS_THR 0.7
|
||||
param set VT_FW_PERM_STAB 1
|
||||
param set VT_TRANS_TIMEOUT 22
|
||||
param set VT_F_TRANS_RAMP 4
|
||||
|
||||
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
|
||||
param set V19_VT_ROLLDIR 0
|
||||
param set SYS_COMPANION 57600
|
||||
fi
|
||||
|
||||
set MAV_TYPE 22
|
||||
|
||||
set MIXER deltaquad
|
||||
set MIXER_AUX pass
|
||||
|
||||
set PWM_OUT 1234
|
||||
set PWM_RATE 400
|
||||
|
||||
param set PWM_MAIN_DIS5 1500
|
||||
param set PWM_MAIN_DIS6 1500
|
||||
param set PWM_MAIN_DIS7 900
|
||||
param set PWM_MAIN_DIS8 900
|
||||
|
||||
set MIXER_AUX pass
|
||||
set PWM_AUX_OUT 12345
|
||||
set PWM_AUX_DISARMED 950
|
||||
|
||||
set MAV_TYPE 22
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Tricopter Y+ Geometry
|
||||
#
|
||||
@@ -18,3 +18,4 @@ sh /etc/init.d/rc.mc_defaults
|
||||
set MIXER tri_y_yaw+
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Tricopter Y- Geometry
|
||||
#
|
||||
+17
-17
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Esky (Big) Lama v4
|
||||
#
|
||||
@@ -16,8 +16,16 @@
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
set MIXER coax
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
|
||||
param set PWM_DISARMED 900
|
||||
param set PWM_MIN 1075
|
||||
param set PWM_MAX 1950
|
||||
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_ROLLRATE_P 0.17
|
||||
param set MC_ROLLRATE_I 0.05
|
||||
@@ -29,26 +37,18 @@ then
|
||||
param set MC_PITCHRATE_D 0.005
|
||||
param set MC_PITCHRATE_FF 0
|
||||
param set MC_YAW_P 2
|
||||
param set MC_YAW_FF 0.5
|
||||
param set MC_YAWRATE_P 0.1
|
||||
param set MC_YAWRATE_I 0.1
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAWRATE_FF 0
|
||||
|
||||
param set NAV_ACC_RAD 2
|
||||
|
||||
param set PWM_AUX_RATE 50
|
||||
param set PWM_DISARMED 900
|
||||
param set PWM_MIN 1075
|
||||
param set PWM_MAX 1950
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set RTL_RETURN_ALT 30
|
||||
param set RTL_DESCEND_ALT 10
|
||||
fi
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_OUT 34
|
||||
set PWM_RATE 400
|
||||
|
||||
# This is the gimbal pass mixer
|
||||
set MIXER_AUX pass
|
||||
|
||||
# use PWM parameters for throttle channel
|
||||
set PWM_AUX_RATE 50
|
||||
set PWM_AUX_OUT 1234
|
||||
set PWM_OUT 34
|
||||
+23
-22
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Blade 130X
|
||||
#
|
||||
@@ -23,34 +23,35 @@ set MIXER blade130
|
||||
|
||||
#set PWM_OUT 1234
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set ATT_BIAS_MAX 0
|
||||
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
|
||||
param set MC_ROLL_P 5
|
||||
param set MC_ROLLRATE_P 0
|
||||
param set MC_ROLLRATE_I 0
|
||||
param set MC_ROLLRATE_D 0
|
||||
param set MC_ROLL_P 5.0
|
||||
param set MC_ROLLRATE_P 0.0
|
||||
param set MC_ROLLRATE_I 0.0
|
||||
param set MC_ROLLRATE_D 0.0
|
||||
param set MC_ROLLRATE_FF 0.15
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_PITCHRATE_P 0
|
||||
param set MC_PITCHRATE_I 0
|
||||
param set MC_PITCHRATE_D 0
|
||||
param set MC_PITCHRATE_P 0.0
|
||||
param set MC_PITCHRATE_I 0.0
|
||||
param set MC_PITCHRATE_D 0.0
|
||||
param set MC_PITCHRATE_FF 0.15
|
||||
param set MC_YAW_P 3
|
||||
param set MC_YAW_P 3.0
|
||||
param set MC_YAWRATE_P 0.1
|
||||
param set MC_YAWRATE_I 0
|
||||
param set MC_YAWRATE_D 0
|
||||
param set MC_ROLLRATE_MAX 720
|
||||
param set MC_PITCHRATE_MAX 720
|
||||
param set MC_YAWRATE_MAX 400
|
||||
param set MC_ACRO_R_MAX 360
|
||||
param set MC_ACRO_P_MAX 360
|
||||
param set MC_YAWRATE_I 0.0
|
||||
param set MC_YAWRATE_D 0.0
|
||||
param set MC_YAW_FF 0.0
|
||||
param set MC_ROLLRATE_MAX 720.0
|
||||
param set MC_PITCHRATE_MAX 720.0
|
||||
param set MC_YAWRATE_MAX 400.0
|
||||
param set MC_ACRO_R_MAX 360.0
|
||||
param set MC_ACRO_P_MAX 360.0
|
||||
|
||||
param set PWM_MIN 1075
|
||||
|
||||
param set MPC_THR_MIN 0.06
|
||||
param set MPC_MANTHR_MIN 0.06
|
||||
|
||||
param set PWM_MIN 1075
|
||||
param set ATT_BIAS_MAX 0.0
|
||||
|
||||
param set CBRK_IO_SAFETY 22027
|
||||
fi
|
||||
+6
-9
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Standard Plane
|
||||
#
|
||||
@@ -21,13 +21,10 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set PWM_AUX_RATE 50
|
||||
param set PWM_RATE 50
|
||||
fi
|
||||
|
||||
set MIXER AETRFG
|
||||
|
||||
# Rate must be set by group (see pwm info).
|
||||
# Throttle is in the same group as servos.
|
||||
set PWM_RATE 50
|
||||
set PWM_AUX_RATE 50
|
||||
|
||||
# rate must be set by group (see pwm info)
|
||||
# throttle is in the same group as servos
|
||||
+15
-15
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Bormatec Maja
|
||||
#
|
||||
@@ -22,24 +22,24 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 10
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
param set FW_AIRSPD_MAX 20
|
||||
param set FW_AIRSPD_MIN 10
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
param set FW_AIRSPD_MAX 20
|
||||
|
||||
param set FW_MAN_P_MAX 55
|
||||
param set FW_MAN_R_MAX 55
|
||||
param set FW_R_LIM 55
|
||||
param set FW_MAN_P_MAX 55
|
||||
param set FW_MAN_R_MAX 55
|
||||
param set FW_R_LIM 55
|
||||
|
||||
param set FW_WR_FF 0.2
|
||||
param set FW_WR_I 0.2
|
||||
param set FW_WR_IMAX 0.8
|
||||
param set FW_WR_P 1
|
||||
param set FW_W_RMAX 0
|
||||
param set FW_WR_FF 0.2
|
||||
param set FW_WR_I 0.2
|
||||
param set FW_WR_IMAX 0.8
|
||||
param set FW_WR_P 1
|
||||
param set FW_W_RMAX 0
|
||||
|
||||
# set disarmed value for the ESC
|
||||
param set PWM_DISARMED 1000
|
||||
# set disarmed value for the ESC
|
||||
param set PWM_DISARMED 1000
|
||||
fi
|
||||
|
||||
set MIXER AAERTWF
|
||||
+15
-15
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Applied Aeronautics Albatross
|
||||
#
|
||||
@@ -23,24 +23,24 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 10
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
param set FW_AIRSPD_MAX 20
|
||||
param set FW_AIRSPD_MIN 10
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
param set FW_AIRSPD_MAX 20
|
||||
|
||||
param set FW_MAN_P_MAX 55
|
||||
param set FW_MAN_R_MAX 55
|
||||
param set FW_R_LIM 55
|
||||
param set FW_MAN_P_MAX 55
|
||||
param set FW_MAN_R_MAX 55
|
||||
param set FW_R_LIM 55
|
||||
|
||||
param set FW_WR_FF 0.2
|
||||
param set FW_WR_I 0.2
|
||||
param set FW_WR_IMAX 0.8
|
||||
param set FW_WR_P 1
|
||||
param set FW_W_RMAX 0
|
||||
param set FW_WR_FF 0.2
|
||||
param set FW_WR_I 0.2
|
||||
param set FW_WR_IMAX 0.8
|
||||
param set FW_WR_P 1
|
||||
param set FW_W_RMAX 0
|
||||
|
||||
# set disarmed value for the ESC
|
||||
param set PWM_DISARMED 1000
|
||||
# set disarmed value for the ESC
|
||||
param set PWM_DISARMED 1000
|
||||
fi
|
||||
|
||||
set MIXER AAVVTWFF
|
||||
+11
-11
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Dodecarotor cox geometry
|
||||
#
|
||||
@@ -25,24 +25,24 @@
|
||||
|
||||
set VEHICLE_TYPE mc
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set NAV_ACC_RAD 2
|
||||
|
||||
param set PWM_AUX_RATE 400
|
||||
param set PWM_AUX_DISARMED 900
|
||||
param set PWM_AUX_MIN 1075
|
||||
param set PWM_AUX_MAX 1950
|
||||
|
||||
param set NAV_ACC_RAD 2.0
|
||||
param set RTL_RETURN_ALT 30.0
|
||||
param set RTL_DESCEND_ALT 10.0
|
||||
param set PWM_MIN 1075
|
||||
param set PWM_MAX 1950
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
param set RTL_RETURN_ALT 30
|
||||
fi
|
||||
|
||||
set PWM_AUX_RATE 400
|
||||
# Note: May Have to set these parameters manually. They don't appear to save.
|
||||
set PWM_AUX_DISARMED 900
|
||||
param set PWM_AUX_MIN 1075
|
||||
param set PWM_AUX_MAX 1950
|
||||
|
||||
set MIXER dodeca_top_cox
|
||||
set MIXER_AUX dodeca_bottom_cox
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Flying Wing
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @maintainer
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
|
||||
fi
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
+5
-4
@@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name IO Camflyer
|
||||
#
|
||||
# @url https://pixhawk.org/platforms/planes/bormatec_camflyer_q
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
@@ -18,7 +20,7 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MAX 15
|
||||
param set FW_AIRSPD_MIN 10
|
||||
@@ -39,11 +41,10 @@ then
|
||||
param set FW_RR_FF 0.6
|
||||
param set FW_RR_IMAX 0.2
|
||||
param set FW_RR_P 0.04
|
||||
|
||||
param set PWM_DISARMED 1000
|
||||
fi
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
# Provide ESC a constant 1000 us pulse while disarmed
|
||||
set PWM_OUT 4
|
||||
set PWM_DISARMED 1000
|
||||
+5
-7
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Phantom FPV Flying Wing
|
||||
#
|
||||
# @url https://docs.px4.io/en/frames_plane/wing_wing_z84.html
|
||||
# @url https://pixhawk.org/platforms/planes/z-84_wing_wing
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 13
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
@@ -40,15 +40,13 @@ then
|
||||
param set FW_RR_P 0.08
|
||||
param set FW_R_LIM 50
|
||||
param set FW_R_RMAX 50
|
||||
|
||||
param set PWM_DISARMED 1000
|
||||
|
||||
# Bottom of bay and nominal zero-pitch attitude differ
|
||||
# the payload bay is pitched up about 7 degrees
|
||||
param set SENS_BOARD_Y_OFF 7
|
||||
param set SENS_BOARD_Y_OFF 7.0
|
||||
fi
|
||||
|
||||
set MIXER phantom
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
set PWM_DISARMED 1000
|
||||
+4
-2
@@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Skywalker X5 Flying Wing
|
||||
#
|
||||
# @url https://pixhawk.org/platforms/planes/skywalker_x5
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
@@ -18,7 +20,7 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 15
|
||||
param set FW_AIRSPD_TRIM 20
|
||||
+6
-9
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Wing Wing (aka Z-84) Flying Wing
|
||||
#
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set BAT_N_CELLS 2
|
||||
param set FW_AIRSPD_MAX 15
|
||||
@@ -39,15 +39,12 @@ then
|
||||
param set FW_PR_FF 0.35
|
||||
param set FW_RR_FF 0.6
|
||||
param set FW_RR_P 0.04
|
||||
|
||||
param set PWM_DISARMED 1000
|
||||
fi
|
||||
|
||||
# Configure this as plane.
|
||||
# Configure this as plane
|
||||
set MAV_TYPE 1
|
||||
|
||||
# Set mixer.
|
||||
# Set mixer
|
||||
set MIXER wingwing
|
||||
|
||||
# Provide ESC a constant 1000 us pulse.
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
set PWM_DISARMED 1000
|
||||
+3
-12
@@ -1,30 +1,21 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name FX-79 Buffalo Flying Wing
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 right aileron
|
||||
# @output MAIN2 left aileron
|
||||
# @output MAIN4 throttle
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set NAV_LOITER_RAD 150
|
||||
param set FW_AIRSPD_MAX 30
|
||||
param set FW_AIRSPD_MIN 13
|
||||
param set FW_AIRSPD_TRIM 15
|
||||
|
||||
param set NAV_LOITER_RAD 150
|
||||
fi
|
||||
|
||||
set MIXER FX79
|
||||
@@ -0,0 +1,15 @@
|
||||
#
|
||||
#!nsh
|
||||
#
|
||||
# @name Viper
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
set MIXER Viper
|
||||
|
||||
+6
-5
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Sparkle Tech Pigeon
|
||||
#
|
||||
@@ -20,14 +20,14 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MIN 15
|
||||
param set FW_AIRSPD_TRIM 20
|
||||
param set FW_AIRSPD_MAX 27
|
||||
param set FW_ATT_TC 0.3
|
||||
param set FW_L1_DAMPING 0.75
|
||||
param set FW_L1_PERIOD 20
|
||||
param set FW_L1_PERIOD 15
|
||||
param set FW_PR_FF 0.35
|
||||
param set FW_PR_IMAX 0.2
|
||||
param set FW_PR_P 0.05
|
||||
@@ -42,14 +42,15 @@ then
|
||||
param set FW_R_RMAX 50
|
||||
param set FW_R_TC 0.3
|
||||
|
||||
param set PWM_DISARMED 1000
|
||||
|
||||
# Bottom of bay and nominal zero-pitch attitude differ
|
||||
# the payload bay is pitched up about 7 degrees
|
||||
param set SENS_BOARD_Y_OFF 11.9
|
||||
|
||||
param set FW_L1_PERIOD 20.0
|
||||
fi
|
||||
|
||||
set MIXER phantom
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
set PWM_DISARMED 1000
|
||||
+13
-13
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Modified Parrot Disco
|
||||
#
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
|
||||
####################################
|
||||
@@ -37,7 +37,7 @@ then
|
||||
|
||||
param set FW_L1_PERIOD 20 #units of meters
|
||||
|
||||
# Damping factor for L1 control (def = 0.75)
|
||||
#Damping factor for L1 control (def = 0.75)
|
||||
param set FW_L1_DAMPING 0.75
|
||||
|
||||
####################################
|
||||
@@ -48,32 +48,32 @@ then
|
||||
param set FW_P_LIM_MAX 45
|
||||
param set FW_P_LIM_MIN -45
|
||||
|
||||
# Time Constant (def = 0.4s)
|
||||
# Time Constant (def = 0.4s)
|
||||
param set FW_P_TC 0.4
|
||||
|
||||
# Pitch rate feed forward (def = 0.5 %/rad/sec)
|
||||
param set FW_PR_FF 0.35
|
||||
|
||||
|
||||
# Pitch rate integrator limit (def = 0.4)
|
||||
param set FW_PR_IMAX 0.4
|
||||
|
||||
|
||||
# Pitch rate proportional gain (def = 0.08 %/rad/sec)
|
||||
param set FW_PR_P 0.08
|
||||
|
||||
|
||||
####################################
|
||||
# Roll
|
||||
####################################
|
||||
|
||||
# Basic limits (def = 50 deg)
|
||||
# Basic limits (def = 50 deg)
|
||||
param set FW_R_LIM 40
|
||||
|
||||
|
||||
# Roll rate upper limit (def = 70 deg/s)
|
||||
param set FW_R_RMAX 50
|
||||
|
||||
# Roll Time Constant (def = 0.4 s)
|
||||
param set FW_R_TC 0.4
|
||||
param set FW_R_TC 0.4
|
||||
|
||||
# Roll rate feed forward (def = 0.5 %/rad/sec)
|
||||
# Roll rate feed forward (def = 0.5 %/rad/sec)
|
||||
param set FW_RR_FF 0.5
|
||||
|
||||
# Roll rate proportional Gain (def = 0.05 %/rad/sec)
|
||||
@@ -81,11 +81,11 @@ then
|
||||
|
||||
# Roll Integrator Anti-Windup
|
||||
param set FW_RR_IMAX 0.2
|
||||
|
||||
param set PWM_DISARMED 1000
|
||||
|
||||
fi
|
||||
|
||||
set MIXER fw_generic_wing.main.mix
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
set PWM_DISARMED 1000
|
||||
+13
-23
@@ -1,28 +1,27 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name TBS Caipirinha
|
||||
#
|
||||
# @type Flying Wing
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 left aileron
|
||||
# @output MAIN2 right aileron
|
||||
# @output MAIN4 throttle
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.fw_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
if [ $AUTOCNF == yes ]
|
||||
then
|
||||
param set FW_AIRSPD_MAX 25
|
||||
param set FW_AIRSPD_MIN 12.5
|
||||
param set FW_AIRSPD_TRIM 16.5
|
||||
param set LNDFW_AIRSPD_MAX 6
|
||||
param set LNDFW_VELI_MAX 4
|
||||
param set LNDFW_VEL_XY_MAX 3
|
||||
param set LNDFW_VEL_Z_MAX 5
|
||||
param set FW_R_TC 0.4
|
||||
param set FW_P_TC 0.4
|
||||
param set FW_THR_CRUISE 0.55
|
||||
param set FW_L1_DAMPING 0.75
|
||||
param set FW_L1_PERIOD 15
|
||||
param set FW_LND_ANG 15
|
||||
@@ -34,8 +33,6 @@ then
|
||||
param set FW_P_LIM_MAX 20
|
||||
param set FW_P_LIM_MIN -30
|
||||
param set FW_R_LIM 45
|
||||
param set FW_R_TC 0.4
|
||||
param set FW_P_TC 0.4
|
||||
param set FW_PR_FF 0.45
|
||||
param set FW_PR_IMAX 0.4
|
||||
param set FW_PR_P 0.005
|
||||
@@ -45,21 +42,14 @@ then
|
||||
param set FW_P_RMAX_NEG 70
|
||||
param set FW_P_RMAX_POS 70
|
||||
param set FW_R_RMAX 70
|
||||
param set FW_THR_CRUISE 0.55
|
||||
|
||||
param set LNDFW_AIRSPD_MAX 6
|
||||
param set LNDFW_XYACC_MAX 4
|
||||
param set LNDFW_VEL_XY_MAX 3
|
||||
param set LNDFW_VEL_Z_MAX 5
|
||||
|
||||
param set MIS_TAKEOFF_ALT 50
|
||||
|
||||
param set NAV_LOITER_RAD 30
|
||||
|
||||
param set SYS_COMPANION 157600
|
||||
param set PWM_MAIN_REV1 1
|
||||
param set PWM_MAIN_REV2 1
|
||||
param set PWM_DISARMED 0
|
||||
param set PWM_MIN 900
|
||||
param set PWM_MAX 2100
|
||||
param set MIS_TAKEOFF_ALT 50
|
||||
param set NAV_LOITER_RAD 30
|
||||
fi
|
||||
|
||||
set MIXER caipi
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Quadrotor x
|
||||
#
|
||||
+3
-6
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!nsh
|
||||
#
|
||||
# @name Generic Quadrotor x with mount (e.g. gimbal)
|
||||
#
|
||||
@@ -22,13 +22,10 @@
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set PWM_AUX_RATE 50
|
||||
fi
|
||||
|
||||
set MIXER quad_x
|
||||
set PWM_OUT 1234
|
||||
|
||||
set MIXER_AUX mount
|
||||
set PWM_AUX_OUT 123456
|
||||
set PWM_AUX_RATE 50
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user