mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-24 04:17:34 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 054b8093de |
+7
-10
@@ -61,20 +61,18 @@ pipeline {
|
||||
"holybro_kakutef7_default",
|
||||
"holybro_kakuteh7_default",
|
||||
"holybro_pix32v5_default",
|
||||
"matek_h743-slim",
|
||||
"matek_gnss-m9n-f4_canbootloader",
|
||||
"matek_gnss-m9n-f4_default",
|
||||
"matek_h743-mini_default",
|
||||
"matek_h743-slim_default",
|
||||
"matek_h743_default",
|
||||
"modalai_fc-v1_default",
|
||||
"modalai_fc-v1_rtps",
|
||||
"modalai_fc-v2_default",
|
||||
"mro_ctrl-zero-f7_default",
|
||||
"mro_ctrl-zero-f7-oem_default",
|
||||
"mro_ctrl-zero-h7-oem_default",
|
||||
"mro_ctrl-zero-h7-oem_rtps",
|
||||
"mro_ctrl-zero-h7_default",
|
||||
"mro_ctrl-zero-h7_rtps",
|
||||
"mro_ctrl-zero-h7-oem_default",
|
||||
"mro_ctrl-zero-h7-oem_rtps",
|
||||
"mro_pixracerpro_default",
|
||||
"mro_pixracerpro_rtps",
|
||||
"mro_x21-777_default",
|
||||
@@ -89,27 +87,26 @@ pipeline {
|
||||
"nxp_ucans32k146_canbootloader",
|
||||
"nxp_ucans32k146_default",
|
||||
"omnibus_f4sd_default",
|
||||
"raspberrypi_pico_default",
|
||||
"px4_fmu-v2_default",
|
||||
"px4_fmu-v2_fixedwing",
|
||||
"px4_fmu-v2_lto",
|
||||
"px4_fmu-v2_multicopter",
|
||||
"px4_fmu-v2_rover",
|
||||
"px4_fmu-v2_lto",
|
||||
"px4_fmu-v3_default",
|
||||
"px4_fmu-v4_default",
|
||||
"px4_fmu-v4pro_default",
|
||||
"px4_fmu-v5_cyphal",
|
||||
"px4_fmu-v5_debug",
|
||||
"px4_fmu-v5_default",
|
||||
"px4_fmu-v5_lto",
|
||||
"px4_fmu-v5_rtps",
|
||||
"px4_fmu-v5_stackcheck",
|
||||
"px4_fmu-v5_uavcanv0periph",
|
||||
"px4_fmu-v5_uavcanv1",
|
||||
"px4_fmu-v5_lto",
|
||||
"px4_fmu-v5x_default",
|
||||
"px4_fmu-v6c_default",
|
||||
"px4_fmu-v6u_default",
|
||||
"px4_fmu-v6x_default",
|
||||
"px4_io-v2_default",
|
||||
"raspberrypi_pico_default",
|
||||
"sky-drones_smartap-airlink_default",
|
||||
"spracing_h7extreme_default",
|
||||
"uvify_core_default"
|
||||
|
||||
@@ -794,7 +794,7 @@ void resetParameters() {
|
||||
void runTests() {
|
||||
|
||||
// test loading a range of airframes
|
||||
sh './Tools/HIL/test_airframes.sh `find /dev/serial -name *usb-*` 2100 3000 4001 6001 8001 10016'
|
||||
sh './Tools/HIL/test_airframes.sh `find /dev/serial -name *usb-*` 1000 1001 2100 3000 4001 6001 8001 10016'
|
||||
|
||||
resetParameters()
|
||||
|
||||
@@ -809,9 +809,6 @@ void runTests() {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ostest"'
|
||||
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot after ostest
|
||||
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander_tests" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "controllib_test"'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "lightware_laser_test"'
|
||||
@@ -867,15 +864,12 @@ void printTopics() {
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener cpuload" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener distance_sensor" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener ekf2_timestamps" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_gps_status" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener esc_status" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_fake_pos" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_gnss_pos" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_gnss_vel" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_attitude" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_baro_bias" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_event_flags" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_global_position" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_gps_status" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovation_test_ratios" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovation_variances" || true'
|
||||
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovations" || true'
|
||||
|
||||
+2
-10
@@ -1,17 +1,11 @@
|
||||
---
|
||||
Checks: '*,
|
||||
-*-avoid-c-arrays,
|
||||
-*-uppercase-literal-suffix,
|
||||
-*-magic-numbers,
|
||||
-altera-id-dependent-backward-branch,
|
||||
-altera-unroll-loops,
|
||||
-android*,
|
||||
-bugprone-integer-division,
|
||||
-cert-dcl50-cpp,
|
||||
-cert-env33-c,
|
||||
-cert-err34-c,
|
||||
-cert-err58-cpp,
|
||||
-cert-flp30-c,
|
||||
-cert-msc30-c,
|
||||
-cert-msc50-cpp,
|
||||
-clang-analyzer-core.CallAndMessage,
|
||||
@@ -24,7 +18,6 @@ Checks: '*,
|
||||
-clang-analyzer-deadcode.DeadStores,
|
||||
-clang-analyzer-optin.cplusplus.VirtualCall,
|
||||
-clang-analyzer-optin.performance.Padding,
|
||||
-clang-analyzer-security.FloatLoopCounter,
|
||||
-clang-analyzer-security.insecureAPI.strcpy,
|
||||
-clang-analyzer-unix.API,
|
||||
-clang-analyzer-unix.cstring.BadSizeArg,
|
||||
@@ -44,7 +37,8 @@ Checks: '*,
|
||||
-cppcoreguidelines-pro-type-union-access,
|
||||
-cppcoreguidelines-pro-type-vararg,
|
||||
-cppcoreguidelines-special-member-functions,
|
||||
-fuchsia-*,
|
||||
-fuchsia-default-arguments,
|
||||
-fuchsia-overloaded-operator,
|
||||
-google-build-using-namespace,
|
||||
-google-explicit-constructor,
|
||||
-google-global-names-in-headers,
|
||||
@@ -68,7 +62,6 @@ Checks: '*,
|
||||
-hicpp-use-equals-delete,
|
||||
-hicpp-use-override,
|
||||
-hicpp-vararg,
|
||||
-llvmlibc-*,
|
||||
-llvm-header-guard,
|
||||
-llvm-include-order,
|
||||
-llvm-namespace-comment,
|
||||
@@ -91,7 +84,6 @@ Checks: '*,
|
||||
-modernize-use-override,
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-use-using,
|
||||
-modernize-use-trailing-return-type,
|
||||
-performance-inefficient-string-concatenation,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-readability-container-size-empty,
|
||||
|
||||
@@ -1,34 +1,32 @@
|
||||
---
|
||||
name: 🐛 Bug report
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
labels: bug-report
|
||||
|
||||
---
|
||||
|
||||
## Describe the bug
|
||||
**Describe the bug**
|
||||
A clear and concise description of the bug.
|
||||
|
||||
## To Reproduce
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Drone switched on '...'
|
||||
2. Uploaded mission '....' (attach QGC mission file)
|
||||
3. Took off '....'
|
||||
4. See error
|
||||
|
||||
## Expected behavior
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
## Log Files and Screenshots
|
||||
**Log Files and Screenshots**
|
||||
*Always* provide a link to the flight log file:
|
||||
- Download the flight log file from the vehicle ([tutorial](https://docs.px4.io/master/en/getting_started/flight_reporting.html)).
|
||||
- Upload the log to the [PX4 Flight Review](http://logs.px4.io/)
|
||||
- Share the link to the log (Copy and paste the URL of the log)
|
||||
- Share the link to a log showing the problem on [PX4 Flight Review](http://logs.px4.io/).
|
||||
|
||||
Add screenshots to help explain your problem.
|
||||
|
||||
## Drone (please complete the following information):
|
||||
**Drone (please complete the following information):**
|
||||
- Describe the type of drone.
|
||||
- Photo of the IMU / autopilot setup if possible.
|
||||
|
||||
## Additional context
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
---
|
||||
name: 🚀 Feature Request
|
||||
about: Suggest an idea for this project
|
||||
labels: feature-request
|
||||
|
||||
---
|
||||
|
||||
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or Slack (you can find an invite link on this project README).
|
||||
|
||||
## Describe problem solved by the proposed feature
|
||||
**Describe problem solved by the proposed feature**
|
||||
A clear and concise description of the problem, if any, this feature will solve. E.g. I'm always frustrated when ...
|
||||
|
||||
## Describe your preferred solution
|
||||
**Describe your preferred solution**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
## Describe possible alternatives
|
||||
**Describe possible alternatives**
|
||||
A clear and concise description of alternative solutions or features you've considered.
|
||||
|
||||
## Additional context
|
||||
**Additional context**
|
||||
Add any other context or screenshots for the feature request here.
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
---
|
||||
name: ⛔ Support Question
|
||||
about: See http://discuss.px4.io/ for questions about using PX4.
|
||||
about: See [PX4 Discuss](http://discuss.px4.io/) for questions about using PX4.
|
||||
|
||||
---
|
||||
|
||||
## Attention! Please read the note below
|
||||
|
||||
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/).**
|
||||
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,11 +1,9 @@
|
||||
---
|
||||
name: ⛔ Documentation Issue
|
||||
about: See https://github.com/PX4/px4_user_guide for documentation issues
|
||||
about: See https://github.com/PX4/Devguide for documentation issues
|
||||
|
||||
---
|
||||
|
||||
## Attention! Please read the note below
|
||||
|
||||
**Please submit the documentation issue to the [User Guide](https://github.com/PX4/px4_user_guide) repository.**
|
||||
PX4 has dedicated repositories for developer documentation (https://github.com/PX4/Devguide) and user documentation (https://github.com/PX4/px4_user_guide).
|
||||
|
||||
Thanks!
|
||||
|
||||
@@ -37,10 +37,8 @@ jobs:
|
||||
holybro_kakutef7,
|
||||
holybro_kakuteh7,
|
||||
holybro_pix32v5,
|
||||
matek_gnss-m9n-f4,
|
||||
matek_h743,
|
||||
matek_h743-mini,
|
||||
matek_h743-slim,
|
||||
matek_gnss-m9n-f4,
|
||||
modalai_fc-v1,
|
||||
modalai_fc-v2,
|
||||
mro_ctrl-zero-f7,
|
||||
@@ -55,16 +53,15 @@ jobs:
|
||||
nxp_fmurt1062-v1,
|
||||
nxp_ucans32k146,
|
||||
omnibus_f4sd,
|
||||
raspberrypi_pico,
|
||||
px4_fmu-v2,
|
||||
px4_fmu-v3,
|
||||
px4_fmu-v4,
|
||||
px4_fmu-v4pro,
|
||||
px4_fmu-v5,
|
||||
px4_fmu-v5x,
|
||||
px4_fmu-v6c,
|
||||
px4_fmu-v6u,
|
||||
px4_fmu-v6x,
|
||||
raspberrypi_pico,
|
||||
sky-drones_smartap-airlink,
|
||||
spracing_h7extreme,
|
||||
uvify_core
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
name: docker-dev
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: file_changes
|
||||
uses: trilom/file-changes-action@v1.2.3
|
||||
- name: test
|
||||
run: |
|
||||
echo '${{ steps.file_changes.outputs.files}}'
|
||||
echo '${{ steps.file_changes.outputs.files_modified}}'
|
||||
echo '${{ steps.file_changes.outputs.files_added}}'
|
||||
echo '${{ steps.file_changes.outputs.files_removed}}'
|
||||
+8
-8
@@ -36,14 +36,14 @@
|
||||
[submodule "Tools/jsbsim_bridge"]
|
||||
path = Tools/jsbsim_bridge
|
||||
url = https://github.com/PX4/px4-jsbsim-bridge.git
|
||||
[submodule "src/drivers/cyphal/libcanard"]
|
||||
path = src/drivers/cyphal/libcanard
|
||||
url = https://github.com/opencyphal/libcanard.git
|
||||
[submodule "src/drivers/cyphal/public_regulated_data_types"]
|
||||
path = src/drivers/cyphal/public_regulated_data_types
|
||||
url = https://github.com/opencyphal/public_regulated_data_types.git
|
||||
[submodule "src/drivers/cyphal/legacy_data_types"]
|
||||
path = src/drivers/cyphal/legacy_data_types
|
||||
[submodule "src/drivers/uavcan_v1/libcanard"]
|
||||
path = src/drivers/uavcan_v1/libcanard
|
||||
url = https://github.com/UAVCAN/libcanard.git
|
||||
[submodule "src/drivers/uavcan_v1/public_regulated_data_types"]
|
||||
path = src/drivers/uavcan_v1/public_regulated_data_types
|
||||
url = https://github.com/UAVCAN/public_regulated_data_types.git
|
||||
[submodule "src/drivers/uavcan_v1/legacy_data_types"]
|
||||
path = src/drivers/uavcan_v1/legacy_data_types
|
||||
url = https://github.com/PX4/public_regulated_data_types.git
|
||||
branch = legacy
|
||||
[submodule "src/lib/crypto/monocypher"]
|
||||
|
||||
@@ -9,5 +9,3 @@ launch.json
|
||||
ipch/
|
||||
|
||||
browse.vc.db*
|
||||
|
||||
*.log
|
||||
|
||||
Vendored
+2
@@ -126,6 +126,8 @@
|
||||
},
|
||||
"search.showLineNumbers": true,
|
||||
"telemetry.enableTelemetry": false,
|
||||
"terminal.integrated.copyOnSelection": true,
|
||||
"terminal.integrated.rightClickBehavior": "paste",
|
||||
"terminal.integrated.scrollback": 5000,
|
||||
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
|
||||
"workbench.editor.highlightModifiedTabs": true,
|
||||
|
||||
@@ -175,12 +175,6 @@ include(kconfig)
|
||||
message(STATUS "PX4 config: ${PX4_CONFIG}")
|
||||
message(STATUS "PX4 platform: ${PX4_PLATFORM}")
|
||||
|
||||
if($ENV{CLION_IDE})
|
||||
# CLion automatically executes some compiler commands after configuring the
|
||||
# project. This would fail on NuttX, as visibility.h tries to (indirectly)
|
||||
# include nuttx/config.h, which at that point does not exist yet
|
||||
add_definitions(-DPX4_DISABLE_GCC_POISON)
|
||||
endif()
|
||||
|
||||
if(${PX4_PLATFORM} STREQUAL "posix")
|
||||
if(ENABLE_LOCKSTEP_SCHEDULER)
|
||||
|
||||
@@ -325,13 +325,12 @@ px4io_update: px4_io-v2_default cubepilot_io-v2_default
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v5/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v5x/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v6x/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v6c/extras/px4_io-v2_default.bin
|
||||
# cubepilot_io-v2_default
|
||||
cp build/cubepilot_io-v2_default/cubepilot_io-v2_default.bin boards/cubepilot/cubeorange/extras/cubepilot_io-v2_default.bin
|
||||
cp build/cubepilot_io-v2_default/cubepilot_io-v2_default.bin boards/cubepilot/cubeyellow/extras/cubepilot_io-v2_default.bin
|
||||
git status
|
||||
|
||||
bootloaders_update: cuav_nora_bootloader cuav_x7pro_bootloader cubepilot_cubeorange_bootloader holybro_durandal-v1_bootloader holybro_kakuteh7_bootloader matek_h743_bootloader matek_h743-mini_bootloader matek_h743-slim_bootloader modalai_fc-v2_bootloader mro_ctrl-zero-classic_bootloader mro_ctrl-zero-h7_bootloader mro_ctrl-zero-h7-oem_bootloader mro_pixracerpro_bootloader px4_fmu-v6c_bootloader px4_fmu-v6u_bootloader px4_fmu-v6x_bootloader
|
||||
bootloaders_update: cuav_nora_bootloader cuav_x7pro_bootloader cubepilot_cubeorange_bootloader holybro_durandal-v1_bootloader matek_h743-slim_bootloader modalai_fc-v2_bootloader mro_ctrl-zero-classic_bootloader mro_ctrl-zero-h7_bootloader mro_ctrl-zero-h7-oem_bootloader mro_pixracerpro_bootloader px4_fmu-v6u_bootloader px4_fmu-v6x_bootloader
|
||||
git status
|
||||
|
||||
.PHONY: coverity_scan
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
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 this pull request
|
||||
A clear and concise description of the problem this proposed change will solve. Or, what it will improve.
|
||||
**Describe problem solved by this pull request**
|
||||
A clear and concise description of the problem this proposed change will solve.
|
||||
E.g. For this use case I ran into...
|
||||
|
||||
## Describe your solution
|
||||
**Describe your solution**
|
||||
A clear and concise description of what you have implemented.
|
||||
|
||||
## Describe possible alternatives
|
||||
**Describe possible alternatives**
|
||||
A clear and concise description of alternative solutions or features you've considered.
|
||||
|
||||
## Test data / coverage
|
||||
**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.
|
||||
|
||||
## Additional context
|
||||
**Additional context**
|
||||
Add any other related context or media.
|
||||
@@ -6,38 +6,38 @@
|
||||
|
||||
[](https://join.slack.com/t/px4/shared_invite/zt-si4xo5qs-R4baYFmMjlrT4rQK5yUnaA)
|
||||
|
||||
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/PX4-Autopilot/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
|
||||
PX4 is highly portable, OS-independent and supports Linux, NuttX and MacOS out of the box.
|
||||
|
||||
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/PX4-Autopilot/blob/master/LICENSE))
|
||||
* [Supported airframes](https://docs.px4.io/main/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
|
||||
* [Multicopters](https://docs.px4.io/main/en/frames_multicopter/)
|
||||
* [Fixed wing](https://docs.px4.io/main/en/frames_plane/)
|
||||
* [VTOL](https://docs.px4.io/main/en/frames_vtol/)
|
||||
* [Autogyro](https://docs.px4.io/main/en/frames_autogyro/)
|
||||
* [Rover](https://docs.px4.io/main/en/frames_rover/)
|
||||
* [Supported airframes](https://docs.px4.io/master/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
|
||||
* [Multicopters](https://docs.px4.io/master/en/frames_multicopter/)
|
||||
* [Fixed wing](https://docs.px4.io/master/en/frames_plane/)
|
||||
* [VTOL](https://docs.px4.io/master/en/frames_vtol/)
|
||||
* [Autogyro](https://docs.px4.io/master/en/frames_autogyro/)
|
||||
* [Rover](https://docs.px4.io/master/en/frames_rover/)
|
||||
* many more experimental types (Blimps, Boats, Submarines, High altitude balloons, etc)
|
||||
* Releases: [Downloads](https://github.com/PX4/PX4-Autopilot/releases)
|
||||
|
||||
|
||||
## Building a PX4 based drone, rover, boat or robot
|
||||
|
||||
The [PX4 User Guide](https://docs.px4.io/main/en/) explains how to assemble [supported vehicles](https://docs.px4.io/main/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
See the [forum and chat](https://docs.px4.io/main/en/#getting-help) if you need help!
|
||||
The [PX4 User Guide](https://docs.px4.io/master/en/) explains how to assemble [supported vehicles](https://docs.px4.io/master/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
See the [forum and chat](https://docs.px4.io/master/en/#support) if you need help!
|
||||
|
||||
|
||||
## Changing code and contributing
|
||||
|
||||
This [Developer Guide](https://docs.px4.io/main/en/development/development.html) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
|
||||
This [Developer Guide](https://docs.px4.io/master/en/development/development.html) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
|
||||
|
||||
Developers should read the [Guide for Contributions](https://docs.px4.io/main/en/contribute/).
|
||||
See the [forum and chat](https://docs.px4.io/main/en/#getting-help) if you need help!
|
||||
Developers should read the [Guide for Contributions](https://docs.px4.io/master/en/contribute/).
|
||||
See the [forum and chat](https://dev.px4.io/master/en/#support) if you need help!
|
||||
|
||||
|
||||
### Weekly Dev Call
|
||||
|
||||
The PX4 Dev Team syncs up on a [weekly dev call](https://docs.px4.io/main/en/contribute/).
|
||||
The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/master/en/contribute/#dev_call).
|
||||
|
||||
> **Note** The dev call is open to all interested developers (not just the core dev team). This is a great opportunity to meet the team and contribute to the ongoing development of the platform. It includes a QA session for newcomers. All regular calls are listed in the [Dronecode calendar](https://www.dronecode.org/calendar/).
|
||||
|
||||
@@ -88,43 +88,35 @@ This repository contains code supporting Pixhawk standard boards (best supported
|
||||
* FMUv6X and FMUv6U (STM32H7, 2021)
|
||||
* Various vendors will provide FMUv6X and FMUv6U based designs Q3/2021
|
||||
* FMUv5 and FMUv5X (STM32F7, 2019/20)
|
||||
* [Pixhawk 4 (FMUv5)](https://docs.px4.io/main/en/flight_controller/pixhawk4.html)
|
||||
* [Pixhawk 4 mini (FMUv5)](https://docs.px4.io/main/en/flight_controller/pixhawk4_mini.html)
|
||||
* [CUAV V5+ (FMUv5)](https://docs.px4.io/main/en/flight_controller/cuav_v5_plus.html)
|
||||
* [CUAV V5 nano (FMUv5)](https://docs.px4.io/main/en/flight_controller/cuav_v5_nano.html)
|
||||
* [Auterion Skynode (FMUv5X)](https://docs.auterion.com/skynode)
|
||||
* [Pixhawk 4 (FMUv5)](https://docs.px4.io/master/en/flight_controller/pixhawk4.html)
|
||||
* [Pixhawk 4 mini (FMUv5)](https://docs.px4.io/master/en/flight_controller/pixhawk4_mini.html)
|
||||
* [CUAV V5+ (FMUv5)](https://docs.px4.io/master/en/flight_controller/cuav_v5_plus.html)
|
||||
* [CUAV V5 nano (FMUv5)](https://docs.px4.io/master/en/flight_controller/cuav_v5_nano.html)
|
||||
* [Auterion Skynode (FMUv5X)](https://docs.px4.io/master/en/flight_controller/auterion_skynode.html)
|
||||
* FMUv4 (STM32F4, 2015)
|
||||
* [Pixracer](https://docs.px4.io/main/en/flight_controller/pixracer.html)
|
||||
* [Pixhawk 3 Pro](https://docs.px4.io/main/en/flight_controller/pixhawk3_pro.html)
|
||||
* [Pixracer](https://docs.px4.io/master/en/flight_controller/pixracer.html)
|
||||
* [Pixhawk 3 Pro](https://docs.px4.io/master/en/flight_controller/pixhawk3_pro.html)
|
||||
* FMUv3 (STM32F4, 2014)
|
||||
* [Pixhawk 2](https://docs.px4.io/main/en/flight_controller/pixhawk-2.html)
|
||||
* [Pixhawk Mini](https://docs.px4.io/main/en/flight_controller/pixhawk_mini.html)
|
||||
* [CUAV Pixhack v3](https://docs.px4.io/main/en/flight_controller/pixhack_v3.html)
|
||||
* [Pixhawk 2](https://docs.px4.io/master/en/flight_controller/pixhawk-2.html)
|
||||
* [Pixhawk Mini](https://docs.px4.io/master/en/flight_controller/pixhawk_mini.html)
|
||||
* [CUAV Pixhack v3](https://docs.px4.io/master/en/flight_controller/pixhack_v3.html)
|
||||
* FMUv2 (STM32F4, 2013)
|
||||
* [Pixhawk](https://docs.px4.io/main/en/flight_controller/pixhawk.html)
|
||||
* [Pixfalcon](https://docs.px4.io/main/en/flight_controller/pixfalcon.html)
|
||||
* [Pixhawk](https://docs.px4.io/master/en/flight_controller/pixhawk.html)
|
||||
* [Pixfalcon](https://docs.px4.io/master/en/flight_controller/pixfalcon.html)
|
||||
|
||||
### Manufacturer and Community supported
|
||||
* [Holybro Durandal](https://docs.px4.io/main/en/flight_controller/durandal.html)
|
||||
* [Hex Cube Orange](https://docs.px4.io/main/en/flight_controller/cubepilot_cube_orange.html)
|
||||
* [Hex Cube Yellow](https://docs.px4.io/main/en/flight_controller/cubepilot_cube_yellow.html)
|
||||
* [Holybro Durandal](https://docs.px4.io/master/en/flight_controller/durandal.html)
|
||||
* [Hex Cube Orange](https://docs.px4.io/master/en/flight_controller/cubepilot_cube_orange.html)
|
||||
* [Hex Cube Yellow](https://docs.px4.io/master/en/flight_controller/cubepilot_cube_yellow.html)
|
||||
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
|
||||
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/main/en/complete_vehicles/crazyflie2.html)
|
||||
* [Omnibus F4 SD](https://docs.px4.io/main/en/flight_controller/omnibus_f4_sd.html)
|
||||
* [Holybro Kakute F7](https://docs.px4.io/main/en/flight_controller/kakutef7.html)
|
||||
* [Raspberry PI with Navio 2](https://docs.px4.io/main/en/flight_controller/raspberry_pi_navio2.html)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/master/en/complete_vehicles/crazyflie2.html)
|
||||
* [Omnibus F4 SD](https://docs.px4.io/master/en/flight_controller/omnibus_f4_sd.html)
|
||||
* [Holybro Kakute F7](https://docs.px4.io/master/en/flight_controller/kakutef7.html)
|
||||
* [Raspberry PI with Navio 2](https://docs.px4.io/master/en/flight_controller/raspberry_pi_navio2.html)
|
||||
|
||||
Additional information about supported hardware can be found in [PX4 user Guide > Autopilot Hardware](https://docs.px4.io/main/en/flight_controller/).
|
||||
Additional information about supported hardware can be found in [PX4 user Guide > Autopilot Hardware](https://docs.px4.io/master/en/flight_controller/).
|
||||
|
||||
## Project Roadmap
|
||||
|
||||
A high level project roadmap is available [here](https://github.com/orgs/PX4/projects/25).
|
||||
|
||||
## Project Governance
|
||||
|
||||
The PX4 Autopilot project including all of its trademarks is hosted under [Dronecode](https://www.dronecode.org/), part of the Linux Foundation.
|
||||
|
||||
<a href="https://www.dronecode.org/" style="padding:20px" ><img src="https://mavlink.io/assets/site/logo_dronecode.png" alt="Dronecode Logo" width="110px"/></a>
|
||||
<a href="https://www.linuxfoundation.org/projects" style="padding:20px;"><img src="https://mavlink.io/assets/site/logo_linux_foundation.png" alt="Linux Foundation Logo" width="80px" /></a>
|
||||
<div style="padding:10px"> </div>
|
||||
|
||||
+15
-9
@@ -112,17 +112,23 @@ add_custom_command(
|
||||
${PX4_SOURCE_DIR}/Tools/px4airframes/xmlout.py
|
||||
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
|
||||
)
|
||||
set(romfs_extract_stamp ${CMAKE_CURRENT_BINARY_DIR}/romfs_extract.stamp)
|
||||
add_custom_command(
|
||||
OUTPUT ${romfs_extract_stamp}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_extract_stamp}
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
DEPENDS ${romfs_tar_file}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
|
||||
set(romfs_copy_stamp ${CMAKE_CURRENT_BINARY_DIR}/romfs_copy.stamp)
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/rc.serial
|
||||
${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
${romfs_gen_root_dir}/init.d/rc.autostart.post
|
||||
${romfs_copy_stamp}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
|
||||
romfs_copy.stamp
|
||||
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
|
||||
@@ -131,9 +137,9 @@ add_custom_command(
|
||||
--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}
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
DEPENDS ${romfs_tar_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch romfs_copy.stamp
|
||||
DEPENDS
|
||||
${romfs_extract_stamp}
|
||||
COMMENT "ROMFS: copying, generating airframes"
|
||||
)
|
||||
|
||||
@@ -305,7 +311,7 @@ add_custom_command(OUTPUT romfs_extras.stamp
|
||||
|
||||
add_custom_target(romfs_gen_files_target
|
||||
DEPENDS
|
||||
${romfs_copy_stamp}
|
||||
${romfs_extract_stamp}
|
||||
${romfs_gen_root_dir}/init.d/rc.serial
|
||||
romfs_extras.stamp
|
||||
)
|
||||
|
||||
@@ -86,28 +86,10 @@ unset BOARD_RC_SENSORS
|
||||
. ${R}etc/init.d/rc.serial
|
||||
|
||||
# Check for flow sensor
|
||||
if param compare -s SENS_EN_PX4FLOW 1
|
||||
if param compare SENS_EN_PX4FLOW 1
|
||||
then
|
||||
px4flow start -X &
|
||||
fi
|
||||
|
||||
if param compare -s IMU_GYRO_CAL_EN 1
|
||||
then
|
||||
gyro_calibration start
|
||||
fi
|
||||
|
||||
|
||||
if param compare -s MBE_ENABLE 1
|
||||
then
|
||||
# conservative mag bias estimation
|
||||
param set-default MBE_LEARN_GAIN 5
|
||||
param set-default IMU_GYRO_CUTOFF 20
|
||||
mag_bias_estimator start
|
||||
fi
|
||||
|
||||
param set-default SENS_MAG_RATE 100
|
||||
|
||||
sensors start
|
||||
|
||||
uavcannode start
|
||||
unset R
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 6DoF Omnicopter SITL
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
# @maintainer Jaeyoung Lim <jalim@ethz.ch>
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
|
||||
|
||||
param set-default CA_AIRFRAME 0
|
||||
|
||||
param set-default CA_ROTOR_COUNT 8
|
||||
param set-default CA_R_REV 255
|
||||
|
||||
param set-default CA_ROTOR0_PX 0.14435
|
||||
param set-default CA_ROTOR0_PY -0.14435
|
||||
param set-default CA_ROTOR0_PZ -0.14435
|
||||
param set-default CA_ROTOR0_KM 0.05 # CCW
|
||||
param set-default CA_ROTOR0_AX -0.788675
|
||||
param set-default CA_ROTOR0_AY -0.211325
|
||||
param set-default CA_ROTOR0_AZ -0.57735
|
||||
|
||||
param set-default CA_ROTOR1_PX -0.14435
|
||||
param set-default CA_ROTOR1_PY -0.14435
|
||||
param set-default CA_ROTOR1_PZ -0.14435
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR1_AX 0.211325
|
||||
param set-default CA_ROTOR1_AY -0.788675
|
||||
param set-default CA_ROTOR1_AZ 0.57735
|
||||
|
||||
param set-default CA_ROTOR2_PX 0.14435
|
||||
param set-default CA_ROTOR2_PY 0.14435
|
||||
param set-default CA_ROTOR2_PZ -0.14435
|
||||
param set-default CA_ROTOR2_KM 0.05
|
||||
param set-default CA_ROTOR2_AX -0.211325
|
||||
param set-default CA_ROTOR2_AY 0.788675
|
||||
param set-default CA_ROTOR2_AZ 0.57735
|
||||
|
||||
param set-default CA_ROTOR3_PX -0.14435
|
||||
param set-default CA_ROTOR3_PY 0.14435
|
||||
param set-default CA_ROTOR3_PZ -0.14435
|
||||
param set-default CA_ROTOR3_KM 0.05
|
||||
param set-default CA_ROTOR3_AX 0.788675
|
||||
param set-default CA_ROTOR3_AY 0.211325
|
||||
param set-default CA_ROTOR3_AZ -0.57735
|
||||
|
||||
param set-default CA_ROTOR4_PX 0.14435
|
||||
param set-default CA_ROTOR4_PY -0.14435
|
||||
param set-default CA_ROTOR4_PZ 0.14435
|
||||
param set-default CA_ROTOR4_KM 0.05
|
||||
param set-default CA_ROTOR4_AX 0.788675
|
||||
param set-default CA_ROTOR4_AY 0.211325
|
||||
param set-default CA_ROTOR4_AZ -0.57735
|
||||
|
||||
param set-default CA_ROTOR5_PX -0.14435
|
||||
param set-default CA_ROTOR5_PY -0.14435
|
||||
param set-default CA_ROTOR5_PZ 0.14435
|
||||
param set-default CA_ROTOR5_KM 0.05
|
||||
param set-default CA_ROTOR5_AX -0.211325
|
||||
param set-default CA_ROTOR5_AY 0.788675
|
||||
param set-default CA_ROTOR5_AZ 0.57735
|
||||
|
||||
param set-default CA_ROTOR6_PX 0.14435
|
||||
param set-default CA_ROTOR6_PY 0.14435
|
||||
param set-default CA_ROTOR6_PZ 0.14435
|
||||
param set-default CA_ROTOR6_KM 0.05
|
||||
param set-default CA_ROTOR6_AX 0.211325
|
||||
param set-default CA_ROTOR6_AY -0.788675
|
||||
param set-default CA_ROTOR6_AZ 0.57735
|
||||
|
||||
param set-default CA_ROTOR7_PX -0.14435
|
||||
param set-default CA_ROTOR7_PY 0.14435
|
||||
param set-default CA_ROTOR7_PZ 0.14435
|
||||
param set-default CA_ROTOR7_KM 0.05
|
||||
param set-default CA_ROTOR7_AX -0.788675
|
||||
param set-default CA_ROTOR7_AY -0.211325
|
||||
param set-default CA_ROTOR7_AZ -0.57735
|
||||
|
||||
param set-default PWM_MAIN_FUNC1 101
|
||||
param set-default PWM_MAIN_FUNC2 102
|
||||
param set-default PWM_MAIN_FUNC3 103
|
||||
param set-default PWM_MAIN_FUNC4 104
|
||||
param set-default PWM_MAIN_FUNC5 105
|
||||
param set-default PWM_MAIN_FUNC6 106
|
||||
param set-default PWM_MAIN_FUNC7 107
|
||||
param set-default PWM_MAIN_FUNC8 108
|
||||
|
||||
# disable MC desaturation which improves attitude tracking
|
||||
param set-default CA_METHOD 0
|
||||
|
||||
# disable attitude failure detection
|
||||
param set-default FD_FAIL_P 0
|
||||
param set-default FD_FAIL_R 0
|
||||
|
||||
set MIXER skip
|
||||
set MIXER_AUX none
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name QuadrotorX SITL for SIH
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_x
|
||||
|
||||
# disable some checks to allow to fly:
|
||||
# - with usb
|
||||
param set-default CBRK_USB_CHK 197848
|
||||
# - without real battery
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
# - without safety switch
|
||||
param set-default COM_PREARM_MODE 0
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set SIH_VEHICLE_TYPE 0
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Plane SITL for SIH
|
||||
#
|
||||
# @type Plane
|
||||
#
|
||||
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
set MIXER AERT
|
||||
|
||||
# disable some checks to allow to fly:
|
||||
# - with usb
|
||||
param set-default CBRK_USB_CHK 197848
|
||||
# - without real battery
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
# - without safety switch
|
||||
param set-default COM_PREARM_MODE 0
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set-default BAT_N_CELLS 3
|
||||
|
||||
param set SIH_T_MAX 6.0
|
||||
param set SIH_MASS 0.3
|
||||
param set SIH_IXX 0.00402
|
||||
param set SIH_IYY 0.0144
|
||||
param set SIH_IZZ 0.0177
|
||||
param set SIH_IXZ 0.00046
|
||||
param set SIH_KDV 0.2
|
||||
|
||||
param set SIH_VEHICLE_TYPE 1 # sih as fixed wing
|
||||
param set RWTO_TKOFF 1 # enable takeoff from runway (as opposed to launched)
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name SIH Tailsitter Duo
|
||||
#
|
||||
# @type VTOL
|
||||
#
|
||||
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
param set-default VT_TYPE 0
|
||||
param set-default VT_FW_DIFTHR_EN 1
|
||||
param set-default VT_FW_DIFTHR_SC 0.3
|
||||
param set-default MPC_MAN_Y_MAX 60
|
||||
param set-default MC_PITCH_P 5
|
||||
|
||||
param set-default MAV_TYPE 19
|
||||
set MAV_TYPE 19
|
||||
set MIXER vtol_tailsitter_duo_sat
|
||||
|
||||
# disable some checks to allow to fly:
|
||||
# - with usb
|
||||
param set-default CBRK_USB_CHK 197848
|
||||
# - without real battery
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
# - without safety switch
|
||||
param set-default COM_PREARM_MODE 0
|
||||
param set-default CBRK_IO_SAFETY 22027
|
||||
|
||||
param set-default BAT_N_CELLS 3
|
||||
|
||||
param set SIH_T_MAX 2.0
|
||||
param set SIH_Q_MAX 0.0165
|
||||
param set SIH_MASS 0.2
|
||||
# IXX and IZZ are inverted from the thesis as the body frame is pitched by 90 deg
|
||||
param set SIH_IXX 0.00354
|
||||
param set SIH_IYY 0.000625
|
||||
param set SIH_IZZ 0.00300
|
||||
param set SIH_IXZ 0.0
|
||||
param set SIH_KDV 0.2
|
||||
param set SIH_L_ROLL 0.145
|
||||
|
||||
# sih as tailsitter
|
||||
param set SIH_VEHICLE_TYPE 2
|
||||
@@ -18,7 +18,3 @@ param set-default LPE_FAKE_ORIGIN 1
|
||||
|
||||
param set-default MPC_ALT_MODE 2
|
||||
|
||||
param set-default SENS_FLOW_ROT 6
|
||||
param set-default SENS_FLOW_MINHGT 0.7
|
||||
param set-default SENS_FLOW_MAXHGT 3.0
|
||||
param set-default SENS_FLOW_MAXR 2.5
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
# EKF2
|
||||
param set-default EKF2_AID_MASK 2
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
|
||||
# LPE: Flow-only mode
|
||||
param set-default LPE_FUSION 242
|
||||
|
||||
@@ -10,6 +10,7 @@ param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
|
||||
@@ -28,7 +29,7 @@ param set-default FW_SPOILERS_LND 0.4
|
||||
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_THR_TRIM 0.25
|
||||
param set-default FW_THR_CRUISE 0.25
|
||||
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
param set-default FW_T_SINK_MAX 2.7
|
||||
|
||||
@@ -7,9 +7,12 @@
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1.1
|
||||
param set-default FW_LND_ANG 5
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
param set-default FW_LND_HHDIST 30
|
||||
param set-default FW_LND_FL_PMIN 9.5
|
||||
param set-default FW_LND_FL_PMAX 20
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_LND_TLALT 15
|
||||
|
||||
param set-default FW_L1_PERIOD 25
|
||||
|
||||
@@ -35,6 +38,7 @@ param set-default NAV_DLL_ACT 2
|
||||
param set-default RWTO_TKOFF 1
|
||||
|
||||
param set-default RWTO_MAX_PITCH 20
|
||||
param set-default RWTO_MAX_ROLL 10
|
||||
|
||||
param set-default RWTO_PSP 8
|
||||
param set-default RWTO_AIRSPD_SCL 1.8
|
||||
|
||||
@@ -7,9 +7,12 @@
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1.1
|
||||
param set-default FW_LND_ANG 5
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
param set-default FW_LND_HHDIST 30
|
||||
param set-default FW_LND_FL_PMIN 9.5
|
||||
param set-default FW_LND_FL_PMAX 20
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_LND_TLALT 15
|
||||
|
||||
param set-default FW_L1_PERIOD 25
|
||||
|
||||
@@ -35,6 +38,7 @@ param set-default NAV_DLL_ACT 2
|
||||
param set-default RWTO_TKOFF 1
|
||||
|
||||
param set-default RWTO_MAX_PITCH 20
|
||||
param set-default RWTO_MAX_ROLL 10
|
||||
|
||||
param set-default RWTO_PSP 8
|
||||
param set-default RWTO_AIRSPD_SCL 1.8
|
||||
|
||||
@@ -10,6 +10,7 @@ param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
|
||||
param set-default FW_L1_PERIOD 15
|
||||
|
||||
|
||||
@@ -7,9 +7,12 @@
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1.1
|
||||
param set-default FW_LND_ANG 5
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
param set-default FW_LND_HHDIST 30
|
||||
param set-default FW_LND_FL_PMIN 9.5
|
||||
param set-default FW_LND_FL_PMAX 20
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_LND_TLALT 15
|
||||
|
||||
param set-default FW_L1_PERIOD 25
|
||||
|
||||
@@ -34,6 +37,7 @@ param set-default NAV_DLL_ACT 2
|
||||
|
||||
param set-default RWTO_TKOFF 1
|
||||
param set-default RWTO_MAX_PITCH 20
|
||||
param set-default RWTO_MAX_ROLL 10
|
||||
param set-default RWTO_PSP 8
|
||||
param set-default RWTO_AIRSPD_SCL 1.8
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ param set-default EKF2_MAG_YAWLIM 0
|
||||
|
||||
param set-default FW_LND_AIRSPD_SC 1
|
||||
param set-default FW_LND_ANG 8
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
|
||||
param set-default FW_L1_PERIOD 12
|
||||
|
||||
@@ -26,7 +27,7 @@ param set-default FW_RR_P 0.3
|
||||
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_THR_TRIM 0.25
|
||||
param set-default FW_THR_CRUISE 0.25
|
||||
|
||||
param set-default FW_T_ALT_TC 2
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
|
||||
. ${R}etc/init.d-posix/airframes/1030_plane
|
||||
|
||||
param set-default FW_THR_TRIM 0.0
|
||||
param set-default FW_THR_CRUISE 0.0
|
||||
param set-default RWTO_TKOFF 0
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
# TODO: Enable motor failure detection when the
|
||||
# VTOL no longer reports 0A for all ESCs in SITL
|
||||
param set-default FD_ACT_EN 0
|
||||
param set-default FD_ACT_MOT_TOUT 500
|
||||
|
||||
# param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 2
|
||||
|
||||
@@ -57,7 +52,7 @@ param set-default FW_P_LIM_MAX 32
|
||||
param set-default FW_P_LIM_MIN -15
|
||||
param set-default FW_RR_FF 0.1
|
||||
param set-default FW_RR_P 0.3
|
||||
param set-default FW_THR_TRIM 0.25
|
||||
param set-default FW_THR_CRUISE 0.25
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
|
||||
@@ -51,7 +51,7 @@ param set-default FW_PSP_OFF 2
|
||||
param set-default FW_P_LIM_MAX 32
|
||||
param set-default FW_P_LIM_MIN -15
|
||||
param set-default FW_RR_P 0.2
|
||||
param set-default FW_THR_TRIM 0.33
|
||||
param set-default FW_THR_CRUISE 0.33
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_T_ALT_TC 2
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
param set-default MAV_TYPE 21
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
# param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 3
|
||||
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
@@ -64,7 +64,7 @@ param set-default FW_P_LIM_MAX 32
|
||||
param set-default FW_P_LIM_MIN -15
|
||||
param set-default FW_RR_FF 0.1
|
||||
param set-default FW_RR_P 0.3
|
||||
param set-default FW_THR_TRIM 0.38
|
||||
param set-default FW_THR_CRUISE 0.38
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_T_CLMB_MAX 8
|
||||
|
||||
@@ -16,7 +16,7 @@ param set-default FW_P_LIM_MAX 32
|
||||
param set-default FW_P_LIM_MIN -15
|
||||
param set-default FW_RR_FF 0.1
|
||||
param set-default FW_RR_P 0.3
|
||||
param set-default FW_THR_TRIM 0.25
|
||||
param set-default FW_THR_CRUISE 0.25
|
||||
param set-default FW_THR_MAX 0.6
|
||||
param set-default FW_THR_MIN 0.05
|
||||
param set-default FW_T_ALT_TC 2
|
||||
|
||||
@@ -41,7 +41,7 @@ param set-default FW_R_LIM 30
|
||||
param set-default FW_MAN_P_MAX 30.0
|
||||
param set-default FW_MAN_R_MAX 30.0
|
||||
|
||||
param set-default FW_THR_TRIM 0.8
|
||||
param set-default FW_THR_CRUISE 0.8
|
||||
param set-default FW_THR_IDLE 0
|
||||
param set-default COM_DISARM_PRFLT 0
|
||||
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name ThunderFly TF-G2
|
||||
# ThunderFly TF-G2 autogyro airframe. Only for FlightGear simulator
|
||||
#
|
||||
# @type Autogyro
|
||||
# @class Autogyro
|
||||
#
|
||||
# @url https://github.com/ThunderFly-aerospace/TF-G2/
|
||||
#
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_AIRSPD_STALL 5
|
||||
|
||||
param set-default FW_P_RMAX_NEG 20.0
|
||||
param set-default FW_W_RMAX 10
|
||||
param set-default FW_W_EN 1
|
||||
|
||||
param set-default FW_RR_P 0.08
|
||||
|
||||
param set-default MIS_LTRMIN_ALT 50
|
||||
param set-default MIS_TAKEOFF_ALT 7
|
||||
|
||||
param set-default NAV_ACC_RAD 20
|
||||
param set-default NAV_DLL_ACT 2
|
||||
param set-default NAV_LOITER_RAD 50
|
||||
|
||||
param set-default RWTO_TKOFF 0
|
||||
# Parameters related to autogyro takeoff PR
|
||||
#param set-default AG_TKOFF 1
|
||||
#param set-default AG_PROT_TYPE 1
|
||||
#param set-default AG_PROT_MIN_RPM 50.0
|
||||
#param set-default AG_PROT_TRG_RPM 900.0
|
||||
#param set-defoult AG_ROTOR_RPM 900.0
|
||||
|
||||
param set-default FW_ARSP_SCALE_EN 0
|
||||
|
||||
param set-default FW_AIRSPD_MAX 35
|
||||
param set-default FW_AIRSPD_MIN 7
|
||||
|
||||
param set-default FW_P_LIM_MAX 25
|
||||
param set-default FW_P_LIM_MIN -5
|
||||
param set-default FW_R_LIM 30
|
||||
|
||||
param set-default FW_MAN_P_MAX 30.0
|
||||
param set-default FW_MAN_R_MAX 30.0
|
||||
|
||||
param set-default FW_THR_CRUISE 0.8
|
||||
param set-default FW_THR_IDLE 0
|
||||
param set-default COM_DISARM_PRFLT 0
|
||||
|
||||
set MIXER_FILE etc/mixers-sitl/autogyro_sitl.main.mix
|
||||
set MIXER custom
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
|
||||
|
||||
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530 -p
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
|
||||
@@ -35,12 +35,8 @@ px4_add_romfs_files(
|
||||
10016_iris
|
||||
10017_iris_ctrlalloc
|
||||
10018_iris_foggy_lidar
|
||||
10019_omnicopter
|
||||
10020_if750a
|
||||
10030_px4vision
|
||||
10040_quadx
|
||||
10041_airplane
|
||||
10042_xvert
|
||||
1010_iris_opt_flow
|
||||
1010_iris_opt_flow.post
|
||||
1011_iris_irlock
|
||||
@@ -78,7 +74,6 @@ px4_add_romfs_files(
|
||||
3010_quadrotor_x
|
||||
3011_hexarotor_x
|
||||
17001_tf-g1
|
||||
17002_tf-g2
|
||||
2507_cloudship
|
||||
6011_typhoon_h480
|
||||
6011_typhoon_h480.post
|
||||
|
||||
@@ -30,12 +30,3 @@ mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $ud
|
||||
|
||||
# Onboard link to gimbal
|
||||
mavlink start -x -u $udp_onboard_gimbal_port_local -r 400000 -m gimbal -o $udp_onboard_gimbal_port_remote
|
||||
|
||||
# To display for SIH sitl
|
||||
if [ "$SIM_MODE" = "sihsim" ]; then
|
||||
udp_sihsim_port_local=$((19450+px4_instance))
|
||||
udp_sihsim_port_remote=$((19410+px4_instance))
|
||||
mavlink start -x -u $udp_sihsim_port_local -r 400000 -m custom -o $udp_sihsim_port_remote
|
||||
mavlink stream -r 200 -s HIL_ACTUATOR_CONTROLS -u $udp_sihsim_port_local
|
||||
mavlink stream -r 25 -s HIL_STATE_QUATERNION -u $udp_sihsim_port_local
|
||||
fi
|
||||
|
||||
@@ -95,9 +95,10 @@ fi
|
||||
|
||||
if param compare SYS_AUTOCONFIG 1
|
||||
then
|
||||
# Reset params except Airframe, RC calibration, sensor calibration, flight modes, total flight time, and next flight UUID.
|
||||
param reset_all SYS_AUTOSTART RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
|
||||
set AUTOCNF yes
|
||||
|
||||
# Wipe out params except RC*, flight modes, total flight time, accel cal, gyro cal, next flight UUID
|
||||
param reset_all SYS_AUTO* RC* COM_FLTMODE* LND_FLIGHT* TC_* CAL_ACC* CAL_GYRO* COM_FLIGHT*
|
||||
fi
|
||||
|
||||
# multi-instance setup
|
||||
@@ -154,8 +155,6 @@ param set-default SDLOG_DIRS_MAX 7
|
||||
|
||||
param set-default TRIG_INTERFACE 3
|
||||
|
||||
param set-default SYS_FAILURE_EN 1
|
||||
|
||||
# Adapt timeout parameters if simulation runs faster or slower than realtime.
|
||||
if [ -n "$PX4_SIM_SPEED_FACTOR" ]; then
|
||||
COM_DL_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 10" | bc)
|
||||
@@ -197,6 +196,14 @@ fi
|
||||
|
||||
. "$autostart_file"
|
||||
|
||||
#
|
||||
# If autoconfig parameter was set, reset it and save parameters.
|
||||
#
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set SYS_AUTOCONFIG 0
|
||||
fi
|
||||
|
||||
# Simulator IMU data provided at 250 Hz
|
||||
param set IMU_INTEG_RATE 250
|
||||
|
||||
@@ -204,11 +211,8 @@ param set IMU_INTEG_RATE 250
|
||||
. px4-rc.params
|
||||
|
||||
dataman start
|
||||
# start sih in sih_sim mode, otherwise simulator module
|
||||
if [ "$SIM_MODE" = "sihsim" ]; then
|
||||
sih start
|
||||
# only start the simulator if not in replay mode, as both control the lockstep time
|
||||
elif ! replay tryapplyparams
|
||||
if ! replay tryapplyparams
|
||||
then
|
||||
. px4-rc.simulator
|
||||
fi
|
||||
|
||||
@@ -29,6 +29,9 @@ param set-default FW_L1_DAMPING 0.74
|
||||
param set-default FW_L1_PERIOD 16
|
||||
param set-default FW_LND_ANG 15
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_LND_HVIRT 13
|
||||
param set-default FW_LND_TLALT 5
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
param set-default FW_PR_FF 0.35
|
||||
param set-default FW_PR_P 0.2
|
||||
param set-default FW_RR_FF 0.6
|
||||
@@ -58,8 +61,6 @@ param set-default HIL_ACT_FUNC6 400
|
||||
|
||||
param set SYS_HITL 1
|
||||
|
||||
param set UAVCAN_ENABLE 0
|
||||
|
||||
# disable some checks to allow to fly
|
||||
# - with usb
|
||||
param set-default CBRK_USB_CHK 197848
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Steadidrone QU4D
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 feed-through of RC AUX1 channel
|
||||
# @output MAIN6 feed-through of RC AUX2 channel
|
||||
#
|
||||
# @output AUX1 feed-through of RC AUX1 channel
|
||||
# @output AUX2 feed-through of RC AUX2 channel
|
||||
# @output AUX3 feed-through of RC AUX3 channel
|
||||
# @output AUX4 feed-through of RC FLAPS channel
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_P 0.13
|
||||
param set-default MC_ROLLRATE_I 0.05
|
||||
param set-default MC_ROLLRATE_D 0.004
|
||||
param set-default MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_P 0.19
|
||||
param set-default MC_PITCHRATE_I 0.05
|
||||
param set-default MC_PITCHRATE_D 0.004
|
||||
param set-default MC_YAW_P 4
|
||||
|
||||
set MIXER quad_w
|
||||
@@ -15,8 +15,6 @@ set MIXER quad_x
|
||||
|
||||
param set SYS_HITL 1
|
||||
|
||||
param set UAVCAN_ENABLE 0
|
||||
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
param set-default CA_ROTOR0_PX 0.15
|
||||
param set-default CA_ROTOR0_PY 0.15
|
||||
|
||||
@@ -94,8 +94,6 @@ param set-default HIL_ACT_FUNC8 203
|
||||
|
||||
param set SYS_HITL 1
|
||||
|
||||
param set UAVCAN_ENABLE 0
|
||||
|
||||
# disable some checks to allow to fly
|
||||
# - with usb
|
||||
param set-default CBRK_USB_CHK 197848
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Steadidrone MAVRIK
|
||||
#
|
||||
# @type Octo Coax Wide
|
||||
# @class Copter
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output MAIN5 motor 5
|
||||
# @output MAIN6 motor 6
|
||||
# @output MAIN7 motor 7
|
||||
# @output MAIN8 motor 8
|
||||
#
|
||||
# @maintainer Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
|
||||
param set-default MC_PITCH_P 4
|
||||
param set-default MC_PITCHRATE_P 0.24
|
||||
param set-default MC_PITCHRATE_I 0.09
|
||||
param set-default MC_PITCHRATE_D 0.013
|
||||
param set-default MC_PITCHRATE_MAX 180
|
||||
|
||||
param set-default MC_ROLL_P 4
|
||||
param set-default MC_ROLLRATE_P 0.16
|
||||
param set-default MC_ROLLRATE_I 0.07
|
||||
param set-default MC_ROLLRATE_D 0.009
|
||||
param set-default MC_ROLLRATE_MAX 180
|
||||
|
||||
param set-default MC_YAW_P 3
|
||||
|
||||
param set-default MPC_HOLD_MAX_XY 0.25
|
||||
param set-default MPC_THR_MIN 0.15
|
||||
param set-default MPC_Z_VEL_MAX_DN 2
|
||||
|
||||
param set-default BAT1_N_CELLS 4
|
||||
|
||||
set MIXER octo_cox_w
|
||||
|
||||
set PWM_OUT 12345678
|
||||
@@ -1,10 +1,22 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Generic Standard VTOL
|
||||
# @name Generic Quadplane VTOL
|
||||
#
|
||||
# @type Standard VTOL
|
||||
# @class VTOL
|
||||
|
||||
#
|
||||
# @maintainer
|
||||
#
|
||||
# @output MAIN1 motor 1
|
||||
# @output MAIN2 motor 2
|
||||
# @output MAIN3 motor 3
|
||||
# @output MAIN4 motor 4
|
||||
# @output AUX1 Aileron 1
|
||||
# @output AUX2 Aileron 2
|
||||
# @output AUX3 Elevator
|
||||
# @output AUX4 Rudder
|
||||
# @output AUX5 Throttle
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board holybro_kakutef7 exclude
|
||||
@@ -12,21 +24,21 @@
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 2
|
||||
param set-default CA_ROTOR_COUNT 5
|
||||
param set-default CA_ROTOR0_PX 1
|
||||
param set-default CA_ROTOR0_PY 1
|
||||
param set-default CA_ROTOR1_PX -1
|
||||
param set-default CA_ROTOR1_PY -1
|
||||
param set-default CA_ROTOR2_PX 1
|
||||
param set-default CA_ROTOR2_PY -1
|
||||
param set-default CA_ROTOR0_PX 0.15
|
||||
param set-default CA_ROTOR0_PY 0.15
|
||||
param set-default CA_ROTOR1_PX -0.15
|
||||
param set-default CA_ROTOR1_PY -0.15
|
||||
param set-default CA_ROTOR2_PX 0.15
|
||||
param set-default CA_ROTOR2_PY -0.15
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -1
|
||||
param set-default CA_ROTOR3_PY 1
|
||||
param set-default CA_ROTOR3_PX -0.15
|
||||
param set-default CA_ROTOR3_PY 0.15
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
param set-default CA_ROTOR4_AX 1.0
|
||||
param set-default CA_ROTOR4_AZ 0.0
|
||||
param set-default CA_ROTOR4_PX 0.2
|
||||
param set-default CA_SV_CS_COUNT 4
|
||||
param set-default CA_SV_CS0_TYPE 1
|
||||
param set-default CA_SV_CS0_TRQ_R -0.5
|
||||
@@ -36,5 +48,16 @@ param set-default CA_SV_CS2_TYPE 3
|
||||
param set-default CA_SV_CS2_TRQ_P 1.0
|
||||
param set-default CA_SV_CS3_TRQ_Y 1.0
|
||||
param set-default CA_SV_CS3_TYPE 4
|
||||
|
||||
param set-default PWM_AUX_DIS5 950
|
||||
|
||||
param set-default VT_TYPE 2
|
||||
param set-default VT_MOT_ID 1234
|
||||
param set-default VT_FW_MOT_OFFID 1234
|
||||
|
||||
param set-default MAV_TYPE 22
|
||||
|
||||
set MIXER quad_x
|
||||
set MIXER_AUX vtol_AAERT
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
@@ -43,7 +43,7 @@ param set-default MPC_YAWRAUTO_MAX 40
|
||||
param set-default FW_PR_I 0.02
|
||||
param set-default FW_RR_FF 0.6
|
||||
param set-default FW_RR_I 0.01
|
||||
param set-default FW_THR_TRIM 0.75
|
||||
param set-default FW_THR_CRUISE 0.75
|
||||
|
||||
param set-default VT_ARSP_BLEND 6
|
||||
param set-default VT_ARSP_TRANS 12
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
|
||||
param set-default FW_THR_TRIM 65
|
||||
param set-default FW_THR_CRUISE 65
|
||||
param set-default FW_RR_FF 0.6
|
||||
|
||||
param set-default MIS_YAW_TMT 10
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name CruiseAder Claire
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
# @class VTOL
|
||||
#
|
||||
# @maintainer Samay Siga <samay_s@icloud.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default MAV_TYPE 21
|
||||
|
||||
param set-default PWM_AUX_DISARM 1000
|
||||
param set-default PWM_AUX_MAX 2000
|
||||
param set-default PWM_AUX_MIN 1000
|
||||
param set-default PWM_AUX_RATE 50
|
||||
|
||||
param set-default PWM_MAIN_MAX 2000
|
||||
|
||||
param set-default VT_MOT_ID 1234
|
||||
param set-default VT_FW_MOT_OFFID 13
|
||||
param set-default VT_IDLE_PWM_MC 1080
|
||||
param set-default VT_TILT_FW 0.9
|
||||
param set-default VT_TILT_MC 0.08
|
||||
param set-default VT_TILT_TRANS 0.5
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
param set-default VT_TYPE 1
|
||||
|
||||
set MIXER claire
|
||||
set MIXER_AUX claire
|
||||
|
||||
set PWM_OUT 1234
|
||||
@@ -53,7 +53,7 @@ param set-default FW_T_CLMB_MAX 3
|
||||
param set-default FW_T_SINK_MAX 3
|
||||
param set-default FW_T_SINK_MIN 1
|
||||
param set-default FW_T_VERT_ACC 6
|
||||
param set-default FW_THR_TRIM 0.70
|
||||
param set-default FW_THR_CRUISE 0.70
|
||||
param set-default FW_THR_SLEW_MAX 1
|
||||
param set-default FW_MAN_P_MAX 30
|
||||
param set-default FW_P_LIM_MAX 15
|
||||
@@ -131,6 +131,7 @@ param set-default VT_F_TRANS_DUR 1
|
||||
param set-default VT_IDLE_PWM_MC 1025
|
||||
param set-default VT_B_REV_OUT 0.5
|
||||
param set-default VT_B_TRANS_THR 0.7
|
||||
param set-default VT_FW_PERM_STAB 1
|
||||
param set-default VT_TRANS_TIMEOUT 22
|
||||
param set-default VT_F_TRANS_RAMP 4
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ param set-default FW_RLL_TO_YAW_FF 0.1
|
||||
param set-default FW_RR_P 0.08
|
||||
param set-default FW_R_LIM 45
|
||||
param set-default FW_R_RMAX 50
|
||||
param set-default FW_THR_TRIM 0.65
|
||||
param set-default FW_THR_CRUISE 0.65
|
||||
param set-default FW_THR_MIN 0.3
|
||||
param set-default FW_THR_SLEW_MAX 0.6
|
||||
param set-default FW_T_HRATE_FF 0
|
||||
@@ -62,7 +62,7 @@ param set-default MPC_JERK_AUTO 4
|
||||
param set-default MPC_LAND_SPEED 1
|
||||
param set-default MPC_MAN_TILT_MAX 25
|
||||
param set-default MPC_MAN_Y_MAX 40
|
||||
param set-default COM_SPOOLUP_TIME 1.5
|
||||
param set-default MPC_SPOOLUP_TIME 1.5
|
||||
param set-default MPC_THR_HOVER 0.45
|
||||
param set-default MPC_TILTMAX_AIR 25
|
||||
param set-default MPC_TKO_RAMP_T 1.8
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Generic Tiltrotor VTOL
|
||||
#
|
||||
# @type VTOL Tiltrotor
|
||||
# @class VTOL
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
|
||||
param set-default CA_AIRFRAME 3
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
param set-default CA_ROTOR0_PX 1
|
||||
param set-default CA_ROTOR0_PY 1
|
||||
param set-default CA_ROTOR0_TILT 2
|
||||
param set-default CA_ROTOR1_PX -1
|
||||
param set-default CA_ROTOR1_PY -1
|
||||
param set-default CA_ROTOR2_PX 1
|
||||
param set-default CA_ROTOR2_PY -1
|
||||
param set-default CA_ROTOR2_TILT 1
|
||||
param set-default CA_ROTOR2_KM -0.05
|
||||
param set-default CA_ROTOR3_PX -1
|
||||
param set-default CA_ROTOR3_PY 1
|
||||
param set-default CA_ROTOR3_KM -0.05
|
||||
param set-default CA_SV_CS_COUNT 4
|
||||
param set-default CA_SV_CS0_TYPE 1
|
||||
param set-default CA_SV_CS0_TRQ_R -0.5
|
||||
param set-default CA_SV_CS1_TYPE 2
|
||||
param set-default CA_SV_CS1_TRQ_R 0.5
|
||||
param set-default CA_SV_CS2_TYPE 7
|
||||
param set-default CA_SV_CS2_TRQ_P 0.5
|
||||
param set-default CA_SV_CS2_TRQ_Y 0.5
|
||||
param set-default CA_SV_CS3_TYPE 8
|
||||
param set-default CA_SV_CS3_TRQ_P 0.5
|
||||
param set-default CA_SV_CS3_TRQ_Y -0.5
|
||||
param set-default CA_SV_TL_COUNT 2
|
||||
|
||||
param set-default MAV_TYPE 21
|
||||
param set-default VT_TYPE 1
|
||||
@@ -1,10 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Generic VTOL Tailsitter
|
||||
# @name Generic Tailsitter
|
||||
#
|
||||
# @type VTOL Tailsitter
|
||||
# @type VTOL Duo Tailsitter
|
||||
# @class VTOL
|
||||
#
|
||||
# @output MAIN1 motor right
|
||||
# @output MAIN2 motor left
|
||||
# @output MAIN5 elevon right
|
||||
# @output MAIN6 elevon left
|
||||
#
|
||||
# @maintainer Roman Bapst <roman@px4.io>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board holybro_kakutef7 exclude
|
||||
@@ -12,13 +19,18 @@
|
||||
|
||||
. ${R}etc/init.d/rc.vtol_defaults
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default MAV_TYPE 19
|
||||
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
param set-default VT_MOT_COUNT 2
|
||||
param set-default VT_TYPE 0
|
||||
|
||||
param set-default CA_AIRFRAME 4
|
||||
param set-default CA_ROTOR_COUNT 2
|
||||
param set-default CA_ROTOR0_KM -0.05
|
||||
param set-default CA_ROTOR0_PY -0.2
|
||||
param set-default CA_ROTOR1_KM 0.05
|
||||
param set-default CA_ROTOR1_PY 0.2
|
||||
param set-default CA_ROTOR0_PY 0.2
|
||||
param set-default CA_ROTOR1_KM -0.05
|
||||
param set-default CA_ROTOR1_PY -0.2
|
||||
param set-default CA_SV_CS_COUNT 2
|
||||
param set-default CA_SV_CS0_TRQ_P 0.5
|
||||
param set-default CA_SV_CS0_TRQ_Y 0.5
|
||||
@@ -27,6 +39,6 @@ param set-default CA_SV_CS1_TRQ_P 0.5
|
||||
param set-default CA_SV_CS1_TRQ_Y -0.5
|
||||
param set-default CA_SV_CS1_TYPE 6
|
||||
|
||||
param set-default MAV_TYPE 19
|
||||
param set-default VT_TYPE 0
|
||||
param set-default VT_ELEV_MC_LOCK 0
|
||||
set MIXER vtol_tailsitter_duo
|
||||
|
||||
set PWM_OUT 1234
|
||||
|
||||
@@ -37,7 +37,7 @@ param set-default SENS_BOARD_ROT 8
|
||||
param set-default FW_AIRSPD_MAX 20
|
||||
param set-default FW_AIRSPD_MIN 7
|
||||
param set-default FW_AIRSPD_TRIM 13
|
||||
param set-default FW_THR_TRIM 0.8
|
||||
param set-default FW_THR_CRUISE 0.8
|
||||
|
||||
param set-default FW_MAN_P_MAX 25
|
||||
param set-default FW_MAN_R_MAX 25
|
||||
|
||||
@@ -32,7 +32,7 @@ param set-default SENS_BOARD_ROT 4
|
||||
param set-default FW_AIRSPD_MAX 20
|
||||
param set-default FW_AIRSPD_MIN 7
|
||||
param set-default FW_AIRSPD_TRIM 13
|
||||
param set-default FW_THR_TRIM 0.8
|
||||
param set-default FW_THR_CRUISE 0.8
|
||||
|
||||
param set-default FW_MAN_P_MAX 25
|
||||
param set-default FW_MAN_R_MAX 25
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Generic Standard Plane
|
||||
# @name Standard Plane
|
||||
#
|
||||
# @type Standard Plane
|
||||
# @class Plane
|
||||
#
|
||||
# @output MAIN1 aileron
|
||||
# @output MAIN2 elevator
|
||||
# @output MAIN3 throttle
|
||||
# @output MAIN4 rudder
|
||||
# @output MAIN5 flaps
|
||||
# @output MAIN6 gear
|
||||
#
|
||||
# @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>
|
||||
#
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 1
|
||||
param set-default CA_ROTOR_COUNT 1
|
||||
param set-default CA_ROTOR0_PX 0.3
|
||||
@@ -22,3 +34,11 @@ param set-default CA_SV_CS2_TRQ_P 1.0
|
||||
param set-default CA_SV_CS2_TYPE 3
|
||||
param set-default CA_SV_CS3_TRQ_Y 1.0
|
||||
param set-default CA_SV_CS3_TYPE 4
|
||||
|
||||
param set-default PWM_AUX_RATE 50
|
||||
param set-default PWM_MAIN_RATE 50
|
||||
|
||||
set MIXER AETRFG
|
||||
|
||||
# Rate must be set by group (see pwm info).
|
||||
# Throttle is in the same group as servos.
|
||||
|
||||
@@ -5,20 +5,19 @@
|
||||
# @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
|
||||
#
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default SYS_CTRL_ALLOC 1
|
||||
param set-default CA_AIRFRAME 1
|
||||
|
||||
param set-default CA_ROTOR_COUNT 1
|
||||
param set-default CA_ROTOR0_PX 0.15
|
||||
param set-default CA_SV_CS_COUNT 2
|
||||
param set-default CA_SV_CS0_TYPE 5
|
||||
param set-default CA_SV_CS0_TRQ_P 0.5
|
||||
param set-default CA_SV_CS0_TRQ_R -0.5
|
||||
param set-default CA_SV_CS1_TYPE 6
|
||||
param set-default CA_SV_CS1_TRQ_P 0.5
|
||||
param set-default CA_SV_CS1_TRQ_R 0.5
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name IO Camflyer
|
||||
#
|
||||
# @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 Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_AIRSPD_MAX 15
|
||||
param set-default FW_AIRSPD_TRIM 13
|
||||
param set-default FW_R_TC 0.3
|
||||
param set-default FW_P_TC 0.3
|
||||
param set-default FW_L1_DAMPING 0.74
|
||||
param set-default FW_L1_PERIOD 16
|
||||
param set-default FW_LND_ANG 15
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_LND_HVIRT 13
|
||||
param set-default FW_LND_TLALT 5
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
param set-default FW_PR_FF 0.35
|
||||
param set-default FW_RR_FF 0.6
|
||||
param set-default FW_RR_P 0.04
|
||||
|
||||
param set-default PWM_MAIN_DISARM 1000
|
||||
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
|
||||
# Provide ESC a constant 1000 us pulse while disarmed
|
||||
set PWM_OUT 4
|
||||
@@ -30,6 +30,9 @@ param set-default FW_L1_DAMPING 0.74
|
||||
param set-default FW_L1_PERIOD 16
|
||||
param set-default FW_LND_ANG 15
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_LND_HVIRT 13
|
||||
param set-default FW_LND_TLALT 5
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
param set-default FW_PR_FF 0.35
|
||||
param set-default FW_RR_FF 0.6
|
||||
param set-default FW_RR_P 0.04
|
||||
|
||||
@@ -32,6 +32,9 @@ param set-default FW_L1_DAMPING 0.74
|
||||
param set-default FW_L1_PERIOD 16
|
||||
param set-default FW_LND_ANG 15
|
||||
param set-default FW_LND_FLALT 5
|
||||
param set-default FW_LND_HVIRT 13
|
||||
param set-default FW_LND_TLALT 5
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
param set-default FW_PR_FF 0.35
|
||||
param set-default FW_RR_FF 0.6
|
||||
param set-default FW_RR_P 0.04
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @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>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
param set-default FW_AIRSPD_MAX 30
|
||||
param set-default FW_AIRSPD_MIN 13
|
||||
|
||||
param set-default NAV_LOITER_RAD 150
|
||||
|
||||
set MIXER fw_generic_wing
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Viper
|
||||
#
|
||||
# @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 Simon Wilks <simon@uaventure.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
set MIXER Viper
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Modified Parrot Disco
|
||||
#
|
||||
# @url
|
||||
#
|
||||
# @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 Jan Liphardt <JTLiphardt@gmail.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
####################################
|
||||
# Airspeed
|
||||
####################################
|
||||
param set-default FW_AIRSPD_MAX 27 # = 52 knots
|
||||
|
||||
####################################
|
||||
# Pitch
|
||||
####################################
|
||||
|
||||
# Pitch rate feed forward (def = 0.5 %/rad/sec)
|
||||
param set-default FW_PR_FF 0.35
|
||||
|
||||
####################################
|
||||
# Roll
|
||||
####################################
|
||||
|
||||
# Basic limits (def = 50 deg)
|
||||
param set-default FW_R_LIM 40
|
||||
|
||||
# Roll rate upper limit (def = 70 deg/s)
|
||||
param set-default FW_R_RMAX 50
|
||||
|
||||
param set-default PWM_MAIN_DISARM 1000
|
||||
|
||||
set MIXER fw_generic_wing.main.mix
|
||||
|
||||
# Provide ESC a constant 1000 us pulse
|
||||
set PWM_OUT 4
|
||||
@@ -27,6 +27,9 @@ param set-default FW_AIRSPD_TRIM 16.5
|
||||
param set-default FW_L1_PERIOD 15
|
||||
param set-default FW_LND_ANG 15
|
||||
param set-default FW_LND_FLALT 8
|
||||
param set-default FW_LND_HVIRT 13
|
||||
param set-default FW_LND_TLALT 10
|
||||
param set-default FW_THR_LND_MAX 0
|
||||
param set-default FW_P_LIM_MAX 20
|
||||
param set-default FW_P_LIM_MIN -30
|
||||
param set-default FW_R_LIM 45
|
||||
@@ -37,7 +40,7 @@ param set-default FW_RR_P 0.013
|
||||
param set-default FW_P_RMAX_NEG 70
|
||||
param set-default FW_P_RMAX_POS 70
|
||||
param set-default FW_R_RMAX 70
|
||||
param set-default FW_THR_TRIM 0.55
|
||||
param set-default FW_THR_CRUISE 0.55
|
||||
|
||||
param set-default LNDFW_AIRSPD_MAX 6
|
||||
param set-default LNDFW_XYACC_MAX 4
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name DJI F330 w/ DJI ESCs
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
# @board px4_fmu-v2 exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_I 0.05
|
||||
param set-default MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_I 0.05
|
||||
|
||||
|
||||
# DJI ESCs do not support calibration and need a higher min
|
||||
param set-default PWM_MAIN_MIN 1230
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name DJI F450 w/ DJI ESCs
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Lorenz Meier <lorenz@px4.io>
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default MC_ROLL_P 7
|
||||
param set-default MC_ROLLRATE_I 0.05
|
||||
param set-default MC_PITCH_P 7
|
||||
param set-default MC_PITCHRATE_I 0.05
|
||||
param set-default MC_YAWRATE_P 0.3
|
||||
|
||||
# DJI ESCs do not support calibration and need a higher min
|
||||
param set-default PWM_MAIN_MIN 1230
|
||||
@@ -104,6 +104,7 @@ param set-default SDLOG_PROFILE 131
|
||||
param set-default SENS_CM8JL65_CFG 104
|
||||
param set-default SENS_FLOW_MAXHGT 25
|
||||
param set-default SENS_FLOW_MINHGT 0.5
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
param set-default IMU_GYRO_CUTOFF 100
|
||||
param set-default SENS_EN_PMW3901 1
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name DJI Matrice 100
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer James Goppert <james.goppert@gmail.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
param set-default BAT1_N_CELLS 6
|
||||
|
||||
param set-default MC_ROLLRATE_P 0.05
|
||||
param set-default MC_ROLLRATE_I 0.05
|
||||
param set-default MC_ROLLRATE_D 0.001
|
||||
param set-default MC_PITCHRATE_P 0.05
|
||||
param set-default MC_PITCHRATE_I 0.05
|
||||
param set-default MC_PITCHRATE_D 0.001
|
||||
|
||||
param set-default MC_YAWRATE_I 0
|
||||
|
||||
param set-default PWM_MAIN_MIN 1200
|
||||
@@ -47,7 +47,6 @@ param set-default COM_RC_LOSS_T 3
|
||||
|
||||
# ekf2
|
||||
param set-default EKF2_AID_MASK 33
|
||||
param set-default EKF2_TERR_MASK 1
|
||||
param set-default EKF2_BARO_DELAY 0
|
||||
param set-default EKF2_BARO_NOISE 2.0
|
||||
|
||||
@@ -174,7 +173,7 @@ param set-default RC1_TRIM 1000
|
||||
param set-default SENS_FLOW_MAXR 7.4
|
||||
param set-default SENS_FLOW_MINHGT 0.15
|
||||
param set-default SENS_FLOW_MAXHGT 5.0
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
param set-default SENS_FLOW_ROT 0
|
||||
|
||||
# ignore the SD card errors and use normal startup sound
|
||||
set STARTUP_TUNE "1"
|
||||
|
||||
@@ -52,16 +52,22 @@ px4_add_romfs_files(
|
||||
|
||||
# [3000, 3999] Flying wing"
|
||||
3000_generic_wing
|
||||
3030_io_camflyer
|
||||
3031_phantom
|
||||
3032_skywalker_x5
|
||||
3033_wingwing
|
||||
3034_fx79
|
||||
3035_viper
|
||||
3036_pigeon
|
||||
3037_parrot_disco_mod
|
||||
3100_tbs_caipirinha
|
||||
|
||||
# [4000, 4999] Quadrotor x"
|
||||
4001_quad_x
|
||||
4003_qavr5
|
||||
4009_qav250
|
||||
4010_dji_f330
|
||||
4011_dji_f450
|
||||
4014_s500
|
||||
4015_holybro_s500
|
||||
4016_holybro_px4vision
|
||||
@@ -75,6 +81,7 @@ px4_add_romfs_files(
|
||||
4051_s250aq
|
||||
4052_holybro_qav250
|
||||
4053_holybro_kopis2
|
||||
4060_dji_matrice_100
|
||||
4061_atl_mantis_edu
|
||||
4071_ifo
|
||||
4072_draco
|
||||
@@ -105,6 +112,7 @@ px4_add_romfs_files(
|
||||
# [10000, 10999] Quadrotor Wide arm / H frame"
|
||||
10015_tbs_discovery
|
||||
10016_3dr_iris
|
||||
10017_steadidrone_qu4d
|
||||
10018_tbs_endurance
|
||||
|
||||
# [11000, 11999] Hexa Cox
|
||||
@@ -112,6 +120,7 @@ px4_add_romfs_files(
|
||||
|
||||
# [12000, 12999] Octo Cox
|
||||
12001_octo_cox
|
||||
12002_steadidrone_mavrik
|
||||
|
||||
# [13000, 13999] VTOL
|
||||
13000_generic_vtol_standard
|
||||
@@ -124,7 +133,7 @@ px4_add_romfs_files(
|
||||
13007_vtol_AAVVT_quad
|
||||
13008_QuadRanger
|
||||
13009_vtol_spt_ranger
|
||||
13100_generic_vtol_tiltrotor
|
||||
13010_claire
|
||||
13012_convergence
|
||||
13013_deltaquad
|
||||
13014_vtol_babyshark
|
||||
|
||||
@@ -21,6 +21,7 @@ set +e
|
||||
# it wastes flash
|
||||
#
|
||||
set R /
|
||||
set AUTOCNF no
|
||||
set FCONFIG /fs/microsd/etc/config.txt
|
||||
set FEXTRAS /fs/microsd/etc/extras.txt
|
||||
set FRC /fs/microsd/etc/rc.txt
|
||||
@@ -176,12 +177,13 @@ else
|
||||
fi
|
||||
|
||||
#
|
||||
# If the airframe has been previously reset SYS_AUTCONFIG will have been set to 1 and other params will be reset on the next boot.
|
||||
# Set AUTOCNF flag to use it in AUTOSTART scripts.
|
||||
#
|
||||
if param greater SYS_AUTOCONFIG 0
|
||||
then
|
||||
# Reset params except Airframe, RC calibration, sensor calibration, flight modes, total flight time, and next flight UUID.
|
||||
param reset_all SYS_AUTOSTART RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
|
||||
# Wipe out params except RC*, flight modes, total flight time, calibration parameters, next flight UUID
|
||||
param reset_all SYS_AUTO* RC* COM_FLTMODE* LND_FLIGHT* TC_* CAL_ACC* CAL_GYRO* COM_FLIGHT*
|
||||
set AUTOCNF yes
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -206,26 +208,6 @@ else
|
||||
fi
|
||||
unset BOARD_RC_DEFAULTS
|
||||
|
||||
#
|
||||
# Set parameters and env variables for selected SYS_AUTOSTART.
|
||||
#
|
||||
set AUTOSTART_PATH etc/init.d/rc.autostart
|
||||
if ! param compare SYS_AUTOSTART 0
|
||||
then
|
||||
if param greater SYS_AUTOSTART 1000000
|
||||
then
|
||||
# Use external startup file
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
then
|
||||
set AUTOSTART_PATH etc/init.d/rc.autostart_ext
|
||||
else
|
||||
echo "ERROR [init] SD card not mounted - trying to load airframe from ROMFS"
|
||||
fi
|
||||
fi
|
||||
. ${R}$AUTOSTART_PATH
|
||||
fi
|
||||
unset AUTOSTART_PATH
|
||||
|
||||
#
|
||||
# Start the tone_alarm driver.
|
||||
# Needs to be started after the parameters are loaded (for CBRK_BUZZER).
|
||||
@@ -263,6 +245,26 @@ else
|
||||
rgbled start -X -q
|
||||
rgbled_ncp5623c start -X -q
|
||||
|
||||
#
|
||||
# Set parameters and env variables for selected AUTOSTART.
|
||||
#
|
||||
set AUTOSTART_PATH etc/init.d/rc.autostart
|
||||
if ! param compare SYS_AUTOSTART 0
|
||||
then
|
||||
if param greater SYS_AUTOSTART 1000000
|
||||
then
|
||||
# Use external startup file
|
||||
if [ $SDCARD_AVAILABLE = yes ]
|
||||
then
|
||||
set AUTOSTART_PATH etc/init.d/rc.autostart_ext
|
||||
else
|
||||
echo "ERROR [init] SD card not mounted - trying to load airframe from ROMFS"
|
||||
fi
|
||||
fi
|
||||
. ${R}$AUTOSTART_PATH
|
||||
fi
|
||||
unset AUTOSTART_PATH
|
||||
|
||||
#
|
||||
# Override parameters from user configuration file.
|
||||
#
|
||||
@@ -272,6 +274,14 @@ else
|
||||
. $FCONFIG
|
||||
fi
|
||||
|
||||
#
|
||||
# If autoconfig parameter was set, reset it and save parameters.
|
||||
#
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set SYS_AUTOCONFIG 0
|
||||
fi
|
||||
|
||||
#
|
||||
# Check if UAVCAN is enabled, default to it for ESCs.
|
||||
#
|
||||
@@ -288,9 +298,9 @@ else
|
||||
tune_control play error
|
||||
fi
|
||||
else
|
||||
if param greater -s CYPHAL_ENABLE 0
|
||||
if param greater -s UAVCAN_V1_ENABLE 0
|
||||
then
|
||||
cyphal start
|
||||
uavcan_v1 start
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -303,7 +313,7 @@ else
|
||||
then
|
||||
# Check for the mini using build with px4io fw file
|
||||
# but not a px4IO
|
||||
if ver hwtypecmp V5004000 V5006000
|
||||
if ver hwtypecmp V540 V560
|
||||
then
|
||||
param set SYS_USE_IO 0
|
||||
else
|
||||
@@ -555,6 +565,7 @@ fi
|
||||
# Unset all script parameters to free RAM.
|
||||
#
|
||||
unset R
|
||||
unset AUTOCNF
|
||||
unset FCONFIG
|
||||
unset FEXTRAS
|
||||
unset FRC
|
||||
|
||||
@@ -40,6 +40,8 @@ px4_add_romfs_files(
|
||||
babyshark.main.mix
|
||||
blade130.main.mix
|
||||
CCPM.main.mix
|
||||
claire.aux.mix
|
||||
claire.main.mix
|
||||
cloudship.main.mix
|
||||
coax.main.mix
|
||||
delta.main.mix
|
||||
@@ -81,6 +83,7 @@ px4_add_romfs_files(
|
||||
tri_y_yaw-.main.mix
|
||||
uuv_x.main.mix
|
||||
vectored6dof.main.mix
|
||||
Viper.main.mix
|
||||
vtol_AAERT.aux.mix
|
||||
vtol_AAVVT.aux.mix
|
||||
vtol_TTTTAAER.aux.mix
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
Viper Delta-wing mixer
|
||||
=================================
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
Designed for Viper.
|
||||
|
||||
TODO (sjwilks): Add mixers for flaps.
|
||||
|
||||
This file defines mixers suitable for controlling a delta wing aircraft using
|
||||
PX4FMU. The configuration assumes the elevon servos are connected to PX4FMU
|
||||
servo outputs 0 and 1 and the motor speed control to output 3. Output 2 is
|
||||
assumed to be unused.
|
||||
|
||||
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
|
||||
(roll), 1 (pitch) and 3 (thrust).
|
||||
|
||||
See the README for more information on the scaler format.
|
||||
|
||||
Elevon mixers
|
||||
-------------
|
||||
Three scalers total (output, roll, pitch).
|
||||
|
||||
On the assumption that the two elevon servos are physically reversed, the pitch
|
||||
input is inverted between the two servos.
|
||||
|
||||
The scaling factor for roll inputs is adjusted to implement differential travel
|
||||
for the elevons.
|
||||
|
||||
M: 2
|
||||
S: 0 0 7500 7500 0 -10000 10000
|
||||
S: 0 1 8000 8000 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
S: 0 0 7500 7500 0 -10000 10000
|
||||
S: 0 1 -8000 -8000 0 -10000 10000
|
||||
|
||||
Output 2
|
||||
--------
|
||||
This mixer is empty.
|
||||
|
||||
Z:
|
||||
|
||||
Motor speed mixer
|
||||
-----------------
|
||||
Two scalers total (output, thrust).
|
||||
|
||||
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
|
||||
range. Inputs below zero are treated as zero.
|
||||
|
||||
M: 1
|
||||
S: 0 3 0 20000 -10000 -10000 10000
|
||||
|
||||
Inputs to the mixer come from channel group 2 (payload), channels 0
|
||||
(bay servo 1), 1 (bay servo 2) and 3 (drop release).
|
||||
-----------------------------------------------------
|
||||
|
||||
M: 1
|
||||
S: 2 0 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
S: 2 1 10000 10000 0 -10000 10000
|
||||
|
||||
M: 1
|
||||
S: 2 2 -8000 -8000 0 -10000 10000
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# mixer for the CruiseAder Claire tilt mechansim servo and elevons
|
||||
|
||||
=======================================================================
|
||||
|
||||
|
||||
Tilt mechanism servo mixer
|
||||
|
||||
---------------------------
|
||||
|
||||
M: 1
|
||||
|
||||
|
||||
S: 1 8 10000 10000 0 -10000 10000
|
||||
|
||||
|
||||
|
||||
Elevon mixers
|
||||
|
||||
-------------
|
||||
|
||||
M: 2
|
||||
|
||||
S: 1 0 7500 7500 0 -10000 10000
|
||||
S: 1 1 7500 7500 0 -10000 10000
|
||||
|
||||
M: 2
|
||||
S: 1 0 7500 7500 0 -10000 10000
|
||||
S: 1 1 -7500 -7500 0 -10000 10000
|
||||
@@ -0,0 +1,8 @@
|
||||
# CruiseAder Claire Main Multirotor mixer for PX4FMU
|
||||
# @board px4_fmu-v2 exclude
|
||||
|
||||
#
|
||||
|
||||
#===========================
|
||||
|
||||
R: 4x
|
||||
@@ -5,7 +5,7 @@ Tailsitter duo mixer
|
||||
This file defines a mixer for a generic duo tailsitter VTOL (eg TBS Caipirinha tailsitter edition). This vehicle
|
||||
has two motors in total, one attached to each wing. It also has two elevons which
|
||||
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
|
||||
on the main PWM output port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
on the main PWM ouput port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
|
||||
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Tailsitter duo mixer
|
||||
This file defines a mixer for a generic duo tailsitter VTOL (eg TBS Caipirinha tailsitter edition). This vehicle
|
||||
has two motors in total, one attached to each wing. It also has two elevons which
|
||||
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
|
||||
on the main PWM output port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
on the main PWM ouput port, two at 400Hz for the motors, and two at 50Hz for the
|
||||
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
|
||||
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ def do_nsh_cmd(port_url, baudrate, cmd):
|
||||
|
||||
|
||||
timeout_start = time.monotonic()
|
||||
timeout = 600 # 10 minutes
|
||||
timeout = 240 # 4 minutes
|
||||
|
||||
return_code = 0
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ exec find boards msg src platforms test \
|
||||
-path platforms/qurt/dspal -prune -o \
|
||||
-path src/drivers/uavcan/libuavcan -prune -o \
|
||||
-path src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis -prune -o \
|
||||
-path src/drivers/cyphal/libcanard -prune -o \
|
||||
-path src/drivers/uavcan_v1/libcanard -prune -o \
|
||||
-path src/drivers/uavcannode_gps_demo/libcanard -prune -o \
|
||||
-path src/lib/crypto/monocypher -prune -o \
|
||||
-path src/lib/events/libevents -prune -o \
|
||||
-path src/lib/parameters/uthash -prune -o \
|
||||
-path src/lib/wind_estimator/python/generated -prune -o \
|
||||
-path src/modules/ekf2/EKF -prune -o \
|
||||
-path src/modules/gyro_fft/CMSIS_5 -prune -o \
|
||||
-path src/modules/mavlink/mavlink -prune -o \
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "${DOCKER_TAG}" ]]; then
|
||||
# the default tag for docker images
|
||||
# follows the pattern below, and we recommend
|
||||
# that any images pushed to the registry continue
|
||||
# to use the pattern for consistency
|
||||
TAG_NAME="`date +"%Y-%m-%d"`"
|
||||
else
|
||||
TAG_NAME="${DOCKER_TAG}"
|
||||
fi
|
||||
|
||||
PX4_DOCKER_REPO="ghcr.io/px4/px4-dev:$TAG_NAME"
|
||||
PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
SRC_DIR=$PWD/../
|
||||
|
||||
echo "[docker_build.sh]: Building [$PX4_DOCKER_REPO]"
|
||||
|
||||
docker build \
|
||||
-t ${PX4_DOCKER_REPO} \
|
||||
-f Tools/setup/Dockerfile "${SRC_DIR}"
|
||||
+57
-19
@@ -1,29 +1,67 @@
|
||||
#!/bin/bash
|
||||
#! /bin/bash
|
||||
|
||||
if [[ -z "${DOCKER_TAG}" ]]; then
|
||||
# The default tag name should be hardcoded
|
||||
# to whatever we are currently using in CI on this branch
|
||||
TAG_NAME="2022-08-16"
|
||||
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
echo "guessing PX4_DOCKER_REPO based on input";
|
||||
if [[ $@ =~ .*px4_fmu.* ]]; then
|
||||
# nuttx-px4fmu-v{1,2,3,4,5}
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-09-08"
|
||||
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*pilotpi.default ]]; then
|
||||
# beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, scumaker_pilotpi_default
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-08-18"
|
||||
elif [[ $@ =~ .*pilotpi.arm64 ]]; then
|
||||
# scumaker_pilotpi_arm64
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-aarch64:latest"
|
||||
elif [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*bebop.* ]]; then
|
||||
# posix_rpi_cross, posix_bebop_default
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2021-08-18"
|
||||
elif [[ $@ =~ .*clang.* ]] || [[ $@ =~ .*scan-build.* ]]; then
|
||||
# clang tools
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-clang:2021-02-04"
|
||||
elif [[ $@ =~ .*tests* ]]; then
|
||||
# run all tests with simulation
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-simulation-bionic:2021-12-11"
|
||||
fi
|
||||
else
|
||||
TAG_NAME="${DOCKER_TAG}"
|
||||
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
|
||||
fi
|
||||
|
||||
PX4_DOCKER_REPO="ghcr.io/px4/px4-dev:$TAG_NAME"
|
||||
# otherwise default to nuttx
|
||||
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2021-09-08"
|
||||
fi
|
||||
|
||||
echo "[docker_run.sh]: Running '$PX4_DOCKER_REPO'"
|
||||
# docker hygiene
|
||||
|
||||
#Delete all stopped containers (including data-only containers)
|
||||
#docker rm $(docker ps -a -q)
|
||||
|
||||
#Delete all 'untagged/dangling' (<none>) images
|
||||
#docker rmi $(docker images -q -f dangling=true)
|
||||
|
||||
echo "PX4_DOCKER_REPO: $PX4_DOCKER_REPO";
|
||||
|
||||
PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
SRC_DIR=$PWD/../
|
||||
|
||||
CCACHE_DIR=${HOME}/.ccache
|
||||
mkdir -p "${CCACHE_DIR}"
|
||||
|
||||
docker run -it --rm -w "${SRC_DIR}" \
|
||||
--env=LOCAL_USER_ID="$(id -u)" \
|
||||
--env=AWS_ACCESS_KEY_ID \
|
||||
--env=AWS_SECRET_ACCESS_KEY \
|
||||
--env=BRANCH_NAME \
|
||||
--env=CCACHE_DIR="${CCACHE_DIR}" \
|
||||
--env=CI \
|
||||
--publish 14556:14556/udp \
|
||||
--volume=/tmp/.X11-unix:/tmp/.X11-unix \
|
||||
--volume=/tmp:/tmp:rw \
|
||||
--volume=${SRC_DIR}:${SRC_DIR}:rw \
|
||||
${PX4_DOCKER_REPO} /bin/bash -c "$1 $2 $3"
|
||||
--env=AWS_ACCESS_KEY_ID \
|
||||
--env=AWS_SECRET_ACCESS_KEY \
|
||||
--env=BRANCH_NAME \
|
||||
--env=CCACHE_DIR="${CCACHE_DIR}" \
|
||||
--env=CI \
|
||||
--env=CODECOV_TOKEN \
|
||||
--env=COVERALLS_REPO_TOKEN \
|
||||
--env=LOCAL_USER_ID="$(id -u)" \
|
||||
--env=PX4_ASAN \
|
||||
--env=PX4_MSAN \
|
||||
--env=PX4_TSAN \
|
||||
--env=PX4_UBSAN \
|
||||
--env=TRAVIS_BRANCH \
|
||||
--env=TRAVIS_BUILD_ID \
|
||||
--publish 14556:14556/udp \
|
||||
--volume=${CCACHE_DIR}:${CCACHE_DIR}:rw \
|
||||
--volume=${SRC_DIR}:${SRC_DIR}:rw \
|
||||
${PX4_DOCKER_REPO} /bin/bash -c "$1 $2 $3"
|
||||
|
||||
@@ -11,7 +11,7 @@ from pyulog import ULog
|
||||
from analysis.detectors import InAirDetector, PreconditionError
|
||||
from analysis.metrics import calculate_ecl_ekf_metrics
|
||||
from analysis.checks import perform_ecl_ekf_checks
|
||||
from analysis.post_processing import get_gps_check_fail_flags
|
||||
from analysis.post_processing import get_estimator_check_flags
|
||||
|
||||
def analyse_ekf(
|
||||
ulog: ULog, check_levels: Dict[str, float], multi_instance: int = 0,
|
||||
@@ -40,11 +40,6 @@ def analyse_ekf(
|
||||
except:
|
||||
raise PreconditionError('could not find estimator_status instance', multi_instance)
|
||||
|
||||
try:
|
||||
estimator_status_flags = ulog.get_dataset('estimator_status_flags', multi_instance).data
|
||||
except:
|
||||
raise PreconditionError('could not find estimator_status_flags instance', multi_instance)
|
||||
|
||||
try:
|
||||
_ = ulog.get_dataset('estimator_innovations', multi_instance).data
|
||||
except:
|
||||
@@ -66,14 +61,14 @@ def analyse_ekf(
|
||||
'in_air_transition_time': round(in_air.take_off + in_air.log_start, 2),
|
||||
'on_ground_transition_time': round(in_air.landing + in_air.log_start, 2)}
|
||||
|
||||
gps_fail_flags = get_gps_check_fail_flags(estimator_status)
|
||||
control_mode, innov_flags, gps_fail_flags = get_estimator_check_flags(estimator_status)
|
||||
|
||||
sensor_checks, innov_fail_checks = find_checks_that_apply(
|
||||
estimator_status_flags, estimator_status,
|
||||
control_mode, estimator_status,
|
||||
pos_checks_when_sensors_not_fused=pos_checks_when_sensors_not_fused)
|
||||
|
||||
metrics = calculate_ecl_ekf_metrics(
|
||||
ulog, estimator_status_flags, innov_fail_checks, sensor_checks, in_air, in_air_no_ground_effects,
|
||||
ulog, innov_flags, innov_fail_checks, sensor_checks, in_air, in_air_no_ground_effects,
|
||||
multi_instance, red_thresh=red_thresh, amb_thresh=amb_thresh)
|
||||
|
||||
check_status, master_status = perform_ecl_ekf_checks(
|
||||
@@ -83,12 +78,12 @@ def analyse_ekf(
|
||||
|
||||
|
||||
def find_checks_that_apply(
|
||||
estimator_status_flags: dict, estimator_status: dict, pos_checks_when_sensors_not_fused: bool = False) ->\
|
||||
control_mode: dict, estimator_status: dict, pos_checks_when_sensors_not_fused: bool = False) ->\
|
||||
Tuple[List[str], List[str]]:
|
||||
"""
|
||||
finds the checks that apply and stores them in lists for the std checks and the innovation
|
||||
fail checks.
|
||||
:param estimator_status_flags:
|
||||
:param control_mode:
|
||||
:param estimator_status:
|
||||
:param b_pos_only_when_sensors_fused:
|
||||
:return: a tuple of two lists that contain strings for the std checks and for the innovation
|
||||
@@ -102,7 +97,7 @@ def find_checks_that_apply(
|
||||
innov_fail_checks.append('posv')
|
||||
|
||||
# Magnetometer Sensor Checks
|
||||
if (np.amax(estimator_status_flags['cs_yaw_align']) > 0.5):
|
||||
if (np.amax(control_mode['yaw_aligned']) > 0.5):
|
||||
sensor_checks.append('mag')
|
||||
|
||||
innov_fail_checks.append('magx')
|
||||
@@ -111,14 +106,13 @@ def find_checks_that_apply(
|
||||
innov_fail_checks.append('yaw')
|
||||
|
||||
# Velocity Sensor Checks
|
||||
if (np.amax(estimator_status_flags['cs_gps']) > 0.5):
|
||||
if (np.amax(control_mode['using_gps']) > 0.5):
|
||||
sensor_checks.append('vel')
|
||||
innov_fail_checks.append('velh')
|
||||
innov_fail_checks.append('velv')
|
||||
innov_fail_checks.append('vel')
|
||||
|
||||
# Position Sensor Checks
|
||||
if (pos_checks_when_sensors_not_fused or (np.amax(estimator_status_flags['cs_gps']) > 0.5)
|
||||
or (np.amax(estimator_status_flags['cs_ev_pos']) > 0.5)):
|
||||
if (pos_checks_when_sensors_not_fused or (np.amax(control_mode['using_gps']) > 0.5)
|
||||
or (np.amax(control_mode['using_evpos']) > 0.5)):
|
||||
sensor_checks.append('pos')
|
||||
innov_fail_checks.append('posh')
|
||||
|
||||
@@ -134,7 +128,7 @@ def find_checks_that_apply(
|
||||
innov_fail_checks.append('hagl')
|
||||
|
||||
# optical flow sensor checks
|
||||
if (np.amax(estimator_status_flags['cs_opt_flow']) > 0.5):
|
||||
if (np.amax(control_mode['using_optflow']) > 0.5):
|
||||
innov_fail_checks.append('ofx')
|
||||
innov_fail_checks.append('ofy')
|
||||
|
||||
|
||||
@@ -123,8 +123,7 @@ def perform_sensor_innov_checks(
|
||||
('magy', 'magy_fail_percentage', 'mag'),
|
||||
('magz', 'magz_fail_percentage', 'mag'),
|
||||
('yaw', 'yaw_fail_percentage', 'yaw'),
|
||||
('velh', 'vel_fail_percentage', 'vel'),
|
||||
('velv', 'vel_fail_percentage', 'vel'),
|
||||
('vel', 'vel_fail_percentage', 'vel'),
|
||||
('posh', 'pos_fail_percentage', 'pos'),
|
||||
('tas', 'tas_fail_percentage', 'tas'),
|
||||
('hagl', 'hagl_fail_percentage', 'hagl'),
|
||||
|
||||
@@ -11,7 +11,7 @@ import numpy as np
|
||||
from analysis.detectors import InAirDetector
|
||||
|
||||
def calculate_ecl_ekf_metrics(
|
||||
ulog: ULog, estimator_status_flags: Dict[str, float], innov_fail_checks: List[str],
|
||||
ulog: ULog, innov_flags: Dict[str, float], innov_fail_checks: List[str],
|
||||
sensor_checks: List[str], in_air: InAirDetector, in_air_no_ground_effects: InAirDetector,
|
||||
multi_instance: int = 0, red_thresh: float = 1.0, amb_thresh: float = 0.5) -> Tuple[dict, dict, dict, dict]:
|
||||
|
||||
@@ -20,7 +20,7 @@ def calculate_ecl_ekf_metrics(
|
||||
red_thresh=red_thresh, amb_thresh=amb_thresh)
|
||||
|
||||
innov_fail_metrics = calculate_innov_fail_metrics(
|
||||
estimator_status_flags, innov_fail_checks, in_air, in_air_no_ground_effects)
|
||||
innov_flags, innov_fail_checks, in_air, in_air_no_ground_effects)
|
||||
|
||||
imu_metrics = calculate_imu_metrics(ulog, multi_instance, in_air_no_ground_effects)
|
||||
|
||||
@@ -90,10 +90,10 @@ def calculate_sensor_metrics(
|
||||
|
||||
|
||||
def calculate_innov_fail_metrics(
|
||||
estimator_status_flags: dict, innov_fail_checks: List[str], in_air: InAirDetector,
|
||||
innov_flags: dict, innov_fail_checks: List[str], in_air: InAirDetector,
|
||||
in_air_no_ground_effects: InAirDetector) -> dict:
|
||||
"""
|
||||
:param estimator_status_flags:
|
||||
:param innov_flags:
|
||||
:param innov_fail_checks:
|
||||
:param in_air:
|
||||
:param in_air_no_ground_effects:
|
||||
@@ -103,18 +103,17 @@ def calculate_innov_fail_metrics(
|
||||
innov_fail_metrics = dict()
|
||||
|
||||
# calculate innovation check fail metrics
|
||||
for signal_id, signal, result in [('posv', 'reject_ver_pos', 'hgt_fail_percentage'),
|
||||
('magx', 'reject_mag_x', 'magx_fail_percentage'),
|
||||
('magy', 'reject_mag_y', 'magy_fail_percentage'),
|
||||
('magz', 'reject_mag_z', 'magz_fail_percentage'),
|
||||
('yaw', 'reject_yaw', 'yaw_fail_percentage'),
|
||||
('velh', 'reject_hor_vel', 'vel_fail_percentage'),
|
||||
('velv', 'reject_ver_vel', 'vel_fail_percentage'),
|
||||
('posh', 'reject_hor_pos', 'pos_fail_percentage'),
|
||||
('tas', 'reject_airspeed', 'tas_fail_percentage'),
|
||||
('hagl', 'reject_hagl', 'hagl_fail_percentage'),
|
||||
('ofx', 'reject_optflow_x', 'ofx_fail_percentage'),
|
||||
('ofy', 'reject_optflow_y', 'ofy_fail_percentage')]:
|
||||
for signal_id, signal, result in [('posv', 'posv_innov_fail', 'hgt_fail_percentage'),
|
||||
('magx', 'magx_innov_fail', 'magx_fail_percentage'),
|
||||
('magy', 'magy_innov_fail', 'magy_fail_percentage'),
|
||||
('magz', 'magz_innov_fail', 'magz_fail_percentage'),
|
||||
('yaw', 'yaw_innov_fail', 'yaw_fail_percentage'),
|
||||
('vel', 'vel_innov_fail', 'vel_fail_percentage'),
|
||||
('posh', 'posh_innov_fail', 'pos_fail_percentage'),
|
||||
('tas', 'tas_innov_fail', 'tas_fail_percentage'),
|
||||
('hagl', 'hagl_innov_fail', 'hagl_fail_percentage'),
|
||||
('ofx', 'ofx_innov_fail', 'ofx_fail_percentage'),
|
||||
('ofy', 'ofy_innov_fail', 'ofy_fail_percentage')]:
|
||||
|
||||
# only run innov fail checks, if they apply.
|
||||
if signal_id in innov_fail_checks:
|
||||
@@ -126,7 +125,7 @@ def calculate_innov_fail_metrics(
|
||||
in_air_detector = in_air
|
||||
|
||||
innov_fail_metrics[result] = calculate_stat_from_signal(
|
||||
estimator_status_flags, 'estimator_status_flags', signal, in_air_detector,
|
||||
innov_flags, 'estimator_status', signal, in_air_detector,
|
||||
lambda x: 100.0 * np.mean(x > 0.5))
|
||||
|
||||
return innov_fail_metrics
|
||||
@@ -153,7 +152,7 @@ def calculate_imu_metrics(ulog: ULog, multi_instance, in_air_no_ground_effects:
|
||||
|
||||
if vehicle_imu_status_data['accel_device_id'][0] == estimator_status_data['accel_device_id'][0]:
|
||||
|
||||
for signal, result in [('gyro_coning_vibration', 'imu_coning'),
|
||||
for signal, result in [('delta_angle_coning_metric', 'imu_coning'),
|
||||
('gyro_vibration_metric', 'imu_hfgyro'),
|
||||
('accel_vibration_metric', 'imu_hfaccel')]:
|
||||
|
||||
|
||||
@@ -7,6 +7,115 @@ from typing import Tuple
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
def get_estimator_check_flags(estimator_status: dict) -> Tuple[dict, dict, dict]:
|
||||
"""
|
||||
:param estimator_status:
|
||||
:return:
|
||||
"""
|
||||
control_mode = get_control_mode_flags(estimator_status)
|
||||
innov_flags = get_innovation_check_flags(estimator_status)
|
||||
gps_fail_flags = get_gps_check_fail_flags(estimator_status)
|
||||
return control_mode, innov_flags, gps_fail_flags
|
||||
|
||||
|
||||
def get_control_mode_flags(estimator_status: dict) -> dict:
|
||||
"""
|
||||
:param estimator_status:
|
||||
:return:
|
||||
"""
|
||||
|
||||
control_mode = dict()
|
||||
# extract control mode metadata from estimator_status.control_mode_flags
|
||||
# 0 - true if the filter tilt alignment is complete
|
||||
# 1 - true if the filter yaw alignment is complete
|
||||
# 2 - true if GPS measurements are being fused
|
||||
# 3 - true if optical flow measurements are being fused
|
||||
# 4 - true if a simple magnetic yaw heading is being fused
|
||||
# 5 - true if 3-axis magnetometer measurement are being fused
|
||||
# 6 - true if synthetic magnetic declination measurements are being fused
|
||||
# 7 - true when the vehicle is airborne
|
||||
# 8 - true when wind velocity is being estimated
|
||||
# 9 - true when baro height is being fused as a primary height reference
|
||||
# 10 - true when range finder height is being fused as a primary height reference
|
||||
# 11 - true when range finder height is being fused as a primary height reference
|
||||
# 12 - true when local position data from external vision is being fused
|
||||
# 13 - true when yaw data from external vision measurements is being fused
|
||||
# 14 - true when height data from external vision measurements is being fused
|
||||
# 15 - true when synthetic sideslip measurements are being fused
|
||||
# 16 - true true when the mag field does not match the expected strength
|
||||
# 17 - true true when the vehicle is operating as a fixed wing vehicle
|
||||
# 18 - true when the magnetometer has been declared faulty and is no longer being used
|
||||
# 19 - true true when airspeed measurements are being fused
|
||||
# 20 - true true when protection from ground effect induced static pressure rise is active
|
||||
# 21 - true when rng data wasn't ready for more than 10s and new rng values haven't changed enough
|
||||
# 22 - true when yaw (not ground course) data from a GPS receiver is being fused
|
||||
# 23 - true when the in-flight mag field alignment has been completed
|
||||
# 24 - true when local earth frame velocity data from external vision measurements are being fused
|
||||
# 25 - true when we are using a synthesized measurement for the magnetometer Z component
|
||||
control_mode['tilt_aligned'] = ((2 ** 0 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['yaw_aligned'] = ((2 ** 1 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_gps'] = ((2 ** 2 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_optflow'] = ((2 ** 3 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_magyaw'] = ((2 ** 4 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_mag3d'] = ((2 ** 5 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_magdecl'] = ((2 ** 6 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['airborne'] = ((2 ** 7 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['estimating_wind'] = ((2 ** 8 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_barohgt'] = ((2 ** 9 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_rnghgt'] = ((2 ** 10 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_gpshgt'] = ((2 ** 11 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_evpos'] = ((2 ** 12 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_evyaw'] = ((2 ** 13 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['using_evhgt'] = ((2 ** 14 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['fuse_beta'] = ((2 ** 15 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['mag_field_disturbed'] = ((2 ** 16 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['fixed_wing'] = ((2 ** 17 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['mag_fault'] = ((2 ** 18 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['fuse_aspd'] = ((2 ** 19 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['gnd_effect'] = ((2 ** 20 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['rng_stuck'] = ((2 ** 21 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['gps_yaw'] = ((2 ** 22 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['mag_aligned_in_flight'] = ((2 ** 23 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['ev_vel'] = ((2 ** 24 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
control_mode['synthetic_mag_z'] = ((2 ** 25 & estimator_status['control_mode_flags']) > 0) * 1
|
||||
return control_mode
|
||||
|
||||
def get_innovation_check_flags(estimator_status: dict) -> dict:
|
||||
"""
|
||||
:param estimator_status:
|
||||
:return:
|
||||
"""
|
||||
|
||||
innov_flags = dict()
|
||||
# innovation_check_flags summary
|
||||
# 0 - true if velocity observations have been rejected
|
||||
# 1 - true if horizontal position observations have been rejected
|
||||
# 2 - true if true if vertical position observations have been rejected
|
||||
# 3 - true if the X magnetometer observation has been rejected
|
||||
# 4 - true if the Y magnetometer observation has been rejected
|
||||
# 5 - true if the Z magnetometer observation has been rejected
|
||||
# 6 - true if the yaw observation has been rejected
|
||||
# 7 - true if the airspeed observation has been rejected
|
||||
# 8 - true if synthetic sideslip observation has been rejected
|
||||
# 9 - true if the height above ground observation has been rejected
|
||||
# 10 - true if the X optical flow observation has been rejected
|
||||
# 11 - true if the Y optical flow observation has been rejected
|
||||
innov_flags['vel_innov_fail'] = ((2 ** 0 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['posh_innov_fail'] = ((2 ** 1 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['posv_innov_fail'] = ((2 ** 2 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['magx_innov_fail'] = ((2 ** 3 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['magy_innov_fail'] = ((2 ** 4 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['magz_innov_fail'] = ((2 ** 5 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['yaw_innov_fail'] = ((2 ** 6 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['tas_innov_fail'] = ((2 ** 7 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['sli_innov_fail'] = ((2 ** 8 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['hagl_innov_fail'] = ((2 ** 9 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['ofx_innov_fail'] = ((2 ** 10 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
innov_flags['ofy_innov_fail'] = ((2 ** 11 & estimator_status['innovation_check_flags']) > 0) * 1
|
||||
return innov_flags
|
||||
|
||||
|
||||
def get_gps_check_fail_flags(estimator_status: dict) -> dict:
|
||||
"""
|
||||
:param estimator_status:
|
||||
|
||||
@@ -11,7 +11,7 @@ import numpy as np
|
||||
from matplotlib.backends.backend_pdf import PdfPages
|
||||
from pyulog import ULog
|
||||
|
||||
from analysis.post_processing import magnetic_field_estimates_from_states, get_gps_check_fail_flags
|
||||
from analysis.post_processing import magnetic_field_estimates_from_states, get_estimator_check_flags
|
||||
from plotting.data_plots import TimeSeriesPlot, InnovationPlot, ControlModeSummaryPlot, \
|
||||
CheckFlagsPlot
|
||||
from analysis.detectors import PreconditionError
|
||||
@@ -33,11 +33,6 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
except:
|
||||
raise PreconditionError('could not find estimator_status instance', multi_instance)
|
||||
|
||||
try:
|
||||
estimator_status_flags = ulog.get_dataset('estimator_status_flags', multi_instance).data
|
||||
except:
|
||||
raise PreconditionError('could not find estimator_status_flags instance', multi_instance)
|
||||
|
||||
try:
|
||||
estimator_states = ulog.get_dataset('estimator_states', multi_instance).data
|
||||
except:
|
||||
@@ -73,13 +68,12 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
except:
|
||||
raise PreconditionError('could not find innovation data')
|
||||
|
||||
gps_fail_flags = get_gps_check_fail_flags(estimator_status)
|
||||
control_mode, innov_flags, gps_fail_flags = get_estimator_check_flags(estimator_status)
|
||||
|
||||
status_time = 1e-6 * estimator_status['timestamp']
|
||||
status_flags_time = 1e-6 * estimator_status_flags['timestamp']
|
||||
|
||||
b_finishes_in_air, b_starts_in_air, in_air_duration, in_air_transition_time, \
|
||||
on_ground_transition_time = detect_airtime(estimator_status_flags, status_flags_time)
|
||||
on_ground_transition_time = detect_airtime(control_mode, status_time)
|
||||
|
||||
with PdfPages(output_plot_filename) as pdf_pages:
|
||||
|
||||
@@ -179,9 +173,9 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
|
||||
# plot control mode summary A
|
||||
data_plot = ControlModeSummaryPlot(
|
||||
status_flags_time, estimator_status_flags, [['cs_tilt_align', 'cs_yaw_align'],
|
||||
['cs_gps', 'cs_opt_flow', 'cs_ev_pos'], ['cs_baro_hgt', 'cs_gps_hgt',
|
||||
'cs_rng_hgt', 'cs_ev_hgt'], ['cs_mag_hdg', 'cs_mag_3d', 'cs_mag_dec']],
|
||||
status_time, control_mode, [['tilt_aligned', 'yaw_aligned'],
|
||||
['using_gps', 'using_optflow', 'using_evpos'], ['using_barohgt', 'using_gpshgt',
|
||||
'using_rnghgt', 'using_evhgt'], ['using_magyaw', 'using_mag3d', 'using_magdecl']],
|
||||
x_label='time (sec)', y_labels=['aligned', 'pos aiding', 'hgt aiding', 'mag aiding'],
|
||||
annotation_text=[['tilt alignment', 'yaw alignment'], ['GPS aiding', 'optical flow aiding',
|
||||
'external vision aiding'], ['Baro aiding', 'GPS aiding', 'rangefinder aiding',
|
||||
@@ -194,7 +188,7 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
# plot control mode summary B
|
||||
# construct additional annotations for the airborne plot
|
||||
airborne_annotations = list()
|
||||
if np.amin(np.diff(estimator_status_flags['cs_in_air'])) > -0.5:
|
||||
if np.amin(np.diff(control_mode['airborne'])) > -0.5:
|
||||
airborne_annotations.append(
|
||||
(on_ground_transition_time, 'air to ground transition not detected'))
|
||||
else:
|
||||
@@ -203,7 +197,7 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
if in_air_duration > 0.0:
|
||||
airborne_annotations.append(((in_air_transition_time + on_ground_transition_time) / 2,
|
||||
'duration = {:.1f} sec'.format(in_air_duration)))
|
||||
if np.amax(np.diff(estimator_status_flags['cs_in_air'])) < 0.5:
|
||||
if np.amax(np.diff(control_mode['airborne'])) < 0.5:
|
||||
airborne_annotations.append(
|
||||
(in_air_transition_time, 'ground to air transition not detected'))
|
||||
else:
|
||||
@@ -211,7 +205,7 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
(in_air_transition_time, 'in-air at {:.1f} sec'.format(in_air_transition_time)))
|
||||
|
||||
data_plot = ControlModeSummaryPlot(
|
||||
status_flags_time, estimator_status_flags, [['cs_in_air'], ['cs_wind']],
|
||||
status_time, control_mode, [['airborne'], ['estimating_wind']],
|
||||
x_label='time (sec)', y_labels=['airborne', 'estimating wind'], annotation_text=[[], []],
|
||||
additional_annotation=[airborne_annotations, []],
|
||||
plot_title='EKF Control Status - Figure B', pdf_handle=pdf_pages)
|
||||
@@ -220,15 +214,15 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
|
||||
# plot innovation_check_flags summary
|
||||
data_plot = CheckFlagsPlot(
|
||||
status_flags_time, estimator_status_flags, [['reject_hor_vel', 'reject_hor_pos'], ['reject_ver_vel', 'reject_ver_pos',
|
||||
'reject_hagl'],
|
||||
['reject_mag_x', 'reject_mag_y', 'reject_mag_z',
|
||||
'reject_yaw'], ['reject_airspeed'], ['reject_sideslip'],
|
||||
['reject_optflow_x',
|
||||
'reject_optflow_y']], x_label='time (sec)',
|
||||
status_time, innov_flags, [['vel_innov_fail', 'posh_innov_fail'], ['posv_innov_fail',
|
||||
'hagl_innov_fail'],
|
||||
['magx_innov_fail', 'magy_innov_fail', 'magz_innov_fail',
|
||||
'yaw_innov_fail'], ['tas_innov_fail'], ['sli_innov_fail'],
|
||||
['ofx_innov_fail',
|
||||
'ofy_innov_fail']], x_label='time (sec)',
|
||||
y_labels=['failed', 'failed', 'failed', 'failed', 'failed', 'failed'],
|
||||
y_lim=(-0.1, 1.1),
|
||||
legend=[['vel NE', 'pos NE'], ['vel D', 'hgt absolute', 'hgt above ground'],
|
||||
legend=[['vel NED', 'pos NE'], ['hgt absolute', 'hgt above ground'],
|
||||
['mag_x', 'mag_y', 'mag_z', 'yaw'], ['airspeed'], ['sideslip'],
|
||||
['flow X', 'flow Y']],
|
||||
plot_title='EKF Innovation Test Fails', annotate=False, pdf_handle=pdf_pages)
|
||||
@@ -350,33 +344,33 @@ def create_pdf_report(ulog: ULog, multi_instance: int, output_plot_filename: str
|
||||
data_plot.close()
|
||||
|
||||
|
||||
def detect_airtime(estimator_status_flags, status_flags_time):
|
||||
def detect_airtime(control_mode, status_time):
|
||||
# define flags for starting and finishing in air
|
||||
b_starts_in_air = False
|
||||
b_finishes_in_air = False
|
||||
# calculate in-air transition time
|
||||
if (np.amin(estimator_status_flags['cs_in_air']) < 0.5) and (np.amax(estimator_status_flags['cs_in_air']) > 0.5):
|
||||
in_air_transtion_time_arg = np.argmax(np.diff(estimator_status_flags['cs_in_air']))
|
||||
in_air_transition_time = status_flags_time[in_air_transtion_time_arg]
|
||||
elif (np.amax(estimator_status_flags['cs_in_air']) > 0.5):
|
||||
in_air_transition_time = np.amin(status_flags_time)
|
||||
if (np.amin(control_mode['airborne']) < 0.5) and (np.amax(control_mode['airborne']) > 0.5):
|
||||
in_air_transtion_time_arg = np.argmax(np.diff(control_mode['airborne']))
|
||||
in_air_transition_time = status_time[in_air_transtion_time_arg]
|
||||
elif (np.amax(control_mode['airborne']) > 0.5):
|
||||
in_air_transition_time = np.amin(status_time)
|
||||
print('log starts while in-air at ' + str(round(in_air_transition_time, 1)) + ' sec')
|
||||
b_starts_in_air = True
|
||||
else:
|
||||
in_air_transition_time = float('NaN')
|
||||
print('always on ground')
|
||||
# calculate on-ground transition time
|
||||
if (np.amin(np.diff(estimator_status_flags['cs_in_air'])) < 0.0):
|
||||
on_ground_transition_time_arg = np.argmin(np.diff(estimator_status_flags['cs_in_air']))
|
||||
on_ground_transition_time = status_flags_time[on_ground_transition_time_arg]
|
||||
elif (np.amax(estimator_status_flags['cs_in_air']) > 0.5):
|
||||
on_ground_transition_time = np.amax(status_flags_time)
|
||||
if (np.amin(np.diff(control_mode['airborne'])) < 0.0):
|
||||
on_ground_transition_time_arg = np.argmin(np.diff(control_mode['airborne']))
|
||||
on_ground_transition_time = status_time[on_ground_transition_time_arg]
|
||||
elif (np.amax(control_mode['airborne']) > 0.5):
|
||||
on_ground_transition_time = np.amax(status_time)
|
||||
print('log finishes while in-air at ' + str(round(on_ground_transition_time, 1)) + ' sec')
|
||||
b_finishes_in_air = True
|
||||
else:
|
||||
on_ground_transition_time = float('NaN')
|
||||
print('always on ground')
|
||||
if (np.amax(np.diff(estimator_status_flags['cs_in_air'])) > 0.5) and (np.amin(np.diff(estimator_status_flags['cs_in_air'])) < -0.5):
|
||||
if (np.amax(np.diff(control_mode['airborne'])) > 0.5) and (np.amin(np.diff(control_mode['airborne'])) < -0.5):
|
||||
if ((on_ground_transition_time - in_air_transition_time) > 0.0):
|
||||
in_air_duration = on_ground_transition_time - in_air_transition_time
|
||||
else:
|
||||
|
||||
+4
-12
@@ -5,13 +5,12 @@ set -e
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cd "$SCRIPT_DIR/jMAVSim"
|
||||
|
||||
port=4560
|
||||
tcp_port=4560
|
||||
extra_args=
|
||||
baudrate=921600
|
||||
device=
|
||||
ip="127.0.0.1"
|
||||
protocol="tcp"
|
||||
while getopts ":b:d:u:p:qsr:f:i:loat" opt; do
|
||||
while getopts ":b:d:p:qsr:f:i:loat" opt; do
|
||||
case $opt in
|
||||
b)
|
||||
baudrate=$OPTARG
|
||||
@@ -19,14 +18,11 @@ while getopts ":b:d:u:p:qsr:f:i:loat" opt; do
|
||||
d)
|
||||
device="$OPTARG"
|
||||
;;
|
||||
u)
|
||||
protocol="udp"
|
||||
;;
|
||||
i)
|
||||
ip="$OPTARG"
|
||||
;;
|
||||
p)
|
||||
port=$OPTARG
|
||||
tcp_port=$OPTARG
|
||||
;;
|
||||
q)
|
||||
extra_args="$extra_args -qgc"
|
||||
@@ -57,11 +53,7 @@ while getopts ":b:d:u:p:qsr:f:i:loat" opt; do
|
||||
done
|
||||
|
||||
if [ "$device" == "" ]; then
|
||||
if [ "$protocol" == "tcp" ]; then
|
||||
device="-tcp $ip:$port"
|
||||
else
|
||||
device="-udp $port"
|
||||
fi
|
||||
device="-tcp $ip:$tcp_port"
|
||||
else
|
||||
device="-serial $device $baudrate"
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/bin/python3
|
||||
|
||||
import parse_cmake.parsing as cmp
|
||||
import glob
|
||||
import pprint
|
||||
import re
|
||||
import os
|
||||
|
||||
__location__ = os.path.realpath(
|
||||
os.path.join(os.getcwd(), os.path.dirname(__file__)))
|
||||
|
||||
serial_regex = r"(\D\D\D\d):(/dev/ttyS\d+)"
|
||||
io_regex = r"IO (.*)"
|
||||
romfs_regex = r"ROMFSROOT (.*)"
|
||||
arch_regex = r"ARCHITECTURE (.*)"
|
||||
toolchain_regex = r"TOOLCHAIN (.*)"
|
||||
|
||||
|
||||
|
||||
def stripComments(code):
|
||||
code = str(code)
|
||||
return re.sub(r'(?m) *#.*\n?', '', code)
|
||||
|
||||
lut = {}
|
||||
with open(os.path.join(__location__, "cmake_kconfig_lut.txt"),'r') as lookup:
|
||||
for line in lookup:
|
||||
if ',' in line:
|
||||
key, value = line.strip().split(',')
|
||||
lut[key] = value
|
||||
|
||||
#for name in glob.glob('boards/*/*/*.cmake'):
|
||||
px4_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))
|
||||
|
||||
for name in glob.glob(px4_dir + '/boards/*/*/*.cmake'):
|
||||
print(name)
|
||||
with open(name, 'r') as f:
|
||||
romfs_set = False
|
||||
w = open(name.replace(".cmake",".px4board"), "w")
|
||||
for line in f:
|
||||
clean_line = stripComments(line.strip())
|
||||
value = lut.get(clean_line)
|
||||
if value is not None:
|
||||
print(value, file=w)
|
||||
print(value)
|
||||
else:
|
||||
matches = re.finditer(serial_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_SERIAL_" + match.groups()[0] + "=\"" + match.groups()[1] + "\"")
|
||||
print("CONFIG_BOARD_SERIAL_" + match.groups()[0] + "=\"" + match.groups()[1] + "\"", file=w)
|
||||
matches = re.finditer(io_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_IO=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_IO=\"" + match.groups()[0] + "\"", file=w)
|
||||
matches = re.finditer(romfs_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"" + match.groups()[0] + "\"", file=w)
|
||||
romfs_set = True
|
||||
matches = re.finditer(arch_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_ARCHITECTURE=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_ARCHITECTURE=\"" + match.groups()[0] + "\"", file=w)
|
||||
matches = re.finditer(toolchain_regex, clean_line, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
print("CONFIG_BOARD_TOOLCHAIN=\"" + match.groups()[0] + "\"")
|
||||
print("CONFIG_BOARD_TOOLCHAIN=\"" + match.groups()[0] + "\"", file=w)
|
||||
|
||||
if(romfs_set == False):
|
||||
print("CONFIG_BOARD_ROMFSROOT=\"\"", file=w)
|
||||
|
||||
|
||||
w.close()
|
||||
@@ -0,0 +1,201 @@
|
||||
PLATFORM nuttx,CONFIG_PLATFORM_NUTTX=y
|
||||
PLATFORM posix,CONFIG_PLATFORM_POSIX=y
|
||||
CONSTRAINED_MEMORY,CONFIG_BOARD_CONSTRAINED_MEMORY=y
|
||||
CONSTRAINED_FLASH,CONFIG_BOARD_CONSTRAINED_FLASH=y
|
||||
NO_HELP,CONFIG_BOARD_NO_HELP=y
|
||||
EXTERNAL_METADATA,CONFIG_BOARD_EXTERNAL_METADATA=y
|
||||
BUILD_BOOTLOADER,CONFIG_BOARD_BUILD_BOOTLOADER=y
|
||||
UAVCAN_INTERFACES 2,CONFIG_BOARD_UAVCAN_INTERFACES=2
|
||||
UAVCAN_INTERFACES 1,CONFIG_BOARD_UAVCAN_INTERFACES=1
|
||||
TESTING,CONFIG_BOARD_TESTING=y
|
||||
ETHERNET,CONFIG_BOARD_ETHERNET=y
|
||||
adc/ads1115,CONFIG_DRIVERS_ADC_ADS1115=y
|
||||
adc/board_adc,CONFIG_DRIVERS_ADC_BOARD_ADC=y
|
||||
barometer,CONFIG_COMMON_BAROMETERS=y
|
||||
barometer/bmp280,CONFIG_DRIVERS_BAROMETER_BMP280=y
|
||||
barometer/bmp388,CONFIG_DRIVERS_BAROMETER_BMP388=y
|
||||
barometer/dps310,CONFIG_DRIVERS_BAROMETER_DPS310=y
|
||||
barometer/lps22hb,CONFIG_DRIVERS_BAROMETER_LPS22HB=y
|
||||
barometer/lps25h,CONFIG_DRIVERS_BAROMETER_LPS25H=y
|
||||
barometer/lps33hw,CONFIG_DRIVERS_BAROMETER_LPS33HW=y
|
||||
barometer/mpl3115a2,CONFIG_DRIVERS_BAROMETER_MPL3115A2=y
|
||||
barometer/ms5611,CONFIG_DRIVERS_BAROMETER_MS5611=y
|
||||
barometer/tcbp001ta,CONFIG_DRIVERS_BAROMETER_TCBP001TA=y
|
||||
batt_smbus,CONFIG_DRIVERS_BATT_SMBUS=y
|
||||
bootloaders,CONFIG_DRIVERS_BOOTLOADERS=y
|
||||
camera_capture,CONFIG_DRIVERS_CAMERA_CAPTURE=y
|
||||
camera_trigger,CONFIG_DRIVERS_CAMERA_TRIGGER=y
|
||||
differential_pressure,CONFIG_DRIVERS_DIFFERENTIAL_PRESSURE=y
|
||||
distance_sensor,CONFIG_COMMON_DISTANCE_SENSOR=y
|
||||
distance_sensor/ll40ls,CONFIG_DRIVERS_DISTANCE_SENSOR_LL40LS=y
|
||||
distance_sensor/lightware_laser_serial,CONFIG_DRIVERS_DISTANCE_SENSOR_LIGHTWARE_LASER_SERIAL=y
|
||||
distance_sensor/broadcom/afbrs50,CONFIG_DRIVERS_DISTANCE_SENSOR_BROADCOM_AFBRS50=y
|
||||
distance_sensor/vl53l0x,CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L0X=y
|
||||
distance_sensor/vl53l1x,CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L1X=y
|
||||
distance_sensor/srf05,CONFIG_DRIVERS_DISTANCE_SENSOR_SRF05=y
|
||||
dshot,CONFIG_DRIVERS_DSHOT=y
|
||||
gps,CONFIG_DRIVERS_GPS=y
|
||||
heater,CONFIG_DRIVERS_HEATER=y
|
||||
imu,CONFIG_COMMON_IMU=y
|
||||
imu/adis16477,CONFIG_DRIVERS_IMU_ADIS16477=y
|
||||
imu/adis16497,CONFIG_DRIVERS_IMU_ADIS16497=y
|
||||
imu/analog_devices/adis16448,CONFIG_DRIVERS_IMU_ANALOG_DEVICES_ADIS16448=y
|
||||
imu/analog_devices/adis16470,CONFIG_DRIVERS_IMU_ANALOG_DEVICES_ADIS16470=y
|
||||
imu/bosch/bmi055,CONFIG_DRIVERS_IMU_BOSCH_BMI055=y
|
||||
imu/bosch/bmi088,CONFIG_DRIVERS_IMU_BOSCH_BMI088=y
|
||||
imu/fxas21002c,CONFIG_DRIVERS_IMU_FXAS21002C=y
|
||||
imu/fxos8701cq,CONFIG_DRIVERS_IMU_FXOS8701CQ=y
|
||||
imu/invensense/icm20602,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
|
||||
imu/invensense/icm20608g,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20608G=y
|
||||
imu/invensense/icm20649,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20649=y
|
||||
imu/invensense/icm20689,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20689=y
|
||||
imu/invensense/icm20948,CONFIG_DRIVERS_IMU_INVENSENSE_ICM20948=y
|
||||
imu/invensense/icm40609d,CONFIG_DRIVERS_IMU_INVENSENSE_ICM40609D=y
|
||||
imu/invensense/icm42605,CONFIG_DRIVERS_IMU_INVENSENSE_ICM42605=y
|
||||
imu/invensense/icm42688p,CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
imu/invensense/mpu6000,CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
|
||||
imu/invensense/mpu6500,CONFIG_DRIVERS_IMU_INVENSENSE_MPU6500=y
|
||||
imu/invensense/mpu9250,CONFIG_DRIVERS_IMU_INVENSENSE_MPU9250=y
|
||||
imu/l3gd20,CONFIG_DRIVERS_IMU_L3GD20=y
|
||||
imu/lsm303d,CONFIG_DRIVERS_IMU_LSM303D=y
|
||||
imu/st,CONFIG_DRIVERS_IMU_ST=y
|
||||
irlock,CONFIG_DRIVERS_IRLOCK=y
|
||||
lights,CONFIG_COMMON_LIGHT=y
|
||||
lights/neopixel,CONFIG_DRIVERS_LIGHTS_NEOPIXEL=y
|
||||
lights/rgbled,CONFIG_DRIVERS_LIGHTS_RGBLED=y
|
||||
lights/rgbled_ncp5623c,CONFIG_DRIVERS_LIGHTS_RGBLED_NCP5623C=y
|
||||
lights/rgbled_pwm,CONFIG_DRIVERS_LIGHTS_RGBLED_PWM=y
|
||||
magnetometer,CONFIG_COMMON_MAGNETOMETER=y
|
||||
magnetometer/akm/ak09916,CONFIG_DRIVERS_MAGNETOMETER_AKM_AK09916=y
|
||||
magnetometer/akm/ak8963,CONFIG_DRIVERS_MAGNETOMETER_AKM_AK8963=y
|
||||
magnetometer/bosch/bmm150,CONFIG_DRIVERS_MAGNETOMETER_BOSCH_BMM150=y
|
||||
magnetometer/hmc5883,CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
|
||||
magnetometer/isentek/ist8308,CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8308=y
|
||||
magnetometer/isentek/ist8310,CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
|
||||
magnetometer/lis2mdl,CONFIG_DRIVERS_MAGNETOMETER_LIS2MDL=y
|
||||
magnetometer/lis3mdl,CONFIG_DRIVERS_MAGNETOMETER_LIS3MDL=y
|
||||
magnetometer/lsm303agr,CONFIG_DRIVERS_MAGNETOMETER_LSM303AGR=y
|
||||
magnetometer/lsm9ds1_mag,CONFIG_DRIVERS_MAGNETOMETER_LSM9DS1_MAG=y
|
||||
magnetometer/qmc5883l,CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
|
||||
magnetometer/rm3100,CONFIG_DRIVERS_MAGNETOMETER_RM3100=y
|
||||
magnetometer/vtrantech/vcm1193l,CONFIG_DRIVERS_MAGNETOMETER_VTRANTECH_VCM1193L=y
|
||||
optical_flow,CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
optical_flow/paw3902,CONFIG_DRIVERS_OPTICAL_FLOW_PAW3902=y
|
||||
optical_flow/paw3901,CONFIG_DRIVERS_OPTICAL_FLOW_PMW3901=y
|
||||
optical_flow/px4flow,CONFIG_DRIVERS_OPTICAL_FLOW_PX4FLOW=y
|
||||
optical_flow/thoneflow,CONFIG_DRIVERS_OPTICAL_FLOW_THONEFLOW=y
|
||||
osd,CONFIG_DRIVERS_OSD=y
|
||||
pca9685,CONFIG_DRIVERS_PCA9685=y
|
||||
pca9685_pwm_out,CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
power_monitor/ina226,CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
power_monitor/voxlpm,CONFIG_DRIVERS_POWER_MONITOR_VOXLPM=y
|
||||
pps_capture,CONFIG_DRIVERS_PPS_CAPTURE=y
|
||||
protocol_splitter,CONFIG_DRIVERS_PROTOCOL_SPLITTER=y
|
||||
pwm_input,CONFIG_DRIVERS_PWM_INPUT=y
|
||||
pwm_out_sim,CONFIG_DRIVERS_PWM_OUT_SIM=y
|
||||
pwm_out,CONFIG_DRIVERS_PWM_OUT=y
|
||||
px4io,CONFIG_DRIVERS_PX4IO=y
|
||||
rc_input,CONFIG_DRIVERS_RC_INPUT=y
|
||||
roboclaw,CONFIG_DRIVERS_ROBOCLAW=y
|
||||
rpi_rc_in,CONFIG_DRIVERS_RPI_RC_IN=y
|
||||
rpm,CONFIG_DRIVERS_RPM=y
|
||||
safety_button,CONFIG_DRIVERS_SAFETY_BUTTON=y
|
||||
smart_battery/batmon,CONFIG_DRIVERS_SMART_BATTERY_BATMON=y
|
||||
spektrum_rc,CONFIG_DRIVERS_SPEKTRUM_RC=y
|
||||
telemetry,CONFIG_DRIVERS_TELEMETRY=y
|
||||
test_ppm,CONFIG_DRIVERS_TEST_PPM=y
|
||||
tone_alarm,CONFIG_DRIVERS_TONE_ALARM=y
|
||||
uavcan,CONFIG_DRIVERS_UAVCAN=y
|
||||
uavcannode,CONFIG_DRIVERS_UAVCANNODE=y
|
||||
uavcannode_gps_demo,CONFIG_DRIVERS_UAVCANNODE_GPS_DEMO=y
|
||||
airship_att_control,CONFIG_MODULES_AIRSHIP_ATT_CONTROL=y
|
||||
airspeed_selector,CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
velocity_controller,CONFIG_MODULES_ANGULAR_VELOCITY_CONTROLLER=y
|
||||
attitude_estimator_q,CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=y
|
||||
battery_status,CONFIG_MODULES_BATTERY_STATUS=y
|
||||
camera_feedback,CONFIG_MODULES_CAMERA_FEEDBACK=y
|
||||
commander,CONFIG_MODULES_COMMANDER=y
|
||||
control_allocator,CONFIG_MODULES_CONTROL_ALLOCATOR=y
|
||||
dataman,CONFIG_MODULES_DATAMAN=y
|
||||
ekf2,CONFIG_MODULES_EKF2=y
|
||||
esc_battery,CONFIG_MODULES_ESC_BATTERY=y
|
||||
events,CONFIG_MODULES_EVENTS=y
|
||||
flight_mode_manager,CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
|
||||
fw_att_control,CONFIG_MODULES_FW_ATT_CONTROL=y
|
||||
fw_pos_control_l1,CONFIG_MODULES_FW_POS_CONTROL_L1=y
|
||||
gyro_calibration,CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
gyro_fft,CONFIG_MODULES_GYRO_FFT=y
|
||||
land_detector,CONFIG_MODULES_LAND_DETECTOR=y
|
||||
landing_target_estimator,CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
|
||||
load_mon,CONFIG_MODULES_LOAD_MON=y
|
||||
local_position_estimator,CONFIG_MODULES_LOCAL_POSITION_ESTIMATOR=y
|
||||
logger,CONFIG_MODULES_LOGGER=y
|
||||
mavlink,CONFIG_MODULES_MAVLINK=y
|
||||
mc_att_control,CONFIG_MODULES_MC_ATT_CONTROL=y
|
||||
mc_hover_thrust_estimator,CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
mc_pos_control,CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
mc_rate_control,CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
micrortps_bridge,CONFIG_MODULES_MICRORTPS_BRIDGE=y
|
||||
microdds_client,CONFIG_MODULES_MICRODDS_CLIENT=y
|
||||
navigator,CONFIG_MODULES_NAVIGATOR=y
|
||||
px4iofirmware,CONFIG_MODULES_PX4IOFIRMWARE=y
|
||||
rc_update,CONFIG_MODULES_RC_UPDATE=y
|
||||
replay,CONFIG_MODULES_REPLAY=y
|
||||
rover_pos_control,CONFIG_MODULES_ROVER_POS_CONTROL=y
|
||||
sensors,CONFIG_MODULES_SENSORS=y
|
||||
sih,CONFIG_MODULES_SIH=y
|
||||
simulator,CONFIG_MODULES_SIMULATOR=y
|
||||
temperature_compensation,CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
uuv_att_control,CONFIG_MODULES_UUV_ATT_CONTROL=y
|
||||
uuv_pos_control,CONFIG_MODULES_UUV_POS_CONTROL=y
|
||||
gimbal,CONFIG_MODULES_GIMBAL=y
|
||||
vtol_att_control,CONFIG_MODULES_VTOL_ATT_CONTROL=y
|
||||
bl_update,CONFIG_SYSTEMCMDS_BL_UPDATE=y
|
||||
dmesg,CONFIG_SYSTEMCMDS_DMESG=y
|
||||
dumpfile,CONFIG_SYSTEMCMDS_DUMPFILE=y
|
||||
dyn,CONFIG_SYSTEMCMDS_DYN=y
|
||||
failure,CONFIG_SYSTEMCMDS_FAILURE=y
|
||||
gpio,CONFIG_SYSTEMCMDS_GPIO=y
|
||||
hardfault_log,CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
|
||||
i2cdetect,CONFIG_SYSTEMCMDS_I2CDETECT=y
|
||||
led_control,CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
mft,CONFIG_SYSTEMCMDS_MFT=y
|
||||
microbench,CONFIG_SYSTEMCMDS_MICROBENCH=y
|
||||
mixer,CONFIG_SYSTEMCMDS_MIXER=y
|
||||
motor_test,CONFIG_SYSTEMCMDS_MOTOR_TEST=y
|
||||
mtd,CONFIG_SYSTEMCMDS_MTD=y
|
||||
netman,CONFIG_SYSTEMCMDS_NETMAN=y
|
||||
nshterm,CONFIG_SYSTEMCMDS_NSHTERM=y
|
||||
param,CONFIG_SYSTEMCMDS_PARAM=y
|
||||
perf,CONFIG_SYSTEMCMDS_PERF=y
|
||||
pwm,CONFIG_SYSTEMCMDS_PWM=y
|
||||
reboot,CONFIG_SYSTEMCMDS_REBOOT=y
|
||||
reflect,CONFIG_SYSTEMCMDS_REFLECT=y
|
||||
sd_bench,CONFIG_SYSTEMCMDS_SD_BENCH=y
|
||||
serial_tet,CONFIG_SYSTEMCMDS_SERIAL_TEST=y
|
||||
shutdown,CONFIG_SYSTEMCMDS_SHUTDOWN=y
|
||||
system_time,CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
|
||||
tests,CONFIG_SYSTEMCMDS_TESTS=y
|
||||
top,CONFIG_SYSTEMCMDS_TOP=y
|
||||
topic_listener,CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
|
||||
tune_control,CONFIG_SYSTEMCMDS_TUNE_CONTROL=y
|
||||
uorb,CONFIG_SYSTEMCMDS_UORB=y
|
||||
usb_connected,CONFIG_SYSTEMCMDS_USB_CONNECTED=y
|
||||
ver,CONFIG_SYSTEMCMDS_VER=y
|
||||
work_queue,CONFIG_SYSTEMCMDS_WORK_QUEUE=y
|
||||
dyn_hello,CONFIG_EXAMPLES_DYN_HELLO=y
|
||||
fake_gps,CONFIG_EXAMPLES_FAKE_GPS=y
|
||||
fake_gyro,CONFIG_EXAMPLES_FAKE_GYRO=y
|
||||
fake_imu,CONFIG_EXAMPLES_FAKE_IMU=y
|
||||
fake_magnetometer,CONFIG_EXAMPLES_FAKE_MAGNETOMETER=y
|
||||
fixedwing_control,CONFIG_EXAMPLES_FIXEDWING_CONTROL=y
|
||||
hello,CONFIG_EXAMPLES_HELLO=y
|
||||
hwtest,CONFIG_EXAMPLES_HWTEST=y
|
||||
matlab_csv_serial,CONFIG_EXAMPLES_MATLAB_CSV_SERIAL=y
|
||||
px4_mavlink_debug,CONFIG_EXAMPLES_PX4_MAVLINK_DEBUG=y
|
||||
px4_simple_app,CONFIG_EXAMPLES_PX4_SIMPLE_APP=y
|
||||
rover_steering_control,CONFIG_EXAMPLES_ROVER_STEERING_CONTROL=y
|
||||
uuv_example_app,CONFIG_EXAMPLES_UUV_EXAMPLE_APP=y
|
||||
work_item,CONFIG_EXAMPLES_WORK_ITEM=y
|
||||
add_compile_options(-Wno-narrowing),CONFIG_BOARD_COMPILE_DEFINITIONS="-Wno-narrowing"
|
||||
-D__PX4_LINUX,CONFIG_BOARD_LINUX=y
|
||||
@@ -3019,7 +3019,7 @@ class MAVLink(object):
|
||||
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
|
||||
press_abs : Absolute pressure (hectopascal) (float)
|
||||
press_diff : Differential pressure 1 (hectopascal) (float)
|
||||
temperature : Temperature measurement (0.01 degrees Celsius) (int16_t)
|
||||
temperature : Temperature measurement (0.01 degrees celsius) (int16_t)
|
||||
|
||||
'''
|
||||
msg = MAVLink_scaled_pressure_message(time_boot_ms, press_abs, press_diff, temperature)
|
||||
@@ -3035,7 +3035,7 @@ class MAVLink(object):
|
||||
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
|
||||
press_abs : Absolute pressure (hectopascal) (float)
|
||||
press_diff : Differential pressure 1 (hectopascal) (float)
|
||||
temperature : Temperature measurement (0.01 degrees Celsius) (int16_t)
|
||||
temperature : Temperature measurement (0.01 degrees celsius) (int16_t)
|
||||
|
||||
'''
|
||||
return self.send(self.scaled_pressure_encode(time_boot_ms, press_abs, press_diff, temperature))
|
||||
@@ -4879,7 +4879,7 @@ class MAVLink(object):
|
||||
abs_pressure : Absolute pressure in millibar (float)
|
||||
diff_pressure : Differential pressure in millibar (float)
|
||||
pressure_alt : Altitude calculated from pressure (float)
|
||||
temperature : Temperature in degrees Celsius (float)
|
||||
temperature : Temperature in degrees celsius (float)
|
||||
fields_updated : Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature (uint16_t)
|
||||
|
||||
'''
|
||||
@@ -4904,7 +4904,7 @@ class MAVLink(object):
|
||||
abs_pressure : Absolute pressure in millibar (float)
|
||||
diff_pressure : Differential pressure in millibar (float)
|
||||
pressure_alt : Altitude calculated from pressure (float)
|
||||
temperature : Temperature in degrees Celsius (float)
|
||||
temperature : Temperature in degrees celsius (float)
|
||||
fields_updated : Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature (uint16_t)
|
||||
|
||||
'''
|
||||
|
||||
@@ -14,14 +14,12 @@ class MarkdownOutput():
|
||||
|
||||
result = """
|
||||
# Modules & Commands Reference
|
||||
|
||||
The following pages document the PX4 modules, drivers and commands.
|
||||
They describe the provided functionality, high-level implementation overview and how
|
||||
The following pages document the PX4 modules, drivers and commands. They
|
||||
describe the provided functionality, high-level implementation overview and how
|
||||
to use the command-line interface.
|
||||
|
||||
:::note
|
||||
**This is auto-generated from the source code** and contains the most recent modules documentation.
|
||||
:::
|
||||
> **Note** **This is auto-generated from the source code** and contains the
|
||||
> most recent modules documentation.
|
||||
|
||||
It is not a complete list and NuttX provides some additional commands
|
||||
as well (such as `free`). Use `help` on the console to get a list of all
|
||||
@@ -31,7 +29,6 @@ Since this is generated from source, errors must be reported/fixed
|
||||
in the [PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) repository.
|
||||
The documentation pages can be generated by running the following command from
|
||||
the root of the PX4-Autopilot directory:
|
||||
|
||||
```
|
||||
make module_documentation
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ class ModuleDocumentation(object):
|
||||
valid_categories = ['driver', 'estimator', 'controller', 'system',
|
||||
'communication', 'command', 'template', 'simulation', 'autotune']
|
||||
valid_subcategories = ['', 'distance_sensor', 'imu', 'airspeed_sensor',
|
||||
'magnetometer', 'baro', 'optical_flow', 'rpm_sensor', 'transponder']
|
||||
'magnetometer', 'baro', 'optical_flow', 'rpm_sensor']
|
||||
|
||||
max_line_length = 80 # wrap lines that are longer than this
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#
|
||||
# PX4 base development environment
|
||||
#
|
||||
|
||||
FROM ubuntu:20.04
|
||||
LABEL maintainer="Daniel Agar <daniel@agar.ca>, Ramon Roche <mrpollo@gmail.com>"
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV LANG C.UTF-8
|
||||
ENV LC_ALL C.UTF-8
|
||||
|
||||
# Installing required utilities
|
||||
RUN apt-get update && apt-get -y --quiet --no-install-recommends install \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
lsb-core \
|
||||
lsb-release \
|
||||
sudo \
|
||||
software-properties-common \
|
||||
wget \
|
||||
gosu \
|
||||
;
|
||||
|
||||
# Install PX4 Requirements
|
||||
COPY Tools/setup/requirements.txt /tmp/requirements.txt
|
||||
COPY Tools/setup/ubuntu.sh /tmp/ubuntu.sh
|
||||
# The PATH env is set within ubuntu.sh, but given how we
|
||||
# are running the image using `gosu` to avoid read-only problems
|
||||
# with the filesystem the env variable does not persist
|
||||
ENV PATH="/opt/gcc-arm-none-eabi-9-2020-q2-update/bin:$PATH"
|
||||
|
||||
RUN bash /tmp/ubuntu.sh --from-docker
|
||||
|
||||
ENV DISPLAY :99
|
||||
|
||||
ENV FASTRTPSGEN_DIR="/usr/local/bin/"
|
||||
ENV TERM=xterm
|
||||
ENV TZ=UTC
|
||||
|
||||
# SITL UDP PORTS
|
||||
EXPOSE 14556/udp
|
||||
EXPOSE 14557/udp
|
||||
|
||||
# create user with id 1001 (jenkins docker workflow default)
|
||||
RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout user
|
||||
|
||||
# create and start as LOCAL_USER_ID
|
||||
COPY Tools/setup/docker-entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "[docker-entrypoint.sh] Starting entrypoint"
|
||||
# Start virtual X server in the background
|
||||
# - DISPLAY default is :99, set in dockerfile
|
||||
# - Users can override with `-e DISPLAY=` in `docker run` command to avoid
|
||||
# running Xvfb and attach their screen
|
||||
if [[ -x "$(command -v Xvfb)" && "$DISPLAY" == ":99" ]]; then
|
||||
echo "[docker-entrypoint.sh] Starting Xvfb"
|
||||
Xvfb :99 -screen 0 1600x1200x24+32 &
|
||||
fi
|
||||
|
||||
# Check if the ROS_DISTRO is passed and use it
|
||||
# to source the ROS environment
|
||||
if [ -n "${ROS_DISTRO}" ]; then
|
||||
source "/opt/ros/$ROS_DISTRO/setup.bash"
|
||||
fi
|
||||
|
||||
# Use the LOCAL_USER_ID if passed in at runtime
|
||||
if [ -n "${LOCAL_USER_ID}" ]; then
|
||||
echo "[docker-entrypoint.sh] Starting with UID : $LOCAL_USER_ID"
|
||||
# modify existing user's id
|
||||
usermod -u $LOCAL_USER_ID user
|
||||
|
||||
# run as user
|
||||
exec gosu user "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
@@ -26,5 +26,3 @@ requests
|
||||
setuptools>=39.2.0
|
||||
six>=1.12.0
|
||||
toml>=0.9
|
||||
symforce>=0.5.0
|
||||
sympy>=1.10.1
|
||||
|
||||
+63
-123
@@ -2,18 +2,20 @@
|
||||
|
||||
set -e
|
||||
|
||||
## Bash script to setup PX4 development environment on Ubuntu LTS (20.04, 18.04).
|
||||
## Bash script to setup PX4 development environment on Ubuntu LTS (20.04, 18.04, 16.04).
|
||||
## Can also be used in docker.
|
||||
##
|
||||
## Installs:
|
||||
## - Common dependencies and tools for NuttX, and Gazebo
|
||||
## - Common dependencies and tools for nuttx, jMAVSim, Gazebo
|
||||
## - NuttX toolchain (omit with arg: --no-nuttx)
|
||||
## - Gazebo simulator (omit with arg: --no-sim-tools)
|
||||
## - jMAVSim and Gazebo9 simulator (omit with arg: --no-sim-tools)
|
||||
##
|
||||
## Not Installs:
|
||||
## - FastRTPS and FastCDR
|
||||
|
||||
INSTALL_NUTTX="true"
|
||||
INSTALL_SIM="true"
|
||||
INSTALL_ARCH=`uname -m`
|
||||
INSIDE_DOCKER="false"
|
||||
|
||||
# Parse arguments
|
||||
for arg in "$@"
|
||||
@@ -26,23 +28,20 @@ do
|
||||
INSTALL_SIM="false"
|
||||
fi
|
||||
|
||||
|
||||
if [[ $arg == "--from-docker" ]]; then
|
||||
INSIDE_DOCKER="true"
|
||||
fi
|
||||
|
||||
if [[ $arg == "--help" ]]; then
|
||||
echo "#⚡️ PX4 Dependency Installer for Ubuntu"
|
||||
echo "# Options:
|
||||
#
|
||||
# --no-nuttx boolean
|
||||
# --no-sim-tools boolean"
|
||||
echo "#"
|
||||
exit
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# detect if running in docker
|
||||
if [ -f /.dockerenv ]; then
|
||||
echo "Running within docker, installing initial dependencies";
|
||||
apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
lsb-core \
|
||||
sudo \
|
||||
wget \
|
||||
;
|
||||
fi
|
||||
|
||||
# script directory
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
@@ -70,22 +69,9 @@ elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
echo "Ubuntu 20.04"
|
||||
fi
|
||||
|
||||
VERBOSE_BAR="####################"
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "#⚡️ Starting PX4 Dependency Installer for Ubuntu ${UBUNTU_RELEASE} (${INSTALL_ARCH})"
|
||||
echo "# Options:
|
||||
#
|
||||
# - Install NuttX = ${INSTALL_NUTTX}
|
||||
# - Install Simulation = ${INSTALL_SIM}"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing System Dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
echo "Installing PX4 general dependencies"
|
||||
|
||||
sudo apt-get update -y --quiet
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
@@ -99,7 +85,6 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends i
|
||||
gdb \
|
||||
git \
|
||||
lcov \
|
||||
libssl-dev \
|
||||
libxml2-dev \
|
||||
libxml2-utils \
|
||||
make \
|
||||
@@ -115,42 +100,32 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends i
|
||||
zip \
|
||||
;
|
||||
|
||||
# Python 3 dependencies
|
||||
# Python3 dependencies
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing Python dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
echo "Installing PX4 Python3 dependencies"
|
||||
if [ -n "$VIRTUAL_ENV" ]; then
|
||||
# virtual environments don't allow --user option
|
||||
# virtual envrionments don't allow --user option
|
||||
python -m pip install -r ${DIR}/requirements.txt
|
||||
else
|
||||
# older versions of Ubuntu require --user option
|
||||
if [[ $INSIDE_DOCKER == "true" ]]; then
|
||||
# when running inside a docker container we don't need to install
|
||||
# under --user since the installer user is root
|
||||
# its best to install packages globaly for any user to find
|
||||
python3 -m pip install -r /tmp/requirements.txt
|
||||
else
|
||||
python3 -m pip install --user -r ${DIR}/requirements.txt
|
||||
fi
|
||||
python3 -m pip install --user -r ${DIR}/requirements.txt
|
||||
fi
|
||||
|
||||
# NuttX toolchain (arm-none-eabi-gcc)
|
||||
if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing NuttX dependencies"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
echo "Installing NuttX dependencies"
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
automake \
|
||||
binutils-dev \
|
||||
bison \
|
||||
build-essential \
|
||||
flex \
|
||||
g++-multilib \
|
||||
gcc-multilib \
|
||||
gdb-multiarch \
|
||||
genromfs \
|
||||
gettext \
|
||||
gperf \
|
||||
@@ -170,12 +145,7 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
u-boot-tools \
|
||||
util-linux \
|
||||
vim-common \
|
||||
g++-arm-linux-gnueabihf \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
g++-aarch64-linux-gnu \
|
||||
gcc-aarch64-linux-gnu \
|
||||
;
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
kconfig-frontends \
|
||||
@@ -188,47 +158,32 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
sudo usermod -a -G dialout $USER
|
||||
fi
|
||||
|
||||
# arm-none-eabi-gcc
|
||||
NUTTX_GCC_VERSION="9-2020-q2-update"
|
||||
NUTTX_GCC_VERSION_SHORT="9-2020q2"
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Verifying proper gcc version (${NUTTX_GCC_VERSION}), and installing if not found"
|
||||
echo
|
||||
|
||||
source $HOME/.profile # load changed path for the case the script is reran before relogin
|
||||
if [ $(which arm-none-eabi-gcc) ]; then
|
||||
GCC_VER_STR=$(arm-none-eabi-gcc --version)
|
||||
GCC_VER_FOUND=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}")
|
||||
GCC_FOUND_VER=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ $(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}") == "1" ]]; then
|
||||
echo "📌 Skipping installation, the arm cross compiler was found"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
if [[ "$GCC_FOUND_VER" == "1" ]]; then
|
||||
echo "arm-none-eabi-gcc-${NUTTX_GCC_VERSION} found, skipping installation"
|
||||
|
||||
else
|
||||
echo "📌 The arm cross compiler was not found";
|
||||
echo " * Installing arm-none-eabi-gcc-${NUTTX_GCC_VERSION}";
|
||||
COMPILER_NAME="gcc-arm-none-eabi-${NUTTX_GCC_VERSION}"
|
||||
COMPILER_PATH="/tmp/$COMPILER_NAME-linux.tar.bz2"
|
||||
wget -O $COMPILER_PATH https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${NUTTX_GCC_VERSION_SHORT}/${COMPILER_NAME}-${INSTALL_ARCH}-linux.tar.bz2
|
||||
sudo tar -jxf $COMPILER_PATH -C /opt/;
|
||||
echo "Installing arm-none-eabi-gcc-${NUTTX_GCC_VERSION}";
|
||||
wget -O /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${NUTTX_GCC_VERSION_SHORT}/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-${INSTALL_ARCH}-linux.tar.bz2 && \
|
||||
sudo tar -jxf /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 -C /opt/;
|
||||
|
||||
# add arm-none-eabi-gcc to user's PATH
|
||||
exportline="export PATH=\"/opt/${COMPILER_NAME}/bin:\$PATH\""
|
||||
if [[ $INSIDE_DOCKER == "true" ]]; then
|
||||
# when running on a docker container its best to set the environment globally
|
||||
# since we don't know which user is going to be running commands on the container
|
||||
touch /etc/profile.d/px4env.sh
|
||||
echo $exportline >> /etc/profile.d/px4env.sh
|
||||
elif grep -Fxq "$exportline" $HOME/.profile; then
|
||||
exportline="export PATH=/opt/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}/bin:\$PATH"
|
||||
|
||||
if grep -Fxq "$exportline" $HOME/.profile; then
|
||||
echo "${NUTTX_GCC_VERSION} path already set.";
|
||||
else
|
||||
echo $exportline >> $HOME/.profile;
|
||||
fi
|
||||
echo " * arm-none-eabi-gcc (${NUTTX_GCC_VERSION}) Installed Succesful to /opt/${COMPILER_NAME}/bin"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -236,45 +191,49 @@ fi
|
||||
if [[ $INSTALL_SIM == "true" ]]; then
|
||||
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "🍻 Installing PX4 Simulation Tools"
|
||||
echo
|
||||
|
||||
# default and Ubuntu 20.04
|
||||
gazebo_version=11
|
||||
gazebo_packages="gazebo$gazebo_version libgazebo$gazebo_version-dev"
|
||||
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
||||
gazebo_version=9
|
||||
elif [[ "${UBUNTU_RELEASE}" == "22.04" ]]; then
|
||||
gazebo_version=11
|
||||
gazebo_packages="gazebo libgazebo-dev"
|
||||
fi
|
||||
|
||||
echo " * Gazebo Version $gazebo_version"
|
||||
echo $VERBOSE_BAR
|
||||
echo "Installing PX4 simulation dependencies"
|
||||
|
||||
# General simulation dependencies
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
bc \
|
||||
;
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "18.04" ]]; then
|
||||
java_version=11
|
||||
gazebo_version=9
|
||||
elif [[ "${UBUNTU_RELEASE}" == "20.04" ]]; then
|
||||
java_version=13
|
||||
gazebo_version=11
|
||||
else
|
||||
java_version=14
|
||||
gazebo_version=11
|
||||
fi
|
||||
# Java (jmavsim or fastrtps)
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
ant \
|
||||
openjdk-$java_version-jre \
|
||||
openjdk-$java_version-jdk \
|
||||
libvecmath-java \
|
||||
;
|
||||
|
||||
# Installing Gazebo and dependencies
|
||||
# Setup OSRF Gazebo repository
|
||||
# Set Java 11 as default
|
||||
sudo update-alternatives --set java $(update-alternatives --list java | grep "java-$java_version")
|
||||
|
||||
# Gazebo
|
||||
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
|
||||
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
||||
# Update list, since new gazebo-stable.list has been added
|
||||
sudo apt-get update -y --quiet
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends install \
|
||||
dmidecode \
|
||||
$gazebo_packages \
|
||||
gazebo$gazebo_version \
|
||||
gstreamer1.0-plugins-bad \
|
||||
gstreamer1.0-plugins-base \
|
||||
gstreamer1.0-plugins-good \
|
||||
gstreamer1.0-plugins-ugly \
|
||||
gstreamer1.0-libav \
|
||||
libeigen3-dev \
|
||||
libgazebo$gazebo_version-dev \
|
||||
libgstreamer-plugins-base1.0-dev \
|
||||
libimage-exiftool-perl \
|
||||
libopencv-dev \
|
||||
@@ -289,26 +248,7 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $INSIDE_DOCKER == "true" ]]; then
|
||||
# cleanup installation
|
||||
rm -rf /tmp/
|
||||
fi
|
||||
|
||||
if [[ $INSIDE_DOCKER == "false" ]] && [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "💡 We recommend you relogin/reboot before attempting to build NuttX targets"
|
||||
echo $VERBOSE_BAR
|
||||
if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
echo
|
||||
echo "Relogin or reboot computer before attempting to build NuttX targets"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo
|
||||
echo $VERBOSE_BAR
|
||||
echo "#⚡️ PX4 Dependency Installer Ended Succesfully
|
||||
#
|
||||
# For more information on PX4 Autopilot check out our docs
|
||||
# at docs.px4.io, if you find a bug please file an issue
|
||||
# on GitHub https://github.com/px4/px4-autopilot"
|
||||
echo $VERBOSE_BAR
|
||||
echo
|
||||
|
||||
+1
-1
Submodule Tools/sitl_gazebo updated: 5610c3fb44...2cf56d0bf8
@@ -74,9 +74,6 @@ if [ "$model" == "" ] || [ "$model" == "none" ]; then
|
||||
if [ "$program" == "jsbsim" ]; then
|
||||
echo "empty model, setting rascal as default for jsbsim"
|
||||
model="rascal"
|
||||
elif [ "$program" == "sihsim" ]; then
|
||||
echo "empty model, setting quadx as default for sihsim"
|
||||
model="quadx"
|
||||
else
|
||||
echo "empty model, setting iris as default"
|
||||
model="iris"
|
||||
@@ -217,12 +214,6 @@ elif [ "$program" == "jsbsim" ] && [ -z "$no_sim" ]; then
|
||||
fi
|
||||
"${build_path}/build_jsbsim_bridge/jsbsim_bridge" ${model} -s "${src_path}/Tools/jsbsim_bridge/scene/${world}.xml" 2> /dev/null &
|
||||
JSBSIM_PID=$!
|
||||
elif [ "$program" == "sihsim" ] && [ ! -n "$no_sim" ]; then
|
||||
export SIM_MODE="sihsim"
|
||||
if [ "$model" != "airplane" ] && [ "$model" != "quadx" ] && [ "$model" != "xvert" ]; then
|
||||
echo "Model ${model} not compatible with with sih. sih supports [quadx,airplane,xvert]."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
pushd "$rootfs" >/dev/null
|
||||
|
||||
@@ -130,7 +130,8 @@ CONFIG_SCHED_LPWORKSTACKSIZE=1632
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_SDIO_BLOCKSETUP=y
|
||||
CONFIG_SEM_PREALLOCHOLDERS=32
|
||||
CONFIG_SEM_NNESTPRIO=8
|
||||
CONFIG_SEM_PREALLOCHOLDERS=0
|
||||
CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS=y
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
@@ -173,7 +174,7 @@ CONFIG_STM32_SPI1=y
|
||||
CONFIG_STM32_SPI2=y
|
||||
CONFIG_STM32_SPI4=y
|
||||
CONFIG_STM32_SPI4_DMA=y
|
||||
CONFIG_STM32_SPI4_DMA_BUFFER=512
|
||||
CONFIG_STM32_SPI4_DMA_BUFFER=1024
|
||||
CONFIG_STM32_SPI_DMA=y
|
||||
CONFIG_STM32_SPI_DMATHRESHOLD=8
|
||||
CONFIG_STM32_TIM10=y
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user