Compare commits
108 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a700471b4 | |||
| 076e07444d | |||
| afdac4bd4c | |||
| 39965d3ef1 | |||
| 348b8f7f56 | |||
| 8e658a6e2d | |||
| db2c6b2abe | |||
| 95b8328162 | |||
| 6de6abfb64 | |||
| e371c4edd9 | |||
| 473ef5fd06 | |||
| 46d9b14ba0 | |||
| 66e21497a6 | |||
| de49edc428 | |||
| b5846fd8c2 | |||
| ec6dd286fc | |||
| cf50ecf41b | |||
| 9fe69d4f33 | |||
| f4247aee58 | |||
| ec8f34325e | |||
| 0e615816b3 | |||
| 4cf4f82233 | |||
| 5f83c186ee | |||
| e761297003 | |||
| 27181619fc | |||
| 210239324d | |||
| c71e2d41d6 | |||
| 7c318a3296 | |||
| 0375f1a6f0 | |||
| 0ef4f1b7bd | |||
| 598066653a | |||
| 86e1356e0a | |||
| 450cf79fc8 | |||
| 1ff36422c9 | |||
| 38b6a9abf3 | |||
| 819c783b6c | |||
| 14558e9304 | |||
| 6bc24c8cd1 | |||
| d8220d4948 | |||
| 435040f2d5 | |||
| dad58f31a6 | |||
| 6ecbfb2262 | |||
| 9563f4c8c6 | |||
| cea6c10864 | |||
| 1e34c80115 | |||
| 076b673977 | |||
| 00f2c149d1 | |||
| e370d15c72 | |||
| aa850d5c1c | |||
| 1e618a7eb0 | |||
| f46fd89057 | |||
| 33c7eed5f1 | |||
| 96f428b683 | |||
| 722133f79a | |||
| 66c5644f1b | |||
| 3ef13da044 | |||
| 161b530247 | |||
| b5c0867101 | |||
| ca6d257ed8 | |||
| c51502781f | |||
| 339a0b40af | |||
| d2aa1b801c | |||
| 26d847e6e7 | |||
| 1cf2dc8791 | |||
| 209a9935e7 | |||
| 0fa667fd92 | |||
| bbf32a537e | |||
| 3e425210e0 | |||
| f25997a15b | |||
| e132568430 | |||
| 6195629373 | |||
| 2c044b327e | |||
| b7ffd6ea2c | |||
| b26db22c1a | |||
| 6f18ff8ff9 | |||
| f224b81eec | |||
| b537601b7a | |||
| e01c4b0692 | |||
| ca43fc8f5a | |||
| 11cac778ba | |||
| 441892b33f | |||
| 1d5a8531e4 | |||
| e71348967d | |||
| fbe49db571 | |||
| 4b36cfccfc | |||
| 699ec30c9c | |||
| e6c49edd20 | |||
| cb6bdee4c2 | |||
| 3438d593a1 | |||
| 38f89a8b69 | |||
| 3e290695ef | |||
| 11bf3cffde | |||
| ba4437ae60 | |||
| b64860f9f8 | |||
| e51d09612f | |||
| eb1c0322e3 | |||
| e822da74b2 | |||
| ccaad82f61 | |||
| 4e5c1140b7 | |||
| 4acb8ec799 | |||
| 89d43185c7 | |||
| df0a197050 | |||
| c726c7e4f4 | |||
| 24d06047bd | |||
| cb682006fe | |||
| 5632728467 | |||
| 778ad160f2 | |||
| 8393f46100 |
@@ -3,92 +3,45 @@ description: Create a report to help us improve
|
||||
title: "[Bug] "
|
||||
labels: ["bug-report"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Tips for a great bug report:**
|
||||
- Describe what went wrong and what you expected
|
||||
- Include a flight log link from [logs.px4.io](http://logs.px4.io/) if possible
|
||||
- Mention your PX4 version, flight controller, and vehicle type if relevant
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of the bug.
|
||||
description: A clear description of the bug and what you expected to happen.
|
||||
placeholder: |
|
||||
What happened and what did you expect instead?
|
||||
|
||||
Steps to reproduce (if applicable):
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: To Reproduce
|
||||
label: Flight Log / Additional Information
|
||||
description: |
|
||||
Steps to reproduce the behavior.
|
||||
1. Drone switched on '...'
|
||||
2. Uploaded mission '....' (attach QGC mission file)
|
||||
3. Took off '....'
|
||||
4. See error
|
||||
validations:
|
||||
required: false
|
||||
**Flight log** (highly recommended for flight-related issues):
|
||||
- Upload to [PX4 Flight Review](http://logs.px4.io/) and paste the link
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshot / Media
|
||||
description: Add screenshot / media if you have them
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Flight Log
|
||||
description: |
|
||||
*Always* provide a link to the flight log file:
|
||||
- Download the flight log file from the vehicle ([tutorial](https://docs.px4.io/main/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)
|
||||
**Additional details** (if relevant):
|
||||
- PX4 version (output of `ver all` in MAVLink Shell)
|
||||
- Flight controller model
|
||||
- Vehicle type (multicopter, fixed-wing, VTOL, etc.)
|
||||
- Screenshots or media
|
||||
placeholder: |
|
||||
# PASTE HERE THE LINK TO THE LOG
|
||||
Flight log link:
|
||||
|
||||
Version:
|
||||
|
||||
Hardware:
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Setup
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Software Version
|
||||
description: |
|
||||
Which version of PX4 are you using?
|
||||
placeholder: |
|
||||
# If you don't know the version, paste the output of `ver all` in the MAVLink Shell of QGC
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Flight controller
|
||||
description: Specify your flight controller model (what type is it, where was it bought from, ...).
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Vehicle type
|
||||
options:
|
||||
- Multicopter
|
||||
- Helicopter
|
||||
- Fixed Wing
|
||||
- Hybrid VTOL
|
||||
- Airship/Balloon
|
||||
- Rover
|
||||
- Boat
|
||||
- Submarine
|
||||
- Other
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: How are the different components wired up (including port information)
|
||||
description: Details about how all is wired.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context about the problem here.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
blank_issues_enabled: false
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Support Question
|
||||
url: https://docs.px4.io/main/en/contribute/support.html#forums-and-chat
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
applyTo: "docs/en/**"
|
||||
---
|
||||
|
||||
# Review Guidelines docs/en Tree
|
||||
|
||||
## File System & Structure
|
||||
|
||||
- **Naming:** Use `lowercase_with_underscores` for all filenames. No spaces.
|
||||
- **Hierarchy:** Markdown files must reside exactly in a first-level category folder.
|
||||
- Valid: `docs/en/category/file.md`
|
||||
- Invalid: `docs/en/category/subcategory/file.md`
|
||||
- **Text Files:** Any `.txt` or `.text` files must start with an underscore (e.g., `_notes.txt`).
|
||||
- **Assets:** All images/non-docs must be in `/docs/assets/`. Deep nesting is permitted here.
|
||||
- **Formats:** Prefer **SVG** for diagrams and **PNG** for screenshots. Flag JPG files.
|
||||
|
||||
## Markdown & Style
|
||||
|
||||
- **Headings:** Use Title Case ("First Letter Capitalisation").
|
||||
- The Page Title must be the only H1 (`#`). All others must be `##` or lower.
|
||||
- Do not apply bold or italic styling inside a heading.
|
||||
- **Formatting:**
|
||||
- **Bold:** Only for UI elements (buttons, menu items).
|
||||
- **Italics (Emphasis):** For tool names (e.g., *QGroundControl*).
|
||||
- **Inline Code:** Use backticks for file paths, parameters, and CLI commands (e.g., `prettier`).
|
||||
- **Structure:** End every line at the end of a sentence (Semantic Line Breaks).
|
||||
|
||||
## Linking & Navigation
|
||||
|
||||
- **Standard Links:** Use standard inline syntax: `[link text](../category/filename.md)`.
|
||||
Note relative link.
|
||||
- **Table Links:** To keep tables readable, use reference-style links.
|
||||
- Definition: `[Link Name]: https://example.com` (placed below the table).
|
||||
- Usage: `[Link Name]` within the table cell.
|
||||
- **Images:** All image links must include a descriptive, accessible alt-text in the brackets: ``.
|
||||
Note that all images should be relative references to images stored in the assets folder, which should be two folders below the any markdown file (as they are stored in a "category" subfolder)
|
||||
|
||||
- **Standard Links:** Use standard inline syntax: `[link text](../category/filename.md)`. Note the use of relative links.
|
||||
- **Table Links:** To keep tables easier to edit, prefer reference-style links.
|
||||
- Definition: `[Link Name]: https://example.com` (placed below the table).
|
||||
- Usage: `[Link Name]` within the table cell.
|
||||
- **Images:** All image links must include a descriptive, accessible alt-text: ``.
|
||||
- **Note:** All images must be relative references to the `/docs/assets/` folder. Since documents are nested in a category folder, this is usually two levels up (`../../assets/`).
|
||||
|
||||
## Quality Control
|
||||
|
||||
- **Prettier Check:** Ensure Prettier rules have been applied. If there is evidence of inconsistent indentation or spacing, request the author run `npx prettier --write .` before merging.
|
||||
- **Language:** Enforce **UK English** spelling and grammar.
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
remove-stale-when-updated: true
|
||||
stale-issue-message: 'This issue has been marked as stale due to 90 days of inactivity. If no further activity occurs, it will be automatically closed in 30 days. Please leave a comment, add a reaction, make an update, or remove the stale label if you’d like to keep it open.'
|
||||
close-issue-message: 'This issue has been closed due to prolonged inactivity after being marked as stale. If you believe this was closed in error or the topic is still relevant, please feel free to reopen it or create a new issue.'
|
||||
stale-pr-message: 'This PR was identified as stale and it will be closed in 30 days unless any activity is detected.'
|
||||
close-pr-message: 'This pull request has been closed after being marked as stale with no further activity. Thank you for the time and effort you put into this contribution. If you’d like to continue the discussion or update the work, please feel free to reopen it or submit a new PR.'
|
||||
stale-issue-message: ''
|
||||
close-issue-message: 'This issue has been automatically closed due to 120 days of inactivity. If you believe this is still relevant, please feel free to reopen it or create a new issue.'
|
||||
stale-pr-message: ''
|
||||
close-pr-message: 'This pull request has been automatically closed due to 120 days of inactivity. If you would like to continue, please feel free to reopen it or submit a new PR.'
|
||||
|
||||
@@ -103,3 +103,9 @@
|
||||
[submodule "src/drivers/ins/sbgecom/sbgECom"]
|
||||
path = src/drivers/ins/sbgecom/sbgECom
|
||||
url = https://github.com/PX4/sbgECom.git
|
||||
[submodule "src/modules/mc_raptor/blob"]
|
||||
path = src/modules/mc_raptor/blob
|
||||
url = https://github.com/rl-tools/px4-blob
|
||||
[submodule "src/lib/rl_tools/rl_tools"]
|
||||
path = src/lib/rl_tools/rl_tools
|
||||
url = https://github.com/rl-tools/rl-tools.git
|
||||
|
||||
@@ -6,6 +6,16 @@ CONFIG:
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_raptor:
|
||||
short: px4_sitl_raptor
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_raptor
|
||||
px4_sitl_raptor_debug:
|
||||
short: px4_sitl_raptor_debug
|
||||
buildType: Debug
|
||||
settings:
|
||||
CONFIG: px4_sitl_raptor
|
||||
px4_sitl_spacecraft:
|
||||
short: px4_sitl_spacecraft
|
||||
buildType: RelWithDebInfo
|
||||
|
||||
@@ -267,7 +267,7 @@ endif()
|
||||
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Boat
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.uuv_defaults
|
||||
|
||||
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
|
||||
PX4_GZ_WORLD=${PX4_GZ_WORLD:=ocean}
|
||||
PX4_SIM_MODEL=${PX4_SIM_MODEL:=boat}
|
||||
|
||||
param set-default SIM_GZ_EN 1
|
||||
|
||||
param set-default CA_AIRFRAME 9
|
||||
|
||||
param set-default CA_ROTOR_COUNT 2
|
||||
param set-default CA_ROTOR0_AX 1
|
||||
param set-default CA_ROTOR0_AZ 0
|
||||
param set-default CA_ROTOR0_KM 0
|
||||
param set-default CA_ROTOR0_PX -2
|
||||
param set-default CA_ROTOR0_PY -1
|
||||
param set-default CA_ROTOR1_AX 1
|
||||
param set-default CA_ROTOR1_AZ 0
|
||||
param set-default CA_ROTOR1_KM 0
|
||||
param set-default CA_ROTOR1_PX -2
|
||||
param set-default CA_ROTOR1_PY 1
|
||||
param set-default CA_R_REV 3
|
||||
|
||||
param set-default CA_SV_CS_COUNT 1
|
||||
param set-default CA_SV_CS0_TYPE 4
|
||||
param set-default CA_SV_CS0_TRQ_Y 1
|
||||
|
||||
param set-default SIM_GZ_EC_FUNC1 101
|
||||
param set-default SIM_GZ_EC_FUNC2 102
|
||||
param set-default SIM_GZ_SV_FUNC1 201
|
||||
@@ -0,0 +1,167 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name KTH-ATMOS
|
||||
#
|
||||
# @type Free-Flyer
|
||||
# @class Spacecraft
|
||||
#
|
||||
# @output Motor1 back left thruster, +x thrust
|
||||
# @output Motor2 front left thruster, -x thrust
|
||||
# @output Motor3 back right thruster, +x thrust
|
||||
# @output Motor4 front right thruster, -x thrust
|
||||
# @output Motor5 front left thruster, +y thrust
|
||||
# @output Motor6 front right thruster, -y thrust
|
||||
# @output Motor7 back left thruster, +y thrust
|
||||
# @output Motor8 back right thruster, -y thrust
|
||||
#
|
||||
# @maintainer discower-io
|
||||
# @url https://atmos.discower.io
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.sc_defaults
|
||||
|
||||
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
|
||||
PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
|
||||
PX4_SIM_MODEL=${PX4_SIM_MODEL:=atmos_dual}
|
||||
|
||||
param set-default SIM_GZ_EN 1
|
||||
|
||||
param set-default SENS_EN_MAGSIM 1
|
||||
param set-default COM_ARM_CHK_ESCS 0 # We don't have ESCs
|
||||
param set-default FD_ESCS_EN 0
|
||||
|
||||
param set-default CA_AIRFRAME 14
|
||||
param set-default MAV_TYPE 45
|
||||
|
||||
param set-default CA_ROTOR_COUNT 8
|
||||
param set-default CA_R_REV 0
|
||||
|
||||
# Auto to be provided by Custom Airframe
|
||||
param set-default CA_METHOD 0
|
||||
|
||||
# Set proper failsafes
|
||||
param set-default COM_ACT_FAIL_ACT 0
|
||||
param set-default COM_LOW_BAT_ACT 0
|
||||
param set-default NAV_DLL_ACT 0
|
||||
param set-default GF_ACTION 1
|
||||
param set-default NAV_RCL_ACT 1
|
||||
|
||||
# disable attitude failure detection
|
||||
param set-default FD_FAIL_P 0
|
||||
param set-default FD_FAIL_R 0
|
||||
|
||||
param set-default CA_ROTOR0_PX -0.12
|
||||
param set-default CA_ROTOR0_PY -0.12
|
||||
param set-default CA_ROTOR0_PZ 0.0
|
||||
param set-default CA_ROTOR0_CT 1.4
|
||||
param set-default CA_ROTOR0_AX 1.0
|
||||
param set-default CA_ROTOR0_AY 0.0
|
||||
param set-default CA_ROTOR0_AZ 0.0
|
||||
|
||||
param set-default CA_ROTOR1_PX 0.12
|
||||
param set-default CA_ROTOR1_PY -0.12
|
||||
param set-default CA_ROTOR1_PZ 0.0
|
||||
param set-default CA_ROTOR1_CT 1.4
|
||||
param set-default CA_ROTOR1_AX -1.0
|
||||
param set-default CA_ROTOR1_AY 0.0
|
||||
param set-default CA_ROTOR1_AZ 0.0
|
||||
|
||||
param set-default CA_ROTOR2_PX -0.12
|
||||
param set-default CA_ROTOR2_PY 0.12
|
||||
param set-default CA_ROTOR2_PZ 0.0
|
||||
param set-default CA_ROTOR2_CT 1.4
|
||||
param set-default CA_ROTOR2_AX 1.0
|
||||
param set-default CA_ROTOR2_AY 0.0
|
||||
param set-default CA_ROTOR2_AZ 0.0
|
||||
|
||||
param set-default CA_ROTOR3_PX 0.12
|
||||
param set-default CA_ROTOR3_PY 0.12
|
||||
param set-default CA_ROTOR3_PZ 0.0
|
||||
param set-default CA_ROTOR3_CT 1.4
|
||||
param set-default CA_ROTOR3_AX -1.0
|
||||
param set-default CA_ROTOR3_AY 0.0
|
||||
param set-default CA_ROTOR3_AZ 0.0
|
||||
|
||||
param set-default CA_ROTOR4_PX 0.12
|
||||
param set-default CA_ROTOR4_PY -0.12
|
||||
param set-default CA_ROTOR4_PZ 0.0
|
||||
param set-default CA_ROTOR4_CT 1.4
|
||||
param set-default CA_ROTOR4_AX 0.0
|
||||
param set-default CA_ROTOR4_AY 1.0
|
||||
param set-default CA_ROTOR4_AZ 0.0
|
||||
|
||||
param set-default CA_ROTOR5_PX 0.12
|
||||
param set-default CA_ROTOR5_PY 0.12
|
||||
param set-default CA_ROTOR5_PZ 0.0
|
||||
param set-default CA_ROTOR5_CT 1.4
|
||||
param set-default CA_ROTOR5_AX 0.0
|
||||
param set-default CA_ROTOR5_AY -1.0
|
||||
param set-default CA_ROTOR5_AZ 0.0
|
||||
|
||||
param set-default CA_ROTOR6_PX -0.12
|
||||
param set-default CA_ROTOR6_PY -0.12
|
||||
param set-default CA_ROTOR6_PZ 0.0
|
||||
param set-default CA_ROTOR6_CT 1.4
|
||||
param set-default CA_ROTOR6_AX 0.0
|
||||
param set-default CA_ROTOR6_AY 1.0
|
||||
param set-default CA_ROTOR6_AZ 0.0
|
||||
|
||||
param set-default CA_ROTOR7_PX -0.12
|
||||
param set-default CA_ROTOR7_PY 0.12
|
||||
param set-default CA_ROTOR7_PZ 0.0
|
||||
param set-default CA_ROTOR7_CT 1.4
|
||||
param set-default CA_ROTOR7_AX 0.0
|
||||
param set-default CA_ROTOR7_AY -1.0
|
||||
param set-default CA_ROTOR7_AZ 0.0
|
||||
|
||||
param set-default SIM_GZ_EC_FUNC1 101
|
||||
param set-default SIM_GZ_EC_FUNC2 102
|
||||
param set-default SIM_GZ_EC_FUNC3 103
|
||||
param set-default SIM_GZ_EC_FUNC4 104
|
||||
param set-default SIM_GZ_EC_FUNC5 105
|
||||
param set-default SIM_GZ_EC_FUNC6 106
|
||||
param set-default SIM_GZ_EC_FUNC7 107
|
||||
param set-default SIM_GZ_EC_FUNC8 108
|
||||
param set-default SIM_GZ_EC_FUNC9 301
|
||||
param set-default SIM_GZ_EC_FUNC10 302
|
||||
param set-default SIM_GZ_EC_FUNC11 303
|
||||
param set-default SIM_GZ_EC_FUNC12 304
|
||||
|
||||
param set-default SIM_GZ_EC_MIN1 0
|
||||
param set-default SIM_GZ_EC_MIN2 0
|
||||
param set-default SIM_GZ_EC_MIN3 0
|
||||
param set-default SIM_GZ_EC_MIN4 0
|
||||
param set-default SIM_GZ_EC_MIN5 0
|
||||
param set-default SIM_GZ_EC_MIN6 0
|
||||
param set-default SIM_GZ_EC_MIN7 0
|
||||
param set-default SIM_GZ_EC_MIN8 0
|
||||
param set-default SIM_GZ_EC_MIN9 1100
|
||||
param set-default SIM_GZ_EC_MIN10 1100
|
||||
param set-default SIM_GZ_EC_MIN11 1100
|
||||
param set-default SIM_GZ_EC_MIN12 1100
|
||||
|
||||
param set-default SIM_GZ_EC_MAX1 10000
|
||||
param set-default SIM_GZ_EC_MAX2 10000
|
||||
param set-default SIM_GZ_EC_MAX3 10000
|
||||
param set-default SIM_GZ_EC_MAX4 10000
|
||||
param set-default SIM_GZ_EC_MAX5 10000
|
||||
param set-default SIM_GZ_EC_MAX6 10000
|
||||
param set-default SIM_GZ_EC_MAX7 10000
|
||||
param set-default SIM_GZ_EC_MAX8 10000
|
||||
param set-default SIM_GZ_EC_MAX9 1900
|
||||
param set-default SIM_GZ_EC_MAX10 1900
|
||||
param set-default SIM_GZ_EC_MAX11 1900
|
||||
param set-default SIM_GZ_EC_MAX12 1900
|
||||
|
||||
# Controller Tunings
|
||||
param set SC_YAWRATE_P 3.335
|
||||
param set SC_YAWRATE_I 0.87
|
||||
param set SC_YAWRATE_D 0.15
|
||||
param set SC_YR_INT_LIM 0.2
|
||||
param set SC_YAW_P 3.0
|
||||
|
||||
param set SPC_POS_P 0.20
|
||||
param set SPC_VEL_P 6.55
|
||||
param set SPC_VEL_I 0.0
|
||||
param set SPC_VEL_D 0.0
|
||||
param set SPC_VEL_MAX 12.0
|
||||
@@ -111,6 +111,8 @@ px4_add_romfs_files(
|
||||
17001_flightgear_tf-g1
|
||||
17002_flightgear_tf-g2
|
||||
|
||||
40000_gz_boat
|
||||
|
||||
50000_gz_rover_differential
|
||||
51000_gz_rover_ackermann
|
||||
52000_gz_rover_mecanum
|
||||
@@ -118,6 +120,7 @@ px4_add_romfs_files(
|
||||
60002_gz_uuv_bluerov2_heavy
|
||||
|
||||
70000_gz_atmos
|
||||
70001_gz_atmos_dual
|
||||
|
||||
# [22000, 22999] Reserve for custom models
|
||||
)
|
||||
|
||||
@@ -126,15 +126,6 @@ then
|
||||
set AUTOCNF yes
|
||||
fi
|
||||
|
||||
# Allow overriding parameters via env variables: export PX4_PARAM_{name}={value}
|
||||
env | while IFS='=' read -r line; do
|
||||
value=${line#*=}
|
||||
name=${line%%=*}
|
||||
case $name in
|
||||
"PX4_PARAM_"*) param set "${name#PX4_PARAM_}" "$value" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# multi-instance setup
|
||||
# shellcheck disable=SC2154
|
||||
param set MAV_SYS_ID $((px4_instance+1))
|
||||
@@ -238,6 +229,15 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Allow overriding parameters via env variables: export PX4_PARAM_{name}={value}
|
||||
env | while IFS='=' read -r line; do
|
||||
value=${line#*=}
|
||||
name=${line%%=*}
|
||||
case $name in
|
||||
"PX4_PARAM_"*) param set "${name#PX4_PARAM_}" "$value" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
dataman start
|
||||
|
||||
# only start the simulator if not in replay mode, as both control the lockstep time
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v6x exclude
|
||||
# @board ark_fmu-v6x exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v6x exclude
|
||||
# @board ark_fmu-v6x exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.fw_defaults
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v6x exclude
|
||||
# @board ark_fmu-v6x exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
@@ -75,9 +77,6 @@ param set-default NAV_ACC_RAD 2
|
||||
param set-default RTL_DESCEND_ALT 5
|
||||
param set-default RTL_RETURN_ALT 5
|
||||
|
||||
# Logging Parameters
|
||||
param set-default SDLOG_PROFILE 131
|
||||
|
||||
# Sensors Parameters
|
||||
param set-default SENS_CM8JL65_CFG 104
|
||||
param set-default SENS_FLOW_MAXHGT 25
|
||||
|
||||
@@ -78,9 +78,6 @@ param set-default NAV_ACC_RAD 2
|
||||
param set-default RTL_DESCEND_ALT 5
|
||||
param set-default RTL_RETURN_ALT 5
|
||||
|
||||
# Logging Parameters
|
||||
param set-default SDLOG_PROFILE 131
|
||||
|
||||
# Sensors Parameters
|
||||
param set-default SENS_CM8JL65_CFG 202
|
||||
param set-default SENS_FLOW_MAXHGT 25
|
||||
|
||||
@@ -29,9 +29,6 @@ param set-default MPC_MAN_TILT_MAX 60
|
||||
|
||||
param set-default THR_MDL_FAC 0.3
|
||||
|
||||
# enable high-rate logging profile (helps with tuning)
|
||||
param set-default SDLOG_PROFILE 19
|
||||
|
||||
param set-default IMU_DGYRO_CUTOFF 50
|
||||
param set-default IMU_GYRO_CUTOFF 90
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v6x exclude
|
||||
# @board ark_fmu-v6x exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board px4_fmu-v6x exclude
|
||||
# @board ark_fmu-v6x exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
# @board px4_fmu-v4pro exclude
|
||||
# @board px4_fmu-v5 exclude
|
||||
# @board px4_fmu-v5x exclude
|
||||
# @board px4_fmu-v6x exclude
|
||||
# @board bitcraze_crazyflie exclude
|
||||
# @board ark_fmu-v6x exclude
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
. ${R}etc/init.d/rc.sc_defaults
|
||||
|
||||
# Overwrite DDS AG IP to `192.168.0.1`
|
||||
param set-default UXRCE_DDS_AG_IP -1062731775
|
||||
|
||||
param set-default CA_AIRFRAME 14
|
||||
param set-default MAV_TYPE 45
|
||||
|
||||
|
||||
@@ -41,3 +41,9 @@ if param compare -s MC_NN_EN 1
|
||||
then
|
||||
mc_nn_control start
|
||||
fi
|
||||
|
||||
|
||||
if param compare -s MC_RAPTOR_ENABLE 1
|
||||
then
|
||||
mc_raptor start
|
||||
fi
|
||||
|
||||
@@ -8,9 +8,6 @@ set VEHICLE_TYPE spacecraft
|
||||
# MAV_TYPE_SPACECRAFT_ORBITTER
|
||||
param set-default MAV_TYPE 45
|
||||
|
||||
# Set micro-dds-client to use ethernet and IP-address 192.168.0.1
|
||||
param set-default UXRCE_DDS_AG_IP -1062731775
|
||||
|
||||
# Disable preflight disarm to not interfere with external launching
|
||||
param set-default COM_DISARM_PRFLT -1
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
|
||||
@@ -237,6 +237,12 @@ then
|
||||
tla2528 start -X
|
||||
fi
|
||||
|
||||
# Start TMP102 temperature sensor
|
||||
if param compare SENS_EN_TMP102 1
|
||||
then
|
||||
tmp102 start -X
|
||||
fi
|
||||
|
||||
# probe for optional external I2C devices
|
||||
if param compare SENS_EXT_I2C_PRB 1
|
||||
then
|
||||
|
||||
@@ -17,37 +17,12 @@ if [[ -f $1"/.git" || -d $1"/.git" ]]; then
|
||||
SUBMODULE_STATUS=$(git submodule summary "$1")
|
||||
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1")
|
||||
if ! [[ -z "$STATUSRETVAL" ]]; then
|
||||
echo -e "\033[31mChecked $1 submodule, ACTION REQUIRED:\033[0m"
|
||||
echo ""
|
||||
echo -e "Different commits:"
|
||||
echo -e "\033[33mWarning: $1 submodule has uncommitted changes:\033[0m"
|
||||
echo -e "$SUBMODULE_STATUS"
|
||||
echo ""
|
||||
echo -e "To update submodules to the expected version, run:"
|
||||
echo -e " \033[94mgit submodule sync --recursive && git submodule update --init --recursive\033[0m"
|
||||
echo ""
|
||||
echo -e " *******************************************************************************"
|
||||
echo -e " * \033[31mIF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS):\033[0m *"
|
||||
echo -e " * \033[31mHit 'u' and <ENTER> to update ALL submodules and resolve this.\033[0m *"
|
||||
echo -e " * (performs \033[94mgit submodule sync --recursive\033[0m *"
|
||||
echo -e " * and \033[94mgit submodule update --init --recursive\033[0m ) *"
|
||||
echo -e " *******************************************************************************"
|
||||
echo ""
|
||||
echo ""
|
||||
echo -e " Only for EXPERTS:"
|
||||
echo -e " $1 submodule is not in the recommended version."
|
||||
echo -e " Hit 'y' and <ENTER> to continue the build with this version. Hit <ENTER> to resolve manually."
|
||||
echo -e " Use \033[94mgit add $1 && git commit -m 'Updated $1'\033[0m to choose this version (careful!)"
|
||||
echo ""
|
||||
read user_cmd
|
||||
if [ "$user_cmd" == "y" ]; then
|
||||
echo "Continuing build with manually overridden submodule.."
|
||||
elif [ "$user_cmd" == "u" ]; then
|
||||
git submodule sync --recursive -- $1
|
||||
git submodule update --init --recursive -- $1 || true
|
||||
git submodule update --init --recursive --force -- $1
|
||||
echo "Submodule fixed, continuing build.."
|
||||
else
|
||||
echo "Build aborted."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
git submodule --quiet sync --recursive --quiet -- $1
|
||||
|
||||
@@ -98,40 +98,6 @@ class firmware(object):
|
||||
|
||||
desc = {}
|
||||
image = bytes()
|
||||
crctab = array.array('I', [
|
||||
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
|
||||
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
|
||||
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
|
||||
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
|
||||
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
|
||||
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
|
||||
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
|
||||
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
|
||||
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
|
||||
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
|
||||
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
|
||||
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
|
||||
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
|
||||
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
|
||||
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
||||
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
|
||||
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
|
||||
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
|
||||
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
|
||||
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
|
||||
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
|
||||
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
|
||||
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
|
||||
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
|
||||
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
|
||||
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
|
||||
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
|
||||
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
|
||||
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
|
||||
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
||||
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
|
||||
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d])
|
||||
crcpad = bytearray(b'\xff\xff\xff\xff')
|
||||
|
||||
def __init__(self, path):
|
||||
|
||||
@@ -149,17 +115,15 @@ class firmware(object):
|
||||
def property(self, propname):
|
||||
return self.desc[propname]
|
||||
|
||||
def __crc32(self, bytes, state):
|
||||
for byte in bytes:
|
||||
index = (state ^ byte) & 0xff
|
||||
state = self.crctab[index] ^ (state >> 8)
|
||||
return state
|
||||
|
||||
def crc(self, padlen):
|
||||
state = self.__crc32(self.image, int(0))
|
||||
for _ in range(len(self.image), (padlen - 1), 4):
|
||||
state = self.__crc32(self.crcpad, state)
|
||||
return state
|
||||
state = 0xFFFFFFFF
|
||||
state = zlib.crc32(self.image, state)
|
||||
padding_length = padlen - len(self.image)
|
||||
if padding_length > 0:
|
||||
padding = b'\xff' * padding_length
|
||||
state = zlib.crc32(padding, state)
|
||||
|
||||
return (state ^ 0xFFFFFFFF) & 0xFFFFFFFF
|
||||
|
||||
|
||||
class uploader:
|
||||
|
||||
@@ -71,6 +71,5 @@ else()
|
||||
nuttx_arch # sdio
|
||||
nuttx_drivers # sdio
|
||||
px4_layer
|
||||
platform_gpio_mcp23009
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
#include <px4_platform/gpio.h>
|
||||
#include <px4_platform/board_determine_hw_info.h>
|
||||
#include <px4_platform/board_dma_alloc.h>
|
||||
#include <px4_platform/gpio/mcp23009.hpp>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
@@ -286,13 +285,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
|
||||
# endif /* CONFIG_MMCSD */
|
||||
|
||||
ret = mcp23009_register_gpios(3, 0x25);
|
||||
|
||||
if (ret != OK) {
|
||||
led_on(LED_RED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* !defined(BOOTLOADER) */
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_LIS3MDL=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_LSM303AGR=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_RM3100=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_MEMSIC_MMC5983MA=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA228=y
|
||||
|
||||
@@ -19,7 +19,15 @@ CONFIG_DRIVERS_HEATER=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_IIM42653=y
|
||||
CONFIG_DRIVERS_IMU_MURATA_SCH16T=y
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_BOSCH_BMM150=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8308=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_LIS3MDL=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_LSM303AGR=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_RM3100=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
|
||||
CONFIG_DRIVERS_OSD_MSP_OSD=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
|
||||
@@ -20,9 +20,9 @@ safety_button start
|
||||
if ver hwbasecmp 009 010 011
|
||||
then
|
||||
# No USB
|
||||
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -U 10
|
||||
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -M 0 -U 10
|
||||
fi
|
||||
if ver hwbasecmp 00a 008
|
||||
then
|
||||
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -U 10
|
||||
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -M 0 -U 10
|
||||
fi
|
||||
|
||||
@@ -86,8 +86,5 @@ fi
|
||||
#external baro
|
||||
bmp388 -X start
|
||||
|
||||
# Don't try to start external baro on I2C3 as it can conflict with the MS5525DSO airspeed sensor.
|
||||
#ms5611 -X start
|
||||
|
||||
unset INA_CONFIGURED
|
||||
unset HAVE_PM2
|
||||
|
||||
@@ -69,6 +69,6 @@ else()
|
||||
nuttx_arch # sdio
|
||||
nuttx_drivers # sdio
|
||||
px4_layer
|
||||
platform_gpio_mcp23009
|
||||
platform_gpio_mcp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
#include <px4_platform/gpio.h>
|
||||
#include <px4_platform/board_determine_hw_info.h>
|
||||
#include <px4_platform/board_dma_alloc.h>
|
||||
#include <px4_platform/gpio/mcp23009.hpp>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
@@ -282,13 +281,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
|
||||
# endif /* CONFIG_MMCSD */
|
||||
|
||||
ret = mcp23009_register_gpios(3, 0x25);
|
||||
|
||||
if (ret != OK) {
|
||||
led_on(LED_RED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* !defined(BOOTLOADER) */
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -68,7 +68,7 @@ fi
|
||||
|
||||
bmi088 -A -R 4 -s start
|
||||
bmi088 -G -R 4 -s start
|
||||
iim42652 -R 6 -s start
|
||||
iim42652 -R 6 -s -C 32768 start
|
||||
icm45686 -R 2 -s start
|
||||
|
||||
rm3100 -I -b 4 start
|
||||
|
||||
@@ -71,6 +71,5 @@ else()
|
||||
nuttx_arch # sdio
|
||||
nuttx_drivers # sdio
|
||||
px4_layer
|
||||
platform_gpio_mcp23009
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
#include <px4_platform/gpio.h>
|
||||
#include <px4_platform/board_determine_hw_info.h>
|
||||
#include <px4_platform/board_dma_alloc.h>
|
||||
#include <px4_platform/gpio/mcp23009.hpp>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
@@ -286,13 +285,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
|
||||
# endif /* CONFIG_MMCSD */
|
||||
|
||||
ret = mcp23009_register_gpios(3, 0x25);
|
||||
|
||||
if (ret != OK) {
|
||||
led_on(LED_RED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* !defined(BOOTLOADER) */
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -13,7 +13,7 @@ CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/narinfc/h7/nuttx-config"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_NAME="PX4 NarinFC-H7"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
|
||||
CONFIG_ARCH_CHIP="stm32h7"
|
||||
CONFIG_ARCH_CHIP_STM32H743XI=y
|
||||
CONFIG_ARCH_CHIP_STM32H7=y
|
||||
@@ -31,11 +31,11 @@ CONFIG_BOARD_LOOPSPERMSEC=22114
|
||||
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_IFLOWCONTROL=y
|
||||
CONFIG_CDCACM_PRODUCTID=0x004c
|
||||
CONFIG_CDCACM_PRODUCTSTR="PX4 BL NarinFC H7"
|
||||
CONFIG_CDCACM_PRODUCTID=0x0047
|
||||
CONFIG_CDCACM_PRODUCTSTR="PX4 BL VOLOLAND NarinFC-H7"
|
||||
CONFIG_CDCACM_RXBUFSIZE=600
|
||||
CONFIG_CDCACM_TXBUFSIZE=12000
|
||||
CONFIG_CDCACM_VENDORID=0x3163
|
||||
CONFIG_CDCACM_VENDORID=0x3fc5
|
||||
CONFIG_CDCACM_VENDORSTR="VOLOLAND"
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
|
||||
@@ -29,9 +29,9 @@ safety_button start
|
||||
if ver hwbasecmp 009
|
||||
then
|
||||
# No USB
|
||||
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -U 10
|
||||
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -M 0 -U 10
|
||||
fi
|
||||
if ver hwbasecmp 00a 008
|
||||
then
|
||||
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -U 10
|
||||
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -M 0 -U 10
|
||||
fi
|
||||
|
||||
@@ -43,8 +43,6 @@ add_library(drivers_board
|
||||
usb.c
|
||||
)
|
||||
|
||||
add_dependencies(drivers_board platform_gpio_mcp23009)
|
||||
|
||||
target_link_libraries(drivers_board
|
||||
PRIVATE
|
||||
arch_io_pins
|
||||
@@ -54,5 +52,5 @@ target_link_libraries(drivers_board
|
||||
nuttx_arch # sdio
|
||||
nuttx_drivers # sdio
|
||||
px4_layer
|
||||
platform_gpio_mcp23009
|
||||
platform_gpio_mcp
|
||||
)
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
#include <px4_platform/gpio.h>
|
||||
#include <px4_platform/board_determine_hw_info.h>
|
||||
#include <px4_platform/board_dma_alloc.h>
|
||||
#include <px4_platform/gpio/mcp23009.hpp>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
@@ -280,12 +279,5 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
|
||||
#endif /* CONFIG_MMCSD */
|
||||
|
||||
ret = mcp23009_register_gpios(3, 0x25);
|
||||
|
||||
if (ret != OK) {
|
||||
led_on(LED_RED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
CONFIG_BOARD_ARCHITECTURE="cortex-m7"
|
||||
CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS0"
|
||||
CONFIG_BOARD_SERIAL_GPS2="/dev/ttyS6"
|
||||
CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS5"
|
||||
CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS3"
|
||||
CONFIG_BOARD_SERIAL_TEL3="/dev/ttyS1"
|
||||
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
|
||||
CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=2
|
||||
CONFIG_COMMON_DIFFERENTIAL_PRESSURE=y
|
||||
CONFIG_COMMON_DISTANCE_SENSOR=y
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
CONFIG_COMMON_TELEMETRY=y
|
||||
CONFIG_DRIVERS_ACTUATORS_VERTIQ_IO=y
|
||||
CONFIG_DRIVERS_ADC_BOARD_ADC=y
|
||||
CONFIG_DRIVERS_BAROMETER_MS5611=y
|
||||
CONFIG_DRIVERS_BATT_SMBUS=y
|
||||
CONFIG_DRIVERS_CAMERA_CAPTURE=y
|
||||
CONFIG_DRIVERS_CAMERA_TRIGGER=y
|
||||
CONFIG_DRIVERS_CDCACM_AUTOSTART=y
|
||||
CONFIG_DRIVERS_DSHOT=y
|
||||
CONFIG_DRIVERS_GNSS_SEPTENTRIO=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_HEATER=y
|
||||
CONFIG_DRIVERS_IMU_BOSCH_BMI055=y
|
||||
CONFIG_DRIVERS_IMU_BOSCH_BMI088=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA228=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA238=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PX4IO=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
CONFIG_LIB_RL_TOOLS=y
|
||||
CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
CONFIG_MODULES_BATTERY_STATUS=y
|
||||
CONFIG_MODULES_CAMERA_FEEDBACK=y
|
||||
CONFIG_MODULES_COMMANDER=y
|
||||
CONFIG_MODULES_CONTROL_ALLOCATOR=y
|
||||
CONFIG_MODULES_DATAMAN=y
|
||||
CONFIG_MODULES_EKF2=y
|
||||
CONFIG_MODULES_ESC_BATTERY=y
|
||||
CONFIG_MODULES_EVENTS=y
|
||||
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
|
||||
CONFIG_MODULES_FW_ATT_CONTROL=n
|
||||
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
|
||||
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
|
||||
CONFIG_MODULES_FW_MODE_MANAGER=n
|
||||
CONFIG_MODULES_FW_RATE_CONTROL=n
|
||||
CONFIG_MODULES_GIMBAL=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_LAND_DETECTOR=y
|
||||
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
|
||||
CONFIG_MODULES_LOAD_MON=y
|
||||
CONFIG_MODULES_LOGGER=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_MANUAL_CONTROL=y
|
||||
CONFIG_MODULES_MAVLINK=y
|
||||
CONFIG_MODULES_MC_ATT_CONTROL=y
|
||||
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RAPTOR=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_SIMULATION_SIMULATOR_SIH=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
CONFIG_MODULES_UXRCE_DDS_CLIENT=y
|
||||
CONFIG_MODULES_VTOL_ATT_CONTROL=n
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
|
||||
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
|
||||
CONFIG_SYSTEMCMDS_BSONDUMP=y
|
||||
CONFIG_SYSTEMCMDS_DMESG=y
|
||||
CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
|
||||
CONFIG_SYSTEMCMDS_I2CDETECT=y
|
||||
CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_MFT=y
|
||||
CONFIG_SYSTEMCMDS_MTD=y
|
||||
CONFIG_SYSTEMCMDS_NSHTERM=y
|
||||
CONFIG_SYSTEMCMDS_PARAM=y
|
||||
CONFIG_SYSTEMCMDS_PERF=y
|
||||
CONFIG_SYSTEMCMDS_REBOOT=y
|
||||
CONFIG_SYSTEMCMDS_SD_BENCH=y
|
||||
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
|
||||
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
|
||||
CONFIG_SYSTEMCMDS_TOP=y
|
||||
CONFIG_SYSTEMCMDS_TUNE_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_UORB=y
|
||||
CONFIG_SYSTEMCMDS_VER=y
|
||||
CONFIG_SYSTEMCMDS_WORK_QUEUE=y
|
||||
CONFIG_USE_IFCI_CONFIGURATION=y
|
||||
@@ -12,7 +12,6 @@ CONFIG_DRIVERS_ADC_ADS1115=y
|
||||
CONFIG_DRIVERS_ADC_BOARD_ADC=y
|
||||
CONFIG_DRIVERS_BAROMETER_BMP388=y
|
||||
CONFIG_DRIVERS_BAROMETER_INVENSENSE_ICP201XX=y
|
||||
CONFIG_DRIVERS_BAROMETER_MS5611=y
|
||||
CONFIG_DRIVERS_CAMERA_CAPTURE=y
|
||||
CONFIG_DRIVERS_CAMERA_TRIGGER=y
|
||||
CONFIG_DRIVERS_CDCACM_AUTOSTART=y
|
||||
|
||||
@@ -146,8 +146,5 @@ else
|
||||
bmp388 -X start
|
||||
fi
|
||||
|
||||
# Don't try to start external baro on I2C3 as it can conflict with the MS5525DSO airspeed sensor.
|
||||
#ms5611 -X start
|
||||
|
||||
unset INA_CONFIGURED
|
||||
unset HAVE_PM2
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
CONFIG_MAVLINK_DIALECT="development"
|
||||
CONFIG_MODULES_UXRCE_DDS_CLIENT=n
|
||||
|
||||
@@ -54,6 +54,7 @@ CONFIG_DEBUG_MEMFAULT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEBUG_TCBINFO=y
|
||||
CONFIG_DEV_FIFO_SIZE=0
|
||||
CONFIG_DEV_GPIO=y
|
||||
CONFIG_DEV_PIPE_SIZE=70
|
||||
CONFIG_DEV_URANDOM=y
|
||||
CONFIG_ETH0_PHY_MULTI=y
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
CONFIG_BOARD_ETHERNET=y
|
||||
CONFIG_BOARD_ROOT_PATH="."
|
||||
CONFIG_BOARD_TESTING=y
|
||||
CONFIG_COMMON_SIMULATION=y
|
||||
CONFIG_DRIVERS_CAMERA_TRIGGER=y
|
||||
CONFIG_DRIVERS_GNSS_SEPTENTRIO=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_OSD_MSP_OSD=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_EKF2_VERBOSE_STATUS=y
|
||||
CONFIG_EXAMPLES_DYN_HELLO=y
|
||||
CONFIG_EXAMPLES_FAKE_GPS=y
|
||||
CONFIG_EXAMPLES_FAKE_IMU=y
|
||||
CONFIG_EXAMPLES_FAKE_MAGNETOMETER=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_PX4_MAVLINK_DEBUG=y
|
||||
CONFIG_EXAMPLES_PX4_SIMPLE_APP=y
|
||||
CONFIG_EXAMPLES_WORK_ITEM=y
|
||||
CONFIG_FIGURE_OF_EIGHT=y
|
||||
CONFIG_LIB_RL_TOOLS=y
|
||||
CONFIG_MAVLINK_DIALECT="development"
|
||||
CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF=y
|
||||
CONFIG_MODULES_AIRSHIP_ATT_CONTROL=y
|
||||
CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=y
|
||||
CONFIG_MODULES_CAMERA_FEEDBACK=y
|
||||
CONFIG_MODULES_COMMANDER=y
|
||||
CONFIG_MODULES_CONTROL_ALLOCATOR=y
|
||||
CONFIG_MODULES_DATAMAN=y
|
||||
CONFIG_MODULES_EKF2=y
|
||||
CONFIG_MODULES_EVENTS=y
|
||||
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
|
||||
CONFIG_MODULES_FW_ATT_CONTROL=y
|
||||
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
|
||||
CONFIG_MODULES_FW_MODE_MANAGER=y
|
||||
CONFIG_MODULES_FW_RATE_CONTROL=y
|
||||
CONFIG_MODULES_GIMBAL=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_GYRO_FFT=y
|
||||
CONFIG_MODULES_LAND_DETECTOR=y
|
||||
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
|
||||
CONFIG_MODULES_LOAD_MON=y
|
||||
CONFIG_MODULES_LOCAL_POSITION_ESTIMATOR=y
|
||||
CONFIG_MODULES_LOGGER=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_MANUAL_CONTROL=y
|
||||
CONFIG_MODULES_MAVLINK=y
|
||||
CONFIG_MODULES_MC_ATT_CONTROL=y
|
||||
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RAPTOR=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODULES_PAYLOAD_DELIVERER=y
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_REPLAY=y
|
||||
CONFIG_MODULES_ROVER_ACKERMANN=y
|
||||
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
|
||||
CONFIG_MODULES_ROVER_MECANUM=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_SIMULATION_GZ_BRIDGE=y
|
||||
CONFIG_MODULES_SIMULATION_GZ_MSGS=y
|
||||
CONFIG_MODULES_SIMULATION_GZ_PLUGINS=y
|
||||
CONFIG_MODULES_SIMULATION_SENSOR_AGP_SIM=y
|
||||
CONFIG_MODULES_SPACECRAFT=n
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
CONFIG_MODULES_UUV_ATT_CONTROL=y
|
||||
CONFIG_MODULES_UUV_POS_CONTROL=y
|
||||
CONFIG_MODULES_UXRCE_DDS_CLIENT=y
|
||||
CONFIG_MODULES_VTOL_ATT_CONTROL=y
|
||||
CONFIG_NUM_MISSION_ITMES_SUPPORTED=10000
|
||||
CONFIG_PLATFORM_POSIX=y
|
||||
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
|
||||
CONFIG_SYSTEMCMDS_BSONDUMP=y
|
||||
CONFIG_SYSTEMCMDS_DYN=y
|
||||
CONFIG_SYSTEMCMDS_FAILURE=y
|
||||
CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_PARAM=y
|
||||
CONFIG_SYSTEMCMDS_PERF=y
|
||||
CONFIG_SYSTEMCMDS_SD_BENCH=y
|
||||
CONFIG_SYSTEMCMDS_SHUTDOWN=y
|
||||
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
|
||||
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
|
||||
CONFIG_SYSTEMCMDS_TUNE_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_UORB=y
|
||||
CONFIG_SYSTEMCMDS_VER=y
|
||||
CONFIG_SYSTEMCMDS_WORK_QUEUE=y
|
||||
|
After Width: | Height: | Size: 550 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 210 KiB |
@@ -128,7 +128,7 @@
|
||||
- [LED Meanings](getting_started/led_meanings.md)
|
||||
- [Tune/Sound Meanings](getting_started/tunes.md)
|
||||
- [QGroundControl Flight-Readiness Status](flying/pre_flight_checks.md)
|
||||
|
||||
- [Asset Tracking](debug/asset_tracking.md)
|
||||
- [Hardware Selection & Setup](hardware/drone_parts.md)
|
||||
- [Flight Controllers (Autopilots)](flight_controller/index.md)
|
||||
- [Flight Controller Selection](getting_started/flight_controller_selection.md)
|
||||
@@ -271,6 +271,8 @@
|
||||
- [Holybro M8N & M9N GPS](gps_compass/gps_holybro_m8n_m9n.md)
|
||||
- [Sky-Drones SmartAP GPS](gps_compass/gps_smartap.md)
|
||||
- [RTK GNSS](gps_compass/rtk_gps.md)
|
||||
- [ARK G5 RTK GPS](dronecan/ark_g5_rtk_gps.md)
|
||||
- [ARK G5 RTK HEADING GPS](dronecan/ark_g5_rtk_heading_gps.md)
|
||||
- [ARK RTK GPS (CAN)](dronecan/ark_rtk_gps.md)
|
||||
- [ARK RTK GPS L1 L5 (CAN)](dronecan/ark_rtk_gps_l1_l2.md)
|
||||
- [ARK X20 RTK GPS (CAN)](dronecan/ark_x20_rtk_gps.md)
|
||||
@@ -312,15 +314,17 @@
|
||||
- [Actuator Allocation](config/actuators.md)
|
||||
- [ESC Calibration](advanced_config/esc_calibration.md)
|
||||
- [ESCs & Motors](peripherals/esc_motors.md)
|
||||
- [ESC Protocols](esc/esc_protocols.md)
|
||||
- [PWM ESCs and Servos](peripherals/pwm_escs_and_servo.md)
|
||||
- [DShot ESCs](peripherals/dshot.md)
|
||||
- [OneShot ESCs and Servos](peripherals/oneshot.md)
|
||||
- [DroneCAN ESCs](dronecan/escs.md)
|
||||
- [Zubax Telega](dronecan/zubax_telega.md)
|
||||
- [PX4 Sapog ESC Firmware](dronecan/sapog.md)
|
||||
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
|
||||
- [Vertiq](peripherals/vertiq.md)
|
||||
- [VESC](peripherals/vesc.md)
|
||||
- [ARK 4IN1 ESC](esc/ark_4in1_esc.md)
|
||||
- [Holybro Kotleta](dronecan/holybro_kotleta.md)
|
||||
- [Vertiq Motor/ESC Modules](peripherals/vertiq.md)
|
||||
- [VESC Project ESCs](peripherals/vesc.md)
|
||||
- [Zubax Telega ESCs](dronecan/zubax_telega.md)
|
||||
- [Radio Control (RC)](getting_started/rc_transmitter_receiver.md)
|
||||
- [Radio Setup](config/radio.md)
|
||||
- [Flight Modes](config/flight_mode.md)
|
||||
@@ -499,6 +503,7 @@
|
||||
- [PPS Time Synchronization](advanced/pps_time_sync.md)
|
||||
- [Middleware](middleware/index.md)
|
||||
- [uORB Messaging](middleware/uorb.md)
|
||||
- [uORB Docs Standard](uorb/uorb_documentation.md)
|
||||
- [uORB Graph](middleware/uorb_graph.md)
|
||||
- [uORB Message Reference](msg_docs/index.md)
|
||||
- [Versioned](msg_docs/versioned_messages.md)
|
||||
@@ -561,6 +566,7 @@
|
||||
- [DebugKeyValue](msg_docs/DebugKeyValue.md)
|
||||
- [DebugValue](msg_docs/DebugValue.md)
|
||||
- [DebugVect](msg_docs/DebugVect.md)
|
||||
- [DeviceInformation](msg_docs/DeviceInformation.md)
|
||||
- [DifferentialPressure](msg_docs/DifferentialPressure.md)
|
||||
- [DistanceSensor](msg_docs/DistanceSensor.md)
|
||||
- [DistanceSensorModeChangeRequest](msg_docs/DistanceSensorModeChangeRequest.md)
|
||||
@@ -816,9 +822,11 @@
|
||||
- [Camera Integration/Architecture](camera/camera_architecture.md)
|
||||
- [Computer Vision](advanced/computer_vision.md)
|
||||
- [Motion Capture (VICON, Optitrack, NOKOV)](tutorials/motion-capture.md)
|
||||
- [Neural Networks](advanced/neural_networks.md)
|
||||
- [Neural Network Module Utilities](advanced/nn_module_utilities.md)
|
||||
- [TensorFlow Lite Micro (TFLM)](advanced/tflm.md)
|
||||
- [Neural Networks](neural_networks/index.md)
|
||||
- [MC NN Control Module (Generic)](neural_networks/mc_neural_network_control.md)
|
||||
- [Neural Network Module Utilities](neural_networks/nn_module_utilities.md)
|
||||
- [TensorFlow Lite Micro (TFLM)](neural_networks/tflm.md)
|
||||
- [RAPTOR Adaptive RL NN Module](neural_networks/raptor.md)
|
||||
- [Installing driver for Intel RealSense R200](advanced/realsense_intel_driver.md)
|
||||
- [Switching State Estimators](advanced/switching_state_estimators.md)
|
||||
- [Out-of-Tree Modules](advanced/out_of_tree_modules.md)
|
||||
@@ -898,6 +906,7 @@
|
||||
- [Licenses](contribute/licenses.md)
|
||||
- [Releases](releases/index.md)
|
||||
- [main (alpha)](releases/main.md)
|
||||
- [1.17 (alpha)](releases/1.17.md)
|
||||
- [1.16 (stable)](releases/1.16.md)
|
||||
- [1.15](releases/1.15.md)
|
||||
- [1.14](releases/1.14.md)
|
||||
|
||||
@@ -74,7 +74,7 @@ For example, you might have the following settings to assign the gimbal roll, pi
|
||||
|
||||

|
||||
|
||||
The PWM values to use for the disarmed, maximum and minimum values can be determined in the same way as other servo, using the [Actuator Test sliders](../config/actuators.md#actuator-testing) to confirm that each slider moves the appropriate axis, and changing the values so that the gimbal is in the appropriate position at the disarmed, low and high position in the slider.
|
||||
The PWM values to use for the disarmed, maximum, center and minimum values can be determined in the same way as other servo, using the [Actuator Test sliders](../config/actuators.md#actuator-testing) to confirm that each slider moves the appropriate axis, and changing the values so that the gimbal is in the appropriate position at the disarmed, low, center and high position in the slider.
|
||||
The values may also be provided in gimbal documentation.
|
||||
|
||||
## Gimbal Control in Missions
|
||||
|
||||
@@ -1,119 +1 @@
|
||||
# Neural Networks
|
||||
|
||||
<Badge type="tip" text="main (planned for: PX4 v1.17)" /> <Badge type="warning" text="Experimental" />
|
||||
|
||||
::: warning
|
||||
This is an experimental module.
|
||||
Use at your own risk.
|
||||
:::
|
||||
|
||||
The Multicopter Neural Network (NN) module ([mc_nn_control](../modules/modules_controller.md#mc-nn-control)) is an example module that allows you to experiment with using a pre-trained neural network on PX4.
|
||||
It might be used, for example, to experiment with controllers for non-traditional drone morphologies, computer vision tasks, and so on.
|
||||
|
||||
The module integrates a pre-trained neural network based on the [TensorFlow Lite Micro (TFLM)](../advanced/tflm.md) module.
|
||||
The module is trained for the [X500 V2](../frames_multicopter/holybro_x500v2_pixhawk6c.md) multicopter frame.
|
||||
While the controller is fairly robust, and might work on other platforms, we recommend [Training your own Network](#training-your-own-network) if you use a different vehicle.
|
||||
Note that after training the network you will need to update and rebuild PX4.
|
||||
|
||||
TLFM is a mature inference library intended for use on embedded devices.
|
||||
It has support for several architectures, so there is a high likelihood that you can build it for the board you want to use.
|
||||
If not, there are other possible NN frameworks, such as [Eigen](https://eigen.tuxfamily.org/index.php?title=Main_Page) and [Executorch](https://pytorch.org/executorch-overview).
|
||||
|
||||
This document explains how you can include the module in your PX4 build, and provides a broad overview of how it works.
|
||||
The other documents in the section provide more information about the integration, allowing you to replace the NN with a version trained on different data, or even to replace the TLFM library altogether.
|
||||
|
||||
If you are looking for more resources to learn about the module, a website has been created with links to a youtube video and a workshop paper. A full master's thesis will be added later. [A Neural Network Mode for PX4 on Embedded Flight Controllers](https://ntnu-arl.github.io/px4-nns/).
|
||||
|
||||
## Neural Network PX4 Firmware
|
||||
|
||||
::: warning
|
||||
This module requires Ubuntu 24.04 or newer (it is not supported in Ubuntu 22.04).
|
||||
:::
|
||||
|
||||
The module has been tested on a number of configurations, which can be build locally using the commands:
|
||||
|
||||
```sh
|
||||
make px4_sitl_neural
|
||||
```
|
||||
|
||||
```sh
|
||||
make px4_fmu-v6c_neural
|
||||
```
|
||||
|
||||
```sh
|
||||
make mro_pixracerpro_neural
|
||||
```
|
||||
|
||||
You can add the module to other board configurations by modifying their `default.px4board file` configuration to include these lines:
|
||||
|
||||
```sh
|
||||
CONFIG_LIB_TFLM=y
|
||||
CONFIG_MODULES_MC_NN_CONTROL=y
|
||||
```
|
||||
|
||||
:::tip
|
||||
The `mc_nn_control` module takes up roughly 50KB, and many of the `default.px4board file` are already close to filling all the flash on their boards. To make room for the neural control module you can remove the include statements for other modules, such as FW, rover, VTOL and UUV.
|
||||
:::
|
||||
|
||||
## Example Module Overview
|
||||
|
||||
The example module replaces the entire controller structure as well as the control allocator, as shown in the diagram below:
|
||||
|
||||

|
||||
|
||||
In the [controller diagram](../flight_stack/controller_diagrams.md) you can see the [uORB message](../middleware/uorb.md) flow.
|
||||
We hook into this flow by subscribing to messages at particular points, using our neural network to calculate outputs, and then publishing them into the next point in the flow.
|
||||
We also need to stop the module publishing the topic to be replaced, which is covered in [Neural Network Module: System Integration](nn_module_utilities.md)
|
||||
|
||||
### Input
|
||||
|
||||
The input can be changed to whatever you want.
|
||||
Set up the input you want to use during training and then provide the same input in PX4.
|
||||
In the Neural Control module the input is an array of 15 numbers, and consists of these values in this order:
|
||||
|
||||
- [3] Local position error. (goal position - current position)
|
||||
- [6] The first 2 rows of a 3 dimensional rotation matrix.
|
||||
- [3] Linear velocity
|
||||
- [3] Angular velocity
|
||||
|
||||
All the input values are collected from uORB topics and transformed into the correct representation in the `PopulateInputTensor()` function.
|
||||
PX4 uses the NED frame representation, while the Aerial Gym Simulator, in which the NN was trained, uses the ENU representation.
|
||||
Therefore two rotation matrices are created in the function and all the inputs are transformed from the NED representation to the ENU one.
|
||||
|
||||

|
||||
|
||||
ENU and NED are just rotation representations, the translational difference is only there so both can be seen in the same figure.
|
||||
|
||||
### Output
|
||||
|
||||
The output consists of 4 values, the motor forces, one for each motor.
|
||||
These are transformed in the `RescaleActions()` function.
|
||||
This is done because PX4 expects normalized motor commands while the Aerial Gym Simulator uses physical values.
|
||||
So the output from the network needs to be normalized before they can be sent to the motors in PX4.
|
||||
|
||||
The commands are published to the [ActuatorMotors](../msg_docs/ActuatorMotors.md) topic.
|
||||
The publishing is handled in `PublishOutput(float* command_actions)` function.
|
||||
|
||||
:::tip
|
||||
If the neural control mode is too aggressive or unresponsive the [MC_NN_THRST_COEF](../advanced_config/parameter_reference.md#MC_NN_THRST_COEF) parameter can be tuned.
|
||||
Decrease it for more thrust.
|
||||
:::
|
||||
|
||||
## Training your own Network
|
||||
|
||||
The network is currently trained for the [X500 V2](../frames_multicopter/holybro_x500v2_pixhawk6c.md).
|
||||
But the controller is somewhat robust, so it could work directly on other platforms, but performing system identification and training a new network is recommended.
|
||||
|
||||
Since the Aerial Gym Simulator is open-source you can download it and train your own networks as long as you have access to an NVIDIA GPU.
|
||||
If you want to train a control network optimized for your platform you can follow the instructions in the [Aerial Gym Documentation](https://ntnu-arl.github.io/aerial_gym_simulator/9_sim2real/).
|
||||
|
||||
You should do one system identification flight for this and get an approximate inertia matrix for your platform.
|
||||
On the `sys-id` flight you need ESC telemetry, you can read more about that in [DSHOT](../peripherals/dshot.md).
|
||||
|
||||
Then do the following steps:
|
||||
|
||||
- Do a hover flight
|
||||
- Read of the logs what RPM is required for the drone to hover.
|
||||
- Use the weight of each motor, length of the motor arms, total weight of the platform with battery to calculate an approximate inertia matrix for the platform.
|
||||
- Insert these values into the Aerial Gym configuration and train your network.
|
||||
- Convert the network as explained in [TFLM](tflm.md).
|
||||
<Redirect to="../neural_networks/mc_neural_network_control" />
|
||||
|
||||
@@ -25,6 +25,7 @@ It may also be supported on other boards.
|
||||
|
||||
Supported flight controllers include:
|
||||
|
||||
- [ARK Electronics ARKV6X](../flight_controller/ark_v6x.md)
|
||||
- [CUAV Pixhawk V6X](../flight_controller/cuav_pixhawk_v6x.md)
|
||||
- [Holybro Pixhawk 5X](../flight_controller/pixhawk5x.md)
|
||||
- [Holybro Pixhawk 6X](../flight_controller/pixhawk6x.md)
|
||||
|
||||
@@ -486,16 +486,6 @@ The integer refers to the I2C bus number where PCA9685 is connected.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 10 | | 0 |
|
||||
|
||||
### PCA9685_I2C_ADDR (`INT32`) {#PCA9685_I2C_ADDR}
|
||||
|
||||
I2C address of PCA9685.
|
||||
|
||||
The default address is 0x40 (64).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 127 | | 64 |
|
||||
|
||||
### PCA9685_FAIL1 (`INT32`) {#PCA9685_FAIL1}
|
||||
|
||||
PCA9685 Output Channel 1 Failsafe Value.
|
||||
@@ -1808,6 +1798,16 @@ The default failsafe value is set according to the selected function:
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0 |
|
||||
|
||||
### PCA9685_I2C_ADDR (`INT32`) {#PCA9685_I2C_ADDR}
|
||||
|
||||
I2C address of PCA9685.
|
||||
|
||||
The default address is 0x40 (64).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 1 | 127 | | 64 |
|
||||
|
||||
### PCA9685_MAX1 (`INT32`) {#PCA9685_MAX1}
|
||||
|
||||
PCA9685 Output Channel 1 Maximum Value.
|
||||
@@ -4924,6 +4924,39 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_DIS10 (`INT32`) {#SIM_GZ_EC_DIS10}
|
||||
|
||||
SIM_GZ ESC 10 Disarmed Value.
|
||||
|
||||
This is the output value that is set when not armed.
|
||||
Note that non-motor outputs might already be active in prearm state if COM_PREARM_MODE is set.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_DIS11 (`INT32`) {#SIM_GZ_EC_DIS11}
|
||||
|
||||
SIM_GZ ESC 11 Disarmed Value.
|
||||
|
||||
This is the output value that is set when not armed.
|
||||
Note that non-motor outputs might already be active in prearm state if COM_PREARM_MODE is set.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_DIS12 (`INT32`) {#SIM_GZ_EC_DIS12}
|
||||
|
||||
SIM_GZ ESC 12 Disarmed Value.
|
||||
|
||||
This is the output value that is set when not armed.
|
||||
Note that non-motor outputs might already be active in prearm state if COM_PREARM_MODE is set.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_DIS2 (`INT32`) {#SIM_GZ_EC_DIS2}
|
||||
|
||||
SIM_GZ ESC 2 Disarmed Value.
|
||||
@@ -5001,6 +5034,17 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_DIS9 (`INT32`) {#SIM_GZ_EC_DIS9}
|
||||
|
||||
SIM_GZ ESC 9 Disarmed Value.
|
||||
|
||||
This is the output value that is set when not armed.
|
||||
Note that non-motor outputs might already be active in prearm state if COM_PREARM_MODE is set.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_FAIL1 (`INT32`) {#SIM_GZ_EC_FAIL1}
|
||||
|
||||
SIM_GZ ESC 1 Failsafe Value.
|
||||
@@ -5012,6 +5056,39 @@ When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC1
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 1000 | | -1 |
|
||||
|
||||
### SIM_GZ_EC_FAIL10 (`INT32`) {#SIM_GZ_EC_FAIL10}
|
||||
|
||||
SIM_GZ ESC 10 Failsafe Value.
|
||||
|
||||
This is the output value that is set when in failsafe mode.
|
||||
When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC10).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 1000 | | -1 |
|
||||
|
||||
### SIM_GZ_EC_FAIL11 (`INT32`) {#SIM_GZ_EC_FAIL11}
|
||||
|
||||
SIM_GZ ESC 11 Failsafe Value.
|
||||
|
||||
This is the output value that is set when in failsafe mode.
|
||||
When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC11).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 1000 | | -1 |
|
||||
|
||||
### SIM_GZ_EC_FAIL12 (`INT32`) {#SIM_GZ_EC_FAIL12}
|
||||
|
||||
SIM_GZ ESC 12 Failsafe Value.
|
||||
|
||||
This is the output value that is set when in failsafe mode.
|
||||
When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC12).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 1000 | | -1 |
|
||||
|
||||
### SIM_GZ_EC_FAIL2 (`INT32`) {#SIM_GZ_EC_FAIL2}
|
||||
|
||||
SIM_GZ ESC 2 Failsafe Value.
|
||||
@@ -5089,6 +5166,17 @@ When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC8
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 1000 | | -1 |
|
||||
|
||||
### SIM_GZ_EC_FAIL9 (`INT32`) {#SIM_GZ_EC_FAIL9}
|
||||
|
||||
SIM_GZ ESC 9 Failsafe Value.
|
||||
|
||||
This is the output value that is set when in failsafe mode.
|
||||
When set to -1 (default), the value depends on the function (see SIM_GZ_EC_FUNC9).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 1000 | | -1 |
|
||||
|
||||
### SIM_GZ_EC_FUNC1 (`INT32`) {#SIM_GZ_EC_FUNC1}
|
||||
|
||||
SIM_GZ ESC 1 Output Function.
|
||||
@@ -5160,6 +5248,219 @@ The default failsafe value is set according to the selected function:
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0 |
|
||||
|
||||
### SIM_GZ_EC_FUNC10 (`INT32`) {#SIM_GZ_EC_FUNC10}
|
||||
|
||||
SIM_GZ ESC 10 Output Function.
|
||||
|
||||
Select what should be output on SIM_GZ ESC 10.
|
||||
The default failsafe value is set according to the selected function:
|
||||
|
||||
- 'Min' for ConstantMin
|
||||
- 'Max' for ConstantMax
|
||||
- 'Max' for Parachute
|
||||
- ('Max'+'Min')/2 for Servos
|
||||
- 'Disarmed' for the rest
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Constant Min
|
||||
- `2`: Constant Max
|
||||
- `101`: Motor 1
|
||||
- `102`: Motor 2
|
||||
- `103`: Motor 3
|
||||
- `104`: Motor 4
|
||||
- `105`: Motor 5
|
||||
- `106`: Motor 6
|
||||
- `107`: Motor 7
|
||||
- `108`: Motor 8
|
||||
- `109`: Motor 9
|
||||
- `110`: Motor 10
|
||||
- `111`: Motor 11
|
||||
- `112`: Motor 12
|
||||
- `201`: Servo 1
|
||||
- `202`: Servo 2
|
||||
- `203`: Servo 3
|
||||
- `204`: Servo 4
|
||||
- `205`: Servo 5
|
||||
- `206`: Servo 6
|
||||
- `207`: Servo 7
|
||||
- `208`: Servo 8
|
||||
- `301`: Peripheral via Actuator Set 1
|
||||
- `302`: Peripheral via Actuator Set 2
|
||||
- `303`: Peripheral via Actuator Set 3
|
||||
- `304`: Peripheral via Actuator Set 4
|
||||
- `305`: Peripheral via Actuator Set 5
|
||||
- `306`: Peripheral via Actuator Set 6
|
||||
- `400`: Landing Gear
|
||||
- `401`: Parachute
|
||||
- `402`: RC Roll
|
||||
- `403`: RC Pitch
|
||||
- `404`: RC Throttle
|
||||
- `405`: RC Yaw
|
||||
- `406`: RC Flaps
|
||||
- `407`: RC AUX 1
|
||||
- `408`: RC AUX 2
|
||||
- `409`: RC AUX 3
|
||||
- `410`: RC AUX 4
|
||||
- `411`: RC AUX 5
|
||||
- `412`: RC AUX 6
|
||||
- `420`: Gimbal Roll
|
||||
- `421`: Gimbal Pitch
|
||||
- `422`: Gimbal Yaw
|
||||
- `430`: Gripper
|
||||
- `440`: Landing Gear Wheel
|
||||
- `450`: IC Engine Ignition
|
||||
- `451`: IC Engine Throttle
|
||||
- `452`: IC Engine Choke
|
||||
- `453`: IC Engine Starter
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0 |
|
||||
|
||||
### SIM_GZ_EC_FUNC11 (`INT32`) {#SIM_GZ_EC_FUNC11}
|
||||
|
||||
SIM_GZ ESC 11 Output Function.
|
||||
|
||||
Select what should be output on SIM_GZ ESC 11.
|
||||
The default failsafe value is set according to the selected function:
|
||||
|
||||
- 'Min' for ConstantMin
|
||||
- 'Max' for ConstantMax
|
||||
- 'Max' for Parachute
|
||||
- ('Max'+'Min')/2 for Servos
|
||||
- 'Disarmed' for the rest
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Constant Min
|
||||
- `2`: Constant Max
|
||||
- `101`: Motor 1
|
||||
- `102`: Motor 2
|
||||
- `103`: Motor 3
|
||||
- `104`: Motor 4
|
||||
- `105`: Motor 5
|
||||
- `106`: Motor 6
|
||||
- `107`: Motor 7
|
||||
- `108`: Motor 8
|
||||
- `109`: Motor 9
|
||||
- `110`: Motor 10
|
||||
- `111`: Motor 11
|
||||
- `112`: Motor 12
|
||||
- `201`: Servo 1
|
||||
- `202`: Servo 2
|
||||
- `203`: Servo 3
|
||||
- `204`: Servo 4
|
||||
- `205`: Servo 5
|
||||
- `206`: Servo 6
|
||||
- `207`: Servo 7
|
||||
- `208`: Servo 8
|
||||
- `301`: Peripheral via Actuator Set 1
|
||||
- `302`: Peripheral via Actuator Set 2
|
||||
- `303`: Peripheral via Actuator Set 3
|
||||
- `304`: Peripheral via Actuator Set 4
|
||||
- `305`: Peripheral via Actuator Set 5
|
||||
- `306`: Peripheral via Actuator Set 6
|
||||
- `400`: Landing Gear
|
||||
- `401`: Parachute
|
||||
- `402`: RC Roll
|
||||
- `403`: RC Pitch
|
||||
- `404`: RC Throttle
|
||||
- `405`: RC Yaw
|
||||
- `406`: RC Flaps
|
||||
- `407`: RC AUX 1
|
||||
- `408`: RC AUX 2
|
||||
- `409`: RC AUX 3
|
||||
- `410`: RC AUX 4
|
||||
- `411`: RC AUX 5
|
||||
- `412`: RC AUX 6
|
||||
- `420`: Gimbal Roll
|
||||
- `421`: Gimbal Pitch
|
||||
- `422`: Gimbal Yaw
|
||||
- `430`: Gripper
|
||||
- `440`: Landing Gear Wheel
|
||||
- `450`: IC Engine Ignition
|
||||
- `451`: IC Engine Throttle
|
||||
- `452`: IC Engine Choke
|
||||
- `453`: IC Engine Starter
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0 |
|
||||
|
||||
### SIM_GZ_EC_FUNC12 (`INT32`) {#SIM_GZ_EC_FUNC12}
|
||||
|
||||
SIM_GZ ESC 12 Output Function.
|
||||
|
||||
Select what should be output on SIM_GZ ESC 12.
|
||||
The default failsafe value is set according to the selected function:
|
||||
|
||||
- 'Min' for ConstantMin
|
||||
- 'Max' for ConstantMax
|
||||
- 'Max' for Parachute
|
||||
- ('Max'+'Min')/2 for Servos
|
||||
- 'Disarmed' for the rest
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Constant Min
|
||||
- `2`: Constant Max
|
||||
- `101`: Motor 1
|
||||
- `102`: Motor 2
|
||||
- `103`: Motor 3
|
||||
- `104`: Motor 4
|
||||
- `105`: Motor 5
|
||||
- `106`: Motor 6
|
||||
- `107`: Motor 7
|
||||
- `108`: Motor 8
|
||||
- `109`: Motor 9
|
||||
- `110`: Motor 10
|
||||
- `111`: Motor 11
|
||||
- `112`: Motor 12
|
||||
- `201`: Servo 1
|
||||
- `202`: Servo 2
|
||||
- `203`: Servo 3
|
||||
- `204`: Servo 4
|
||||
- `205`: Servo 5
|
||||
- `206`: Servo 6
|
||||
- `207`: Servo 7
|
||||
- `208`: Servo 8
|
||||
- `301`: Peripheral via Actuator Set 1
|
||||
- `302`: Peripheral via Actuator Set 2
|
||||
- `303`: Peripheral via Actuator Set 3
|
||||
- `304`: Peripheral via Actuator Set 4
|
||||
- `305`: Peripheral via Actuator Set 5
|
||||
- `306`: Peripheral via Actuator Set 6
|
||||
- `400`: Landing Gear
|
||||
- `401`: Parachute
|
||||
- `402`: RC Roll
|
||||
- `403`: RC Pitch
|
||||
- `404`: RC Throttle
|
||||
- `405`: RC Yaw
|
||||
- `406`: RC Flaps
|
||||
- `407`: RC AUX 1
|
||||
- `408`: RC AUX 2
|
||||
- `409`: RC AUX 3
|
||||
- `410`: RC AUX 4
|
||||
- `411`: RC AUX 5
|
||||
- `412`: RC AUX 6
|
||||
- `420`: Gimbal Roll
|
||||
- `421`: Gimbal Pitch
|
||||
- `422`: Gimbal Yaw
|
||||
- `430`: Gripper
|
||||
- `440`: Landing Gear Wheel
|
||||
- `450`: IC Engine Ignition
|
||||
- `451`: IC Engine Throttle
|
||||
- `452`: IC Engine Choke
|
||||
- `453`: IC Engine Starter
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0 |
|
||||
|
||||
### SIM_GZ_EC_FUNC2 (`INT32`) {#SIM_GZ_EC_FUNC2}
|
||||
|
||||
SIM_GZ ESC 2 Output Function.
|
||||
@@ -5657,6 +5958,77 @@ The default failsafe value is set according to the selected function:
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0 |
|
||||
|
||||
### SIM_GZ_EC_FUNC9 (`INT32`) {#SIM_GZ_EC_FUNC9}
|
||||
|
||||
SIM_GZ ESC 9 Output Function.
|
||||
|
||||
Select what should be output on SIM_GZ ESC 9.
|
||||
The default failsafe value is set according to the selected function:
|
||||
|
||||
- 'Min' for ConstantMin
|
||||
- 'Max' for ConstantMax
|
||||
- 'Max' for Parachute
|
||||
- ('Max'+'Min')/2 for Servos
|
||||
- 'Disarmed' for the rest
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Disabled
|
||||
- `1`: Constant Min
|
||||
- `2`: Constant Max
|
||||
- `101`: Motor 1
|
||||
- `102`: Motor 2
|
||||
- `103`: Motor 3
|
||||
- `104`: Motor 4
|
||||
- `105`: Motor 5
|
||||
- `106`: Motor 6
|
||||
- `107`: Motor 7
|
||||
- `108`: Motor 8
|
||||
- `109`: Motor 9
|
||||
- `110`: Motor 10
|
||||
- `111`: Motor 11
|
||||
- `112`: Motor 12
|
||||
- `201`: Servo 1
|
||||
- `202`: Servo 2
|
||||
- `203`: Servo 3
|
||||
- `204`: Servo 4
|
||||
- `205`: Servo 5
|
||||
- `206`: Servo 6
|
||||
- `207`: Servo 7
|
||||
- `208`: Servo 8
|
||||
- `301`: Peripheral via Actuator Set 1
|
||||
- `302`: Peripheral via Actuator Set 2
|
||||
- `303`: Peripheral via Actuator Set 3
|
||||
- `304`: Peripheral via Actuator Set 4
|
||||
- `305`: Peripheral via Actuator Set 5
|
||||
- `306`: Peripheral via Actuator Set 6
|
||||
- `400`: Landing Gear
|
||||
- `401`: Parachute
|
||||
- `402`: RC Roll
|
||||
- `403`: RC Pitch
|
||||
- `404`: RC Throttle
|
||||
- `405`: RC Yaw
|
||||
- `406`: RC Flaps
|
||||
- `407`: RC AUX 1
|
||||
- `408`: RC AUX 2
|
||||
- `409`: RC AUX 3
|
||||
- `410`: RC AUX 4
|
||||
- `411`: RC AUX 5
|
||||
- `412`: RC AUX 6
|
||||
- `420`: Gimbal Roll
|
||||
- `421`: Gimbal Pitch
|
||||
- `422`: Gimbal Yaw
|
||||
- `430`: Gripper
|
||||
- `440`: Landing Gear Wheel
|
||||
- `450`: IC Engine Ignition
|
||||
- `451`: IC Engine Throttle
|
||||
- `452`: IC Engine Choke
|
||||
- `453`: IC Engine Starter
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | | | | 0 |
|
||||
|
||||
### SIM_GZ_EC_MAX1 (`INT32`) {#SIM_GZ_EC_MAX1}
|
||||
|
||||
SIM_GZ ESC 1 Maximum Value.
|
||||
@@ -5667,6 +6039,36 @@ Maxmimum output value (when not disarmed).
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 1000 |
|
||||
|
||||
### SIM_GZ_EC_MAX10 (`INT32`) {#SIM_GZ_EC_MAX10}
|
||||
|
||||
SIM_GZ ESC 10 Maximum Value.
|
||||
|
||||
Maxmimum output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 1000 |
|
||||
|
||||
### SIM_GZ_EC_MAX11 (`INT32`) {#SIM_GZ_EC_MAX11}
|
||||
|
||||
SIM_GZ ESC 11 Maximum Value.
|
||||
|
||||
Maxmimum output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 1000 |
|
||||
|
||||
### SIM_GZ_EC_MAX12 (`INT32`) {#SIM_GZ_EC_MAX12}
|
||||
|
||||
SIM_GZ ESC 12 Maximum Value.
|
||||
|
||||
Maxmimum output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 1000 |
|
||||
|
||||
### SIM_GZ_EC_MAX2 (`INT32`) {#SIM_GZ_EC_MAX2}
|
||||
|
||||
SIM_GZ ESC 2 Maximum Value.
|
||||
@@ -5737,6 +6139,16 @@ Maxmimum output value (when not disarmed).
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 1000 |
|
||||
|
||||
### SIM_GZ_EC_MAX9 (`INT32`) {#SIM_GZ_EC_MAX9}
|
||||
|
||||
SIM_GZ ESC 9 Maximum Value.
|
||||
|
||||
Maxmimum output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 1000 |
|
||||
|
||||
### SIM_GZ_EC_MIN1 (`INT32`) {#SIM_GZ_EC_MIN1}
|
||||
|
||||
SIM_GZ ESC 1 Minimum Value.
|
||||
@@ -5747,6 +6159,36 @@ Minimum output value (when not disarmed).
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_MIN10 (`INT32`) {#SIM_GZ_EC_MIN10}
|
||||
|
||||
SIM_GZ ESC 10 Minimum Value.
|
||||
|
||||
Minimum output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_MIN11 (`INT32`) {#SIM_GZ_EC_MIN11}
|
||||
|
||||
SIM_GZ ESC 11 Minimum Value.
|
||||
|
||||
Minimum output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_MIN12 (`INT32`) {#SIM_GZ_EC_MIN12}
|
||||
|
||||
SIM_GZ ESC 12 Minimum Value.
|
||||
|
||||
Minimum output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_MIN2 (`INT32`) {#SIM_GZ_EC_MIN2}
|
||||
|
||||
SIM_GZ ESC 2 Minimum Value.
|
||||
@@ -5817,6 +6259,16 @@ Minimum output value (when not disarmed).
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_MIN9 (`INT32`) {#SIM_GZ_EC_MIN9}
|
||||
|
||||
SIM_GZ ESC 9 Minimum Value.
|
||||
|
||||
Minimum output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 1000 | | 0 |
|
||||
|
||||
### SIM_GZ_EC_REV (`INT32`) {#SIM_GZ_EC_REV}
|
||||
|
||||
Reverse Output Range for SIM_GZ.
|
||||
@@ -5834,10 +6286,14 @@ Note: this is only useful for servos.
|
||||
- `5`: SIM_GZ ESC 6
|
||||
- `6`: SIM_GZ ESC 7
|
||||
- `7`: SIM_GZ ESC 8
|
||||
- `8`: SIM_GZ ESC 9
|
||||
- `9`: SIM_GZ ESC 10
|
||||
- `10`: SIM_GZ ESC 11
|
||||
- `11`: SIM_GZ ESC 12
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 255 | | 0 |
|
||||
| | 0 | 4095 | | 0 |
|
||||
|
||||
### SIM_GZ_SV_DIS1 (`INT32`) {#SIM_GZ_SV_DIS1}
|
||||
|
||||
@@ -14553,16 +15009,21 @@ If non-negative, then this will be used instead of the online estimated internal
|
||||
|
||||
Battery 1 monitoring source.
|
||||
|
||||
This parameter controls the source of battery data. The value 'Power Module'
|
||||
means that measurements are expected to come from a power module. If the value is set to
|
||||
'External' then the system expects to receive mavlink battery status messages.
|
||||
This parameter controls the source of battery data. The value 'Power Module / Analog'
|
||||
means that measurements are expected to come from either analog (ADC) inputs
|
||||
or an I2C power monitor (e.g. INA226). Analog inputs are voltage and current
|
||||
measurements read from the board's ADC channels, typically from an onboard
|
||||
voltage divider and current shunt, or an external analog power module.
|
||||
I2C power monitors are digital sensors on the I2C bus.
|
||||
If the value is set to 'External' then the system expects to receive MAVLink
|
||||
or CAN battery status messages, or the battery data is published by an external driver.
|
||||
If the value is set to 'ESCs', the battery information are taken from the esc_status message.
|
||||
This requires the ESC to provide both voltage as well as current.
|
||||
This requires the ESC to provide both voltage as well as current (via ESC telemetry).
|
||||
|
||||
**Values:**
|
||||
|
||||
- `-1`: Disabled
|
||||
- `0`: Power Module
|
||||
- `0`: Power Module / Analog
|
||||
- `1`: External
|
||||
- `2`: ESCs
|
||||
|
||||
@@ -14713,16 +15174,21 @@ If non-negative, then this will be used instead of the online estimated internal
|
||||
|
||||
Battery 2 monitoring source.
|
||||
|
||||
This parameter controls the source of battery data. The value 'Power Module'
|
||||
means that measurements are expected to come from a power module. If the value is set to
|
||||
'External' then the system expects to receive mavlink battery status messages.
|
||||
This parameter controls the source of battery data. The value 'Power Module / Analog'
|
||||
means that measurements are expected to come from either analog (ADC) inputs
|
||||
or an I2C power monitor (e.g. INA226). Analog inputs are voltage and current
|
||||
measurements read from the board's ADC channels, typically from an onboard
|
||||
voltage divider and current shunt, or an external analog power module.
|
||||
I2C power monitors are digital sensors on the I2C bus.
|
||||
If the value is set to 'External' then the system expects to receive MAVLink
|
||||
or CAN battery status messages, or the battery data is published by an external driver.
|
||||
If the value is set to 'ESCs', the battery information are taken from the esc_status message.
|
||||
This requires the ESC to provide both voltage as well as current.
|
||||
This requires the ESC to provide both voltage as well as current (via ESC telemetry).
|
||||
|
||||
**Values:**
|
||||
|
||||
- `-1`: Disabled
|
||||
- `0`: Power Module
|
||||
- `0`: Power Module / Analog
|
||||
- `1`: External
|
||||
- `2`: ESCs
|
||||
|
||||
@@ -14834,16 +15300,21 @@ If non-negative, then this will be used instead of the online estimated internal
|
||||
|
||||
Battery 3 monitoring source.
|
||||
|
||||
This parameter controls the source of battery data. The value 'Power Module'
|
||||
means that measurements are expected to come from a power module. If the value is set to
|
||||
'External' then the system expects to receive mavlink battery status messages.
|
||||
This parameter controls the source of battery data. The value 'Power Module / Analog'
|
||||
means that measurements are expected to come from either analog (ADC) inputs
|
||||
or an I2C power monitor (e.g. INA226). Analog inputs are voltage and current
|
||||
measurements read from the board's ADC channels, typically from an onboard
|
||||
voltage divider and current shunt, or an external analog power module.
|
||||
I2C power monitors are digital sensors on the I2C bus.
|
||||
If the value is set to 'External' then the system expects to receive MAVLink
|
||||
or CAN battery status messages, or the battery data is published by an external driver.
|
||||
If the value is set to 'ESCs', the battery information are taken from the esc_status message.
|
||||
This requires the ESC to provide both voltage as well as current.
|
||||
This requires the ESC to provide both voltage as well as current (via ESC telemetry).
|
||||
|
||||
**Values:**
|
||||
|
||||
- `-1`: Disabled
|
||||
- `0`: Power Module
|
||||
- `0`: Power Module / Analog
|
||||
- `1`: External
|
||||
- `2`: ESCs
|
||||
|
||||
@@ -17270,10 +17741,11 @@ Each threshold value is defined by the parameter indicated next to the check. Dr
|
||||
- `8`: Vertical speed offset (EKF2_REQ_VDRIFT)
|
||||
- `9`: Spoofing
|
||||
- `10`: GPS fix type (EKF2_REQ_FIX)
|
||||
- `11`: Jamming
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 2047 | | 2047 |
|
||||
| | 0 | 4095 | | 2047 |
|
||||
|
||||
### EKF2_GPS_CTRL (`INT32`) {#EKF2_GPS_CTRL}
|
||||
|
||||
@@ -20170,6 +20642,14 @@ Mode 6 is intended for use with a ground control station (not necessarily an RTK
|
||||
| ------- | -------- | -------- | --------- | ------- | ---- |
|
||||
| ✓ | 0 | 1 | | 0 |
|
||||
|
||||
### GPS_UBX_PPK (`INT32`) {#GPS_UBX_PPK}
|
||||
|
||||
Enable MSM7 message output for PPK workflow.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ------------ | ---- |
|
||||
| ✓ | | | | Disabled (0) |
|
||||
|
||||
### GPS_YAW_OFFSET (`FLOAT`) {#GPS_YAW_OFFSET}
|
||||
|
||||
Heading/Yaw offset for dual antenna GPS.
|
||||
@@ -39457,6 +39937,17 @@ uavcan::equipment::ahrs::MagneticFieldStrength2
|
||||
| ------- | -------- | -------- | --------- | ----------- | ---- |
|
||||
| ✓ | | | | Enabled (1) |
|
||||
|
||||
### UAVCAN_SUB_MBD (`INT32`) {#UAVCAN_SUB_MBD}
|
||||
|
||||
subscription MovingBaselineData.
|
||||
|
||||
Enable UAVCAN MovingBaselineData subscription.
|
||||
ardupilot::gnss::MovingBaselineData
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------- | -------- | -------- | --------- | ------------ | ---- |
|
||||
| ✓ | | | | Disabled (0) |
|
||||
|
||||
### UAVCAN_SUB_RNG (`INT32`) {#UAVCAN_SUB_RNG}
|
||||
|
||||
subscription range finder.
|
||||
|
||||
@@ -284,7 +284,7 @@ A particular vehicle might have more/fewer motors and actuators, but the wiring
|
||||
The following sections explain each part in more detail.
|
||||
|
||||
::: tip
|
||||
If you're using [DroneCAN ESC](../peripherals/esc_motors.md#dronecan) the control signals will be connected to the CAN BUS instead of the PWM outputs as shown.
|
||||
If you're using [DroneCAN ESC](../dronecan/escs.md) the control signals will be connected to the CAN BUS instead of the PWM outputs as shown.
|
||||
:::
|
||||
|
||||
### Flight Controller Power
|
||||
@@ -425,7 +425,6 @@ They recommend sensors, power systems, and other components from the same manufa
|
||||
- [Drone Components & Parts](../getting_started/px4_basic_concepts.md#drone-components-parts) (Basic Concepts)
|
||||
- [Payloads](../getting_started/px4_basic_concepts.md#payloads) (Basic Concepts)
|
||||
- [Hardware Selection & Setup](../hardware/drone_parts.md) — information about connecting and configuring specific flight controllers, sensors and other peripherals (e.g. airspeed sensor for planes).
|
||||
|
||||
- [Mounting the Flight Controller](../assembly/mount_and_orient_controller.md)
|
||||
- [Vibration Isolation](../assembly/vibration_isolation.md)
|
||||
- [Mounting a Compass](../assembly/mount_gps_compass.md)
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
# CAN
|
||||
# CAN (DroneCAN & Cyphal)
|
||||
|
||||
[Controller Area Network (CAN)](https://en.wikipedia.org/wiki/CAN_bus) is a robust wired network that allows drone components such as flight controller, ESCs, sensors, and other peripherals, to communicate with each other.
|
||||
Because it is designed to be democratic and uses differential signaling, it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure.
|
||||
|
||||
It is particularly recommended on larger vehicles.
|
||||
|
||||
## Overview
|
||||
|
||||
CAN it is designed to be democratic and uses differential signaling.
|
||||
For this reason it is very robust even over longer cable lengths (on large vehicles), and avoids a single point of failure.
|
||||
CAN also allows status feedback from peripherals and convenient firmware upgrades over the bus.
|
||||
|
||||
PX4 has the ability to track and log detailed information from CAN devices, including firmware versions, hardware versions, and serial numbers.
|
||||
This enables unique identification and lifecycle tracking of hardware connected to the flight controller.
|
||||
See [Asset Tracking](../debug/asset_tracking.md) for more information.
|
||||
|
||||
PX4 supports two software protocols for communicating with CAN devices:
|
||||
|
||||
- [DroneCAN](../dronecan/index.md): PX4 recommends this for most common setups.
|
||||
@@ -18,29 +28,35 @@ In 2022 the project split into two: the original version of UAVCAN (UAVCAN v0) w
|
||||
The differences between the two protocols are outlined in [Cyphal vs. DroneCAN](https://forum.opencyphal.org/t/cyphal-vs-dronecan/1814).
|
||||
:::
|
||||
|
||||
:::warning
|
||||
PX4 does not support other CAN software protocols for drones such as KDECAN (at time of writing).
|
||||
:::
|
||||
|
||||
## Wiring
|
||||
|
||||
The wiring for CAN networks is the same for both DroneCAN and Cyphal/CAN (in fact, for all CAN networks).
|
||||
|
||||
Devices are connected in a chain in any order.
|
||||
Devices within a network are connected in a _daisy-chain_ in any order (this differs from UARTs peripherals, where you attach just one component per port).
|
||||
|
||||
:::warning Don't connect each CAN peripheral to a separate CAN port!
|
||||
Unlike UARTs, CAN peripherals are designed to be daisy chained, with additional ports such as `CAN2` used for [redundancy](redundancy).
|
||||
:::
|
||||
|
||||
At either end of the chain, a 120Ω termination resistor should be connected between the two data lines.
|
||||
Flight controllers and some GNSS modules have built in termination resistors for convenience, thus should be placed at opposite ends of the chain.
|
||||
Otherwise, you can use a termination resistor such as [this one from Zubax Robotics](https://shop.zubax.com/products/uavcan-micro-termination-plug?variant=6007985111069), or solder one yourself if you have access to a JST-GH crimper.
|
||||
|
||||
The following diagram shows an example of a CAN bus connecting a flight controller to 4 CAN ESCs and a GNSS.
|
||||
It includes a redundant bus connected to `CAN 2`.
|
||||
|
||||

|
||||
|
||||
The diagram does not show any power wiring.
|
||||
Refer to your manufacturer instructions to confirm whether components require separate power or can be powered from the CAN bus itself.
|
||||
|
||||
::: info
|
||||
For more information, see [Cyphal/CAN device interconnection](https://wiki.zubax.com/public/cyphal/CyphalCAN-device-interconnection?pageId=2195476) (kb.zubax.com).
|
||||
While the article is written with the Cyphal protocol in mind, it applies equally to DroneCAN hardware and any other CAN setup.
|
||||
For more advanced scenarios, consult with [On CAN bus topology and termination](https://forum.opencyphal.org/t/on-can-bus-topology-and-termination/1685).
|
||||
:::
|
||||
|
||||
### Connectors
|
||||
|
||||
@@ -54,7 +70,30 @@ However, as long as the device firmware supports DroneCAN or Cyphal, it can be u
|
||||
|
||||
DroneCAN and Cyphal/CAN support using a second (redundant) CAN interface.
|
||||
This is completely optional but increases the robustness of the connection.
|
||||
All Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety.
|
||||
|
||||
Pixhawk flight controllers come with 2 CAN interfaces; if your peripherals support 2 CAN interfaces as well, it is recommended to wire both up for increased safety.
|
||||
|
||||
### Flight Controllers with Multiple CAN Ports
|
||||
|
||||
[Flight Controllers](../flight_controller/index.md) may have up to three independent CAN ports, such as `CAN1`, `CAN2`, `CAN3` (neither DroneCAN or Cyphal support more than three).
|
||||
Note that you can't have both DroneCAN and Cyphal running on PX4 at the same time.
|
||||
|
||||
::: tip
|
||||
You only _need_ one CAN port to support an arbitrary number of CAN devices using a particular CAN protocol.
|
||||
Don't connect each CAN peripheral to a separate CAN port!
|
||||
:::
|
||||
|
||||
Generally you'll daisy all CAN peripherals off a single port, and if there is more than one CAN port, use the second one for [redundancy](redundancy).
|
||||
If three are three ports, you might use the remaining network for devices that support another CAN protocol.
|
||||
|
||||
The documentation for your flight controller should indicate which ports are supported/enabled.
|
||||
At runtime you can check what DroneCAN ports are enabled and their status using the following command on the [MAVLink Shell](../debug/mavlink_shell.md) (or some other console):
|
||||
|
||||
```sh
|
||||
uavcan status
|
||||
```
|
||||
|
||||
Note that you can also check the number of supported CAN interfaces for a board by searching for `CONFIG_BOARD_UAVCAN_INTERFACES` in its [default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v6xrt/default.px4board#) configuration file.
|
||||
|
||||
## Firmware
|
||||
|
||||
|
||||
@@ -121,21 +121,22 @@ PX4 and the receiver may also need to be configured in order to _detect RC loss_
|
||||
|
||||

|
||||
|
||||
The QGCroundControl Safety UI allows you to set the [failsafe action](#failsafe-actions) and [RC Loss timeout](#COM_RC_LOSS_T).
|
||||
Users that want to disable the RC loss failsafe in specific automatic modes (mission, hold, offboard) can do so using the parameter [COM_RCL_EXCEPT](#COM_RCL_EXCEPT).
|
||||
The QGCroundControl Safety UI allows you to set the [failsafe action](#failsafe-actions) and [manual control loss timeout](#COM_RC_LOSS_T).
|
||||
Users that want to disable this failsafe in specific modes can do so using the parameter [COM_RCL_EXCEPT](#COM_RCL_EXCEPT).
|
||||
|
||||
Additional (and underlying) parameter settings are shown below.
|
||||
|
||||
| Parameter | Setting | Description |
|
||||
| ----------------------------------------------------------------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_RC_LOSS_T"></a>[COM_RC_LOSS_T](../advanced_config/parameter_reference.md#COM_RC_LOSS_T) | Manual Control Loss Timeout | Time after last setpoint received from the selected manual control source after which manual control is considered lost. This must be kept short because the vehicle will continue to fly using the old manual control setpoint until the timeout triggers. |
|
||||
| <a id="COM_RC_LOSS_T"></a>[COM_RC_LOSS_T](../advanced_config/parameter_reference.md#COM_RC_LOSS_T) | Manual Control Loss Timeout | Time after last setpoint received from the selected manual control source after which manual control is considered lost. This must be kept short because the vehicle will continue to fly using the last known stick position until the timeout triggers. |
|
||||
| <a id="COM_FAIL_ACT_T"></a>[COM_FAIL_ACT_T](../advanced_config/parameter_reference.md#COM_FAIL_ACT_T) | Failsafe Reaction Delay | Delay in seconds between failsafe condition being triggered (`COM_RC_LOSS_T`) and failsafe action (RTL, Land, Hold). In this state the vehicle waits in hold mode for the manual control source to reconnect. This might be set longer for long-range flights so that intermittent connection loss doesn't immediately invoke the failsafe. It can be to zero so that the failsafe triggers immediately. |
|
||||
| <a id="NAV_RCL_ACT"></a>[NAV_RCL_ACT](../advanced_config/parameter_reference.md#NAV_RCL_ACT) | Failsafe Action | Disabled, Loiter, Return, Land, Disarm, Terminate. |
|
||||
| <a id="COM_RCL_EXCEPT"></a>[COM_RCL_EXCEPT](../advanced_config/parameter_reference.md#COM_RCL_EXCEPT) | RC Loss Exceptions | Set the modes in which manual control loss is ignored: Mission, Hold, Offboard. |
|
||||
| <a id="COM_RCL_EXCEPT"></a>[COM_RCL_EXCEPT](../advanced_config/parameter_reference.md#COM_RCL_EXCEPT) | RC Loss Exceptions | Set modes in which manual control loss is ignored. |
|
||||
|
||||
## Data Link Loss Failsafe
|
||||
|
||||
The Data Link Loss failsafe is triggered if a telemetry link (connection to ground station) is lost.
|
||||
The Data Link Loss failsafe is triggered if the connection to the last MAVLink ground station like QGroundControl is lost.
|
||||
Users that want to disable this failsafe in specific modes can do so using the parameter [COM_DLL_EXCEPT](#COM_DLL_EXCEPT).
|
||||
|
||||

|
||||
|
||||
@@ -145,12 +146,7 @@ The settings and underlying parameters are shown below.
|
||||
| ---------------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
|
||||
| Data Link Loss Timeout | [COM_DL_LOSS_T](../advanced_config/parameter_reference.md#COM_DL_LOSS_T) | Amount of time after losing the data connection before the failsafe will trigger. |
|
||||
| Failsafe Action | [NAV_DLL_ACT](../advanced_config/parameter_reference.md#NAV_DLL_ACT) | Disabled, Hold mode, Return mode, Land mode, Disarm, Terminate. |
|
||||
|
||||
The following settings also apply, but are not displayed in the QGC UI.
|
||||
|
||||
| Setting | Parameter | Description |
|
||||
| ----------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------- |
|
||||
| <a id="COM_DLL_EXCEPT"></a>Mode exceptions for DLL failsafe | [COM_DLL_EXCEPT](../advanced_config/parameter_reference.md#COM_DLL_EXCEPT) | Set modes where DL loss will not trigger a failsafe. |
|
||||
| <a id="COM_DLL_EXCEPT"></a>Mode exceptions for DLL failsafe | [COM_DLL_EXCEPT](../advanced_config/parameter_reference.md#COM_DLL_EXCEPT) | Set modes in which data link loss is ignored. |
|
||||
|
||||
## Geofence Failsafe
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ Airframes with more than two frequency noise spikes typically clean the first tw
|
||||
Dynamic notch filters use ESC RPM feedback and/or the onboard FFT analysis.
|
||||
The ESC RPM feedback is used to track the rotor blade pass frequency and its harmonics, while the FFT analysis can be used to track a frequency of another vibration source, such as a fuel engine.
|
||||
|
||||
ESC RPM feedback requires ESCs capable of providing RPM feedback such as [DShot](../peripherals/esc_motors.md#dshot) with telemetry connected, a bidirectional DShot set up ([work in progress](https://github.com/PX4/PX4-Autopilot/pull/23863)), or [UAVCAN/DroneCAN ESCs](../dronecan/escs.md).
|
||||
ESC RPM feedback requires ESCs capable of providing RPM feedback such as [DShot](../peripherals/dshot.md) with telemetry connected, a bidirectional DShot set up ([work in progress](https://github.com/PX4/PX4-Autopilot/pull/23863)), or [UAVCAN/DroneCAN ESCs](../dronecan/escs.md).
|
||||
Before enabling, make sure that the ESC RPM is correct.
|
||||
You might have to adjust the [pole count of the motors](../advanced_config/parameter_reference.md#MOT_POLE_COUNT).
|
||||
|
||||
@@ -92,10 +92,10 @@ To reduce the control latency, we want to increase the cutoff frequency for the
|
||||
The effect on latency of increasing `IMU_GYRO_CUTOFF` is approximated below.
|
||||
|
||||
| Cutoff (Hz) | Delay approx. (ms) |
|
||||
| ------------ | ------------------ |
|
||||
| 30 | 8 |
|
||||
| 60 | 3.8 |
|
||||
| 120 | 1.9 |
|
||||
| ----------- | ------------------ |
|
||||
| 30 | 8 |
|
||||
| 60 | 3.8 |
|
||||
| 120 | 1.9 |
|
||||
|
||||
However this is a trade-off as increasing `IMU_GYRO_CUTOFF` will also increase the noise of the signal that is fed to the motors.
|
||||
Noise on the motors has the following consequences:
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# Asset Tracking
|
||||
|
||||
<Badge type="tip" text="main (planned for: PX4 v1.18)" />
|
||||
|
||||
PX4 can track and log detailed information about external hardware devices connected to the flight controller.
|
||||
This enables unique identification of vehicle parts throughout their operational lifetime using device IDs, serial numbers, and version information.
|
||||
|
||||
::: info
|
||||
Asset tracking is currently implemented for [DroneCAN](../dronecan/index.md) devices only.
|
||||
:::
|
||||
|
||||
## Overview
|
||||
|
||||
Asset tracking allows you to determine exactly which hardware is installed on a vehicle, providing serial number, version, and other information.
|
||||
This makes it easier to track and maintain specific vehicle parts across multiple vehicles, to quickly see what versions you're running when debugging, and log component information for regulatory audits.
|
||||
|
||||
Asset tracking automatically collects and logs the following metadata from external devices:
|
||||
|
||||
- **Device identification**: Vendor name, model name, device type
|
||||
- **Version information**: Firmware version, hardware version
|
||||
- **Unique identifiers**: Serial number, device ID
|
||||
- **Device capabilities**: ESC, GPS, magnetometer, barometer, etc.
|
||||
|
||||
This information is published via the [`device_information`](../msg_docs/DeviceInformation.md) uORB topic and logged to flight logs.
|
||||
This enables fleet management, maintenance tracking, and troubleshooting.
|
||||
|
||||
## Viewing Device Information
|
||||
|
||||
### Real-Time Monitoring
|
||||
|
||||
You can view device information in real-time using the [MAVLink Shell](../debug/mavlink_shell.md) or console:
|
||||
|
||||
```sh
|
||||
listener device_information
|
||||
```
|
||||
|
||||
Example output for a CAN GPS module:
|
||||
|
||||
```plain
|
||||
TOPIC: device_information
|
||||
device_information
|
||||
timestamp: 16258961403 (0.216525 seconds ago)
|
||||
device_id: 8944643 (Type: 0x88, UAVCAN:0 (0x7C))
|
||||
device_type: 5
|
||||
vendor_name: "cubepilot"
|
||||
model_name: "here4"
|
||||
firmware_version: "1.14.3006590"
|
||||
hardware_version: "4.19"
|
||||
serial_number: "1c00410018513331"
|
||||
```
|
||||
|
||||
Device information is published in a round-robin fashion for each detected device, at a rate of approximately 1 Hz.
|
||||
|
||||
### Multi-Capability Devices
|
||||
|
||||
Devices with multiple sensors (e.g., a CAN GPS/magnetometer combo module like the HERE4) register separate device information entries for each capability.
|
||||
Each entry shares the same serial number and base metadata but has a different `device_id` corresponding to the specific sensor capability.
|
||||
|
||||
## Flight Log Analysis
|
||||
|
||||
Device information is automatically logged to flight logs.
|
||||
You can extract it using [pyulog](../log/flight_log_analysis.md#pyulog), though note that fields like vendor name, model name, and serial number are stored as `char` arrays and require additional parsing.
|
||||
|
||||
## See Also
|
||||
|
||||
- [CAN (DroneCAN & Cyphal)](../can/index.md) — CAN bus configuration and setup
|
||||
- [DroneCAN](../dronecan/index.md) — DroneCAN-specific documentation
|
||||
- [Flight Log Analysis](../log/flight_log_analysis.md) — Flight log analysis
|
||||
@@ -95,6 +95,7 @@ Set the following parameters in _QGroundControl_:
|
||||
- To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`.
|
||||
- Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW).
|
||||
- Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG).
|
||||
- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`.
|
||||
- Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`.
|
||||
- Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`.
|
||||
- Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`.
|
||||
|
||||
@@ -92,6 +92,7 @@ Set the following parameters in _QGroundControl_:
|
||||
- To optionally disable GPS aiding, set [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to `0`.
|
||||
- Enable [UAVCAN_SUB_FLOW](../advanced_config/parameter_reference.md#UAVCAN_SUB_FLOW).
|
||||
- Enable [UAVCAN_SUB_RNG](../advanced_config/parameter_reference.md#UAVCAN_SUB_RNG).
|
||||
- Set [EKF2_RNG_CTRL](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) to `1`.
|
||||
- Set [EKF2_RNG_A_HMAX](../advanced_config/parameter_reference.md#EKF2_RNG_A_HMAX) to `10`.
|
||||
- Set [EKF2_RNG_QLTY_T](../advanced_config/parameter_reference.md#EKF2_RNG_QLTY_T) to `0.2`.
|
||||
- Set [UAVCAN_RNG_MIN](../advanced_config/parameter_reference.md#UAVCAN_RNG_MIN) to `0.08`.
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
# ARK G5 RTK GPS
|
||||
|
||||
::: info
|
||||
This GPS module is made in the USA and NDAA compliant.
|
||||
:::
|
||||
|
||||
[ARK G5 RTK GPS](https://arkelectron.com/product/ark-g5-rtk-gps/) is a [DroneCAN](index.md) quad-band [RTK GPS](../gps_compass/rtk_gps.md).
|
||||
|
||||
The module incorporates the [Septentrio mosaic-G5 P3 Ultra-compact high-precision GPS/GNSS receiver module](https://www.u-blox.com/en/product/zed-x20p-module), magnetometer, barometer, IMU, and buzzer module.
|
||||
|
||||

|
||||
|
||||
## Where to Buy
|
||||
|
||||
Order this module from:
|
||||
|
||||
- [ARK Electronics](https://arkelectron.com/product/ark-g5-rtk-gps/) (US)
|
||||
|
||||
## Hardware Specifications
|
||||
|
||||
- [DroneCAN](index.md) RTK GNSS, Magnetometer, Barometer, IMU, and Buzzer Module
|
||||
- [Dronecan Firmware Updating](../dronecan/index.md#firmware-update)
|
||||
- Sensors
|
||||
- [Septentrio mosaic-G5 P3 Ultra-compact high-precision GPS/GNSS receiver module](https://www.septentrio.com/en/products/gnss-receivers/gnss-receiver-modules/mosaic-G5-P3)
|
||||
- All-band all constellation GNSS receiver
|
||||
- All-in-view satellite tracking: multi-constellation, quad-band GNSS module receiver
|
||||
- Full raw data with positioning measurements and Galileo HAS positioning service compatibility
|
||||
- Best-in-class RTK cm-level positioning accuracy
|
||||
- Advanced GNSS+ algorithms
|
||||
- 20Hz update rate
|
||||
- [ST IIS2MDC Magnetometer](https://www.st.com/en/mems-and-sensors/iis2mdc.html)
|
||||
- [Bosch BMP390 Barometer](https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp390/)
|
||||
- [Invensense ICM-42688-P 6-Axis IMU](https://invensense.tdk.com/products/motion-tracking/6-axis/icm-42688-p/)
|
||||
- STM32F412VGH6 MCU
|
||||
- Safety Button
|
||||
- Buzzer
|
||||
- Two CAN Connectors (Pixhawk Connector Standard 4-pin JST GH)
|
||||
- G5 "UART 2" Connector
|
||||
- 4-pin JST GH
|
||||
- TX, RX, PPS, GND
|
||||
- G5 USB C
|
||||
- Debug Connector (Pixhawk Connector Standard 6-pin JST SH)
|
||||
- LED Indicators
|
||||
- GPS Fix
|
||||
- RTK Status
|
||||
- RGB system status
|
||||
- USA Built
|
||||
- NDAA Compliant
|
||||
- Power Requirements
|
||||
- 5V
|
||||
- 270mA
|
||||
- Dimensions
|
||||
- Without Antenna
|
||||
- 48.0mm x 40.0mm x 15.4mm
|
||||
- 13.0g
|
||||
- With Antenna
|
||||
- 48.0mm x 40.0mm x 51.0mm
|
||||
- 43.5g
|
||||
- Includes
|
||||
- CAN Cable (Pixhawk Connector Standard 4-pin)
|
||||
- Full-Frequency Helical GPS Antenna
|
||||
|
||||
## Hardware Setup
|
||||
|
||||
### Wiring
|
||||
|
||||
The ARK G5 RTK GPS is connected to the CAN bus using a [Pixhawk connector standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf) 4-pin JST GH cable.
|
||||
For more information, refer to the [CAN Wiring](../can/index.md#wiring) instructions.
|
||||
|
||||
### Mounting
|
||||
|
||||
The recommended mounting orientation is with the connectors on the board pointing towards the **back of vehicle**.
|
||||
|
||||
The sensor can be mounted anywhere on the frame, but you will need to specify its position, relative to vehicle centre of gravity, during [PX4 Configuration](#px4-configuration).
|
||||
|
||||
## Firmware Setup
|
||||
|
||||
The Septentrio G5 module firmware can be updated using the Septentrio [RxTools](https://www.septentrio.com/en/products/gps-gnss-receiver-software/rxtools) application.
|
||||
|
||||
## Flight Controller Setup
|
||||
|
||||
### Enabling DroneCAN
|
||||
|
||||
In order to use the ARK G5 RTK GPS, connect it to the Pixhawk CAN bus and enable the DroneCAN driver by setting parameter [UAVCAN_ENABLE](../advanced_config/parameter_reference.md#UAVCAN_ENABLE) to `2` for dynamic node allocation (or `3` if using [DroneCAN ESCs](../dronecan/escs.md)).
|
||||
|
||||
The steps are:
|
||||
|
||||
- In _QGroundControl_ set the parameter [UAVCAN_ENABLE](../advanced_config/parameter_reference.md#UAVCAN_ENABLE) to `2` or `3` and reboot (see [Finding/Updating Parameters](../advanced_config/parameters.md)).
|
||||
- Connect ARK G5 RTK GPS CAN to the Pixhawk CAN.
|
||||
|
||||
Once enabled, the module will be detected on boot.
|
||||
|
||||
There is also CAN built-in bus termination via [CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM)
|
||||
|
||||
### PX4 Configuration
|
||||
|
||||
You need to set necessary [DroneCAN](index.md) parameters and define offsets if the sensor is not centred within the vehicle:
|
||||
|
||||
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
|
||||
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK G5 RTK GPS from the vehicle's centre of gravity.
|
||||
|
||||
## LED Meanings
|
||||
|
||||
The GPS status lights are located to the right of the connectors:
|
||||
|
||||
- Blinking green is GPS fix
|
||||
- Blinking blue is received corrections and RTK Float
|
||||
- Solid blue is RTK Fixed
|
||||
|
||||
## See Also
|
||||
|
||||
- [ARK G5 RTK GPS Documentation](https://docs.arkelectron.com/gps/ark-g5-rtk-gps) (ARK Docs)
|
||||
@@ -0,0 +1,150 @@
|
||||
# ARK G5 RTK HEADING GPS
|
||||
|
||||
::: info
|
||||
This GPS module is made in the USA and NDAA compliant.
|
||||
:::
|
||||
|
||||
[ARK G5 RTK HEADING GPS](https://arkelectron.com/product/ark-g5-rtk-gps/) is a [DroneCAN](index.md) quad-band dual antenna [RTK GPS](../gps_compass/rtk_gps.md) that additionally provides vehicle yaw information from GPS.
|
||||
|
||||
The module incorporates the [Septentrio mosaic-G5 P3H Ultra-compact high-precision GPS/GNSS receiver module with heading capability](https://www.septentrio.com/en/products/gnss-receivers/gnss-receiver-modules/mosaic-G5-P3H), magnetometer, barometer, IMU, and buzzer module.
|
||||
|
||||

|
||||
|
||||
## Where to Buy
|
||||
|
||||
Order this module from:
|
||||
|
||||
- [ARK Electronics](https://arkelectron.com/product/ark-g5-rtk-heading-gps/) (US)
|
||||
|
||||
## Hardware Specifications
|
||||
|
||||
- [DroneCAN](index.md) RTK GNSS, Magnetometer, Barometer, IMU, and Buzzer Module
|
||||
- [Dronecan Firmware Updating](../dronecan/index.md#firmware-update)
|
||||
- Sensors
|
||||
- [Septentrio mosaic-G5 P3H Ultra-compact high-precision GPS/GNSS receiver module with heading capability](https://www.septentrio.com/en/products/gnss-receivers/gnss-receiver-modules/mosaic-G5-P3H)
|
||||
- All-band all constellation GNSS receiver
|
||||
- All-in-view satellite tracking: multi-constellation, quad-band GNSS module receiver
|
||||
- Full raw data with positioning measurements and Galileo HAS positioning service compatibility
|
||||
- Best-in-class RTK cm-level positioning accuracy
|
||||
- Advanced GNSS+ algorithms
|
||||
- 20Hz update rate
|
||||
- [ST IIS2MDC Magnetometer](https://www.st.com/en/mems-and-sensors/iis2mdc.html)
|
||||
- [Bosch BMP390 Barometer](https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp390/)
|
||||
- [Invensense ICM-42688-P 6-Axis IMU](https://invensense.tdk.com/products/motion-tracking/6-axis/icm-42688-p/)
|
||||
- STM32F412VGH6 MCU
|
||||
- Safety Button
|
||||
- Buzzer
|
||||
- Two CAN Connectors (Pixhawk Connector Standard 4-pin JST GH)
|
||||
- G5 "UART 2" Connector
|
||||
- 4-pin JST GH
|
||||
- TX, RX, PPS, GND
|
||||
- G5 USB C
|
||||
- Debug Connector (Pixhawk Connector Standard 6-pin JST SH)
|
||||
- LED Indicators
|
||||
- GPS Fix
|
||||
- RTK Status
|
||||
- RGB system status
|
||||
- USA Built
|
||||
- NDAA Compliant
|
||||
- Power Requirements
|
||||
- 5V
|
||||
- 270mA
|
||||
- Dimensions
|
||||
- Without Antenna
|
||||
- 48.0mm x 40.0mm x 15.4mm
|
||||
- 13.0g
|
||||
- With Antenna
|
||||
- 48.0mm x 40.0mm x 51.0mm
|
||||
- 43.5g
|
||||
- Includes
|
||||
- CAN Cable (Pixhawk Connector Standard 4-pin)
|
||||
- Full-Frequency Helical GPS Antenna
|
||||
|
||||
## Hardware Setup
|
||||
|
||||
### Wiring
|
||||
|
||||
The ARK G5 RTK HEADING GPS is connected to the CAN bus using a [Pixhawk connector standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf) 4-pin JST GH cable.
|
||||
For more information, refer to the [CAN Wiring](../can/index.md#wiring) instructions.
|
||||
|
||||
### Mounting
|
||||
|
||||
The recommended mounting orientation is with the connectors on the board pointing towards the **back of vehicle**.
|
||||
|
||||
The sensor can be mounted anywhere on the frame, but you will need to specify its position, relative to vehicle centre of gravity, during [PX4 configuration](#px4-configuration).
|
||||
|
||||
## Firmware Setup
|
||||
|
||||
The Septentrio G5 module firmware can be updated using the Septentrio [RxTools](https://www.septentrio.com/en/products/gps-gnss-receiver-software/rxtools) application.
|
||||
|
||||
## Flight Controller Setup
|
||||
|
||||
### Enabling DroneCAN
|
||||
|
||||
In order to use the ARK G5 RTK HEADING GPS, connect it to the Pixhawk CAN bus and enable the DroneCAN driver by setting parameter [UAVCAN_ENABLE](../advanced_config/parameter_reference.md#UAVCAN_ENABLE) to `2` for dynamic node allocation (or `3` if using [DroneCAN ESCs](../dronecan/escs.md)).
|
||||
|
||||
The steps are:
|
||||
|
||||
- In _QGroundControl_ set the parameter [UAVCAN_ENABLE](../advanced_config/parameter_reference.md#UAVCAN_ENABLE) to `2` or `3` and reboot (see [Finding/Updating Parameters](../advanced_config/parameters.md)).
|
||||
- Connect ARK G5 RTK HEADING GPS CAN to the Pixhawk CAN.
|
||||
|
||||
Once enabled, the module will be detected on boot.
|
||||
|
||||
There is also CAN built-in bus termination via [CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM)
|
||||
|
||||
### PX4 Configuration
|
||||
|
||||
You need to set necessary [DroneCAN](index.md) parameters and define offsets if the sensor is not centred within the vehicle:
|
||||
|
||||
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
|
||||
- Enable GPS blending to ensure the heading is always published by setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 7 (all three bits checked).
|
||||
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
|
||||
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK G5 RTK HEADING GPS from the vehicle's centre of gravity.
|
||||
|
||||
### Parameter references
|
||||
|
||||
This GPS is using ARK's private driver, the prameters below only exist on the firmware we ship the GPS with. You can set these params either in QGC or using the DroneCAN GUI Tool.
|
||||
|
||||
#### SEP_OFFS_YAW (float)
|
||||
|
||||
Heading offset angle for dual antenna GPS setups that support heading estimation.
|
||||
Set this to 0 if the antennas are parallel to the forward-facing direction of the vehicle and the Rover/ANT2 antenna is in front.
|
||||
The offset angle increases clockwise.
|
||||
Set this to 90 if the ANT2 antenna is placed on the right side of the vehicle and the Moving Base/MAIN antenna is on the left side.
|
||||
|
||||
- Default: 0
|
||||
- Min: -360
|
||||
- Max: 360
|
||||
- Unit: degree
|
||||
|
||||
#### SEP_OFFS_PITCH (float)
|
||||
|
||||
Vertical offsets can be compensated for by adjusting the Pitch offset.
|
||||
Note that this can be interpreted as the "roll" angle in case the antennas are aligned along the perpendicular axis. This occurs in situations where the two antenna ARPs may not be exactly at the same height in the vehicle reference frame. Since pitch is defined as the right-handed rotation about the vehicle Y axis, a situation where the main antenna is mounted lower than the aux antenna (assuming the default antenna setup) will result in a positive pitch.
|
||||
|
||||
- Default: 0
|
||||
- Min: -90
|
||||
- Max: 90
|
||||
- Unit: degree
|
||||
|
||||
#### SEP_OUT_RATE (enum)
|
||||
|
||||
Configures the output rate for GNSS data messages.
|
||||
|
||||
- -1: OnChange (Default)
|
||||
- 50: 50 ms
|
||||
- 100: 100 ms
|
||||
- 200: 200 ms
|
||||
- 500: 500 ms
|
||||
|
||||
## LED Meanings
|
||||
|
||||
The GPS status lights are located to the right of the connectors:
|
||||
|
||||
- Blinking green is GPS fix
|
||||
- Blinking blue is received corrections and RTK Float
|
||||
- Solid blue is RTK Fixed
|
||||
|
||||
## See Also
|
||||
|
||||
- [ARK G5 RTK HEADING GPS Documentation](https://docs.arkelectron.com/gps/ark-g5-rtk-gps) (ARK Docs)
|
||||
@@ -1,7 +1,14 @@
|
||||
# DroneCAN ESCs
|
||||
|
||||
PX4 supports DroneCAN compliant ESCs.
|
||||
For more information, see the following articles for specific hardware/firmware:
|
||||
|
||||
## Supported ESC
|
||||
|
||||
:::info
|
||||
[Supported ESCs](../peripherals/esc_motors#supported-esc) in _ESCs & Motors_ may include additional devices that are not listed below.
|
||||
:::
|
||||
|
||||
The following articles have specific hardware/firmware information:
|
||||
|
||||
- [PX4 Sapog ESC Firmware](sapog.md)
|
||||
- [Holybro Kotleta 20](holybro_kotleta.md)
|
||||
|
||||
@@ -27,6 +27,8 @@ Connecting peripherals over DroneCAN has many benefits:
|
||||
- Wiring is less complicated as you can have a single bus for connecting all your ESCs and other DroneCAN peripherals.
|
||||
- Setup is easier as you configure ESC numbering by manually spinning each motor.
|
||||
- It allows users to configure and update the firmware of all CAN-connected devices centrally through PX4.
|
||||
- PX4 automatically tracks device information (vendor, model, versions, serial numbers) for maintenance and fleet management.
|
||||
See [Asset Tracking](../debug/asset_tracking.md).
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# ARK 4IN1 ESC (with/without Connectors)
|
||||
|
||||
4 in 1 Electronic Speed Controller (ESC) that is made in the USA, NDAA compliant, and DIU Blue Framework listed.
|
||||
|
||||
The ESC comes in variants without connectors that you can solder in place, and a variant that has built-in motor and battery connectors (no soldering required).
|
||||
|
||||

|
||||
|
||||
## Where to Buy
|
||||
|
||||
Order this module from:
|
||||
|
||||
- [4IN1 ESC (with connectors)](https://arkelectron.com/product/ark-4in1-esc/) (ARK Electronics - US)
|
||||
- [ARK Electronics (without connectors)](https://arkelectron.com/product/ark-4in1-esc-cons/) (ARK Electronics US)
|
||||
|
||||
## Hardware Specifications
|
||||
|
||||
- Battery Voltage: 3-8s
|
||||
- 6V Minimum
|
||||
- 65V Absolute Maximum
|
||||
- Current Rating: 50A Continuous, 75A Burst Per Motor
|
||||
- [STM32F0](https://www.st.com/en/microcontrollers-microprocessors/stm32f0-series.html)
|
||||
- [AM32 Firmware](https://github.com/am32-firmware/AM32/pull/27)
|
||||
- Onboard Current Sensor, Serial Telemetry
|
||||
- 100V/A
|
||||
- Input Protocols
|
||||
- DShot (300, 600)
|
||||
- Bi-directional DShot
|
||||
- KISS Serial Telemetry
|
||||
- PWM
|
||||
- 8 Pin JST-SH Input/Output
|
||||
- 10 Pin JST-SH Debug
|
||||
|
||||
- Motor & Battery Connectors (with-connector version)
|
||||
|
||||
- MR30 Connector Limit Per Motor: 30A Continuous, 40A Burst
|
||||
- Four MR30 Motor Connectors
|
||||
|
||||
- Dimensions (with connectors)
|
||||
|
||||
- Size: 77.00mm x 42.00mm x 9.43mm
|
||||
- Mounting Pattern: 30.5mm
|
||||
- Weight: 24g
|
||||
|
||||
- Dimensions (without connectors)
|
||||
- Size: 43.00mm x 40.50mm x 7.60mm
|
||||
- Mounting Pattern: 30.5mm
|
||||
- Weight: 14.5g
|
||||
|
||||
Other
|
||||
|
||||
- Made in the USA
|
||||
- Open source AM32 firmware
|
||||
- [DIU Blue Framework Listed](https://www.diu.mil/blue-uas/framework)
|
||||
|
||||
## See Also
|
||||
|
||||
- [ARK 4IN1 ESC CONS](https://docs.arkelectron.com/electronic-speed-controller/ark-4in1-esc) (ARK Docs)
|
||||
@@ -0,0 +1,66 @@
|
||||
# ESC Protocols
|
||||
|
||||
This topic lists the main [Electronic Speed Controller (ESC)](../peripherals/esc_motors.md) protocols supported by PX4.
|
||||
|
||||
## DShot
|
||||
|
||||
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduced latency, in particular racing multicopters, VTOL vehicles, and so on.
|
||||
|
||||
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
|
||||
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can reverse motor spin directions.
|
||||
|
||||
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
|
||||
Selecting a higher rate DShot ESC in the UI results in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
|
||||
|
||||
Setup:
|
||||
|
||||
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
|
||||
- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
|
||||
|
||||
## DroneCAN
|
||||
|
||||
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
|
||||
The PX4 implementation is currently limited to update rates of 200 Hz.
|
||||
|
||||
DroneCAN shares many similar benefits to [DShot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
|
||||
|
||||
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).
|
||||
|
||||
## PWM
|
||||
|
||||
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
|
||||
|
||||
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired speed.
|
||||
The pulse width typically ranges between 1000 μs for zero power and 2000 μs for full power.
|
||||
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50 Hz and 490 Hz (the theoretical maximum being 500 Hz for a very small "off" cycle).
|
||||
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
|
||||
For PWM servos 50 Hz is usually sufficient, and many don't support higher rates.
|
||||
|
||||

|
||||
|
||||
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the pulse widths representing low and high values can vary significantly.
|
||||
Unlike [DShot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
|
||||
|
||||
Setup:
|
||||
|
||||
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md)
|
||||
- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration)
|
||||
- [ESC Calibration](../advanced_config/esc_calibration.md)
|
||||
|
||||
## OneShot 125
|
||||
|
||||
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
|
||||
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
|
||||
There are a number of variants of the OneShot protocol, which support different rates.
|
||||
PX4 only supports OneShot 125.
|
||||
|
||||
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125 μs to 250 μs for zero to full power).
|
||||
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
|
||||
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
|
||||
The actual supported rate depends on the ESC used.
|
||||
|
||||
Setup:
|
||||
|
||||
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
|
||||
- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration)
|
||||
- [ESC Calibration](../advanced_config/esc_calibration.md)
|
||||
@@ -1,6 +1,6 @@
|
||||
# Gain compression
|
||||
|
||||
<Badge type="tip" text="main (planned for: PX4 v1.17)" />
|
||||
<Badge type="tip" text="PX4 v1.17" />
|
||||
|
||||
Automatic gain compression reduces the gains of the angular-rate PID whenever oscillations are detected.
|
||||
It monitors the angular-rate controller output through a band-pass filter to identify these oscillations.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# MicoAir743-Lite
|
||||
|
||||
<Badge type="tip" text="main (planned for: PX4 v1.17)" />
|
||||
<Badge type="tip" text="PX4 v1.17" />
|
||||
|
||||
:::warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# RadiolinkPIX6 Flight Controller
|
||||
|
||||
<Badge type="tip" text="main (planned for: PX4 v1.17)" />
|
||||
<Badge type="tip" text="PX4 v1.17" />
|
||||
|
||||
:::warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# AP-H743-R1
|
||||
# AP-H743-R1 Flight Controller
|
||||
|
||||
<Badge type="tip" text="main (planned for: PX4 v1.17)" />
|
||||
<Badge type="tip" text="PX4 v1.17" />
|
||||
|
||||
:::warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
@@ -50,6 +50,7 @@ These flight controllers are [manufacturer supported](../flight_controller/autop
|
||||
Order from [X-MAV](https://www.x-mav.cn/).
|
||||
|
||||
## Radio Control
|
||||
|
||||
A Radio Control (RC) system is required if you want to manually control your vehicle (PX4 does not require a radio system for autonomous flight modes).
|
||||
|
||||
You will need to select a compatible transmitter/receiver and then bind them so that they communicate (read the instructions that come with your specific transmitter/receiver).
|
||||
@@ -59,14 +60,14 @@ CRSF receiver must be wired to a spare port (UART) on the Flight Controller. The
|
||||
|
||||
## Serial Port Mapping
|
||||
|
||||
| UART | Device | Port |
|
||||
| ------ | ---------- | ------------- |
|
||||
| USART1 | /dev/ttyS0 | GPS |
|
||||
| USART2 | /dev/ttyS1 | GPS2 |
|
||||
| USART3 | /dev/ttyS2 | TELEM1 |
|
||||
| UART4 | /dev/ttyS3 | TELEM2 |
|
||||
| UART7 | /dev/ttyS4 | TELEM3 |
|
||||
| UART8 | /dev/ttyS5 | SERIAL4 |
|
||||
| UART | Device | Port |
|
||||
| ------ | ---------- | ------- |
|
||||
| USART1 | /dev/ttyS0 | GPS |
|
||||
| USART2 | /dev/ttyS1 | GPS2 |
|
||||
| USART3 | /dev/ttyS2 | TELEM1 |
|
||||
| UART4 | /dev/ttyS3 | TELEM2 |
|
||||
| UART7 | /dev/ttyS4 | TELEM3 |
|
||||
| UART8 | /dev/ttyS5 | SERIAL4 |
|
||||
|
||||
## PWM Output
|
||||
|
||||
@@ -133,13 +134,14 @@ The complete set of supported configurations can be found in the [Airframe Refer
|
||||
## Debug Port
|
||||
|
||||
### SWD
|
||||
|
||||
The [SWD interface](../debug/swd_debug.md) operate on the **FMU-DEBUG** port (`FMU-DEBUG`).
|
||||
|
||||
The debug port (`FMU-DEBUG`) uses a [JST SM04B-GHS-TB](https://www.digikey.com/en/products/detail/jst-sales-america-inc/SM04B-GHS-TB/807788) connector and has the following pinout:
|
||||
|
||||
| Pin | Signal | Volt |
|
||||
| ------- | -------------- | ----- |
|
||||
| 1 (red) | 5V+ | +5V |
|
||||
| 2 (blk) | FMU_SWDIO | +3.3V |
|
||||
| 3 (blk) | FMU_SWCLK | +3.3V |
|
||||
| 4 (blk) | GND | GND |
|
||||
| Pin | Signal | Volt |
|
||||
| ------- | --------- | ----- |
|
||||
| 1 (red) | 5V+ | +5V |
|
||||
| 2 (blk) | FMU_SWDIO | +3.3V |
|
||||
| 3 (blk) | FMU_SWCLK | +3.3V |
|
||||
| 4 (blk) | GND | GND |
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
|
||||
<img src="../../assets/site/position_fixed.svg" title="Position fix required (e.g. GPS)" width="30px" />
|
||||
|
||||
The _Hold_ flight mode causes the vehicle to loiter (circle) around its current GPS position and maintain its current altitude.
|
||||
The _Hold_ flight mode causes the vehicle to loiter around its current GPS position and maintain its current altitude.
|
||||
|
||||
The mode supports a [number of distinct loiter modes](#loiter-modes), which are triggered using different QGC controls or MAVLink commands.
|
||||
These allow loitering with circular and figure 8 flight paths.
|
||||
|
||||
:::tip
|
||||
_Hold mode_ can be used to pause a mission or to help you regain control of a vehicle in an emergency.
|
||||
It is usually activated with a pre-programmed switch.
|
||||
It is usually activated with a pre-programmed RC switch.
|
||||
:::
|
||||
|
||||
::: info
|
||||
@@ -24,24 +27,80 @@ It is usually activated with a pre-programmed switch.
|
||||
|
||||
:::
|
||||
|
||||
## Technical Summary
|
||||
## Loiter modes
|
||||
|
||||
The aircraft circles around the GPS hold position at the current altitude.
|
||||
The vehicle will first ascend to [NAV_MIN_LTR_ALT](#NAV_MIN_LTR_ALT) if the mode is engaged below this altitude.
|
||||
### Default Loiter
|
||||
|
||||
RC stick movement is ignored.
|
||||
The aircraft circles around the position at which the mode was triggered and maintain its current altitude.
|
||||
The loiter radius is set by the parameter [NAV_LOITER_RAD](#NAV_LOITER_RAD).
|
||||
Note that if the vehicle altitude is below [NAV_MIN_LTR_ALT](#NAV_MIN_LTR_ALT), it will ascend to that minimum altitude before circling.
|
||||
|
||||
### Parameters
|
||||
The default loiter mode is entered when you switch to Hold mode without explicitly specifying any loiter behaviour.
|
||||
For example, if you switch to Hold mode using an RC switch, select **Hold** on the QGC flight mode selector, or activate the mode using the MAVLink [MAV_CMD_DO_SET_MODE](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_MODE) command.
|
||||
|
||||
### Orbit Loiter Mode
|
||||
|
||||
<Badge type="tip" text="PX4 v1.12" />
|
||||
|
||||
The aircraft travels towards a _specified_ orbit center position, then circles it with a given direction and radius.
|
||||
|
||||
This behaviour can be accessed in QGroundControl by clicking on the map in Fly view, selecting **Orbit at Location**, and configuring the radius.
|
||||
|
||||
The behavior can be triggered using the MAVLink [MAV_CMD_DO_ORBIT](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT) command.
|
||||
Note that PX4 respects the specified centre point (`param5`, `param6`, `param7`), and the radius and direction (`param1`).
|
||||
PX4 ignores `param3` (Yaw behaviour) and `param4` (Orbits).
|
||||
The value of `param2` (velocity) is also ignored, but the speed can be controlled using the [MAV_CMD_DO_CHANGE_SPEED](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_CHANGE_SPEED) command (constrained between `FW_AIRSPD_MAX` and `FW_AIRSPD_MIN`).
|
||||
PX4 outputs orbit status using the [ORBIT_EXECUTION_STATUS](https://mavlink.io/en/messages/common.html#ORBIT_EXECUTION_STATUS) message.
|
||||
|
||||
### Figure 8 Loiter Mode
|
||||
|
||||
<Badge type="tip" text="PX4 v1.15" /> <Badge type="warning" text="Experimental" />
|
||||
|
||||
The aircraft flys towards the closest point on a specified figure 8 path and then follows it.
|
||||
The path is defined by the figure 8 centre position, orientation, and radius of two circles.
|
||||
|
||||
The feature is experimental, and is not present in PX4 firmware by default (on most flight controller boards).
|
||||
It can be included by setting the `CONFIG_FIGURE_OF_EIGHT` key in the [PX4 board configuration](../hardware/porting_guide_config.md#px4-board-configuration-kconfig) for your board and rebuilding.
|
||||
For example, this is enabled on the [default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/auterion/fmu-v6s/default.px4board#L46) file for the `auterion/fmu-v6s` board.
|
||||
|
||||
The behavior can be triggered using the MAVLink [MAV_CMD_DO_FIGURE_EIGHT](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_FIGURE_EIGHT) command (PX4 respects all the parameters).
|
||||
PX4 outputs the figure 8 status using the [FIGURE_EIGHT_EXECUTION_STATUS](https://mavlink.io/en/messages/common.html#FIGURE_EIGHT_EXECUTION_STATUS) message.
|
||||
|
||||
::: info
|
||||
Figure 8 loitering is not currently supported by QGC: [QGC#12778: Need Support Figure of eight (8 figure) loitering by QGC](https://github.com/mavlink/qgroundcontrol/issues/12778).
|
||||
:::
|
||||
|
||||
Figure 8 loitering is also available in the simulator.
|
||||
You can test it in [Gazebo](../sim_gazebo_gz/index.md) using a fixed wing frame:
|
||||
|
||||
```sh
|
||||
make px4_sitl gz_rc_cessna
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
Hold mode behaviour can be configured using the parameters below.
|
||||
|
||||
| Parameter | Description |
|
||||
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| [NAV_LOITER_RAD](../advanced_config/parameter_reference.md#NAV_LOITER_RAD) | The radius of the loiter circle. |
|
||||
| <a id="NAV_LOITER_RAD"></a>[NAV_LOITER_RAD](../advanced_config/parameter_reference.md#NAV_LOITER_RAD) | The radius of the loiter circle. |
|
||||
| <a id="NAV_MIN_LTR_ALT"></a>[NAV_MIN_LTR_ALT](../advanced_config/parameter_reference.md#NAV_MIN_LTR_ALT) | Minimum height for loiter mode (vehicle will ascend to this altitude if mode is engaged at a lower altitude). |
|
||||
|
||||
## MAVLink Commands
|
||||
|
||||
The following commands are relevant to this mode:
|
||||
|
||||
- [MAV_CMD_DO_ORBIT](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT) - Switch to Hold mode and start the specified [Orbit loiter](#orbit-loiter-mode).
|
||||
Params 2 (velocity), 3 (yaw), 4 (orbits) are ignored.
|
||||
[ORBIT_EXECUTION_STATUS](https://mavlink.io/en/messages/common.html#ORBIT_EXECUTION_STATUS) is emitted.
|
||||
- [MAV_CMD_DO_FIGURE_EIGHT](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_FIGURE_EIGHT) - Switch to Hold mode and start the specified [Figure 8 loiter](#figure-8-loiter-mode).
|
||||
All params are respected.
|
||||
[FIGURE_EIGHT_EXECUTION_STATUS](https://mavlink.io/en/messages/common.html#FIGURE_EIGHT_EXECUTION_STATUS) is emitted.
|
||||
|
||||
Note, other commands may be supported.
|
||||
|
||||
## See Also
|
||||
|
||||
[Hold Mode (MC)](../flight_modes_mc/hold.md)
|
||||
- [Hold Mode (MC)](../flight_modes_mc/hold.md)
|
||||
|
||||
<!-- this maps to AUTO_LOITER in flight mode state machine -->
|
||||
|
||||
@@ -49,8 +49,8 @@ If the local position is invalid or becomes invalid while executing the takeoff,
|
||||
|
||||
::: info
|
||||
|
||||
- Takeoff towards a target position was added in <Badge type="tip" text="main (planned for: PX4 v1.17)" />.
|
||||
- Holding wings level and ascending to clearance attitude when local position is invalid during takeoff was added in <Badge type="tip" text="main (planned for: PX4 v1.17)" />.
|
||||
- Takeoff towards a target position was added in <Badge type="tip" text="PX4 v1.17" />.
|
||||
- Holding wings level and ascending to clearance attitude when local position is invalid during takeoff was added in <Badge type="tip" text="PX4 v1.17" />.
|
||||
- QGroundControl does not support `MAV_CMD_NAV_TAKEOFF` (at time of writing).
|
||||
|
||||
:::
|
||||
|
||||
@@ -20,52 +20,59 @@ The RTK compatible devices below that are expected to work with PX4 (it omits di
|
||||
The table indicates devices that also output yaw, and that can provide yaw when two on-vehicle units are used.
|
||||
It also highlights devices that connect via the CAN bus, and those which support PPK (Post-Processing Kinematic).
|
||||
|
||||
| Device | GPS | Compass | [DroneCAN](../dronecan/index.md) | [GPS Yaw](#configuring-gps-as-yaw-heading-source) | PPK |
|
||||
| :-------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------: | :------: | :------------------------------: | :-----------------------------------------------: | :-: |
|
||||
| [ARK RTK GPS](../dronecan/ark_rtk_gps.md) | F9P | BMM150 | ✓ | [Dual F9P][DualF9P] |
|
||||
| [ARK RTK GPS L1 L5](../dronecan/ark_rtk_gps_l1_l2.md) | F9P | BMM150 | ✓ | |
|
||||
| [ARK MOSAIC-X5 RTK GPS](../dronecan/ark_mosaic__rtk_gps.md) | Mosaic-X5 | IIS2MDC | ✓ | [Septentrio Dual Antenna][SeptDualAnt] |
|
||||
| [ARK X20 RTK GPS](../dronecan/ark_x20_rtk_gps.md) | X20P | BMP390 | ✓ | |
|
||||
| [CUAV C-RTK GPS](../gps_compass/rtk_gps_cuav_c-rtk.md) | M8P/M8N | ✓ | | |
|
||||
| [CUAV C-RTK2](../gps_compass/rtk_gps_cuav_c-rtk2.md) | F9P | ✓ | | [Dual F9P][DualF9P] |
|
||||
| [CUAV C-RTK 9Ps GPS](../gps_compass/rtk_gps_cuav_c-rtk-9ps.md) | F9P | RM3100 | | [Dual F9P][DualF9P] |
|
||||
| [CUAV C-RTK2 PPK/RTK GNSS](../gps_compass/rtk_gps_cuav_c-rtk.md) | F9P | RM3100 | | | ✓ |
|
||||
| [CubePilot Here+ RTK GPS](../gps_compass/rtk_gps_hex_hereplus.md) | M8P | HMC5983 | | |
|
||||
| [CubePilot Here3 CAN GNSS GPS (M8N)](https://www.cubepilot.org/#/here/here3) | M8P | ICM20948 | ✓ | |
|
||||
| [Drotek SIRIUS RTK GNSS ROVER (F9P)](https://store-drotek.com/911-sirius-rtk-gnss-rover-f9p.html) | F9P | RM3100 | | [Dual F9P][DualF9P] |
|
||||
| [DATAGNSS NANO HRTK Receiver](../gps_compass/rtk_gps_datagnss_nano_hrtk.md) | [D10P](https://docs.datagnss.com/gnss/gnss_module/D10P_RTK) | IST8310 | | ✘ |
|
||||
| [DATAGNSS GEM1305 RTK Receiver](../gps_compass/rtk_gps_gem1305.md) | TAU951M | IST8310 | | ✘ |
|
||||
| [Femtones MINI2 Receiver](../gps_compass/rtk_gps_fem_mini2.md) | FB672, FB6A0 | ✓ | | |
|
||||
| [Freefly RTK GPS](../gps_compass/rtk_gps_freefly.md) | F9P | IST8310 | | |
|
||||
| [Holybro H-RTK ZED-F9P RTK Rover (DroneCAN variant)](../dronecan/holybro_h_rtk_zed_f9p_gps.md) | F9P | RM3100 | ✓ | [Dual F9P][DualF9P] |
|
||||
| [Holybro H-RTK ZED-F9P RTK Rover](https://holybro.com/collections/h-rtk-gps/products/h-rtk-zed-f9p-rover) | F9P | RM3100 | | [Dual F9P][DualF9P] |
|
||||
| [Holybro H-RTK F9P Ultralight](https://holybro.com/products/h-rtk-f9p-ultralight) | F9P | IST8310 | | [Dual F9P][DualF9P] |
|
||||
| [Holybro H-RTK F9P Helical or Base](../gps_compass/rtk_gps_holybro_h-rtk-f9p.md) | F9P | IST8310 | | [Dual F9P][DualF9P] |
|
||||
| [Holybro DroneCAN H-RTK F9P Helical](https://holybro.com/products/dronecan-h-rtk-f9p-helical) | F9P | BMM150 | ✓ | [Dual F9P][DualF9P] |
|
||||
| [Holybro H-RTK F9P Rover Lite](../gps_compass/rtk_gps_holybro_h-rtk-f9p.md) | F9P | IST8310 | | | |
|
||||
| [Holybro DroneCAN H-RTK F9P Rover](https://holybro.com/products/dronecan-h-rtk-f9p-rover) | F9P | BMM150 | | [Dual F9P][DualF9P] |
|
||||
| [Holybro H-RTK M8P GNSS](../gps_compass/rtk_gps_holybro_h-rtk-m8p.md) | M8P | IST8310 | |
|
||||
| [Holybro H-RTK Unicore UM982 GPS](../gps_compass/rtk_gps_holybro_unicore_um982.md) | UM982 | IST8310 | | [Unicore Dual Antenna][UnicoreDualAnt] |
|
||||
| [LOCOSYS Hawk R1](../gps_compass/rtk_gps_locosys_r1.md) | MC-1612-V2b | | | |
|
||||
| [LOCOSYS Hawk R2](../gps_compass/rtk_gps_locosys_r2.md) | MC-1612-V2b | IST8310 | | |
|
||||
| [mRo u-blox ZED-F9 RTK L1/L2 GPS](https://store.mrobotics.io/product-p/m10020d.htm) | F9P | ✓ | | [Dual F9P][DualF9P] |
|
||||
| [Navisys L1/L2 ZED-F9P RTK - Base only](https://www.navisys.com.tw/productdetail?name=GR901&class=RTK) | F9P | | | |
|
||||
| [RaccoonLab L1/L2 ZED-F9P][RaccoonLab L1/L2 ZED-F9P] | F9P | RM3100 | ✓ | | |
|
||||
| [RaccoonLab L1/L2 ZED-F9P with external antenna][RaccnLabL1L2ZED-F9P ext_ant] | F9P | RM3100 | ✓ | |
|
||||
| [Septentrio AsteRx-m3 Pro](../gps_compass/septentrio_asterx-rib.md) | AsteRx | ✓ | | [Septentrio Dual Antenna][SeptDualAnt] | ✓ |
|
||||
| [Septentrio mosaic-go](../gps_compass/septentrio_mosaic-go.md) | mosaic X5 / mosaic H | ✓ | | [Septentrio Dual Antenna][SeptDualAnt] | ✓ |
|
||||
| [SIRIUS RTK GNSS ROVER (F9P)](https://store-drotek.com/911-sirius-rtk-gnss-rover-f9p.html) | F9P | ✓ | | [Dual F9P][DualF9P] |
|
||||
| [SparkFun GPS-RTK2 Board - ZED-F9P](https://www.sparkfun.com/products/15136) | F9P | ✓ | | [Dual F9P][DualF9P] |
|
||||
| [Trimble MB-Two](../gps_compass/rtk_gps_trimble_mb_two.md) | F9P | ✓ | | ✓ | |
|
||||
| Device | GPS | Compass | [DroneCAN] | [GPS Yaw] | PPK |
|
||||
| :-------------------------------------------------------------------------------------------------------- | :------------------: | :------: | :--------: | :-----------------------: | :-: |
|
||||
| [ARK G5 RTK GPS](../dronecan/ark_g5_rtk_gps.md) | [mosaic-G5 P3] | IIS2MDC | ✓ | | |
|
||||
| [ARK G5 RTK HEADING GPS](../dronecan/ark_g5_rtk_heading_gps.md) | [mosaic-G5 P3H] | IIS2MDC | ✓ | [Heading Capability][mosaic-G5 P3H] | |
|
||||
| [ARK RTK GPS](../dronecan/ark_rtk_gps.md) | F9P | BMM150 | ✓ | [Dual F9P] | |
|
||||
| [ARK RTK GPS L1 L5](../dronecan/ark_rtk_gps_l1_l2.md) | F9P | BMM150 | ✓ | | |
|
||||
| [ARK MOSAIC-X5 RTK GPS](../dronecan/ark_mosaic__rtk_gps.md) | Mosaic-X5 | IIS2MDC | ✓ | [Septentrio Dual Antenna] | |
|
||||
| [ARK X20 RTK GPS](../dronecan/ark_x20_rtk_gps.md) | X20P | IIS2MDC | ✓ | | |
|
||||
| [CUAV C-RTK GPS](../gps_compass/rtk_gps_cuav_c-rtk.md) | M8P/M8N | ✓ | | | |
|
||||
| [CUAV C-RTK2](../gps_compass/rtk_gps_cuav_c-rtk2.md) | F9P | ✓ | | [Dual F9P] | |
|
||||
| [CUAV C-RTK 9Ps GPS](../gps_compass/rtk_gps_cuav_c-rtk-9ps.md) | F9P | RM3100 | | [Dual F9P] | |
|
||||
| [CUAV C-RTK2 PPK/RTK GNSS](../gps_compass/rtk_gps_cuav_c-rtk.md) | F9P | RM3100 | | | ✓ |
|
||||
| [CubePilot Here+ RTK GPS](../gps_compass/rtk_gps_hex_hereplus.md) | M8P | HMC5983 | | | |
|
||||
| [CubePilot Here3 CAN GNSS GPS (M8N)](https://www.cubepilot.org/#/here/here3) | M8P | ICM20948 | ✓ | | |
|
||||
| [Drotek SIRIUS RTK GNSS ROVER (F9P)](https://store-drotek.com/911-sirius-rtk-gnss-rover-f9p.html) | F9P | RM3100 | | [Dual F9P] | |
|
||||
| [DATAGNSS NANO HRTK Receiver](../gps_compass/rtk_gps_datagnss_nano_hrtk.md) | [D10P] | IST8310 | | ✘ | |
|
||||
| [DATAGNSS GEM1305 RTK Receiver](../gps_compass/rtk_gps_gem1305.md) | TAU951M | IST8310 | | ✘ | |
|
||||
| [Femtones MINI2 Receiver](../gps_compass/rtk_gps_fem_mini2.md) | FB672, FB6A0 | ✓ | | | |
|
||||
| [Freefly RTK GPS](../gps_compass/rtk_gps_freefly.md) | F9P | IST8310 | | | |
|
||||
| [Holybro H-RTK ZED-F9P RTK Rover (DroneCAN variant)](../dronecan/holybro_h_rtk_zed_f9p_gps.md) | F9P | RM3100 | ✓ | [Dual F9P] | |
|
||||
| [Holybro H-RTK ZED-F9P RTK Rover](https://holybro.com/collections/h-rtk-gps/products/h-rtk-zed-f9p-rover) | F9P | RM3100 | | [Dual F9P] | |
|
||||
| [Holybro H-RTK F9P Ultralight](https://holybro.com/products/h-rtk-f9p-ultralight) | F9P | IST8310 | | [Dual F9P] | |
|
||||
| [Holybro H-RTK F9P Helical or Base](../gps_compass/rtk_gps_holybro_h-rtk-f9p.md) | F9P | IST8310 | | [Dual F9P] | |
|
||||
| [Holybro DroneCAN H-RTK F9P Helical](https://holybro.com/products/dronecan-h-rtk-f9p-helical) | F9P | BMM150 | ✓ | [Dual F9P] | |
|
||||
| [Holybro H-RTK F9P Rover Lite](../gps_compass/rtk_gps_holybro_h-rtk-f9p.md) | F9P | IST8310 | | | |
|
||||
| [Holybro DroneCAN H-RTK F9P Rover](https://holybro.com/products/dronecan-h-rtk-f9p-rover) | F9P | BMM150 | | [Dual F9P] | |
|
||||
| [Holybro H-RTK M8P GNSS](../gps_compass/rtk_gps_holybro_h-rtk-m8p.md) | M8P | IST8310 | | | |
|
||||
| [Holybro H-RTK Unicore UM982 GPS](../gps_compass/rtk_gps_holybro_unicore_um982.md) | UM982 | IST8310 | | [Unicore Dual Antenna] | |
|
||||
| [LOCOSYS Hawk R1](../gps_compass/rtk_gps_locosys_r1.md) | MC-1612-V2b | | | | |
|
||||
| [LOCOSYS Hawk R2](../gps_compass/rtk_gps_locosys_r2.md) | MC-1612-V2b | IST8310 | | | |
|
||||
| [mRo u-blox ZED-F9 RTK L1/L2 GPS](https://store.mrobotics.io/product-p/m10020d.htm) | F9P | ✓ | | [Dual F9P] | |
|
||||
| [Navisys L1/L2 ZED-F9P RTK - Base only](https://www.navisys.com.tw/productdetail?name=GR901&class=RTK) | F9P | | | | |
|
||||
| [RaccoonLab L1/L2 ZED-F9P][RaccoonLab L1/L2 ZED-F9P] | F9P | RM3100 | ✓ | | |
|
||||
| [RaccoonLab L1/L2 ZED-F9P with external antenna][RaccnLabL1L2ZED-F9P ext_ant] | F9P | RM3100 | ✓ | | |
|
||||
| [Septentrio AsteRx-m3 Pro](../gps_compass/septentrio_asterx-rib.md) | AsteRx | ✓ | | [Septentrio Dual Antenna] | ✓ |
|
||||
| [Septentrio mosaic-go](../gps_compass/septentrio_mosaic-go.md) | mosaic X5 / mosaic H | ✓ | | [Septentrio Dual Antenna] | ✓ |
|
||||
| [SIRIUS RTK GNSS ROVER (F9P)](https://store-drotek.com/911-sirius-rtk-gnss-rover-f9p.html) | F9P | ✓ | | [Dual F9P] | |
|
||||
| [SparkFun GPS-RTK2 Board - ZED-F9P](https://www.sparkfun.com/products/15136) | F9P | ✓ | | [Dual F9P] | |
|
||||
| [Trimble MB-Two](../gps_compass/rtk_gps_trimble_mb_two.md) | F9P | ✓ | | ✓ | |
|
||||
|
||||
<!-- links used in above table -->
|
||||
|
||||
[RaccnLabL1L2ZED-F9P ext_ant]: https://docs.raccoonlab.co/guide/gps_mag_baro/gnss_external_antenna_f9p_v320.html
|
||||
[RaccoonLab L1/L2 ZED-F9P]: https://docs.raccoonlab.co/guide/gps_mag_baro/gps_l1_l2_zed_f9p.html
|
||||
[DualF9P]: ../gps_compass/u-blox_f9p_heading.md
|
||||
[SeptDualAnt]: ../gps_compass/septentrio.md#gnss-based-heading
|
||||
[UnicoreDualAnt]: ../gps_compass/rtk_gps_holybro_unicore_um982.md#enable-gps-heading-yaw
|
||||
[Dual F9P]: ../gps_compass/u-blox_f9p_heading.md
|
||||
[Septentrio Dual Antenna]: ../gps_compass/septentrio.md#gnss-based-heading
|
||||
[Unicore Dual Antenna]: ../gps_compass/rtk_gps_holybro_unicore_um982.md#enable-gps-heading-yaw
|
||||
[DATAGNSS GEM1305 RTK]: ../gps_compass/rtk_gps_gem1305.md
|
||||
[DroneCAN]: ../dronecan/index.md
|
||||
[GPS Yaw]: #configuring-gps-as-yaw-heading-source
|
||||
[mosaic-G5 P3]: https://www.septentrio.com/en/products/gnss-receivers/gnss-receiver-modules/mosaic-G5-P3
|
||||
[mosaic-G5 P3H]: https://www.septentrio.com/en/products/gnss-receivers/gnss-receiver-modules/mosaic-G5-P3H
|
||||
[D10P]: https://docs.datagnss.com/gnss/gnss_module/D10P_RTK
|
||||
|
||||
Notes:
|
||||
|
||||
@@ -143,6 +150,7 @@ The RTK GPS connection is essentially plug and play:
|
||||

|
||||
|
||||
1. Once Survey-in completes:
|
||||
|
||||
- The RTK GPS icon changes to white and _QGroundControl_ starts to stream position data to the vehicle:
|
||||
|
||||

|
||||
|
||||
@@ -280,6 +280,8 @@ For more information see: [Plotting uORB Topic Data in Real Time using PlotJuggl
|
||||
|
||||
## See Also
|
||||
|
||||
- [uORB Documentation Standard](../uorb/uorb_documentation.md)
|
||||
|
||||
- _PX4 uORB Explained_ Blog series
|
||||
- [Part 1](https://px4.io/px4-uorb-explained-part-1/)
|
||||
- [Part 2](https://px4.io/px4-uorb-explained-part-2/)
|
||||
|
||||
@@ -321,7 +321,7 @@ The configuration can be done using the [UXRCE-DDS parameters](../advanced_confi
|
||||
- [UXRCE_DDS_SYNCT](../advanced_config/parameter_reference.md#UXRCE_DDS_SYNCT): Bridge time synchronization enable.
|
||||
The uXRCE-DDS client module can synchronize the timestamp of the messages exchanged over the bridge.
|
||||
This is the default configuration. In certain situations, for example during [simulations](../ros2/user_guide.md#ros-gazebo-and-px4-time-synchronization), this feature may be disabled.
|
||||
- <Badge type="tip" text="PX4 v1.17" /> [`UXRCE_DDS_NS_IDX`](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX): Index-based namespace definition
|
||||
- [UXRCE_DDS_NS_IDX](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX) <Badge type="tip" text="PX4 v1.17" />: Index-based namespace definition
|
||||
Setting this parameter to any value other than `-1` creates a namespace with the prefix `uav_` and the specified value, e.g. `uav_0`, `uav_1`, etc.
|
||||
See [namespace](#customizing-the-namespace) for methods to define richer or arbitrary namespaces.
|
||||
|
||||
@@ -426,7 +426,7 @@ will generate topics under the namespaces:
|
||||
|
||||
:::
|
||||
|
||||
- A simple index-based namespace can be applied by setting the parameter [`UXRCE_DDS_NS_IDX`](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX) to a value between 0 and 9999.
|
||||
- A simple index-based namespace can be applied by setting the parameter [`UXRCE_DDS_NS_IDX`](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX) <Badge type="tip" text="PX4 v1.17" /> to a value between 0 and 9999.
|
||||
This will generate a namespace such as `/uav_0`, `/uav_1`, and so on.
|
||||
This technique is ideal if vehicles must be persistently associated with namespaces because their clients are automatically started through PX4.
|
||||
|
||||
|
||||
@@ -15,38 +15,6 @@ Subcategories:
|
||||
- [Rpm Sensor](modules_driver_rpm_sensor.md)
|
||||
- [Transponder](modules_driver_transponder.md)
|
||||
|
||||
## MCP23009
|
||||
|
||||
Source: [drivers/gpio/mcp23009](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/gpio/mcp23009)
|
||||
|
||||
### Usage {#MCP23009_usage}
|
||||
|
||||
```
|
||||
MCP23009 <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 37
|
||||
[-D <val>] Direction
|
||||
default: 0
|
||||
[-O <val>] Output
|
||||
default: 0
|
||||
[-P <val>] Pullups
|
||||
default: 0
|
||||
[-U <val>] Update Interval [ms]
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## atxxxx
|
||||
|
||||
Source: [drivers/osd/atxxxx](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/osd/atxxxx)
|
||||
@@ -749,6 +717,40 @@ lsm303agr <command> [arguments...]
|
||||
status print status info
|
||||
```
|
||||
|
||||
## mcp230xx
|
||||
|
||||
Source: [lib/drivers/mcp_common](https://github.com/PX4/PX4-Autopilot/tree/main/src/lib/drivers/mcp_common)
|
||||
|
||||
### Usage {#mcp230xx_usage}
|
||||
|
||||
```
|
||||
mcp230xx <command> [arguments...]
|
||||
Commands:
|
||||
start
|
||||
[-I] Internal I2C bus(es)
|
||||
[-X] External I2C bus(es)
|
||||
[-b <val>] board-specific bus (default=all) (external SPI: n-th bus
|
||||
(default=1))
|
||||
[-f <val>] bus frequency in kHz
|
||||
[-q] quiet startup (no message if no device found)
|
||||
[-a <val>] I2C address
|
||||
default: 39
|
||||
[-D <val>] Direction (1=Input, 0=Output)
|
||||
default: 0
|
||||
[-O <val>] Output
|
||||
default: 0
|
||||
[-P <val>] Pullups
|
||||
default: 0
|
||||
[-U <val>] Update Interval [ms]
|
||||
default: 0
|
||||
[-M <val>] First minor number
|
||||
default: 0
|
||||
|
||||
stop
|
||||
|
||||
status print status info
|
||||
```
|
||||
|
||||
## mcp9808
|
||||
|
||||
Source: [drivers/temperature_sensor/mcp9808](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/temperature_sensor/mcp9808)
|
||||
@@ -899,8 +901,6 @@ fetching the latest mixing result and write them to PCA9685 at its scheduling ti
|
||||
It can do full 12bits output as duty-cycle mode, while also able to output precious pulse width
|
||||
that can be accepted by most ESCs and servos.
|
||||
|
||||
The I2C bus and address can be configured via parameters `PCA9685_EN_BUS` and `PCA9685_I2C_ADDR`, or via command line arguments.
|
||||
|
||||
### Examples
|
||||
|
||||
It is typically started with:
|
||||
|
||||
@@ -127,6 +127,10 @@ commander <command> [arguments...]
|
||||
|
||||
check Run preflight checks
|
||||
|
||||
safety Change prearm safety state
|
||||
on|off [on] to activate safety, [off] to deactivate safety and allow
|
||||
control surface movements
|
||||
|
||||
arm
|
||||
[-f] Force arming (do not run preflight checks)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Battery status
|
||||
|
||||
Battery status information for up to 4 battery instances.
|
||||
Battery status information for up to 3 battery instances.
|
||||
These are populated from power module and smart battery device drivers, and one battery updated from MAVLink.
|
||||
Battery instance information is also logged and streamed in MAVLink telemetry.
|
||||
|
||||
@@ -11,7 +11,7 @@ Battery instance information is also logged and streamed in MAVLink telemetry.
|
||||
```c
|
||||
# Battery status
|
||||
#
|
||||
# Battery status information for up to 4 battery instances.
|
||||
# Battery status information for up to 3 battery instances.
|
||||
# These are populated from power module and smart battery device drivers, and one battery updated from MAVLink.
|
||||
# Battery instance information is also logged and streamed in MAVLink telemetry.
|
||||
|
||||
@@ -33,9 +33,9 @@ uint8 cell_count # [-] [@invalid 0] Number of cells
|
||||
|
||||
|
||||
uint8 source # [@enum SOURCE] Battery source
|
||||
uint8 SOURCE_POWER_MODULE = 0 # Power module
|
||||
uint8 SOURCE_EXTERNAL = 1 # External
|
||||
uint8 SOURCE_ESCS = 2 # ESCs
|
||||
uint8 SOURCE_POWER_MODULE = 0 # Power module (analog ADC or I2C power monitor)
|
||||
uint8 SOURCE_EXTERNAL = 1 # External (MAVLink, CAN, or external driver)
|
||||
uint8 SOURCE_ESCS = 2 # ESCs (via ESC telemetry)
|
||||
|
||||
uint8 priority # [-] Zero based priority is the connection on the Power Controller V1..Vn AKA BrickN-1
|
||||
uint16 capacity # [mAh] Capacity of the battery when fully charged
|
||||
|
||||
@@ -32,9 +32,9 @@ uint8 cell_count # [@invalid 0] Number of cells
|
||||
|
||||
|
||||
uint8 source # [@enum SOURCE] Battery source
|
||||
uint8 SOURCE_POWER_MODULE = 0 # Power module
|
||||
uint8 SOURCE_EXTERNAL = 1 # External
|
||||
uint8 SOURCE_ESCS = 2 # ESCs
|
||||
uint8 SOURCE_POWER_MODULE = 0 # Power module (analog ADC or I2C power monitor)
|
||||
uint8 SOURCE_EXTERNAL = 1 # External (MAVLink, CAN, or external driver)
|
||||
uint8 SOURCE_ESCS = 2 # ESCs (via ESC telemetry)
|
||||
|
||||
uint8 priority # Zero based priority is the connection on the Power Controller V1..Vn AKA BrickN-1
|
||||
uint16 capacity # [mAh] Capacity of the battery when fully charged
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# DeviceInformation (UORB message)
|
||||
|
||||
Device information
|
||||
|
||||
Can be used to uniquely associate a device_id from a sensor topic with a physical device using serial number.
|
||||
as well as tracking of the used firmware versions on the devices.
|
||||
|
||||
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/DeviceInformation.msg)
|
||||
|
||||
```c
|
||||
# Device information
|
||||
#
|
||||
# Can be used to uniquely associate a device_id from a sensor topic with a physical device using serial number.
|
||||
# as well as tracking of the used firmware versions on the devices.
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint8 device_type # [@enum DEVICE_TYPE] Type of the device. Matches MAVLink DEVICE_TYPE enum
|
||||
|
||||
uint8 DEVICE_TYPE_GENERIC = 0 # Generic/unknown sensor
|
||||
uint8 DEVICE_TYPE_AIRSPEED = 1 # Airspeed sensor
|
||||
uint8 DEVICE_TYPE_ESC = 2 # ESC
|
||||
uint8 DEVICE_TYPE_SERVO = 3 # Servo
|
||||
uint8 DEVICE_TYPE_GPS = 4 # GPS
|
||||
uint8 DEVICE_TYPE_MAGNETOMETER = 5 # Magnetometer
|
||||
uint8 DEVICE_TYPE_PARACHUTE = 6 # Parachute
|
||||
uint8 DEVICE_TYPE_RANGEFINDER = 7 # Rangefinder
|
||||
uint8 DEVICE_TYPE_WINCH = 8 # Winch
|
||||
uint8 DEVICE_TYPE_BAROMETER = 9 # Barometer
|
||||
uint8 DEVICE_TYPE_OPTICAL_FLOW = 10 # Optical flow
|
||||
uint8 DEVICE_TYPE_ACCELEROMETER = 11 # Accelerometer
|
||||
uint8 DEVICE_TYPE_GYROSCOPE = 12 # Gyroscope
|
||||
uint8 DEVICE_TYPE_DIFFERENTIAL_PRESSURE = 13 # Differential pressure
|
||||
uint8 DEVICE_TYPE_BATTERY = 14 # Battery
|
||||
uint8 DEVICE_TYPE_HYGROMETER = 15 # Hygrometer
|
||||
|
||||
char[32] vendor_name # Name of the device vendor
|
||||
char[32] model_name # Name of the device model
|
||||
|
||||
uint32 device_id # [-] [@invalid 0 if not available] Unique device ID for the sensor. Does not change between power cycles.
|
||||
char[24] firmware_version # [-] [@invalid empty if not available] Firmware version.
|
||||
char[24] hardware_version # [-] [@invalid empty if not available] Hardware version.
|
||||
char[33] serial_number # [-] [@invalid empty if not available] Device serial number or unique identifier.
|
||||
|
||||
```
|
||||
@@ -21,6 +21,7 @@ uint8 GPS_CHECK_FAIL_MAX_VERT_DRIFT = 7 # 7 : maximum allowed vertical position
|
||||
uint8 GPS_CHECK_FAIL_MAX_HORZ_SPD_ERR = 8 # 8 : maximum allowed horizontal speed fail - requires stationary vehicle
|
||||
uint8 GPS_CHECK_FAIL_MAX_VERT_SPD_ERR = 9 # 9 : maximum allowed vertical velocity discrepancy fail
|
||||
uint8 GPS_CHECK_FAIL_SPOOFED = 10 # 10 : GPS signal is spoofed
|
||||
uint8 GPS_CHECK_FAIL_JAMMED = 11 # 11 : GPS signal is jammed
|
||||
|
||||
uint64 control_mode_flags # Bitmask to indicate EKF logic state
|
||||
uint8 CS_TILT_ALIGN = 0 # 0 - true if the filter tilt alignment is complete
|
||||
|
||||
@@ -6,6 +6,7 @@ GPIO mask and state
|
||||
|
||||
```c
|
||||
# GPIO mask and state
|
||||
uint8 MAX_INSTANCES = 8
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
uint32 device_id # Device id
|
||||
|
||||
@@ -9,11 +9,15 @@ This message is used to dump the raw gps communication to the log.
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint8 INSTANCE_MAIN = 0
|
||||
uint8 INSTANCE_SECONDARY = 1
|
||||
|
||||
uint8 instance # Instance of GNSS receiver
|
||||
uint32 device_id
|
||||
uint8 len # length of data, MSB bit set = message to the gps device,
|
||||
# clear = message from the device
|
||||
uint8[79] data # data to write to the log
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 8
|
||||
uint8 ORB_QUEUE_LENGTH = 16
|
||||
|
||||
```
|
||||
|
||||
@@ -108,6 +108,7 @@ uint16 VEHICLE_CMD_LOGGING_START = 2510 # Start streaming ULog data.
|
||||
uint16 VEHICLE_CMD_LOGGING_STOP = 2511 # Stop streaming ULog data.
|
||||
uint16 VEHICLE_CMD_CONTROL_HIGH_LATENCY = 2600 # Control starting/stopping transmitting data over the high latency link.
|
||||
uint16 VEHICLE_CMD_DO_VTOL_TRANSITION = 3000 # Command VTOL transition.
|
||||
uint16 VEHICLE_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300 # Command safety on/off. |1 to activate safety, 0 to deactivate safety and allow control surface movements|Unused|Unused|Unused|Unused|Unused|Unused|
|
||||
uint16 VEHICLE_CMD_ARM_AUTHORIZATION_REQUEST = 3001 # Request arm authorization.
|
||||
uint16 VEHICLE_CMD_PAYLOAD_PREPARE_DEPLOY = 30001 # Prepare a payload deployment in the flight plan.
|
||||
uint16 VEHICLE_CMD_PAYLOAD_CONTROL_DEPLOY = 30002 # Control a pre-programmed payload deployment.
|
||||
@@ -187,6 +188,10 @@ int8 ARMING_ACTION_ARM = 1
|
||||
uint8 GRIPPER_ACTION_RELEASE = 0
|
||||
uint8 GRIPPER_ACTION_GRAB = 1
|
||||
|
||||
# Used as param1 in DO_SET_SAFETY_SWITCH_STATE command.
|
||||
uint8 SAFETY_OFF = 0
|
||||
uint8 SAFETY_ON = 1
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 8
|
||||
|
||||
float32 param1 # Parameter 1, as defined by MAVLink uint16 VEHICLE_CMD enum.
|
||||
|
||||
@@ -105,6 +105,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
|
||||
- [DebugKeyValue](DebugKeyValue.md)
|
||||
- [DebugValue](DebugValue.md)
|
||||
- [DebugVect](DebugVect.md)
|
||||
- [DeviceInformation](DeviceInformation.md) — Device information
|
||||
- [DifferentialPressure](DifferentialPressure.md) — Differential-pressure (airspeed) sensor
|
||||
- [DistanceSensor](DistanceSensor.md) — DISTANCE_SENSOR message data
|
||||
- [DistanceSensorModeChangeRequest](DistanceSensorModeChangeRequest.md)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Neural Network Control
|
||||
|
||||
PX4 supports the following mechanisms for using neural networks for multirotor control:
|
||||
|
||||
- [MC Neural Networks Control](../neural_networks/mc_neural_network_control.md)<Badge type="warning" text="Experimental" /> — A generic neural network module that you can modify to use different underlying neural network and training models and compile into the firmware.
|
||||
- [RAPTOR: A Neural Network Module for Adaptive Quadrotor Control](../neural_networks/raptor.md)<Badge type="warning" text="Experimental" /> — An adaptive RL NN module that works well with different Quad configurations without additional training.
|
||||
|
||||
Generally you will select the former if you wish to experiment with custom neural network architectures and train them using PyTorch or TensorFlow, and the latter if you want to use a pre-trained neural-network controller that works out-of-the-box (without training for your particular platform) or if you train your own policies using [RLtools](https://rl.tools).
|
||||
|
||||
Note that both modules are experimental and provided for experimentation.
|
||||
The table below provides more detail on the differences.
|
||||
|
||||
| Use Case | [`mc_raptor`](../neural_networks/raptor.md) | [`mc_nn_control`](../neural_networks/mc_neural_network_control.md) |
|
||||
| ---------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------ |
|
||||
| Pre-trained policy that adapts to any quadrotor without training | ✓ RAPTOR | ✘ |
|
||||
| Train policy in PyTorch/TF | ✘ | ✓ TF Lite |
|
||||
| Train policy in RLtools | ✓ | ✘ |
|
||||
| Use manual control (remote) with NN policy | ✘ GPS/MoCap | ✓ Manual attitude commands |
|
||||
| Load policy checkpoints from SD card | ✓ Upload via MAVLink FTP | ✘ Compiled into firmware |
|
||||
| Offboard setpoints | ✓ MAVLink | ✘ |
|
||||
| Internal Trajectory Generator | ✓ (Position, Lissajous) | ✘ |
|
||||
@@ -0,0 +1,119 @@
|
||||
# MC Neural Networks Control
|
||||
|
||||
<Badge type="tip" text="PX4 v1.17" /> <Badge type="warning" text="Experimental" />
|
||||
|
||||
::: warning
|
||||
This is an experimental module.
|
||||
Use at your own risk.
|
||||
:::
|
||||
|
||||
The Multicopter Neural Network (NN) module ([mc_nn_control](../modules/modules_controller.md#mc-nn-control)) is an example module that allows you to experiment with using a pre-trained neural network on PX4.
|
||||
It might be used, for example, to experiment with controllers for non-traditional drone morphologies, computer vision tasks, and so on.
|
||||
|
||||
The module integrates a pre-trained neural network based on the [TensorFlow Lite Micro (TFLM)](./tflm.md) module.
|
||||
The module is trained for the [X500 V2](../frames_multicopter/holybro_x500v2_pixhawk6c.md) multicopter frame.
|
||||
While the controller is fairly robust, and might work on other platforms, we recommend [Training your own Network](#training-your-own-network) if you use a different vehicle.
|
||||
Note that after training the network you will need to update and rebuild PX4.
|
||||
|
||||
TLFM is a mature inference library intended for use on embedded devices.
|
||||
It has support for several architectures, so there is a high likelihood that you can build it for the board you want to use.
|
||||
If not, there are other possible NN frameworks, such as [Eigen](https://eigen.tuxfamily.org/index.php?title=Main_Page) and [Executorch](https://pytorch.org/executorch-overview).
|
||||
|
||||
This document explains how you can include the module in your PX4 build, and provides a broad overview of how it works.
|
||||
The other documents in the section provide more information about the integration, allowing you to replace the NN with a version trained on different data, or even to replace the TLFM library altogether.
|
||||
|
||||
If you are looking for more resources to learn about the module, a website has been created with links to a youtube video and a workshop paper. A full master's thesis will be added later. [A Neural Network Mode for PX4 on Embedded Flight Controllers](https://ntnu-arl.github.io/px4-nns/).
|
||||
|
||||
## Neural Network PX4 Firmware
|
||||
|
||||
::: warning
|
||||
This module requires Ubuntu 24.04 or newer (it is not supported in Ubuntu 22.04).
|
||||
:::
|
||||
|
||||
The module has been tested on a number of configurations, which can be build locally using the commands:
|
||||
|
||||
```sh
|
||||
make px4_sitl_neural
|
||||
```
|
||||
|
||||
```sh
|
||||
make px4_fmu-v6c_neural
|
||||
```
|
||||
|
||||
```sh
|
||||
make mro_pixracerpro_neural
|
||||
```
|
||||
|
||||
You can add the module to other board configurations by modifying their `default.px4board file` configuration to include these lines:
|
||||
|
||||
```sh
|
||||
CONFIG_LIB_TFLM=y
|
||||
CONFIG_MODULES_MC_NN_CONTROL=y
|
||||
```
|
||||
|
||||
:::tip
|
||||
The `mc_nn_control` module takes up roughly 50KB, and many of the `default.px4board file` are already close to filling all the flash on their boards. To make room for the neural control module you can remove the include statements for other modules, such as FW, rover, VTOL and UUV.
|
||||
:::
|
||||
|
||||
## Example Module Overview
|
||||
|
||||
The example module replaces the entire controller structure as well as the control allocator, as shown in the diagram below:
|
||||
|
||||

|
||||
|
||||
In the [controller diagram](../flight_stack/controller_diagrams.md) you can see the [uORB message](../middleware/uorb.md) flow.
|
||||
We hook into this flow by subscribing to messages at particular points, using our neural network to calculate outputs, and then publishing them into the next point in the flow.
|
||||
We also need to stop the module publishing the topic to be replaced, which is covered in [Neural Network Module: System Integration](nn_module_utilities.md)
|
||||
|
||||
### Input
|
||||
|
||||
The input can be changed to whatever you want.
|
||||
Set up the input you want to use during training and then provide the same input in PX4.
|
||||
In the Neural Control module the input is an array of 15 numbers, and consists of these values in this order:
|
||||
|
||||
- [3] Local position error. (goal position - current position)
|
||||
- [6] The first 2 rows of a 3 dimensional rotation matrix.
|
||||
- [3] Linear velocity
|
||||
- [3] Angular velocity
|
||||
|
||||
All the input values are collected from uORB topics and transformed into the correct representation in the `PopulateInputTensor()` function.
|
||||
PX4 uses the NED frame representation, while the Aerial Gym Simulator, in which the NN was trained, uses the ENU representation.
|
||||
Therefore two rotation matrices are created in the function and all the inputs are transformed from the NED representation to the ENU one.
|
||||
|
||||

|
||||
|
||||
ENU and NED are just rotation representations, the translational difference is only there so both can be seen in the same figure.
|
||||
|
||||
### Output
|
||||
|
||||
The output consists of 4 values, the motor forces, one for each motor.
|
||||
These are transformed in the `RescaleActions()` function.
|
||||
This is done because PX4 expects normalized motor commands while the Aerial Gym Simulator uses physical values.
|
||||
So the output from the network needs to be normalized before they can be sent to the motors in PX4.
|
||||
|
||||
The commands are published to the [ActuatorMotors](../msg_docs/ActuatorMotors.md) topic.
|
||||
The publishing is handled in `PublishOutput(float* command_actions)` function.
|
||||
|
||||
:::tip
|
||||
If the neural control mode is too aggressive or unresponsive the [MC_NN_THRST_COEF](../advanced_config/parameter_reference.md#MC_NN_THRST_COEF) parameter can be tuned.
|
||||
Decrease it for more thrust.
|
||||
:::
|
||||
|
||||
## Training your own Network
|
||||
|
||||
The network is currently trained for the [X500 V2](../frames_multicopter/holybro_x500v2_pixhawk6c.md).
|
||||
But the controller is somewhat robust, so it could work directly on other platforms, but performing system identification and training a new network is recommended.
|
||||
|
||||
Since the Aerial Gym Simulator is open-source you can download it and train your own networks as long as you have access to an NVIDIA GPU.
|
||||
If you want to train a control network optimized for your platform you can follow the instructions in the [Aerial Gym Documentation](https://ntnu-arl.github.io/aerial_gym_simulator/9_sim2real/).
|
||||
|
||||
You should do one system identification flight for this and get an approximate inertia matrix for your platform.
|
||||
On the `sys-id` flight you need ESC telemetry, you can read more about that in [DSHOT](../peripherals/dshot.md).
|
||||
|
||||
Then do the following steps:
|
||||
|
||||
- Do a hover flight
|
||||
- Read of the logs what RPM is required for the drone to hover.
|
||||
- Use the weight of each motor, length of the motor arms, total weight of the platform with battery to calculate an approximate inertia matrix for the platform.
|
||||
- Insert these values into the Aerial Gym configuration and train your network.
|
||||
- Convert the network as explained in [TFLM](tflm.md).
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The neural control module ([mc_nn_control](../modules/modules_controller.md#mc-nn-control)) implements an end-to-end controller utilizing neural networks.
|
||||
|
||||
The parts of the module directly concerned with generating the code for the trained neural network and integrating it into the module are covered in [TensorFlow Lite Micro (TFLM)](../advanced/tflm.md).
|
||||
The parts of the module directly concerned with generating the code for the trained neural network and integrating it into the module are covered in [TensorFlow Lite Micro (TFLM)](./tflm.md).
|
||||
This page covers the changes that were made to integrate the module into PX4, both within the module, and in larger system configuration.
|
||||
|
||||
::: tip
|
||||
@@ -75,7 +75,7 @@ Which timing library is included and used is based on wether PX4 is built with N
|
||||
|
||||
## Changing the setpoint
|
||||
|
||||
The module uses the [TrajectorySetpoint](../msg_docs/TrajectorySetpoint.md) message’s position fields to define its target.
|
||||
The module uses the [TrajectorySetpoint](../msg_docs/TrajectorySetpoint.md) message's position fields to define its target.
|
||||
To follow a trajectory, you can send updated setpoints.
|
||||
For an example of how to do this in a PX4 module, see the [mc_nn_testing](https://github.com/SindreMHegre/PX4-Autopilot-public/tree/main/src/modules/mc_nn_testing) module in this fork.
|
||||
Note that this is not included in upstream PX4.
|
||||
@@ -0,0 +1,221 @@
|
||||
# RAPTOR: A Neural Network Module for Adaptive Quadrotor Control
|
||||
|
||||
<Badge type="tip" text="main (planned for PX4 v1.18)" /> <Badge type="info" text="Multicopter" /> <Badge type="warning" text="Experimental" />
|
||||
|
||||
::: warning
|
||||
This is an experimental module.
|
||||
Use at your own risk.
|
||||
:::
|
||||
|
||||
RAPTOR is a tiny reinforcement-learning based neural network module for quadrotor control that can be used to control a wide variety of quadrotors without retuning.
|
||||
|
||||
This topic provides an overview of the fundamental concepts, and explains how you can use the module in simulation and real hardware.
|
||||
|
||||
## Overview
|
||||
|
||||

|
||||
|
||||
RAPTOR is an adaptive policy for end-to-end quadrotor control.
|
||||
It is motivated by the human ability to adapt learned behaviours to similar situations.
|
||||
For example, while humans may initially require many hours of driving experience to be able to smoothly control the car and blend into traffic, when faced with a new vehicle they do not need to re-learn how to drive — they only need to experience a few rough braking/acceleration/steering responses to adjust their previously learned behavior.
|
||||
|
||||
Reinforcement Learning (RL) is a machine learning technique that uses trial and error to learn decision making/control behaviors, which is similar to the way that humans learn to drive.
|
||||
RL is interesting for controlling robots (and particularly UAVs) because it overcomes some fundamental limitations of classic, modular control architectures (information loss at module boundaries, requirement for expert tuning, etc).
|
||||
RL has been very successful in [high-performance quadrotor flight](https://doi.org/10.1038/s41586-023-06419-4), but previous designs have not been particularly adaptable to new frames and vehicle types.
|
||||
|
||||
RAPTOR fills this gap and demonstrates a single, tiny neural-network control policy that can control a wide variety of quadrotors (tested on real quadrotors from 32 g to 2.4 kg).
|
||||
|
||||
For more details please refer to this video:
|
||||
|
||||
<lite-youtube videoid="hVzdWRFTX3k" title="RAPTOR: A Foundation Policy for Quadrotor Control"/>
|
||||
|
||||
The method we developed for training the RAPTOR policy is called Meta-Imitation Learning:
|
||||
|
||||

|
||||
|
||||
You can torture test the RAPTOR policy in your browser at [https://raptor.rl.tools](https://raptor.rl.tools) or in the embedded app here:
|
||||
|
||||
<iframe src="https://rl-tools.github.io/raptor.rl.tools?raptor=false" width="100%" height="1000" style="border: none;"></iframe>
|
||||
|
||||
For more information please refer to the paper at [https://arxiv.org/abs/2509.11481](https://arxiv.org/abs/2509.11481).
|
||||
|
||||
## Structure
|
||||
|
||||
The RAPTOR control policy is an end-to-end policy that takes position, orientation, linear velocity and angular velocity as inputs and outputs motor commands (`actuator_motors`).
|
||||
To integrate it into PX4 we use the external mode registration facilities in PX4 (which also works well for internal modes as demonstrated in `mc_nn_control`).
|
||||
Because of this architecture the `mc_raptor` module is completely decoupled from all other PX4 logic.
|
||||
|
||||
By default, the RAPTOR module expects setpoints via `trajectory_setpoint` messages.
|
||||
If no `trajectory_setpoint` messages are received or if no `trajectory_setpoint` is received within 200 ms, the current position and orientation (with zero velocity) is used as the setpoint.
|
||||
Since feeding setpoints reliably via telemetry is still a challenge, we also implement a simple option to generate internal reference trajectories (controlled through the `MC_RAPTOR_INTREF` parameter) for demonstration and benchmarking purposes.
|
||||
|
||||
## Features
|
||||
|
||||
- Tiny neural network (just 2084 parameters) => minimal CPU usage
|
||||
- Easily maintainable
|
||||
- Simple CMake setup
|
||||
- Self-contained (no interference with other modules)
|
||||
- Single, simple and well-maintained dependency (RLtools)
|
||||
- Loading neural network parameters from SD card
|
||||
- Minimal flash usage (for possible inclusion into default build configurations)
|
||||
- Easy development: Train new neural network and just upload it via MAVLink FTP without requiring to re-flash the firmware
|
||||
- Tested on 10+ different real platforms (including flexible frames, brushed motors)
|
||||
- Actively developed and maintained
|
||||
|
||||
## Usage
|
||||
|
||||
### SITL
|
||||
|
||||
Build PX4 SITL with Raptor, disable QGC requirement, and adjust the `IMU_GYRO_RATEMAX` to match the simulation IMU rate
|
||||
|
||||
```sh
|
||||
make px4_sitl_raptor gz_x500
|
||||
param set NAV_DLL_ACT 0
|
||||
param set COM_DISARM_LAND -1 # When taking off in offboard the landing detector can cause mid-air disarms
|
||||
param set IMU_GYRO_RATEMAX 250 # Just for SITL. Tested with IMU_GYRO_RATEMAX=400 on real FCUs
|
||||
param set MC_RAPTOR_ENABLE 1 # Enable the mc_raptor module
|
||||
param save
|
||||
```
|
||||
|
||||
Upload the RAPTOR checkpoint to the "SD card": Separate terminal
|
||||
|
||||
```bash
|
||||
mavproxy.py --master udp:127.0.0.1:14540
|
||||
ftp mkdir /raptor # for the real FMU use: /fs/microsd/raptor
|
||||
ftp put src/modules/mc_raptor/blob/policy.tar /raptor/policy.tar
|
||||
```
|
||||
|
||||
Restart (<kbd>Ctrl+C</kbd>)
|
||||
|
||||
```sh
|
||||
make px4_sitl_raptor gz_x500
|
||||
commander takeoff
|
||||
commander status
|
||||
```
|
||||
|
||||
Note the external mode ID of `RAPTOR` in the status report
|
||||
|
||||
```sh
|
||||
commander mode ext{RAPTOR_MODE_ID}
|
||||
```
|
||||
|
||||
#### Internal Reference Trajectory Generation
|
||||
|
||||
In our experience, feeding the `trajectory_setpoint` via MAVLink (even via WiFi telemetry) is unreliable.
|
||||
But we do not want to constrain this module to only platforms that have a companion board.
|
||||
|
||||
For this reason we have integrated a simple internal reference trajectory generator for testing and benchmarking purposes.
|
||||
It supports position (constant position and yaw setpoint) as well as configurable [Lissajous trajectories](https://en.wikipedia.org/wiki/Lissajous_curve).
|
||||
|
||||
The Lissajous generator can, for example, generate smooth figure-eight trajectories that contain interesting accelerations for benchmarking and testing purposes.
|
||||
Please refer to the embedded configurator later in this section to explore the Lissajous parameters and view the resulting trajectories.
|
||||
|
||||
To use the internal reference generator, select the mode: `0`: Off/activation position tracking, `1`: Lissajous
|
||||
|
||||
```sh
|
||||
param set MC_RAPTOR_INTREF 1
|
||||
```
|
||||
|
||||
Restart (ctrl+c)
|
||||
|
||||
```sh
|
||||
commander takeoff
|
||||
commander mode ext{RAPTOR_MODE_ID}
|
||||
mc_raptor intref lissajous 0.5 1 0 2 1 1 10 3
|
||||
```
|
||||
|
||||
The trajectory is relative to the position and yaw of the vehicle at the point where the RAPTOR mode is activated (or the position and yaw where the parameters are changed if it is already activated).
|
||||
|
||||
You can adjust the parameters of the trajectory with the following tool.
|
||||
Make sure to copy the generated CLI string at the end:
|
||||
|
||||
<iframe src="https://rl-tools.github.io/mc-raptor-trajectory-tool" width="100%" height="1700" style="border: none;"></iframe>
|
||||
|
||||
### Real-World
|
||||
|
||||
#### Setup
|
||||
|
||||
The `mc_raptor` module has been mostly tested with the Holybro X500 V2 but it should also work out-of-the-box with other platforms (see the [Other Platforms](#other-platforms) section).
|
||||
|
||||
```sh
|
||||
make px4_fmu-v6c_raptor upload
|
||||
```
|
||||
|
||||
We recommend initially testing the RAPTOR mode using a dead man's switch.
|
||||
For this we configure the mode selection to be connected to a push button or a switch with a spring that automatically switches back.
|
||||
In the default position we configure e.g. `Stabilized Mode` and in the pressed configuration we select `External Mode 1` (since the name of the external mode is only transmitted at runtime).
|
||||
This allows to take off manually and then just trigger the RAPTOR mode for a split-second to see how it behaves.
|
||||
In our experiments it has been exceptionally stable (zero crashes) but we still think progressively activating it for longer is the safest way to build confidence.
|
||||
|
||||
::: warning
|
||||
Make sure that your platform uses the standard PX4 quadrotor motor layout:
|
||||
|
||||
1: front-right, 2: back-left, 3: front-left, 4: back-right
|
||||
:::
|
||||
|
||||
##### Other Platforms
|
||||
|
||||
To enable the `mc_raptor` module in other platforms, just add `CONFIG_MODULES_MC_RAPTOR=y` and `CONFIG_LIB_RL_TOOLS=y`
|
||||
|
||||
```diff
|
||||
+++ b/boards/px4/fmu-v6c/raptor.px4board
|
||||
@@ -35,2 +35,3 @@
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
+CONFIG_LIB_RL_TOOLS=y
|
||||
CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
@@ -64,2 +65,3 @@
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
+CONFIG_MODULES_MC_RAPTOR=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
```
|
||||
|
||||
#### Results
|
||||
|
||||
Even though there were moderate winds (~ 5 m/s) during the test, we found good figure-eight tracking performance at velocities up to 12 m/s:
|
||||
|
||||

|
||||
|
||||
We also tested the linear velocity in a straight line and found that the RAPTOR policy can reliably fly at > 17 m/s (the wind direction was orthogonal to the line):
|
||||
|
||||

|
||||
|
||||
### Troubleshooting
|
||||
|
||||
#### Logging
|
||||
|
||||
Use this logging configuration to log all relevant topics at maximum rate:
|
||||
|
||||
```sh
|
||||
cat > logger_topics.txt << EOF
|
||||
raptor_status 0
|
||||
raptor_input 0
|
||||
trajectory_setpoint 0
|
||||
vehicle_local_position 0
|
||||
vehicle_angular_velocity 0
|
||||
vehicle_attitude 0
|
||||
vehicle_status 0
|
||||
actuator_motors 0
|
||||
EOF
|
||||
```
|
||||
|
||||
Use mavproxy FTP to upload it:
|
||||
|
||||
```sh
|
||||
mavproxy.py
|
||||
```
|
||||
|
||||
##### Real
|
||||
|
||||
```sh
|
||||
ftp mkdir /fs/microsd/etc
|
||||
ftp mkdir /fs/microsd/etc/logging
|
||||
ftp put logger_topics.txt /fs/microsd/etc/logging/logger_topics.txt
|
||||
```
|
||||
|
||||
##### SITL
|
||||
|
||||
```sh
|
||||
ftp mkdir etc
|
||||
ftp mkdir logging
|
||||
ftp put logger_topics.txt etc/logging/logger_topics.txt
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
# TensorFlow Lite Micro (TFLM)
|
||||
|
||||
The PX4 [Multicopter Neural Network](../advanced/neural_networks.md) module ([mc_nn_control](../modules/modules_controller.md#mc-nn-control)) integrates a neural network that uses the [TensorFlow Lite Micro (TFLM)](https://github.com/tensorflow/tflite-micro) inference library.
|
||||
The PX4 [MC Neural Networks Control](../neural_networks/mc_neural_network_control.md) module ([mc_nn_control](../modules/modules_controller.md#mc-nn-control)) integrates a neural network that uses the [TensorFlow Lite Micro (TFLM)](https://github.com/tensorflow/tflite-micro) inference library.
|
||||
|
||||
This is a mature inference library intended for use on embedded devices, and is hence a suitable choice for PX4.
|
||||
|
||||
@@ -68,7 +68,7 @@ The `_input_tensor` is also defined, it is fetched from `_control_interpreter->i
|
||||
|
||||
The `_input_tensor` is filled in the `PopulateInputTensor()` function.
|
||||
`_input_tensor` works by accessing the `->data.f` member array and fill in the required inputs for your network.
|
||||
The inputs used in the control network is covered in [Neural Networks](../advanced/neural_networks.md).
|
||||
The inputs used in the control network is covered in [MC Neural Networks Control](../neural_networks/mc_neural_network_control.md).
|
||||
|
||||
### Outputs
|
||||
|
||||
@@ -11,6 +11,10 @@ DShot is an alternative ESC protocol that has several advantages over [PWM](../p
|
||||
|
||||
This topic shows how to connect and configure DShot ESCs.
|
||||
|
||||
## Supported ESC
|
||||
|
||||
[ESCs & Motors > Supported ESCs](../peripherals/esc_motors#supported-esc) has a list of supported ESC (check "Protocols" column for DShot ESC).
|
||||
|
||||
## Wiring/Connections {#wiring}
|
||||
|
||||
DShot ESC are wired the same way as [PWM ESCs](pwm_escs_and_servo.md).
|
||||
@@ -76,7 +80,6 @@ The most important ones are:
|
||||
```
|
||||
|
||||
- Permanently set the spin direction of a motor connected to FMU output pin 1 (while motors are _not_ spinning):
|
||||
|
||||
- Set spin direction to `reversed`:
|
||||
|
||||
```sh
|
||||
@@ -104,7 +107,6 @@ The most important ones are:
|
||||
```
|
||||
|
||||
::: info
|
||||
|
||||
- The commands will have no effect if the motors are spinning, or if the ESC is already set to the corresponding direction.
|
||||
- The ESC will revert to its last saved direction (normal or reversed) on reboot if `save` is not called after changing the direction.
|
||||
|
||||
|
||||
@@ -3,80 +3,44 @@
|
||||
Many PX4 drones use brushless motors that are driven by the flight controller via an Electronic Speed Controller (ESC).
|
||||
The ESC takes a signal from the flight controller and uses it to set control the level of power delivered to the motor.
|
||||
|
||||
PX4 supports a number of common protocols for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec).
|
||||
PX4 supports a number of [common protocols](../esc/esc_protocols.md) for sending the signals to ESCs: [PWM ESCs](../peripherals/pwm_escs_and_servo.md), [OneShot ESCs](../peripherals/oneshot.md), [DShot ESCs](../peripherals/dshot.md), [DroneCAN ESCs](../dronecan/escs.md), PCA9685 ESC (via I2C), and some UART ESCs (from Yuneec).
|
||||
|
||||
## Supported ESC
|
||||
|
||||
The following list is non-exhaustive.
|
||||
|
||||
| ESC Device | Protocols | Firmwares | Notes |
|
||||
| ------------------------------ | ------------------------------------ | ------------------------ | ----------------------------------------------------- |
|
||||
| [ARK 4IN1 ESC] | [Dshot], [PWM] | [AM32] | Has versions with/without connnectors |
|
||||
| [Holybro Kotleta 20] | [DroneCAN], [PWM] | [PX4 Sapog ESC Firmware] | |
|
||||
| [Vertiq Motor & ESC modules] | [Dshot], [OneShot], Multishot, [PWM] | Vertiq firmware | Larger modules support DroneCAN, ESC and Motor in one |
|
||||
| [RaccoonLab CAN PWM ESC nodes] | [DroneCAN], Cyphal | | Cyphal and DroneCAN notes for PWM ESC |
|
||||
| [VESC ESCs] | [DroneCAN], [PWM] | VESC project firmware | |
|
||||
| [Zubax Telega] | [DroneCAN], [PWM] | Telega-based | ESC and Motor in one |
|
||||
|
||||
<!-- Links for table above -->
|
||||
|
||||
[ARK 4IN1 ESC]: ../esc/ark_4in1_esc.md
|
||||
[AM32]: https://am32.ca/
|
||||
[PX4 Sapog ESC Firmware]: ../dronecan/sapog.md
|
||||
[VESC ESCs]: ../peripherals/vesc.md
|
||||
[DroneCAN]: ../dronecan/escs.md
|
||||
[Dshot]: ../peripherals/dshot.md
|
||||
[OneShot]: ../peripherals/oneshot.md
|
||||
[PWM]: ../peripherals/pwm_escs_and_servo.md
|
||||
[Holybro Kotleta 20]: ../dronecan/holybro_kotleta.md
|
||||
[Vertiq Motor & ESC modules]: ../peripherals/vertiq.md
|
||||
[RaccoonLab CAN PWM ESC nodes]: ../dronecan/raccoonlab_nodes.md
|
||||
[Zubax Telega]: ../dronecan/zubax_telega.md
|
||||
|
||||
## See Also
|
||||
|
||||
For more information see:
|
||||
|
||||
- [ESC Protocols](../esc/esc_protocols.md) — overview of main ESC/Servo protocols supported by PX4
|
||||
- [PWM ESCs and Servos](../peripherals/pwm_escs_and_servo.md)
|
||||
- [OneShot ESCs and Servos](../peripherals/oneshot.md)
|
||||
- [DShot](../peripherals/dshot.md)
|
||||
- [DroneCAN ESCs](../dronecan/escs.md)
|
||||
- [ESC Calibration](../advanced_config/esc_calibration.md)
|
||||
- [ESC Firmware and Protocols Overview](https://oscarliang.com/esc-firmware-protocols/) (oscarliang.com)
|
||||
|
||||
A high level overview of the main ESC/Servo protocols supported by PX4 is given below.
|
||||
|
||||
## ESC Protocols
|
||||
|
||||
### PWM
|
||||
|
||||
[PWM ESCs](../peripherals/pwm_escs_and_servo.md) are commonly used for fixed-wing vehicles and ground vehicles (vehicles that require a lower latency like multicopters typically use oneshot or dshot ESCs).
|
||||
|
||||
PWM ESCs communicate using a periodic pulse, where the _width_ of the pulse indicates the desired power level.
|
||||
The pulse wdith typically ranges between 1000uS for zero power and 2000uS for full power.
|
||||
The periodic frame rate of the signal depends on the capability of the ESC, and commonly ranges between 50Hz and 490 Hz (the theoretical maximum being 500Hz for a very small "off" cycle).
|
||||
A higher rate is better for ESCs, in particular where a rapid response to setpoint changes is needed.
|
||||
For PWM servos 50Hz is usually sufficient, and many don't support higher rates.
|
||||
|
||||

|
||||
|
||||
In addition to being a relatively slow protocol PWM ESCs require [calibration](../advanced_config/esc_calibration.md) because the range values representing low and high values can vary significantly.
|
||||
Unlike [dshot](#dshot) and [DroneCAN ESC](#dronecan) they do not have the ability to provide telemetry and feedback on ESC (or servo) state.
|
||||
|
||||
Setup:
|
||||
|
||||
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md)
|
||||
- [PX4 Configuration](../peripherals/pwm_escs_and_servo.md#px4-configuration)
|
||||
- [ESC Calibration](../advanced_config/esc_calibration.md)
|
||||
|
||||
### Oneshot 125
|
||||
|
||||
[OneShot 125 ESCs](../peripherals/oneshot.md) are usually much faster than PWM ESCs, and hence more responsive and easier to tune.
|
||||
They are preferred over PWM for multicopters (but not as much as [DShot ESCs](#dshot), which do not require calibration, and may provide telemetry feedback).
|
||||
There are a number of variants of the OneShot protocol, which support different rates.
|
||||
PX4 only supports OneShot 125.
|
||||
|
||||
OneShot 125 is the same as PWM but uses pulse widths that are 8 times shorter (from 125us to 250us for zero to full power).
|
||||
This allows OneShot 125 ESCs to have a much shorter duty cycle/higher rate.
|
||||
For PWM the theoretical maximum is close to 500 Hz while for OneShot it approaches 4 kHz.
|
||||
The actual supported rate depends on the ESC used.
|
||||
|
||||
Setup:
|
||||
|
||||
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
|
||||
- [PX4 Configuration](../peripherals/oneshot.md#px4-configuration)
|
||||
- [ESC Calibration](../advanced_config/esc_calibration.md)
|
||||
|
||||
### DShot
|
||||
|
||||
[DShot](../peripherals/dshot.md) is a digital ESC protocol that is highly recommended for vehicles that can benefit from reduce latency, in particular racing multicopters, VTOL vehicles, and so on.
|
||||
|
||||
It has reduced latency and is more robust than both [PWM](#pwm) and [OneShot](#oneshot-125).
|
||||
In addition it does not require ESC calibration, telemetry is available from some ESCs, and you can revers motor spin directions
|
||||
|
||||
PX4 configuration is done in the [Actuator Configuration](../config/actuators.md).
|
||||
Selecting a higher rate DShot ESC in the UI result in lower latency, but lower rates are more robust (and hence more suitable for large aircraft with longer leads); some ESCs only support lower rates (see datasheets for information).
|
||||
|
||||
Setup:
|
||||
|
||||
- [ESC Wiring](../peripherals/pwm_escs_and_servo.md) (same as for PWM ESCs)
|
||||
- [DShot](../peripherals/dshot.md) also contains information about how to send commands etc.
|
||||
|
||||
### DroneCAN
|
||||
|
||||
[DroneCAN ESCs](../dronecan/escs.md) are recommended when DroneCAN is the primary bus used for your vehicle.
|
||||
The PX4 implementation is currently limited to update rates of 200Hz.
|
||||
|
||||
DroneCAN shares many similar benefits to [Dshot](#dshot) including high data rates, robust connection over long leads, telemetry feedback, no need for calibration of the ESC itself.
|
||||
|
||||
[DroneCAN ESCs](../dronecan/escs.md) are connected via the DroneCAN bus (setup and configuration are covered at that link).
|
||||
|
||||
@@ -129,6 +129,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
|
||||
### uXRCE-DDS / ROS2
|
||||
|
||||
- [PX4-Autopilot#24113](https://github.com/PX4/PX4-Autopilot/pull/24113): <Badge type="warning" text="Experimental"/> [ROS 2 Message Translation Node](../ros2/px4_ros2_msg_translation_node.md) to translate PX4 messages from one definition version to another dynamically
|
||||
- <Badge type="warning" text="Experimental"/>[PX4 ROS 2 Interface Library](../ros2/px4_ros2_control_interface.md) support for [ROS-based waypoint missions](../ros2/px4_ros2_waypoint_missions.md).
|
||||
- dds_topics: add vtol_vehicle_status ([PX4-Autopilot#24582](https://github.com/PX4/PX4-Autopilot/pull/24582))
|
||||
- dds_topics: add home_position ([PX4-Autopilot#24583](https://github.com/PX4/PX4-Autopilot/pull/24583))
|
||||
|
||||
@@ -138,6 +139,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
|
||||
- Parameter to always start mavlink stream via USB. ([PX4-Autopilot#22234](https://github.com/PX4/PX4-Autopilot/pull/22234))
|
||||
- Refactor: MAVLink message handling in one function, reference instead of pointer to main instance ([PX4-Autopilo#23219](https://github.com/PX4/PX4-Autopilot/pull/22234))
|
||||
- mavlink log handler rewrite for improved effeciency ([PX4-Autopilo#23219](https://github.com/PX4/PX4-Autopilot/pull/22234))
|
||||
|
||||
### Multi-Rotor
|
||||
|
||||
- [Multirotor] add yaw torque low pass filter ([PX4-Autopilot#24173](https://github.com/PX4/PX4-Autopilot/pull/24173))
|
||||
|
||||