mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-10 16:00:04 +08:00
Compare commits
100 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0087ea1ee8 | |||
| 106276978d | |||
| 539b1def78 | |||
| 3c961de3fe | |||
| ce564b4448 | |||
| 4a4c15765c | |||
| 5395b3823a | |||
| c1938b8a32 | |||
| 8a8496d57e | |||
| 48525073aa | |||
| cf51a72846 | |||
| fef12c9038 | |||
| 8fbe4a4f7d | |||
| 50c2055efe | |||
| b0b6771118 | |||
| 4226b7d4ec | |||
| 04f4ca8966 | |||
| 54c1d121e4 | |||
| a5c67b90a9 | |||
| 4a0e257fc9 | |||
| bd76832f34 | |||
| 6e418096b7 | |||
| b0b99de767 | |||
| 55d35ddf37 | |||
| 207456fd35 | |||
| a4f9786c3d | |||
| 8fd3d3268a | |||
| af25a31861 | |||
| 77a3ab7aad | |||
| 51be1e3fb9 | |||
| 637cece115 | |||
| d965df930c | |||
| 845a7efd58 | |||
| 30cbf84fd8 | |||
| 76fbac4dee | |||
| 24833f41e5 | |||
| 8d352cd8e0 | |||
| e2708705a8 | |||
| 039ac8c4c1 | |||
| 4880bd5d8c | |||
| 8f870a1346 | |||
| 9048a40277 | |||
| 9fb0ff0e80 | |||
| 7297364484 | |||
| 9e796daee8 | |||
| 17242bc1a4 | |||
| 8a9be9a8f0 | |||
| b346fcfa00 | |||
| 1d852907a2 | |||
| dd177ac8cf | |||
| 68b533f79f | |||
| 7daac63809 | |||
| 2ef5b0a20f | |||
| 2e2067173a | |||
| 93f06f6a23 | |||
| ca0dec5a33 | |||
| 790c2d3369 | |||
| 8478503349 | |||
| 6a18fd045f | |||
| 06942bbfcc | |||
| 89c4980e55 | |||
| e756574420 | |||
| df00901bfa | |||
| 918efc8f97 | |||
| 8602849847 | |||
| d564c5b4c2 | |||
| 245ae58264 | |||
| 996060f581 | |||
| a120773793 | |||
| 6cf8d80bdd | |||
| b4601278db | |||
| 0d66981dcc | |||
| 62f5f5267e | |||
| fd7edaa4fe | |||
| b343eb6a11 | |||
| b8877c4cfc | |||
| 64e996b475 | |||
| 1d45f699be | |||
| be126454c0 | |||
| ce3e62841f | |||
| 657854ae1b | |||
| 5613313107 | |||
| eafb6c396b | |||
| 2ebfd40bba | |||
| 368dd362c5 | |||
| 7332f264f0 | |||
| 06d6c31614 | |||
| d9448f3e99 | |||
| 50a42680d7 | |||
| 70a84a0c1b | |||
| 05de941399 | |||
| adc9a6d35d | |||
| fe91ace0bb | |||
| 977777f40a | |||
| 4afdf38378 | |||
| d0004403a3 | |||
| 2e651117e8 | |||
| 18c176beef | |||
| 602add3ec1 | |||
| 47d5971f42 |
@@ -147,12 +147,10 @@ Checks: '*,
|
||||
-readability-avoid-nested-conditional-operator,
|
||||
-cppcoreguidelines-prefer-member-initializer,
|
||||
-cppcoreguidelines-explicit-virtual-functions,
|
||||
-cppcoreguidelines-virtual-class-destructor,
|
||||
-readability-convert-member-functions-to-static,
|
||||
-readability-make-member-function-const,
|
||||
-bugprone-assignment-in-if-condition,
|
||||
-bugprone-implicit-widening-of-multiplication-result,
|
||||
-bugprone-incorrect-roundings,
|
||||
-bugprone-macro-parentheses,
|
||||
-bugprone-multi-level-implicit-pointer-conversion,
|
||||
-bugprone-signed-char-misuse,
|
||||
@@ -167,13 +165,10 @@ Checks: '*,
|
||||
-readability-avoid-return-with-void-value,
|
||||
-readability-avoid-unconditional-preprocessor-if,
|
||||
-readability-delete-null-pointer,
|
||||
-readability-duplicate-include,
|
||||
-readability-redundant-casting,
|
||||
-readability-redundant-member-init,
|
||||
-readability-reference-to-constructed-temporary,
|
||||
-readability-simplify-boolean-expr,
|
||||
-bugprone-unsafe-functions,
|
||||
-cert-msc24-c,
|
||||
-cert-msc32-c,
|
||||
-cert-msc33-c,
|
||||
-cert-msc51-cpp,
|
||||
|
||||
@@ -21,8 +21,10 @@ applyTo: "docs/en/**"
|
||||
- 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`).
|
||||
Backticks are optional for hyperlinked CLI commands and tool names.
|
||||
- **Italics (Emphasis):** Use for application names (e.g., *QGroundControl*).
|
||||
Emphasis is optional for hyperlinked applications.
|
||||
- **Structure:** End every line at the end of a sentence (Semantic Line Breaks).
|
||||
|
||||
## Linking & Navigation
|
||||
|
||||
@@ -109,3 +109,9 @@
|
||||
[submodule "src/lib/rl_tools/rl_tools"]
|
||||
path = src/lib/rl_tools/rl_tools
|
||||
url = https://github.com/rl-tools/rl-tools.git
|
||||
[submodule "libmodal-json"]
|
||||
path = boards/modalai/voxl2/src/lib/mpa/libmodal-json
|
||||
url = https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-json.git
|
||||
[submodule "libmodal-pipe"]
|
||||
path = boards/modalai/voxl2/src/lib/mpa/libmodal-pipe
|
||||
url = https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe.git
|
||||
|
||||
@@ -42,23 +42,21 @@ param set-default FD_FAIL_R 0
|
||||
param set-default CA_ROTOR_COUNT 8
|
||||
param set-default CA_R_REV 255
|
||||
|
||||
param set-default CA_ROTOR0_AX -1
|
||||
param set-default CA_ROTOR0_AY 1
|
||||
param set-default CA_ROTOR0_AX 1
|
||||
param set-default CA_ROTOR0_AY -1
|
||||
param set-default CA_ROTOR0_AZ 0
|
||||
param set-default CA_ROTOR0_KM 0
|
||||
param set-default CA_ROTOR0_PX 0.14
|
||||
param set-default CA_ROTOR0_PY 0.10
|
||||
param set-default CA_ROTOR0_PZ 0.06
|
||||
#param set-default CA_ROTOR0_PZ 0.0
|
||||
|
||||
param set-default CA_ROTOR1_AX -1
|
||||
param set-default CA_ROTOR1_AY -1
|
||||
param set-default CA_ROTOR1_AX 1
|
||||
param set-default CA_ROTOR1_AY 1
|
||||
param set-default CA_ROTOR1_AZ 0
|
||||
param set-default CA_ROTOR1_KM 0
|
||||
param set-default CA_ROTOR1_PX 0.14
|
||||
param set-default CA_ROTOR1_PY -0.10
|
||||
param set-default CA_ROTOR1_PZ 0.06
|
||||
#param set-default CA_ROTOR1_PZ 0.0
|
||||
|
||||
param set-default CA_ROTOR2_AX 1
|
||||
param set-default CA_ROTOR2_AY 1
|
||||
@@ -67,7 +65,6 @@ param set-default CA_ROTOR2_KM 0
|
||||
param set-default CA_ROTOR2_PX -0.14
|
||||
param set-default CA_ROTOR2_PY 0.10
|
||||
param set-default CA_ROTOR2_PZ 0.06
|
||||
#param set-default CA_ROTOR2_PZ 0.0
|
||||
|
||||
param set-default CA_ROTOR3_AX 1
|
||||
param set-default CA_ROTOR3_AY -1
|
||||
@@ -79,7 +76,7 @@ param set-default CA_ROTOR3_PZ 0.06
|
||||
|
||||
param set-default CA_ROTOR4_AX 0
|
||||
param set-default CA_ROTOR4_AY 0
|
||||
param set-default CA_ROTOR4_AZ 1
|
||||
param set-default CA_ROTOR4_AZ -1
|
||||
param set-default CA_ROTOR4_KM 0
|
||||
param set-default CA_ROTOR4_PX 0.12
|
||||
param set-default CA_ROTOR4_PY 0.22
|
||||
@@ -103,7 +100,7 @@ param set-default CA_ROTOR6_PZ 0
|
||||
|
||||
param set-default CA_ROTOR7_AX 0
|
||||
param set-default CA_ROTOR7_AY 0
|
||||
param set-default CA_ROTOR7_AZ 1
|
||||
param set-default CA_ROTOR7_AZ -1
|
||||
param set-default CA_ROTOR7_KM 0
|
||||
param set-default CA_ROTOR7_PX -0.12
|
||||
param set-default CA_ROTOR7_PY -0.22
|
||||
|
||||
@@ -39,6 +39,8 @@ exec find boards msg src platforms test \
|
||||
-path src/lib/cdrstream/rosidl -prune -o \
|
||||
-path src/modules/zenoh/zenoh-pico -prune -o \
|
||||
-path boards/modalai/voxl2/libfc-sensor-api -prune -o \
|
||||
-path boards/modalai/voxl2/src/lib/mpa/libmodal-json -prune -o \
|
||||
-path boards/modalai/voxl2/src/lib/mpa/libmodal-pipe -prune -o \
|
||||
-path src/drivers/actuators/vertiq_io/iq-module-communication-cpp -prune -o \
|
||||
-path src/lib/tensorflow_lite_micro/tflite_micro -prune -o \
|
||||
-path src/drivers/ins/sbgecom/sbgECom -prune -o \
|
||||
|
||||
@@ -123,7 +123,7 @@ generate_parameters() {
|
||||
if [[ "$VERBOSE" == "true" ]]; then
|
||||
make parameters_metadata
|
||||
else
|
||||
make parameters_metadata >/dev/null 2>&1
|
||||
make parameters_metadata >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ generate_airframes() {
|
||||
if [[ "$VERBOSE" == "true" ]]; then
|
||||
make airframe_metadata
|
||||
else
|
||||
make airframe_metadata >/dev/null 2>&1
|
||||
make airframe_metadata >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ generate_modules() {
|
||||
if [[ "$VERBOSE" == "true" ]]; then
|
||||
make module_documentation
|
||||
else
|
||||
make module_documentation >/dev/null 2>&1
|
||||
make module_documentation >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ generate_msg_docs() {
|
||||
if [[ "$VERBOSE" == "true" ]]; then
|
||||
make msg_docs
|
||||
else
|
||||
make msg_docs >/dev/null 2>&1
|
||||
make msg_docs >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ generate_uorb_graphs() {
|
||||
if [[ "$VERBOSE" == "true" ]]; then
|
||||
make uorb_graphs
|
||||
else
|
||||
make uorb_graphs >/dev/null 2>&1
|
||||
make uorb_graphs >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ generate_failsafe_web() {
|
||||
if [[ "$VERBOSE" == "true" ]]; then
|
||||
make failsafe_web
|
||||
else
|
||||
make failsafe_web >/dev/null 2>&1
|
||||
make failsafe_web >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ pageClass: is-wide-page
|
||||
markdown += "--- | --- | --- |---\n"
|
||||
for name, command in self.commandConstants.items():
|
||||
description = f" {command.comment} " if enum.comment else " "
|
||||
markdown += f'<a href="#{name}"></a> {name} | `{command.type}` | {command.value} |{description}\n'
|
||||
markdown += f'<a id="#{name}"></a> {name} | `{command.type}` | {command.value} |{description}\n'
|
||||
"""
|
||||
for commandConstant in self.commandConstants.values():
|
||||
#print(commandConstant)
|
||||
@@ -529,7 +529,7 @@ pageClass: is-wide-page
|
||||
|
||||
for enumValueName, enumValue in enum.enumValues.items():
|
||||
description = f" {enumValue.comment} " if enumValue.comment else " "
|
||||
markdown += f'<a href="#{enumValueName}"></a> {enumValueName} | `{enumValue.type}` | {enumValue.value} |{description}\n'
|
||||
markdown += f'<a id="#{enumValueName}"></a> {enumValueName} | `{enumValue.type}` | {enumValue.value} |{description}\n'
|
||||
|
||||
# Generate table for constants docs
|
||||
if len(self.constantFields) > 0:
|
||||
@@ -538,7 +538,7 @@ pageClass: is-wide-page
|
||||
markdown += "--- | --- | --- |---\n"
|
||||
for name, enum in self.constantFields.items():
|
||||
description = f" {enum.comment} " if enum.comment else " "
|
||||
markdown += f'<a href="#{name}"></a> {name} | `{enum.type}` | {enum.value} |{description}\n'
|
||||
markdown += f'<a id="#{name}"></a> {name} | `{enum.type}` | {enum.value} |{description}\n'
|
||||
|
||||
|
||||
|
||||
@@ -635,8 +635,8 @@ pageClass: is-wide-page
|
||||
temp = fieldOrConstant.split("=")
|
||||
value = temp[-1]
|
||||
typeAndName = temp[0].split(" ")
|
||||
type = typeAndName[0]
|
||||
name = typeAndName[1]
|
||||
type = typeAndName[0].strip()
|
||||
name = typeAndName[1].strip()
|
||||
if name.startswith("VEHICLE_CMD_") and parentMessage.name == 'VehicleCommand': #it's a command.
|
||||
#print(f"DEBUG: startswith VEHICLE_CMD_ {name}")
|
||||
commandConstant = CommandConstant(name, type, value, comment, line_number, parentMessage)
|
||||
@@ -729,10 +729,10 @@ pageClass: is-wide-page
|
||||
|
||||
# Fix up topics if the topic is empty
|
||||
def camel_to_snake(name):
|
||||
# Match upper case not at start of string
|
||||
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
# Handle cases with multiple capital first letter
|
||||
return re.sub('([A-Z]+)([A-Z][a-z]*)', r'\1_\2', s1).lower()
|
||||
# Insert underscore between lowercase/digit and uppercase letter
|
||||
s1 = re.sub('([a-z0-9])([A-Z])', r'\1_\2', name)
|
||||
# Insert underscore between consecutive uppercase and uppercase+lowercase
|
||||
return re.sub('([A-Z]+)([A-Z][a-z])', r'\1_\2', s1).lower()
|
||||
|
||||
defaultTopic = camel_to_snake(self.name)
|
||||
if len(self.topics) == 0:
|
||||
@@ -745,7 +745,7 @@ pageClass: is-wide-page
|
||||
error = Error("topic_error", self.filename, "", f"WARNING: TOPIC {defaultTopic} unnecessarily declared for {self.name}")
|
||||
else:
|
||||
# Declared topic is not default topic
|
||||
error = Error("topic_error", self.filename, "", f"NOTE: TOPIC {self.topics[1]}: Only Declared topic is not default topic {defaultTopic} for {self.name}")
|
||||
error = Error("topic_error", self.filename, "", f"NOTE: TOPIC {self.topics[0]}: Only Declared topic is not default topic {defaultTopic} for {self.name}")
|
||||
if not "topic_error" in self.errors:
|
||||
self.errors["topic_error"] = []
|
||||
self.errors["topic_error"].append(error)
|
||||
@@ -944,9 +944,6 @@ if __name__ == "__main__":
|
||||
|
||||
for msg_file in msg_files:
|
||||
# Add messages to set of allowed types (compound types)
|
||||
#msg_type = msg_file.rsplit('/')[-1]
|
||||
#msg_type = msg_type.rsplit('\\')[-1]
|
||||
#msg_type = msg_type.rsplit('.')[0]
|
||||
msg_name = os.path.splitext(os.path.basename(msg_file))[0]
|
||||
msgTypes.add(msg_name)
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ python3 -m pip install --user -r ${DIR}/requirements.txt
|
||||
|
||||
# Optional, but recommended additional simulation tools:
|
||||
if [[ $INSTALL_SIM == "--sim-tools" ]]; then
|
||||
if brew ls --versions px4-sim > /dev/null; then
|
||||
if ! brew ls --versions px4-sim > /dev/null; then
|
||||
brew install px4-sim
|
||||
elif [[ $REINSTALL_FORMULAS == "--reinstall" ]]; then
|
||||
brew reinstall px4-sim
|
||||
|
||||
+1
-1
Submodule Tools/simulation/gz updated: fe3fe236e3...3eb05f716a
@@ -243,15 +243,6 @@
|
||||
*/
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 9
|
||||
|
||||
#define GPIO_FMU_CH1 /* PI0 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN0)
|
||||
#define GPIO_FMU_CH2 /* PH12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN12)
|
||||
#define GPIO_FMU_CH3 /* PH11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN11)
|
||||
#define GPIO_FMU_CH4 /* PH10 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN10)
|
||||
#define GPIO_FMU_CH5 /* PD13 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN13)
|
||||
#define GPIO_FMU_CH6 /* PD14 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN14)
|
||||
#define GPIO_FMU_CH7 /* PH6 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN6)
|
||||
#define GPIO_FMU_CH8 /* PH9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN9)
|
||||
|
||||
#define GPIO_FMU_CAP /* PE11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN11)
|
||||
#define GPIO_SPIX_SYNC /* PE9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN9)
|
||||
|
||||
@@ -465,14 +456,6 @@
|
||||
GPIO_SAFETY_SWITCH_IN, \
|
||||
GPIO_PG6, \
|
||||
GPIO_nARMED_INIT, \
|
||||
GPIO_FMU_CH1, \
|
||||
GPIO_FMU_CH2, \
|
||||
GPIO_FMU_CH3, \
|
||||
GPIO_FMU_CH4, \
|
||||
GPIO_FMU_CH5, \
|
||||
GPIO_FMU_CH6, \
|
||||
GPIO_FMU_CH7, \
|
||||
GPIO_FMU_CH8, \
|
||||
GPIO_FMU_CAP, \
|
||||
GPIO_SPIX_SYNC \
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE is not set
|
||||
CONFIG_BOARD_CONSTRAINED_FLASH=y
|
||||
CONFIG_BOARD_CONSTRAINED_MEMORY=y
|
||||
CONFIG_MODULES_UXRCE_DDS_CLIENT=n
|
||||
CONFIG_MODULES_ZENOH=y
|
||||
@@ -26,6 +26,8 @@ then
|
||||
fi
|
||||
|
||||
param set-default BAT1_V_DIV 21.0
|
||||
param set-default BAT1_V_FILT 0.075
|
||||
param set-default BAT1_I_FILT 0.5
|
||||
|
||||
param set-default RC_CRSF_PRT_CFG 300
|
||||
param set-default RC_SBUS_PRT_CFG 0
|
||||
|
||||
@@ -176,9 +176,6 @@
|
||||
|
||||
#define BOARD_BATTERY1_V_DIV (21.0f) // (20k + 1k) / 1k = 21
|
||||
|
||||
#define BOARD_BATTERY_ADC_VOLTAGE_FILTER_S 0.075f
|
||||
#define BOARD_BATTERY_ADC_CURRENT_FILTER_S 0.125f
|
||||
|
||||
#define ADC_SCALED_PAYLOAD_SENSE ADC_SCALED_12V_CHANNEL
|
||||
|
||||
/* HW has to large of R termination on ADC todo:change when HW value is chosen */
|
||||
@@ -226,16 +223,6 @@
|
||||
*/
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 9
|
||||
|
||||
#define GPIO_FMU_CH1 /* PI0 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN0)
|
||||
#define GPIO_FMU_CH2 /* PH12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN12)
|
||||
#define GPIO_FMU_CH3 /* PH11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN11)
|
||||
#define GPIO_FMU_CH4 /* PH10 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN10)
|
||||
#define GPIO_FMU_CH5 /* PI5 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN5)
|
||||
#define GPIO_FMU_CH6 /* PI6 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN6)
|
||||
#define GPIO_FMU_CH7 /* PI7 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN7)
|
||||
#define GPIO_FMU_CH8 /* PI2 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN2)
|
||||
#define GPIO_FMU_CH9 /* PD12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN12)
|
||||
|
||||
#define GPIO_SPIX_SYNC /* PE9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN9)
|
||||
|
||||
/* Power supply control and monitoring GPIOs */
|
||||
@@ -339,15 +326,6 @@
|
||||
GPIO_VDD_3V3_SD_CARD_EN, \
|
||||
GPIO_nARMED_INIT, \
|
||||
SPI6_nRESET_EXTERNAL1, \
|
||||
GPIO_FMU_CH1, \
|
||||
GPIO_FMU_CH2, \
|
||||
GPIO_FMU_CH3, \
|
||||
GPIO_FMU_CH4, \
|
||||
GPIO_FMU_CH5, \
|
||||
GPIO_FMU_CH6, \
|
||||
GPIO_FMU_CH7, \
|
||||
GPIO_FMU_CH8, \
|
||||
GPIO_FMU_CH9, \
|
||||
GPIO_SPIX_SYNC \
|
||||
}
|
||||
|
||||
|
||||
@@ -206,15 +206,6 @@
|
||||
*/
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 8
|
||||
|
||||
#define GPIO_FMU_CH1 /* PI0 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTI|GPIO_PIN0)
|
||||
#define GPIO_FMU_CH2 /* PH12 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN12)
|
||||
#define GPIO_FMU_CH3 /* PH11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN11)
|
||||
#define GPIO_FMU_CH4 /* PH10 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN10)
|
||||
#define GPIO_FMU_CH5 /* PD13 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN13)
|
||||
#define GPIO_FMU_CH6 /* PD14 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTD|GPIO_PIN14)
|
||||
#define GPIO_FMU_CH7 /* PH6 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN6)
|
||||
#define GPIO_FMU_CH8 /* PH9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTH|GPIO_PIN9)
|
||||
|
||||
#define GPIO_FMU_CAP /* PE11 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN11)
|
||||
#define GPIO_SPIX_SYNC /* PE9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTE|GPIO_PIN9)
|
||||
|
||||
@@ -341,14 +332,6 @@
|
||||
GPIO_NFC_GPIO, \
|
||||
GPIO_TONE_ALARM_IDLE, \
|
||||
GPIO_nARMED_INIT, \
|
||||
GPIO_FMU_CH1, \
|
||||
GPIO_FMU_CH2, \
|
||||
GPIO_FMU_CH3, \
|
||||
GPIO_FMU_CH4, \
|
||||
GPIO_FMU_CH5, \
|
||||
GPIO_FMU_CH6, \
|
||||
GPIO_FMU_CH7, \
|
||||
GPIO_FMU_CH8, \
|
||||
GPIO_FMU_CAP, \
|
||||
GPIO_SPIX_SYNC \
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_io_heater.h>
|
||||
|
||||
ModuleBase::Descriptor Core_Heater::desc{task_spawn, custom_command, print_usage};
|
||||
|
||||
# ifndef GPIO_CORE_HEATER_OUTPUT
|
||||
# error "To use the heater driver, the board_config.h must define and initialize GPIO_CORE_HEATER_OUTPUT"
|
||||
# endif
|
||||
@@ -62,7 +64,7 @@ Core_Heater::~Core_Heater()
|
||||
int Core_Heater::custom_command(int argc, char *argv[])
|
||||
{
|
||||
// Check if the driver is running.
|
||||
if (!is_running()) {
|
||||
if (!is_running(desc)) {
|
||||
PX4_INFO("not running");
|
||||
return PX4_ERROR;
|
||||
}
|
||||
@@ -117,7 +119,7 @@ bool Core_Heater::initialize_topics()
|
||||
void Core_Heater::Run()
|
||||
{
|
||||
if (should_exit()) {
|
||||
exit_and_cleanup();
|
||||
exit_and_cleanup(desc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -216,8 +218,8 @@ int Core_Heater::task_spawn(int argc, char *argv[])
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
_object.store(core_heater);
|
||||
_task_id = task_id_is_work_queue;
|
||||
desc.object.store(core_heater);
|
||||
desc.task_id = task_id_is_work_queue;
|
||||
|
||||
core_heater->start();
|
||||
return 0;
|
||||
@@ -257,5 +259,5 @@ Background process running periodically on the LP work queue to regulate IMU tem
|
||||
|
||||
extern "C" __EXPORT int core_heater_main(int argc, char *argv[])
|
||||
{
|
||||
return Core_Heater::main(argc, argv);
|
||||
return ModuleBase::main(Core_Heater::desc, argc, argv);
|
||||
}
|
||||
|
||||
@@ -56,9 +56,11 @@ using namespace time_literals;
|
||||
#define CONTROLLER_PERIOD_DEFAULT 10000
|
||||
#define TEMPERATURE_TARGET_THRESHOLD 2.5f
|
||||
|
||||
class Core_Heater : public ModuleBase<Core_Heater>, public ModuleParams, public px4::ScheduledWorkItem
|
||||
class Core_Heater : public ModuleBase, public ModuleParams, public px4::ScheduledWorkItem
|
||||
{
|
||||
public:
|
||||
static Descriptor desc;
|
||||
|
||||
Core_Heater();
|
||||
|
||||
virtual ~Core_Heater();
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
#include "NavioRGBLed.hpp"
|
||||
|
||||
ModuleBase::Descriptor NavioRGBLed::desc{task_spawn, custom_command, print_usage};
|
||||
|
||||
NavioRGBLed::NavioRGBLed() :
|
||||
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::lp_default)
|
||||
{
|
||||
@@ -130,8 +132,8 @@ int NavioRGBLed::task_spawn(int argc, char *argv[])
|
||||
NavioRGBLed *instance = new NavioRGBLed();
|
||||
|
||||
if (instance) {
|
||||
_object.store(instance);
|
||||
_task_id = task_id_is_work_queue;
|
||||
desc.object.store(instance);
|
||||
desc.task_id = task_id_is_work_queue;
|
||||
|
||||
if (instance->init() == PX4_OK) {
|
||||
return PX4_OK;
|
||||
@@ -142,8 +144,8 @@ int NavioRGBLed::task_spawn(int argc, char *argv[])
|
||||
}
|
||||
|
||||
delete instance;
|
||||
_object.store(nullptr);
|
||||
_task_id = -1;
|
||||
desc.object.store(nullptr);
|
||||
desc.task_id = -1;
|
||||
|
||||
return PX4_ERROR;
|
||||
}
|
||||
@@ -170,5 +172,5 @@ Emlid Navio2 RGB LED driver.
|
||||
|
||||
extern "C" __EXPORT int navio_rgbled_main(int argc, char *argv[])
|
||||
{
|
||||
return NavioRGBLed::main(argc, argv);
|
||||
return ModuleBase::main(NavioRGBLed::desc, argc, argv);
|
||||
}
|
||||
|
||||
@@ -40,9 +40,11 @@
|
||||
|
||||
#include <lib/led/led.h>
|
||||
|
||||
class NavioRGBLed : public ModuleBase<NavioRGBLed>, public px4::ScheduledWorkItem
|
||||
class NavioRGBLed : public ModuleBase, public px4::ScheduledWorkItem
|
||||
{
|
||||
public:
|
||||
static Descriptor desc;
|
||||
|
||||
NavioRGBLed();
|
||||
~NavioRGBLed() override;
|
||||
|
||||
|
||||
@@ -5,14 +5,19 @@ CONFIG_DRIVERS_BAROMETER_INVENSENSE_ICP101XX=y
|
||||
CONFIG_DRIVERS_BAROMETER_MS5611=y
|
||||
CONFIG_DRIVERS_BAROMETER_BMP280=y
|
||||
CONFIG_DRIVERS_BAROMETER_BMP388=y
|
||||
CONFIG_DRIVERS_BAROMETER_DPS310=y
|
||||
CONFIG_DRIVERS_DIFFERENTIAL_PRESSURE_MS4525DO=y
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L0X=y
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L1X=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_IMU_BOSCH_BMI270=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
CONFIG_DRIVERS_BAROMETER_DPS310=y
|
||||
CONFIG_DRIVERS_LIGHTS_RGBLED_NCP5623C=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8308=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_VOXLPM=y
|
||||
CONFIG_DRIVERS_QSHELL_QURT=y
|
||||
CONFIG_DRIVERS_RC_CRSF_RC=y
|
||||
@@ -26,6 +31,11 @@ CONFIG_MODULES_LOAD_MON=y
|
||||
CONFIG_MODULES_MANUAL_CONTROL=y
|
||||
CONFIG_MODULES_MC_ATT_CONTROL=y
|
||||
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_FW_POS_CONTROL=y
|
||||
CONFIG_MODULES_FW_ATT_CONTROL=y
|
||||
CONFIG_MODULES_FW_RATE_CONTROL=y
|
||||
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2022 ModalAI, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2026 ModalAI, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define BOARD_HAS_NO_RESET
|
||||
#define CONFIG_BOARDCTL_RESET
|
||||
#define BOARD_HAS_NO_BOOTLOADER
|
||||
/*
|
||||
* I2C buses
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
ModuleBase::Descriptor GhstRc::desc{task_spawn, custom_command, print_usage};
|
||||
|
||||
uint32_t GhstRc::baudrate = GHST_BAUDRATE;
|
||||
|
||||
GhstRc::GhstRc(const char *device) :
|
||||
@@ -114,8 +116,8 @@ int GhstRc::task_spawn(int argc, char *argv[])
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
_object.store(instance);
|
||||
_task_id = task_id_is_work_queue;
|
||||
desc.object.store(instance);
|
||||
desc.task_id = task_id_is_work_queue;
|
||||
|
||||
instance->ScheduleNow();
|
||||
|
||||
@@ -174,7 +176,7 @@ void GhstRc::Run()
|
||||
if (should_exit()) {
|
||||
ScheduleClear();
|
||||
_rc_fd = -1;
|
||||
exit_and_cleanup();
|
||||
exit_and_cleanup(desc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -308,5 +310,5 @@ This module parses the GHST RC uplink protocol and can generate GHST downlink te
|
||||
|
||||
extern "C" __EXPORT int ghst_rc_main(int argc, char *argv[])
|
||||
{
|
||||
return GhstRc::main(argc, argv);
|
||||
return ModuleBase::main(GhstRc::desc, argc, argv);
|
||||
}
|
||||
|
||||
@@ -54,9 +54,11 @@
|
||||
|
||||
#define GHST_MAX_NUM_CHANNELS (16)
|
||||
|
||||
class GhstRc : public ModuleBase<GhstRc>, public ModuleParams, public px4::ScheduledWorkItem
|
||||
class GhstRc : public ModuleBase, public ModuleParams, public px4::ScheduledWorkItem
|
||||
{
|
||||
public:
|
||||
static Descriptor desc;
|
||||
|
||||
GhstRc(const char *device);
|
||||
~GhstRc() override;
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
|
||||
#include "rc_controller.hpp"
|
||||
|
||||
ModuleBase::Descriptor RC_ControllerModule::desc{task_spawn, custom_command, print_usage};
|
||||
|
||||
int RC_ControllerModule::print_status()
|
||||
{
|
||||
PX4_INFO("Running");
|
||||
@@ -69,35 +71,35 @@ int RC_ControllerModule::print_status()
|
||||
|
||||
int RC_ControllerModule::custom_command(int argc, char *argv[])
|
||||
{
|
||||
if (!is_running()) {
|
||||
if (!is_running(desc)) {
|
||||
print_usage("not running");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[0], "throttle")) {
|
||||
uint16_t val = atoi(argv[1]);
|
||||
get_instance()->set_throttle(val);
|
||||
get_instance<RC_ControllerModule>(desc)->set_throttle(val);
|
||||
PX4_INFO("Setting throttle to %u", val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[0], "yaw")) {
|
||||
uint16_t val = atoi(argv[1]);
|
||||
get_instance()->set_yaw(val);
|
||||
get_instance<RC_ControllerModule>(desc)->set_yaw(val);
|
||||
PX4_INFO("Setting yaw to %u", val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[0], "pitch")) {
|
||||
uint16_t val = atoi(argv[1]);
|
||||
get_instance()->set_pitch(val);
|
||||
get_instance<RC_ControllerModule>(desc)->set_pitch(val);
|
||||
PX4_INFO("Setting pitch to %u", val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[0], "roll")) {
|
||||
uint16_t val = atoi(argv[1]);
|
||||
get_instance()->set_roll(val);
|
||||
get_instance<RC_ControllerModule>(desc)->set_roll(val);
|
||||
PX4_INFO("Setting roll to %u", val);
|
||||
return 0;
|
||||
}
|
||||
@@ -106,17 +108,24 @@ int RC_ControllerModule::custom_command(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
int RC_ControllerModule::run_trampoline(int argc, char *argv[])
|
||||
{
|
||||
return ModuleBase::run_trampoline_impl(desc, [](int ac, char *av[]) -> ModuleBase * {
|
||||
return RC_ControllerModule::instantiate(ac, av);
|
||||
}, argc, argv);
|
||||
}
|
||||
|
||||
int RC_ControllerModule::task_spawn(int argc, char *argv[])
|
||||
{
|
||||
_task_id = px4_task_spawn_cmd("RC_ControllerModule",
|
||||
SCHED_DEFAULT,
|
||||
SCHED_PRIORITY_MAX,
|
||||
1024,
|
||||
(px4_main_t)&run_trampoline,
|
||||
(char *const *)argv);
|
||||
desc.task_id = px4_task_spawn_cmd("RC_ControllerModule",
|
||||
SCHED_DEFAULT,
|
||||
SCHED_PRIORITY_MAX,
|
||||
1024,
|
||||
(px4_main_t)&run_trampoline,
|
||||
(char *const *)argv);
|
||||
|
||||
if (_task_id < 0) {
|
||||
_task_id = -1;
|
||||
if (desc.task_id < 0) {
|
||||
desc.task_id = -1;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
@@ -252,5 +261,5 @@ int RC_ControllerModule::print_usage(const char *reason)
|
||||
|
||||
int rc_controller_main(int argc, char *argv[])
|
||||
{
|
||||
return RC_ControllerModule::main(argc, argv);
|
||||
return ModuleBase::main(RC_ControllerModule::desc, argc, argv);
|
||||
}
|
||||
|
||||
@@ -41,9 +41,11 @@
|
||||
|
||||
extern "C" __EXPORT int rc_controller_main(int argc, char *argv[]);
|
||||
|
||||
class RC_ControllerModule : public ModuleBase<RC_ControllerModule>, public ModuleParams
|
||||
class RC_ControllerModule : public ModuleBase, public ModuleParams
|
||||
{
|
||||
public:
|
||||
static Descriptor desc;
|
||||
|
||||
RC_ControllerModule();
|
||||
|
||||
virtual ~RC_ControllerModule() = default;
|
||||
@@ -51,6 +53,9 @@ public:
|
||||
/** @see ModuleBase */
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int run_trampoline(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static RC_ControllerModule *instantiate(int argc, char *argv[]);
|
||||
|
||||
|
||||
@@ -36,5 +36,5 @@
|
||||
#include <drivers/drv_sensor.h>
|
||||
|
||||
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIBus(1, {initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P), }),
|
||||
initSPIBus(1, {initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P), initSPIDevice(DRV_IMU_DEVTYPE_BMI270), }),
|
||||
};
|
||||
|
||||
@@ -3,6 +3,8 @@ CONFIG_BOARD_LINUX_TARGET=y
|
||||
CONFIG_BOARD_TOOLCHAIN="aarch64-linux-gnu"
|
||||
CONFIG_BOARD_ROOT_PATH="/data/px4"
|
||||
CONFIG_DRIVERS_ACTUATORS_VOXL_ESC=y
|
||||
CONFIG_DRIVERS_BAROMETER_DPS310=y
|
||||
CONFIG_DRIVERS_BAROMETER_INVENSENSE_ICP101XX=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_OSD_MSP_OSD=y
|
||||
CONFIG_DRIVERS_QSHELL_POSIX=y
|
||||
@@ -25,5 +27,6 @@ CONFIG_SYSTEMCMDS_PERF=y
|
||||
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
|
||||
CONFIG_SYSTEMCMDS_UORB=y
|
||||
CONFIG_SYSTEMCMDS_VER=y
|
||||
CONFIG_SYSTEMCMDS_REBOOT=y
|
||||
CONFIG_ORB_COMMUNICATOR=y
|
||||
CONFIG_PARAM_PRIMARY=y
|
||||
|
||||
@@ -128,6 +128,11 @@ adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-flight_mode_manager"
|
||||
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-imu_server"
|
||||
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-apps_sbus"
|
||||
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-voxl_save_cal_params"
|
||||
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-vehicle_air_data_bridge"
|
||||
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-sensor_baro_bridge"
|
||||
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-dps310"
|
||||
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-icp101xx"
|
||||
adb shell "cd /usr/bin; /bin/ln -f -s px4 px4-vehicle_local_position_bridge"
|
||||
|
||||
# Make sure any required directories exist
|
||||
adb shell "/bin/mkdir -p /data/px4/param"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2022 ModalAI, Inc. All rights reserved.
|
||||
# Copyright (c) 2022-2026 ModalAI, Inc. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -39,11 +39,20 @@ set(DISABLE_PARAMS_MODULE_SCOPING TRUE PARENT_SCOPE)
|
||||
|
||||
add_library(drivers_board
|
||||
board_config.h
|
||||
i2c.cpp
|
||||
init.c
|
||||
boardctl.c
|
||||
spi.cpp
|
||||
)
|
||||
|
||||
# Add custom drivers
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/drivers/apps_sbus)
|
||||
|
||||
# Add custom libraries
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/lib/mpa)
|
||||
|
||||
# Add custom modules
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/modules/voxl_save_cal_params)
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/modules/vehicle_air_data_bridge)
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/modules/sensor_baro_bridge)
|
||||
add_subdirectory(${PX4_BOARD_DIR}/src/modules/vehicle_local_position_bridge)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2022 ModalAI, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2026 ModalAI, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -39,12 +39,24 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define BOARD_HAS_NO_RESET
|
||||
#define CONFIG_BOARDCTL_RESET
|
||||
#define BOARD_HAS_NO_BOOTLOADER
|
||||
|
||||
// Define this as empty since there are no I2C buses
|
||||
// Define this as empty since i2c clock init isn't required
|
||||
#define BOARD_I2C_BUS_CLOCK_INIT
|
||||
|
||||
/*
|
||||
* I2C buses
|
||||
*/
|
||||
#define CONFIG_I2C 1
|
||||
#define PX4_NUMBER_I2C_BUSES 1
|
||||
|
||||
/*
|
||||
* SPI buses
|
||||
*/
|
||||
#define CONFIG_SPI 1
|
||||
#define BOARD_SPI_BUS_MAX_BUS_ITEMS 1
|
||||
|
||||
#include <system_config.h>
|
||||
#include <px4_platform_common/board_common.h>
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2025-2026 ModalAI, Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "fc_sensor.h"
|
||||
|
||||
int boardctl(unsigned int cmd, uintptr_t arg)
|
||||
{
|
||||
fc_sensor_kill_slpi();
|
||||
sleep(2);
|
||||
exit(-1);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2025-2026 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_platform_common/i2c.h>
|
||||
#include <px4_arch/i2c_hw_description.h>
|
||||
#include <drivers/drv_sensor.h>
|
||||
|
||||
constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
initI2CBusExternal(0)
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2025-2026 ModalAI, Inc. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_git_submodule(TARGET git_mpa_libmodal-json PATH "libmodal-json")
|
||||
px4_add_git_submodule(TARGET git_mpa_libmodal-pipe PATH "libmodal-pipe")
|
||||
|
||||
px4_add_library(mpa mpa.cpp)
|
||||
|
||||
target_link_libraries(mpa PRIVATE ${CMAKE_DL_LIBS})
|
||||
|
||||
target_include_directories(mpa PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libmodal-json/library/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libmodal-pipe/library/include
|
||||
)
|
||||
+1
Submodule boards/modalai/voxl2/src/lib/mpa/libmodal-json added at a18d9eee62
+1
Submodule boards/modalai/voxl2/src/lib/mpa/libmodal-pipe added at be51027375
@@ -0,0 +1,262 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2025-2026 ModalAI, inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "mpa.hpp"
|
||||
#include <dlfcn.h>
|
||||
#include <px4_log.h>
|
||||
#include <string.h>
|
||||
|
||||
bool MPA::initialized = false;
|
||||
void *MPA::handle = nullptr;
|
||||
int MPA::current_client = 0;
|
||||
int MPA::current_server = 0;
|
||||
|
||||
MPA::pipe_client_set_simple_helper_cb_t MPA::helper_cb = nullptr;
|
||||
MPA::pipe_client_set_connect_cb_t MPA::connect_cb = nullptr;
|
||||
MPA::pipe_client_set_disconnect_cb_t MPA::disconnect_cb = nullptr;
|
||||
MPA::pipe_client_open_t MPA::open_pipe = nullptr;
|
||||
MPA::pipe_server_create_t MPA::create_pipe = nullptr;
|
||||
MPA::pipe_server_write_t MPA::write_pipe = nullptr;
|
||||
MPA::pipe_server_set_control_cb_t MPA::set_control_cb = nullptr;
|
||||
MPA::pipe_server_close_t MPA::close_pipe = nullptr;
|
||||
MPA::mpa_data_cb_t MPA::data_cb[MAX_MPA_CLIENTS];
|
||||
|
||||
// called whenever we connect or reconnect to the server
|
||||
void MPA::ConnectCB(__attribute__((unused)) int ch, __attribute__((unused)) void *context)
|
||||
{
|
||||
PX4_INFO("vfc status server connected");
|
||||
return;
|
||||
}
|
||||
|
||||
// called whenever we disconnect from the server
|
||||
void MPA::DisconnectCB(__attribute__((unused)) int ch, __attribute__((unused)) void *context)
|
||||
{
|
||||
PX4_INFO("vfc status server disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
void MPA::HelperCB(__attribute__((unused)) int ch, char *data, int bytes, __attribute__((unused)) void *context)
|
||||
{
|
||||
// PX4_INFO("Got %d bytes in pipe callback", bytes);
|
||||
|
||||
if (data_cb[ch]) { data_cb[ch](data, bytes); }
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int MPA::PipeClient(const char *pipe_name, int size, mpa_data_cb_t cb)
|
||||
{
|
||||
if (!initialized) {
|
||||
PX4_ERR("Cannot open pipe %s before initialization", pipe_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("waiting for server for pipe %s\n", pipe_name);
|
||||
|
||||
if (open_pipe(current_client, pipe_name, "px4", EN_PIPE_CLIENT_SIMPLE_HELPER, size * 10) < 0) {
|
||||
PX4_ERR("Error opening pipe %s", pipe_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
data_cb[current_client] = cb;
|
||||
current_client++;
|
||||
|
||||
return current_client - 1;
|
||||
}
|
||||
|
||||
int MPA::PipeCreate(char *pipe_name, int flags)
|
||||
{
|
||||
if (!initialized) {
|
||||
PX4_ERR("Cannot open pipe %s before initialization", pipe_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
pipe_info_t server_pipe;
|
||||
strncpy(server_pipe.name, pipe_name, MODAL_PIPE_MAX_NAME_LEN);
|
||||
server_pipe.name[MODAL_PIPE_MAX_NAME_LEN - 1] = 0;
|
||||
server_pipe.location[0] = 0;
|
||||
server_pipe.type[0] = 0;
|
||||
strncpy(server_pipe.server_name, "px4_mpa", MODAL_PIPE_MAX_NAME_LEN);
|
||||
server_pipe.size_bytes = MODAL_PIPE_DEFAULT_PIPE_SIZE;
|
||||
server_pipe.server_pid = 0;
|
||||
|
||||
if (create_pipe(current_server, server_pipe, flags) < 0) {
|
||||
// remove_pid_file(server_pipe.server_name);
|
||||
PX4_ERR("Error opening pipe %s", pipe_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
current_server++;
|
||||
|
||||
return current_server - 1;
|
||||
}
|
||||
|
||||
int MPA::PipeWrite(int ch, const void *data, int bytes)
|
||||
{
|
||||
return write_pipe(ch, data, bytes);
|
||||
}
|
||||
|
||||
int MPA::PipeServerSetControlCb(int ch, mpa_control_cb_t cb, void *context)
|
||||
{
|
||||
return set_control_cb(ch, cb, context);
|
||||
}
|
||||
|
||||
void MPA::PipeServerClose(int ch)
|
||||
{
|
||||
if (close_pipe) {
|
||||
close_pipe(ch);
|
||||
}
|
||||
}
|
||||
|
||||
int MPA::Initialize()
|
||||
{
|
||||
if (initialized) {
|
||||
// Already successfully initialized
|
||||
return 0;
|
||||
}
|
||||
|
||||
char libname[] = "libmodal_pipe.so";
|
||||
handle = dlopen(libname, RTLD_LAZY | RTLD_GLOBAL);
|
||||
|
||||
if (!handle) {
|
||||
PX4_ERR("Error opening library %s: %s\n", libname, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_INFO("Successfully loaded library %s", libname);
|
||||
}
|
||||
|
||||
// set up all our MPA callbacks
|
||||
char helper_cb_name[] = "pipe_client_set_simple_helper_cb";
|
||||
helper_cb = (pipe_client_set_simple_helper_cb_t) dlsym(handle, helper_cb_name);
|
||||
|
||||
if (!helper_cb) {
|
||||
PX4_ERR("Error finding symbol %s: %s\n", helper_cb_name, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("Successfully loaded function %s", helper_cb_name);
|
||||
}
|
||||
|
||||
helper_cb(0, HelperCB, NULL);
|
||||
|
||||
char connect_cb_name[] = "pipe_client_set_connect_cb";
|
||||
connect_cb = (pipe_client_set_connect_cb_t) dlsym(handle, connect_cb_name);
|
||||
|
||||
if (!connect_cb) {
|
||||
PX4_ERR("Error finding symbol %s: %s", connect_cb_name, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("Successfully loaded function %s", connect_cb_name);
|
||||
}
|
||||
|
||||
connect_cb(0, ConnectCB, NULL);
|
||||
|
||||
char disconnect_cb_name[] = "pipe_client_set_disconnect_cb";
|
||||
disconnect_cb = (pipe_client_set_disconnect_cb_t) dlsym(handle, disconnect_cb_name);
|
||||
|
||||
if (!disconnect_cb) {
|
||||
PX4_ERR("Error finding symbol %s: %s", disconnect_cb_name, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("Successfully loaded function %s", disconnect_cb_name);
|
||||
}
|
||||
|
||||
disconnect_cb(0, DisconnectCB, NULL);
|
||||
|
||||
// request a new pipe from the server
|
||||
char open_pipe_name[] = "pipe_client_open";
|
||||
open_pipe = (pipe_client_open_t) dlsym(handle, open_pipe_name);
|
||||
|
||||
if (!open_pipe) {
|
||||
PX4_ERR("Error finding symbol %s: %s", open_pipe_name, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("Successfully loaded function %s", open_pipe_name);
|
||||
}
|
||||
|
||||
// Create a new server pipe
|
||||
char create_pipe_name[] = "pipe_server_create";
|
||||
create_pipe = (pipe_server_create_t) dlsym(handle, create_pipe_name);
|
||||
|
||||
if (!create_pipe) {
|
||||
PX4_ERR("Error finding symbol %s: %s", create_pipe_name, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("Successfully loaded function %s", create_pipe_name);
|
||||
}
|
||||
|
||||
// Write to a server pipe
|
||||
char write_pipe_name[] = "pipe_server_write";
|
||||
write_pipe = (pipe_server_write_t) dlsym(handle, write_pipe_name);
|
||||
|
||||
if (!write_pipe) {
|
||||
PX4_ERR("Error finding symbol %s: %s", write_pipe_name, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("Successfully loaded function %s", write_pipe_name);
|
||||
}
|
||||
|
||||
// Set control callback for server pipe
|
||||
char set_control_cb_name[] = "pipe_server_set_control_cb";
|
||||
set_control_cb = (pipe_server_set_control_cb_t) dlsym(handle, set_control_cb_name);
|
||||
|
||||
if (!set_control_cb) {
|
||||
PX4_ERR("Error finding symbol %s: %s", set_control_cb_name, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("Successfully loaded function %s", set_control_cb_name);
|
||||
}
|
||||
|
||||
// Close server pipe
|
||||
char close_pipe_name[] = "pipe_server_close";
|
||||
close_pipe = (pipe_server_close_t) dlsym(handle, close_pipe_name);
|
||||
|
||||
if (!close_pipe) {
|
||||
PX4_ERR("Error finding symbol %s: %s", close_pipe_name, dlerror());
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("Successfully loaded function %s", close_pipe_name);
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2025-2026 ModalAI, inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include <modal_pipe.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
class MPA
|
||||
{
|
||||
public:
|
||||
static int Initialize();
|
||||
|
||||
typedef void (*mpa_data_cb_t)(char *data, int bytes);
|
||||
typedef void (*mpa_control_cb_t)(int ch, char *data, int bytes, void *context);
|
||||
|
||||
static int PipeClient(const char *pipe_name, int size, mpa_data_cb_t cb);
|
||||
|
||||
static int PipeCreate(char *pipe_name, int flags = 0);
|
||||
static int PipeWrite(int ch, const void *data, int bytes);
|
||||
static int PipeServerSetControlCb(int ch, mpa_control_cb_t cb, void *context);
|
||||
static void PipeServerClose(int ch);
|
||||
|
||||
private:
|
||||
static void HelperCB(__attribute__((unused)) int ch, char *data, int bytes, __attribute__((unused)) void *context);
|
||||
static void DisconnectCB(__attribute__((unused)) int ch, __attribute__((unused)) void *context);
|
||||
static void ConnectCB(__attribute__((unused)) int ch, __attribute__((unused)) void *context);
|
||||
|
||||
typedef int (*pipe_client_set_simple_helper_cb_t)(int ch, client_simple_cb *cb, void *context);
|
||||
typedef int (*pipe_client_set_connect_cb_t)(int ch, client_connect_cb *cb, void *context);
|
||||
typedef int (*pipe_client_set_disconnect_cb_t)(int ch, client_disc_cb *cb, void *context);
|
||||
typedef int (*pipe_client_open_t)(int ch, const char *name_or_location, const char *client_name, int flags, int buf_len);
|
||||
typedef int (*pipe_server_create_t)(int ch, pipe_info_t info, int flags);
|
||||
typedef int (*pipe_server_write_t)(int ch, const void *data, int bytes);
|
||||
typedef int (*pipe_server_set_control_cb_t)(int ch, server_control_cb *cb, void *context);
|
||||
typedef void (*pipe_server_close_t)(int ch);
|
||||
|
||||
static pipe_client_set_simple_helper_cb_t helper_cb;
|
||||
static pipe_client_set_connect_cb_t connect_cb;
|
||||
static pipe_client_set_disconnect_cb_t disconnect_cb;
|
||||
static pipe_client_open_t open_pipe;
|
||||
static pipe_server_create_t create_pipe;
|
||||
static pipe_server_write_t write_pipe;
|
||||
static pipe_server_set_control_cb_t set_control_cb;
|
||||
static pipe_server_close_t close_pipe;
|
||||
|
||||
static bool initialized;
|
||||
static void *handle;
|
||||
|
||||
static int current_client;
|
||||
static int current_server;
|
||||
|
||||
static const int MAX_MPA_CLIENTS{8};
|
||||
static mpa_data_cb_t data_cb[MAX_MPA_CLIENTS];
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2025-2026 ModalAI, Inc. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__sensor_baro_bridge
|
||||
MAIN sensor_baro_bridge
|
||||
INCLUDES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/mpa
|
||||
SRCS
|
||||
sensor_baro_bridge.cpp
|
||||
DEPENDS
|
||||
mpa
|
||||
)
|
||||
@@ -0,0 +1,183 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2025-2026 ModalAI, inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "mpa.hpp"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <px4_log.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <px4_platform_common/module.h>
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/SubscriptionCallback.hpp>
|
||||
#include <uORB/topics/sensor_baro.h>
|
||||
|
||||
class SensorBaroBridge : public ModuleBase, public px4::WorkItem
|
||||
{
|
||||
public:
|
||||
static Descriptor desc;
|
||||
|
||||
SensorBaroBridge();
|
||||
~SensorBaroBridge() override = default;
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int custom_command(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
bool init();
|
||||
|
||||
private:
|
||||
void Run() override;
|
||||
|
||||
uORB::SubscriptionCallbackWorkItem _sensor_baro_sub{this, ORB_ID(sensor_baro)};
|
||||
|
||||
sensor_baro_s _sensor_baro{};
|
||||
|
||||
int baro_pipe_ch{0};
|
||||
|
||||
};
|
||||
|
||||
ModuleBase::Descriptor SensorBaroBridge::desc{task_spawn, custom_command, print_usage};
|
||||
|
||||
SensorBaroBridge::SensorBaroBridge() :
|
||||
WorkItem(MODULE_NAME, px4::wq_configurations::nav_and_controllers)
|
||||
{
|
||||
}
|
||||
|
||||
bool SensorBaroBridge::init()
|
||||
{
|
||||
if (MPA::Initialize() == -1) {
|
||||
PX4_ERR("MPA init failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
char baro_pipe_name[] = "px4_sensor_baro";
|
||||
baro_pipe_ch = MPA::PipeCreate(baro_pipe_name);
|
||||
|
||||
if (baro_pipe_ch == -1) {
|
||||
PX4_ERR("Pipe create failed for %s", baro_pipe_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_sensor_baro_sub.registerCallback()) {
|
||||
PX4_ERR("callback registration failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SensorBaroBridge::Run()
|
||||
{
|
||||
if (should_exit()) {
|
||||
_sensor_baro_sub.unregisterCallback();
|
||||
exit_and_cleanup(desc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_sensor_baro_sub.updated()) {
|
||||
if (_sensor_baro_sub.update(&_sensor_baro)) {
|
||||
baro_data_t baro;
|
||||
memset(&baro, 0, sizeof(baro));
|
||||
|
||||
baro.magic_number = BARO_MAGIC_NUMBER;
|
||||
baro.pressure_pa = _sensor_baro.pressure;
|
||||
baro.temp_c = _sensor_baro.temperature;
|
||||
baro.alt_amsl_m = 0.0f; // sensor_baro does not include altitude
|
||||
baro.timestamp_ns = _sensor_baro.timestamp * 1000; // Convert µs to ns
|
||||
baro.reserved_1 = 0;
|
||||
baro.reserved_2 = 0;
|
||||
|
||||
if (MPA::PipeWrite(baro_pipe_ch, (void *)&baro, sizeof(baro_data_t)) == -1) {
|
||||
PX4_ERR("Pipe %d write failed!", baro_pipe_ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int SensorBaroBridge::custom_command(int argc, char *argv[])
|
||||
{
|
||||
return print_usage("unknown command");
|
||||
}
|
||||
|
||||
int SensorBaroBridge::task_spawn(int argc, char *argv[])
|
||||
{
|
||||
SensorBaroBridge *instance = new SensorBaroBridge();
|
||||
|
||||
if (instance) {
|
||||
desc.object.store(instance);
|
||||
desc.task_id = task_id_is_work_queue;
|
||||
|
||||
if (instance->init()) {
|
||||
return PX4_OK;
|
||||
}
|
||||
|
||||
} else {
|
||||
PX4_ERR("alloc failed");
|
||||
}
|
||||
|
||||
delete instance;
|
||||
desc.object.store(nullptr);
|
||||
desc.task_id = -1;
|
||||
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
int SensorBaroBridge::print_usage(const char *reason)
|
||||
{
|
||||
if (reason) {
|
||||
PX4_WARN("%s\n", reason);
|
||||
}
|
||||
|
||||
PRINT_MODULE_DESCRIPTION(
|
||||
R"DESCR_STR(
|
||||
### Description
|
||||
Sensor baro bridge
|
||||
|
||||
)DESCR_STR");
|
||||
|
||||
PRINT_MODULE_USAGE_NAME("sensor_baro_bridge", "system");
|
||||
PRINT_MODULE_USAGE_COMMAND("start");
|
||||
PRINT_MODULE_USAGE_DEFAULT_COMMANDS();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" __EXPORT int sensor_baro_bridge_main(int argc, char *argv[])
|
||||
{
|
||||
return ModuleBase::main(SensorBaroBridge::desc, argc, argv);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2025-2026 ModalAI, Inc. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__vehicle_air_data_bridge
|
||||
MAIN vehicle_air_data_bridge
|
||||
INCLUDES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/mpa
|
||||
SRCS
|
||||
vehicle_air_data_bridge.cpp
|
||||
DEPENDS
|
||||
mpa
|
||||
)
|
||||
@@ -0,0 +1,183 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2025-2026 ModalAI, inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "mpa.hpp"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <px4_log.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <px4_platform_common/module.h>
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/SubscriptionCallback.hpp>
|
||||
#include <uORB/topics/vehicle_air_data.h>
|
||||
|
||||
class VehicleAirDataBridge : public ModuleBase, public px4::WorkItem
|
||||
{
|
||||
public:
|
||||
static Descriptor desc;
|
||||
|
||||
VehicleAirDataBridge();
|
||||
~VehicleAirDataBridge() override = default;
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int custom_command(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
bool init();
|
||||
|
||||
private:
|
||||
void Run() override;
|
||||
|
||||
uORB::SubscriptionCallbackWorkItem _vehicle_air_data_sub{this, ORB_ID(vehicle_air_data)};
|
||||
|
||||
vehicle_air_data_s _vehicle_air_data{};
|
||||
|
||||
int baro_pipe_ch{0};
|
||||
|
||||
};
|
||||
|
||||
ModuleBase::Descriptor VehicleAirDataBridge::desc{task_spawn, custom_command, print_usage};
|
||||
|
||||
VehicleAirDataBridge::VehicleAirDataBridge() :
|
||||
WorkItem(MODULE_NAME, px4::wq_configurations::nav_and_controllers)
|
||||
{
|
||||
}
|
||||
|
||||
bool VehicleAirDataBridge::init()
|
||||
{
|
||||
if (MPA::Initialize() == -1) {
|
||||
PX4_ERR("MPA init failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
char baro_pipe_name[] = "px4_vehicle_air_data";
|
||||
baro_pipe_ch = MPA::PipeCreate(baro_pipe_name);
|
||||
|
||||
if (baro_pipe_ch == -1) {
|
||||
PX4_ERR("Pipe create failed for %s", baro_pipe_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_vehicle_air_data_sub.registerCallback()) {
|
||||
PX4_ERR("callback registration failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void VehicleAirDataBridge::Run()
|
||||
{
|
||||
if (should_exit()) {
|
||||
_vehicle_air_data_sub.unregisterCallback();
|
||||
exit_and_cleanup(desc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_vehicle_air_data_sub.updated()) {
|
||||
if (_vehicle_air_data_sub.update(&_vehicle_air_data)) {
|
||||
baro_data_t baro;
|
||||
memset(&baro, 0, sizeof(baro));
|
||||
|
||||
baro.magic_number = BARO_MAGIC_NUMBER;
|
||||
baro.pressure_pa = _vehicle_air_data.baro_pressure_pa;
|
||||
baro.temp_c = _vehicle_air_data.ambient_temperature;
|
||||
baro.alt_amsl_m = _vehicle_air_data.baro_alt_meter;
|
||||
baro.timestamp_ns = _vehicle_air_data.timestamp * 1000; // Convert µs to ns
|
||||
baro.reserved_1 = 0;
|
||||
baro.reserved_2 = 0;
|
||||
|
||||
if (MPA::PipeWrite(baro_pipe_ch, (void *)&baro, sizeof(baro_data_t)) == -1) {
|
||||
PX4_ERR("Pipe %d write failed!", baro_pipe_ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int VehicleAirDataBridge::custom_command(int argc, char *argv[])
|
||||
{
|
||||
return print_usage("unknown command");
|
||||
}
|
||||
|
||||
int VehicleAirDataBridge::task_spawn(int argc, char *argv[])
|
||||
{
|
||||
VehicleAirDataBridge *instance = new VehicleAirDataBridge();
|
||||
|
||||
if (instance) {
|
||||
desc.object.store(instance);
|
||||
desc.task_id = task_id_is_work_queue;
|
||||
|
||||
if (instance->init()) {
|
||||
return PX4_OK;
|
||||
}
|
||||
|
||||
} else {
|
||||
PX4_ERR("alloc failed");
|
||||
}
|
||||
|
||||
delete instance;
|
||||
desc.object.store(nullptr);
|
||||
desc.task_id = -1;
|
||||
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
int VehicleAirDataBridge::print_usage(const char *reason)
|
||||
{
|
||||
if (reason) {
|
||||
PX4_WARN("%s\n", reason);
|
||||
}
|
||||
|
||||
PRINT_MODULE_DESCRIPTION(
|
||||
R"DESCR_STR(
|
||||
### Description
|
||||
Vehicle air data bridge
|
||||
|
||||
)DESCR_STR");
|
||||
|
||||
PRINT_MODULE_USAGE_NAME("vehicle_air_data_bridge", "system");
|
||||
PRINT_MODULE_USAGE_COMMAND("start");
|
||||
PRINT_MODULE_USAGE_DEFAULT_COMMANDS();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" __EXPORT int vehicle_air_data_bridge_main(int argc, char *argv[])
|
||||
{
|
||||
return ModuleBase::main(VehicleAirDataBridge::desc, argc, argv);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2025-2026 ModalAI, Inc. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__vehicle_local_position_bridge
|
||||
MAIN vehicle_local_position_bridge
|
||||
INCLUDES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/mpa
|
||||
SRCS
|
||||
vehicle_local_position_bridge.cpp
|
||||
DEPENDS
|
||||
mpa
|
||||
)
|
||||
+238
@@ -0,0 +1,238 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2025-2026 ModalAI, inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "mpa.hpp"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <px4_log.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <px4_platform_common/module.h>
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/SubscriptionCallback.hpp>
|
||||
#include <uORB/topics/vehicle_local_position.h>
|
||||
|
||||
class VehicleLocalPositionBridge : public ModuleBase, public px4::WorkItem
|
||||
{
|
||||
public:
|
||||
static Descriptor desc;
|
||||
|
||||
VehicleLocalPositionBridge();
|
||||
~VehicleLocalPositionBridge() override = default;
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int custom_command(int argc, char *argv[]);
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int print_usage(const char *reason = nullptr);
|
||||
|
||||
bool init();
|
||||
|
||||
private:
|
||||
void Run() override;
|
||||
|
||||
uORB::SubscriptionCallbackWorkItem _vehicle_local_position_sub{this, ORB_ID(vehicle_local_position)};
|
||||
|
||||
vehicle_local_position_s _vehicle_local_position{};
|
||||
|
||||
int _pipe_ch{0};
|
||||
|
||||
};
|
||||
|
||||
ModuleBase::Descriptor VehicleLocalPositionBridge::desc{task_spawn, custom_command, print_usage};
|
||||
|
||||
VehicleLocalPositionBridge::VehicleLocalPositionBridge() :
|
||||
WorkItem(MODULE_NAME, px4::wq_configurations::nav_and_controllers)
|
||||
{
|
||||
}
|
||||
|
||||
bool VehicleLocalPositionBridge::init()
|
||||
{
|
||||
if (MPA::Initialize() == -1) {
|
||||
PX4_ERR("MPA init failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
char pipe_name[] = "px4_vehicle_local_position";
|
||||
_pipe_ch = MPA::PipeCreate(pipe_name);
|
||||
|
||||
if (_pipe_ch == -1) {
|
||||
PX4_ERR("Pipe create failed for %s", pipe_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_vehicle_local_position_sub.registerCallback()) {
|
||||
PX4_ERR("callback registration failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void VehicleLocalPositionBridge::Run()
|
||||
{
|
||||
if (should_exit()) {
|
||||
_vehicle_local_position_sub.unregisterCallback();
|
||||
exit_and_cleanup(desc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_vehicle_local_position_sub.updated()) {
|
||||
if (_vehicle_local_position_sub.update(&_vehicle_local_position)) {
|
||||
// Only publish if we have valid position data
|
||||
if (!_vehicle_local_position.xy_valid && !_vehicle_local_position.z_valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
pose_vel_6dof_t pose;
|
||||
|
||||
pose.magic_number = POSE_VEL_6DOF_MAGIC_NUMBER;
|
||||
pose.timestamp_ns = _vehicle_local_position.timestamp * 1000; // Convert µs to ns
|
||||
|
||||
// Position (NED frame)
|
||||
if (_vehicle_local_position.xy_valid) {
|
||||
pose.T_child_wrt_parent[0] = _vehicle_local_position.x;
|
||||
pose.T_child_wrt_parent[1] = _vehicle_local_position.y;
|
||||
|
||||
} else {
|
||||
pose.T_child_wrt_parent[0] = NAN;
|
||||
pose.T_child_wrt_parent[1] = NAN;
|
||||
}
|
||||
|
||||
if (_vehicle_local_position.z_valid) {
|
||||
pose.T_child_wrt_parent[2] = _vehicle_local_position.z;
|
||||
|
||||
} else {
|
||||
pose.T_child_wrt_parent[2] = NAN;
|
||||
}
|
||||
|
||||
// Rotation matrix from heading (yaw rotation around Z axis)
|
||||
// R_z(heading) = [cos(h) -sin(h) 0]
|
||||
// [sin(h) cos(h) 0]
|
||||
// [0 0 1]
|
||||
float cos_h = cosf(_vehicle_local_position.heading);
|
||||
float sin_h = sinf(_vehicle_local_position.heading);
|
||||
pose.R_child_to_parent[0][0] = cos_h;
|
||||
pose.R_child_to_parent[0][1] = -sin_h;
|
||||
pose.R_child_to_parent[0][2] = 0.0f;
|
||||
pose.R_child_to_parent[1][0] = sin_h;
|
||||
pose.R_child_to_parent[1][1] = cos_h;
|
||||
pose.R_child_to_parent[1][2] = 0.0f;
|
||||
pose.R_child_to_parent[2][0] = 0.0f;
|
||||
pose.R_child_to_parent[2][1] = 0.0f;
|
||||
pose.R_child_to_parent[2][2] = 1.0f;
|
||||
|
||||
// Velocity (NED frame)
|
||||
if (_vehicle_local_position.v_xy_valid) {
|
||||
pose.v_child_wrt_parent[0] = _vehicle_local_position.vx;
|
||||
pose.v_child_wrt_parent[1] = _vehicle_local_position.vy;
|
||||
|
||||
} else {
|
||||
pose.v_child_wrt_parent[0] = NAN;
|
||||
pose.v_child_wrt_parent[1] = NAN;
|
||||
}
|
||||
|
||||
if (_vehicle_local_position.v_z_valid) {
|
||||
pose.v_child_wrt_parent[2] = _vehicle_local_position.vz;
|
||||
|
||||
} else {
|
||||
pose.v_child_wrt_parent[2] = NAN;
|
||||
}
|
||||
|
||||
// Angular velocity not available in vehicle_local_position
|
||||
pose.w_child_wrt_child[0] = NAN;
|
||||
pose.w_child_wrt_child[1] = NAN;
|
||||
pose.w_child_wrt_child[2] = NAN;
|
||||
|
||||
if (MPA::PipeWrite(_pipe_ch, (void *)&pose, sizeof(pose_vel_6dof_t)) == -1) {
|
||||
PX4_ERR("Pipe %d write failed!", _pipe_ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int VehicleLocalPositionBridge::custom_command(int argc, char *argv[])
|
||||
{
|
||||
return print_usage("unknown command");
|
||||
}
|
||||
|
||||
int VehicleLocalPositionBridge::task_spawn(int argc, char *argv[])
|
||||
{
|
||||
VehicleLocalPositionBridge *instance = new VehicleLocalPositionBridge();
|
||||
|
||||
if (instance) {
|
||||
desc.object.store(instance);
|
||||
desc.task_id = task_id_is_work_queue;
|
||||
|
||||
if (instance->init()) {
|
||||
return PX4_OK;
|
||||
}
|
||||
|
||||
} else {
|
||||
PX4_ERR("alloc failed");
|
||||
}
|
||||
|
||||
delete instance;
|
||||
desc.object.store(nullptr);
|
||||
desc.task_id = -1;
|
||||
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
int VehicleLocalPositionBridge::print_usage(const char *reason)
|
||||
{
|
||||
if (reason) {
|
||||
PX4_WARN("%s\n", reason);
|
||||
}
|
||||
|
||||
PRINT_MODULE_DESCRIPTION(
|
||||
R"DESCR_STR(
|
||||
### Description
|
||||
Vehicle local position bridge - publishes vehicle_local_position to MPA pipe as pose_vel_6dof_t
|
||||
|
||||
)DESCR_STR");
|
||||
|
||||
PRINT_MODULE_USAGE_NAME("vehicle_local_position_bridge", "system");
|
||||
PRINT_MODULE_USAGE_COMMAND("start");
|
||||
PRINT_MODULE_USAGE_DEFAULT_COMMANDS();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" __EXPORT int vehicle_local_position_bridge_main(int argc, char *argv[])
|
||||
{
|
||||
return ModuleBase::main(VehicleLocalPositionBridge::desc, argc, argv);
|
||||
}
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
ModuleBase::Descriptor VoxlSaveCalParams::desc{task_spawn, custom_command, print_usage};
|
||||
|
||||
static bool debug = false;
|
||||
|
||||
VoxlSaveCalParams::VoxlSaveCalParams() :
|
||||
@@ -145,7 +147,7 @@ VoxlSaveCalParams::Run()
|
||||
{
|
||||
if (should_exit()) {
|
||||
_parameter_primary_set_value_request_sub.unregisterCallback();
|
||||
exit_and_cleanup();
|
||||
exit_and_cleanup(desc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -186,8 +188,8 @@ int VoxlSaveCalParams::task_spawn(int argc, char *argv[])
|
||||
VoxlSaveCalParams *instance = new VoxlSaveCalParams();
|
||||
|
||||
if (instance) {
|
||||
_object.store(instance);
|
||||
_task_id = task_id_is_work_queue;
|
||||
desc.object.store(instance);
|
||||
desc.task_id = task_id_is_work_queue;
|
||||
|
||||
if (instance->init()) {
|
||||
return PX4_OK;
|
||||
@@ -198,8 +200,8 @@ int VoxlSaveCalParams::task_spawn(int argc, char *argv[])
|
||||
}
|
||||
|
||||
delete instance;
|
||||
_object.store(nullptr);
|
||||
_task_id = -1;
|
||||
desc.object.store(nullptr);
|
||||
desc.task_id = -1;
|
||||
|
||||
return PX4_ERROR;
|
||||
}
|
||||
@@ -230,5 +232,5 @@ This implements autosaving of calibration parameters on VOXL2 platform.
|
||||
|
||||
extern "C" __EXPORT int voxl_save_cal_params_main(int argc, char *argv[])
|
||||
{
|
||||
return VoxlSaveCalParams::main(argc, argv);
|
||||
return ModuleBase::main(VoxlSaveCalParams::desc, argc, argv);
|
||||
}
|
||||
|
||||
@@ -46,10 +46,12 @@
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
class VoxlSaveCalParams : public ModuleBase<VoxlSaveCalParams>, public ModuleParams,
|
||||
class VoxlSaveCalParams : public ModuleBase, public ModuleParams,
|
||||
public px4::WorkItem
|
||||
{
|
||||
public:
|
||||
static Descriptor desc;
|
||||
|
||||
VoxlSaveCalParams();
|
||||
~VoxlSaveCalParams() = default;
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2025-2026 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/spi_hw_description.h>
|
||||
#include <px4_platform_common/spi.h>
|
||||
#include <drivers/drv_sensor.h>
|
||||
|
||||
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIBus(1, {initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, 0), }),
|
||||
};
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
CONFIG_FILE="/etc/modalai/voxl-px4.conf"
|
||||
|
||||
AIRFRAME=MULTICOPTER
|
||||
GPS=NONE
|
||||
RC=SPEKTRUM
|
||||
ESC=VOXL_ESC
|
||||
POWER_MANAGER=VOXLPM
|
||||
AIRSPEED_SENSOR=NONE
|
||||
DISTANCE_SENSOR=NONE
|
||||
OSD=DISABLE
|
||||
DAEMON_MODE=DISABLE
|
||||
@@ -39,12 +41,14 @@ else
|
||||
fi
|
||||
|
||||
print_usage() {
|
||||
echo -e "\nUsage: voxl-px4 [-b (Specify Holybro GPS unit)]"
|
||||
echo -e "\nUsage: voxl-px4 [-a (Specify Airspeed Sensor)]"
|
||||
echo " [-b (Specify Holybro GPS unit)]"
|
||||
echo " [-c delete configuration file and exit]"
|
||||
echo " [-d start px4 without daemon mode]"
|
||||
echo " [-f (Use fake rc input instead of from a real transmitter)]"
|
||||
echo " [-m (Specify Matek GPS unit)]"
|
||||
echo " [-o (Start OSD module on the apps processor)]"
|
||||
echo " [-p (Specify Fixed Wing airframe selected)]"
|
||||
echo " [-r (Specify TBS Crossfire RC receiver, MAVLINK)]"
|
||||
echo " [-w (Specify TBS Crossfire RC receiver, raw)]"
|
||||
echo " [-z (Use fake sensor calibration values)]"
|
||||
@@ -55,10 +59,12 @@ print_usage() {
|
||||
|
||||
print_config_settings(){
|
||||
echo -e "\n*************************"
|
||||
echo "AIRFRAME=$AIRFRAME"
|
||||
echo "GPS=$GPS"
|
||||
echo "RC=$RC"
|
||||
echo "ESC=$ESC"
|
||||
echo "POWER MANAGER=$POWER_MANAGER"
|
||||
echo "AIRSPEED SENSOR=$AIRSPEED_SENSOR"
|
||||
echo "DISTANCE SENSOR=$DISTANCE_SENSOR"
|
||||
echo "OSD=$OSD"
|
||||
echo "DAEMON_MODE=$DAEMON_MODE"
|
||||
@@ -71,9 +77,13 @@ print_config_settings(){
|
||||
echo -e "*************************\n"
|
||||
}
|
||||
|
||||
while getopts "bcdhfmorwz" flag
|
||||
while getopts "abcdhfmoprwz" flag
|
||||
do
|
||||
case "${flag}" in
|
||||
a)
|
||||
echo "[INFO] MRO AIRSPEED Sensor selected"
|
||||
AIRSPEED_SENSOR=MS4525DO
|
||||
;;
|
||||
b)
|
||||
echo "[INFO] Holybro GPS selected"
|
||||
GPS=HOLYBRO
|
||||
@@ -104,6 +114,10 @@ do
|
||||
echo "[INFO] OSD module selected"
|
||||
OSD=ENABLE
|
||||
;;
|
||||
p)
|
||||
echo "[INFO] Airframe Selected as Fixed Wing"
|
||||
AIRFRAME=FIXED_WING
|
||||
;;
|
||||
r)
|
||||
echo "[INFO] TBS Crossfire RC receiver, MAVLINK selected"
|
||||
RC=CRSF_MAV
|
||||
@@ -137,5 +151,6 @@ fi
|
||||
|
||||
print_config_settings
|
||||
|
||||
GPS=$GPS RC=$RC ESC=$ESC POWER_MANAGER=$POWER_MANAGER DISTANCE_SENSOR=$DISTANCE_SENSOR \
|
||||
OSD=$OSD EXTRA_STEPS=$EXTRA_STEPS px4 $DAEMON -s /usr/bin/voxl-px4-start
|
||||
AIRFRAME=$AIRFRAME GPS=$GPS RC=$RC ESC=$ESC POWER_MANAGER=$POWER_MANAGER DISTANCE_SENSOR=$DISTANCE_SENSOR \
|
||||
AIRSPEED_SENSOR=$AIRSPEED_SENSOR OSD=$OSD EXTRA_STEPS=$EXTRA_STEPS \
|
||||
px4 $DAEMON -s /usr/bin/voxl-px4-start
|
||||
|
||||
@@ -17,13 +17,15 @@ if [ $RETURNCODE -ne 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# We can only run on M0052, M0054, or M0104 so exit with error if that is not the case
|
||||
# We can only run on M0052, M0054, M0104, or M0197 so exit with error if that is not the case
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
/bin/echo "Running on M0052"
|
||||
elif [ $PLATFORM = "M0054" ]; then
|
||||
/bin/echo "Running on M0054"
|
||||
elif [ $PLATFORM = "M0104" ]; then
|
||||
/bin/echo "Running on M0104"
|
||||
elif [ $PLATFORM = "M0197" ]; then
|
||||
/bin/echo "Running on M0197"
|
||||
else
|
||||
/bin/echo "Error, cannot determine platform!"
|
||||
exit 0
|
||||
@@ -76,7 +78,11 @@ microdds_client start -t udp -h 127.0.0.1 -p 8888
|
||||
qshell pwm_out_sim start -m hil
|
||||
# g = gps, m = mag, o = odometry (vio), h = distance sensor, f = optic flow
|
||||
# qshell dsp_hitl start -g -m -o -h -f
|
||||
qshell dsp_hitl start -g -m
|
||||
if [ "$PLATFORM" == "M0197" ]; then
|
||||
qshell dsp_hitl start -g -m -p 6
|
||||
else
|
||||
qshell dsp_hitl start -g -m
|
||||
fi
|
||||
|
||||
# start the onboard fast link to connect to voxl-mavlink-server
|
||||
mavlink start -x -u 14556 -o 14557 -r 100000 -n lo -m onboard
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
. px4-alias.sh
|
||||
|
||||
echo -e "\n*************************"
|
||||
echo "AIRFRAME: $AIRFRAME"
|
||||
echo "GPS: $GPS"
|
||||
echo "RC: $RC"
|
||||
echo "ESC: $ESC"
|
||||
echo "POWER MANAGER: $POWER_MANAGER"
|
||||
echo "AIRSPEED SENSOR: $AIRSPEED_SENSOR"
|
||||
echo "DISTANCE SENSOR: $DISTANCE_SENSOR"
|
||||
echo "OSD: $OSD"
|
||||
echo "EXTRA STEPS:"
|
||||
@@ -23,6 +25,8 @@ echo -e "*************************\n"
|
||||
# and modules manually from the px4 command shell
|
||||
if [ ! -z $MINIMAL_PX4 ]; then
|
||||
/bin/echo "Running minimal script"
|
||||
param select /data/px4/param/parameters
|
||||
param load
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -33,23 +37,30 @@ if [ $RETURNCODE -ne 0 ]; then
|
||||
# If we couldn't get the platform from the voxl-platform utility then check
|
||||
# /etc/version to see if there is an M0052 substring in the version string. If so,
|
||||
# then we assume that we are on M0052.
|
||||
VERSIONSTRING=$(</etc/version)
|
||||
VERSIONSTRING=""
|
||||
if [ -f /etc/version ]; then
|
||||
VERSIONSTRING=$(</etc/version)
|
||||
fi
|
||||
M0052SUBSTRING="M0052"
|
||||
if [[ "$VERSIONSTRING" == *"$M0052SUBSTRING"* ]]; then
|
||||
PLATFORM="M0052"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We can only run on M0052, M0054, or M0104 so exit with error if that is not the case
|
||||
# We can only run on M0054, M0104, or M0197 so exit with error if that is not the case
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
/bin/echo "Running on M0052"
|
||||
/bin/echo "Error M0052 is no longer supported!!!"
|
||||
exit 1
|
||||
elif [ $PLATFORM = "M0054" ]; then
|
||||
/bin/echo "Running on M0054"
|
||||
elif [ $PLATFORM = "M0104" ]; then
|
||||
/bin/echo "Running on M0104"
|
||||
elif [ $PLATFORM = "M0197" ]; then
|
||||
/bin/echo "Running on M0197"
|
||||
else
|
||||
/bin/echo "Error, cannot determine platform!"
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sleep a little here. A lot happens when the uorb and muorb start
|
||||
@@ -76,14 +87,43 @@ param load
|
||||
# IMU (accelerometer / gyroscope)
|
||||
if [ "$PLATFORM" == "M0104" ]; then
|
||||
/bin/echo "Starting IMU driver with rotation 12"
|
||||
qshell icm42688p start -s -R 12
|
||||
qshell icm42688p start -s -R 12 -C 32768
|
||||
elif [ "$PLATFORM" == "M0197" ]; then
|
||||
/bin/echo "Starting bmi270 IMU driver with rotation 26"
|
||||
qshell bmi270 start -s -R 26
|
||||
else
|
||||
/bin/echo "Starting IMU driver with no rotation"
|
||||
qshell icm42688p start -s
|
||||
qshell icm42688p start -s -C 32768
|
||||
fi
|
||||
|
||||
# Start Invensense ICP 101xx barometer built on to VOXL 2
|
||||
qshell icp101xx start -I -b 5
|
||||
# First look for any external barometers connected to the apps proc
|
||||
EXTERNAL_BAROMETER=0
|
||||
|
||||
/bin/echo "Looking for external DPS368 barometer"
|
||||
if dps310 start -X -b /dev/i2c-0; then
|
||||
/bin/echo "Detected external DPS368 barometer"
|
||||
EXTERNAL_BAROMETER=1
|
||||
fi
|
||||
|
||||
if (( EXTERNAL_BAROMETER == 0 )); then
|
||||
/bin/echo "Looking for external ICP10100 barometer"
|
||||
if icp101xx start -X -b /dev/i2c-0; then
|
||||
/bin/echo "Detected external ICP10100 barometer"
|
||||
EXTERNAL_BAROMETER=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# If no external barometers found, use the builtin barometer
|
||||
if (( EXTERNAL_BAROMETER == 0 )); then
|
||||
/bin/echo "Did not detect an external barometer, starting onboard barometer"
|
||||
if [ "$PLATFORM" == "M0197" ]; then
|
||||
/bin/echo "Starting dps368 barometer on M0197"
|
||||
qshell dps310 start -I -b 5
|
||||
else
|
||||
# Start Invensense ICP 101xx barometer built on to VOXL 2
|
||||
qshell icp101xx start -I -b 5
|
||||
fi
|
||||
fi
|
||||
|
||||
# Auto detect the magnetometer. If one or both of these devices
|
||||
# are not connected it will fail but not cause any harm.
|
||||
@@ -91,15 +131,19 @@ qshell icp101xx start -I -b 5
|
||||
qshell qmc5883l start -R 10 -X -b 1
|
||||
/bin/echo "Looking for ist8310 magnetometer"
|
||||
qshell ist8310 start -R 10 -X -b 1
|
||||
/bin/echo "Looking for ist8308 magnetometer"
|
||||
# Rotation 12 = PITCH_180
|
||||
qshell ist8308 start -R 12 -X -b 1
|
||||
/bin/echo "Looking for iis2mdc magnetometer"
|
||||
# Note: Rotation may not be correct
|
||||
qshell iis2mdc start -R 10 -X -b 1
|
||||
|
||||
# GPS and magnetometer
|
||||
if [ "$GPS" != "NONE" ]; then
|
||||
# On M0052 the GPS driver runs on the apps processor
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
gps start -d /dev/ttyHS2
|
||||
# On M0054 and M0104 the GPS driver runs on SLPI DSP
|
||||
if [ "$PLATFORM" == "M0197" ]; then
|
||||
gps start -d /dev/ttyHS7
|
||||
else
|
||||
qshell gps start -d 6
|
||||
qshell gps start
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -144,20 +188,12 @@ elif [ "$RC" == "CRSF_MAV" ]; then
|
||||
qshell mavlink_rc_in start -m -p 7 -b 115200
|
||||
elif [ "$RC" == "SPEKTRUM" ]; then
|
||||
/bin/echo "Starting Spektrum RC"
|
||||
# On M0052 the RC driver runs on the apps processor
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
rc_input start -d /dev/ttyHS1
|
||||
# On M0054 and M0104 the RC driver runs on SLPI DSP
|
||||
else
|
||||
qshell spektrum_rc start
|
||||
fi
|
||||
qshell spektrum_rc start
|
||||
elif [ "$RC" == "GHST" ]; then
|
||||
/bin/echo "Starting GHST RC driver"
|
||||
qshell ghst_rc start -d 7
|
||||
elif [ "$RC" == "M0065_SBUS" ]; then
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
apps_sbus start
|
||||
elif [ "$ESC" != "VOXL2_IO_PWM_ESC" ]; then
|
||||
if [ "$ESC" != "VOXL2_IO_PWM_ESC" ]; then
|
||||
/bin/echo "Attempting to start M0065 SBUS RC driver for original M0065 FW"
|
||||
qshell dsp_sbus start
|
||||
retVal=$?
|
||||
@@ -181,6 +217,10 @@ if [ "$POWER_MANAGER" == "VOXLPM" ]; then
|
||||
qshell voxlpm start -X -b 2
|
||||
fi
|
||||
|
||||
if [ "$AIRSPEED_SENSOR" == "MS4525DO" ]; then
|
||||
qshell ms4525do start -X -b 4
|
||||
fi
|
||||
|
||||
# Optional distance sensor on spare i2c
|
||||
# qshell vl53l0x start -X -b 4
|
||||
# qshell vl53l1x start -X -b 4
|
||||
@@ -188,22 +228,27 @@ fi
|
||||
# Start all of the processing modules on DSP
|
||||
qshell sensors start
|
||||
qshell ekf2 start
|
||||
qshell mc_pos_control start
|
||||
qshell mc_att_control start
|
||||
qshell mc_rate_control start
|
||||
qshell mc_hover_thrust_estimator start
|
||||
qshell mc_autotune_attitude_control start
|
||||
qshell land_detector start multicopter
|
||||
|
||||
if [ "$AIRFRAME" == "FIXED_WING" ]; then
|
||||
qshell fw_pos_control start
|
||||
qshell fw_att_control start
|
||||
qshell fw_rate_control start
|
||||
qshell airspeed_selector start
|
||||
qshell fw_autotune_attitude_control start
|
||||
qshell land_detector start fixedwing
|
||||
elif [ $AIRFRAME = "MULTICOPTER" ]; then
|
||||
qshell mc_pos_control start
|
||||
qshell mc_att_control start
|
||||
qshell mc_rate_control start
|
||||
qshell mc_hover_thrust_estimator start
|
||||
qshell mc_autotune_attitude_control start
|
||||
qshell land_detector start multicopter
|
||||
fi
|
||||
|
||||
qshell manual_control start
|
||||
qshell control_allocator start
|
||||
qshell load_mon start
|
||||
|
||||
# Only start the rc_update module if an actual RC driver
|
||||
# is publishing input_rc topics. Otherwise for external RC
|
||||
# over Mavlink this isn't needed.
|
||||
if [ "$RC" != "EXTERNAL" ]; then
|
||||
qshell rc_update start
|
||||
fi
|
||||
qshell rc_update start
|
||||
|
||||
qshell commander start
|
||||
|
||||
@@ -213,21 +258,15 @@ qshell flight_mode_manager start
|
||||
# Start all of the processing modules on the applications processor
|
||||
dataman start
|
||||
navigator start
|
||||
|
||||
# This bridge allows raw data packets to be sent over UART to the ESC
|
||||
# voxl2_io_bridge start
|
||||
vehicle_air_data_bridge start
|
||||
sensor_baro_bridge start
|
||||
vehicle_local_position_bridge start
|
||||
|
||||
# Start uxrce_dds_client for ros2 offboard messages from agent over localhost
|
||||
uxrce_dds_client start -t udp -h 127.0.0.1 -p 8888
|
||||
|
||||
voxl_save_cal_params start
|
||||
|
||||
# On M0052 there is only one IMU. So, PX4 needs to
|
||||
# publish IMU samples externally for VIO to use.
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
imu_server start
|
||||
fi
|
||||
|
||||
# start the onboard fast link to connect to voxl-mavlink-server
|
||||
mavlink start -x -u 14556 -o 14557 -r 100000 -n lo -m onboard
|
||||
|
||||
@@ -238,17 +277,12 @@ mavlink stream -u 14556 -s ATTITUDE_QUATERNION -r 10
|
||||
mavlink stream -u 14556 -s GLOBAL_POSITION_INT -r 30
|
||||
mavlink stream -u 14556 -s SCALED_PRESSURE -r 10
|
||||
|
||||
# Increase heartbeat rate so VFC can get faster mode updates
|
||||
mavlink stream -u 14556 -s HEARTBEAT -r 10
|
||||
|
||||
# start the slow normal mode for voxl-mavlink-server to forward to GCS
|
||||
mavlink start -x -u 14558 -o 14559 -r 100000 -n lo
|
||||
|
||||
# Start logging and use timestamps for log files when possible.
|
||||
# Add the "-e" option to start logging immediately. Default is
|
||||
# to log only when armed. Caution must be used with the "-e" option
|
||||
# because if power is removed without stopping the logger gracefully then
|
||||
# the log file may be corrupted. Rather than using "-e" option it's better
|
||||
# to use the SDLOG_MODE to do that.
|
||||
logger start -t -b 256
|
||||
|
||||
mavlink boot_complete
|
||||
|
||||
# Optional MSP OSD driver for DJI goggles
|
||||
@@ -263,3 +297,9 @@ for i in "${EXTRA_STEPS[@]}"
|
||||
do
|
||||
$i
|
||||
done
|
||||
|
||||
# Start logging module. This is done as the last step because any topics
|
||||
# marked as optional will only be logged if they have been advertised when
|
||||
# this is started. By starting it last it makes sure to see those
|
||||
# advertisements as the other modules are starting before it.
|
||||
logger start
|
||||
|
||||
@@ -269,7 +269,6 @@
|
||||
*(.text.udp_pollsetup)
|
||||
*(.text._ZL14timer_callbackPv)
|
||||
*(.text._ZN3Ekf4fuseERKN6matrix6VectorIfLj24EEEf)
|
||||
*(.text._ZN13land_detector23MulticopterLandDetector22_set_hysteresis_factorEi)
|
||||
*(.text.nxsem_wait_irq)
|
||||
*(.text._ZN20MavlinkCommandSender4lockEv)
|
||||
*(.text.MEM_LongCopyEnd)
|
||||
@@ -432,7 +431,7 @@
|
||||
*(.text._ZN23MavlinkStreamStatustext8get_sizeEv)
|
||||
*(.text._ZN11calibration13Accelerometer13set_device_idEm)
|
||||
*(.text._ZN3px46logger6Logger18start_stop_loggingEv)
|
||||
*(.text._ZN14FlightTaskAuto17_evaluateTripletsEv)
|
||||
*(.text._ZN14FlightTaskAuto32_evaluatePositionSetpointTripletEv)
|
||||
*(.text._ZN11calibration9Gyroscope23SensorCorrectionsUpdateEb)
|
||||
*(.text._ZN25MavlinkStreamMagCalReport4sendEv)
|
||||
*(.text.imxrt_config_gpio)
|
||||
@@ -573,7 +572,6 @@
|
||||
*(.text._ZN4uORB12SubscriptionaSEOS0_)
|
||||
*(.text._ZN15TakeoffHandling18updateTakeoffStateEbbbfbRKy)
|
||||
*(.text._ZN10ModeChecks14checkAndReportERK7ContextR6Report)
|
||||
*(.text._ZN14FlightTaskAuto24_updateInternalWaypointsEv)
|
||||
*(.text._ZN8Failsafe17updateArmingStateERKybRK16failsafe_flags_s)
|
||||
*(.text.imxrt_lpi2c_modifyreg)
|
||||
*(.text.up_flush_dcache)
|
||||
|
||||
@@ -269,7 +269,6 @@
|
||||
*(.text.udp_pollsetup)
|
||||
*(.text._ZL14timer_callbackPv)
|
||||
*(.text._ZN3Ekf4fuseERKN6matrix6VectorIfLj24EEEf)
|
||||
*(.text._ZN13land_detector23MulticopterLandDetector22_set_hysteresis_factorEi)
|
||||
*(.text.nxsem_wait_irq)
|
||||
*(.text._ZN20MavlinkCommandSender4lockEv)
|
||||
*(.text.MEM_LongCopyEnd)
|
||||
@@ -432,7 +431,7 @@
|
||||
*(.text._ZN23MavlinkStreamStatustext8get_sizeEv)
|
||||
*(.text._ZN11calibration13Accelerometer13set_device_idEm)
|
||||
*(.text._ZN3px46logger6Logger18start_stop_loggingEv)
|
||||
*(.text._ZN14FlightTaskAuto17_evaluateTripletsEv)
|
||||
*(.text._ZN14FlightTaskAuto32_evaluatePositionSetpointTripletEv)
|
||||
*(.text._ZN11calibration9Gyroscope23SensorCorrectionsUpdateEb)
|
||||
*(.text._ZN25MavlinkStreamMagCalReport4sendEv)
|
||||
*(.text.imxrt_config_gpio)
|
||||
@@ -573,7 +572,6 @@
|
||||
*(.text._ZN4uORB12SubscriptionaSEOS0_)
|
||||
*(.text._ZN15TakeoffHandling18updateTakeoffStateEbbbfbRKy)
|
||||
*(.text._ZN10ModeChecks14checkAndReportERK7ContextR6Report)
|
||||
*(.text._ZN14FlightTaskAuto24_updateInternalWaypointsEv)
|
||||
*(.text._ZN8Failsafe17updateArmingStateERKybRK16failsafe_flags_s)
|
||||
*(.text.imxrt_lpi2c_modifyreg)
|
||||
*(.text.up_flush_dcache)
|
||||
|
||||
@@ -273,7 +273,6 @@
|
||||
*(.text.udp_pollsetup)
|
||||
*(.text._ZL14timer_callbackPv)
|
||||
*(.text._ZN3Ekf4fuseERKN6matrix6VectorIfLj24EEEf)
|
||||
*(.text._ZN13land_detector23MulticopterLandDetector22_set_hysteresis_factorEi)
|
||||
*(.text.nxsem_wait_irq)
|
||||
*(.text._ZN20MavlinkCommandSender4lockEv)
|
||||
*(.text.MEM_LongCopyEnd)
|
||||
@@ -440,7 +439,7 @@
|
||||
*(.text._ZN23MavlinkStreamStatustext8get_sizeEv)
|
||||
*(.text._ZN11calibration13Accelerometer13set_device_idEm)
|
||||
*(.text._ZN3px46logger6Logger18start_stop_loggingEv)
|
||||
*(.text._ZN14FlightTaskAuto17_evaluateTripletsEv)
|
||||
*(.text._ZN14FlightTaskAuto32_evaluatePositionSetpointTripletEv)
|
||||
*(.text._ZN11calibration9Gyroscope23SensorCorrectionsUpdateEb)
|
||||
*(.text._ZN25MavlinkStreamMagCalReport4sendEv)
|
||||
*(.text.imxrt_config_gpio)
|
||||
@@ -586,7 +585,6 @@
|
||||
*(.text._ZN4uORB12SubscriptionaSEOS0_)
|
||||
*(.text._ZN15TakeoffHandling18updateTakeoffStateEbbbfbRKy)
|
||||
*(.text._ZN10ModeChecks14checkAndReportERK7ContextR6Report)
|
||||
*(.text._ZN14FlightTaskAuto24_updateInternalWaypointsEv)
|
||||
*(.text._ZN8Failsafe17updateArmingStateERKybRK16failsafe_flags_s)
|
||||
*(.text.imxrt_lpi2c_modifyreg)
|
||||
*(.text.up_flush_dcache)
|
||||
|
||||
@@ -162,6 +162,15 @@
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Custom style to hide search on the ome page
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
.home #local-search {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Custom styles for wide pages
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Onboard parameters for Vehicle 1
|
||||
#
|
||||
# Stack: PX4 Pro
|
||||
# Vehicle: Multi-Rotor
|
||||
# Version: 1.15.4
|
||||
# Vehicle: Amovlab F410
|
||||
# Version: 1.15.4
|
||||
# Git Revision: 99c40407ff000000
|
||||
#
|
||||
# Vehicle-Id Component-Id Name Value Type
|
||||
@@ -546,7 +546,6 @@
|
||||
1 1 IMU_INTEG_RATE 200 6
|
||||
1 1 LNDMC_ALT_GND 2.000000000000000000 9
|
||||
1 1 LNDMC_ROT_MAX 20.000000000000000000 9
|
||||
1 1 LNDMC_TRIG_TIME 1.000000000000000000 9
|
||||
1 1 LNDMC_XY_VEL_MAX 1.500000000000000000 9
|
||||
1 1 LNDMC_Z_VEL_MAX 0.250000000000000000 9
|
||||
1 1 LND_FLIGHT_T_HI 5 6
|
||||
|
||||
+6
-4
@@ -328,10 +328,11 @@
|
||||
- [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)
|
||||
- [Joysticks](config/joystick.md)
|
||||
- [Manual Control](config/manual_control.md)
|
||||
- [Radio Control (RC)](getting_started/rc_transmitter_receiver.md)
|
||||
- [Radio Setup](config/radio.md)
|
||||
- [Flight Modes](config/flight_mode.md)
|
||||
- [Joysticks](config/joystick.md)
|
||||
- [Data Links](data_links/index.md)
|
||||
- [MAVLink Telemetry (OSD/GCS)](peripherals/mavlink_peripherals.md)
|
||||
- [Telemetry Radios](telemetry/index.md)
|
||||
@@ -418,6 +419,7 @@
|
||||
- [Standard Configuration](config/index.md)
|
||||
- [Advanced Configuration](advanced_config/index.md)
|
||||
- [Using PX4's Navigation Filter (EKF2)](advanced_config/tuning_the_ecl_ekf.md)
|
||||
- [GNSS-Denied & Degraded Flight](advanced_config/gnss_degraded_or_denied_flight.md)
|
||||
- [Finding/Updating Parameters](advanced_config/parameters.md)
|
||||
- [Full Parameter Reference](advanced_config/parameter_reference.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
# GNSS-Degraded & Denied Flight ("Dead-Reckoning" Mode)
|
||||
|
||||
<Badge type="tip" text="PX4 v1.17" /> <Badge type="warning" text="Experimental" />
|
||||
|
||||
::: warning Experimental
|
||||
This is a new feature with limited real-world testing.
|
||||
It is intended for GNSS dropout scenarios (not pure GNSS-denied from takeoff), and requires that alternative velocity/position sensors are available.
|
||||
|
||||
Please [share your related test logs](../getting_started/flight_reporting.md#sharing-the-log-files-for-review-by-px4-developers) to help us verify and harden it.
|
||||
:::
|
||||
|
||||
PX4 is default-configured for outdoor flight with a reliable GNSS signal, but it can also be set up in "dead-reckoning mode" to more gracefully handle environments where GNSS is intermittently degraded or denied during flight.
|
||||
|
||||
This section describes the differences between automatic and dead-reckoning modes, the circumstances in which each should be used, and how dead-reckoning is configured.
|
||||
|
||||
## Overview
|
||||
|
||||
PX4's EKF2 navigation has two modes for handling when GNSS data is determined to be unreliable:
|
||||
|
||||
- **Automatic mode** (the default): Used for flying outdoors in environments where a GNSS signal is expected to be largely reliable.
|
||||
- **Dead-reckoning mode**: Recommended when you want to fly missions or other position controlled modes when there is intermittent GNSS loss, such as when flying under a bridge, from outdoors into an indoor setting, or when there is GNSS jamming (it is not suitable for pure-indoor use, as a GNSS signal is required before arming).
|
||||
|
||||
::: info
|
||||
Dead-reckoning mode helps for both Fixed-Wing and Multicopter vehicles.
|
||||
MC vehicles benefit more because they can hover when transitioning between sensor regimes.
|
||||
FW needs continuous accurate velocity/position during the entire mission arc, making sensor transitions trickier.
|
||||
:::
|
||||
|
||||
## Mode Comparison
|
||||
|
||||
The following sections provide more detail about each of the modes and when they should be used.
|
||||
|
||||
### Automatic Mode
|
||||
|
||||
In Automatic mode the EKF2 resets if GNSS is lost and no other sources of position are available.
|
||||
This can result in a [position loss failsafe](../config/safety.md#position-loss-failsafe) and may trigger a shift into a mode that does not require global position, including stopping missions.
|
||||
|
||||
This is desirable if the GNSS signal is likely to be recovered quickly and there are no mechanisms to estimate position when GNSS is unavailable.
|
||||
|
||||
Use Automatic (default) when:
|
||||
|
||||
- Flying in open sky with reliable GNSS throughout the mission.
|
||||
- You want the EKF to reset to GNSS when it becomes available again.
|
||||
- Operating in environments where GNSS is either good or completely unavailable (binary state).
|
||||
|
||||
### Dead-Reckoning Mode
|
||||
|
||||
In dead-reckoning mode, EKF2 stops fusing GNSS data when it becomes unreliable and prevents EKF2 resets — provided there are other sources of position or velocity data that can be fused.
|
||||
This ensures that the vehicle can continue flying missions and other position controlled modes when GNSS is lost.
|
||||
|
||||
When GNSS is recovered it will be fused with other measurements when tests indicate it can be trusted.
|
||||
This may cause jerky movements in position controlled modes if the estimate has drifted.
|
||||
This mode relies on having additional position or velocity sensors and must also have a reliable GNSS signal at boot.
|
||||
|
||||
Use Dead-Reckoning when:
|
||||
|
||||
- **Transitioning between GNSS and non-GNSS environments** (flying into buildings, under bridges, through tree cover).
|
||||
- You have **redundant sensors** (optical flow, VIO, rangefinder, quality baro) that can maintain position estimation.
|
||||
- Flying **missions that cross GPS-denied areas** where you want continuous operation rather than failsafe.
|
||||
- **Urban environments** or other areas with intermittent GNSS quality.
|
||||
- You want to **avoid EKF resets and jumps** when GNSS recovers (smoother transitions).
|
||||
|
||||
## Configuration
|
||||
|
||||
To use dead-reckoning mode, the vehicle must have an alternative source of position or velocity information, such as an [Optical Flow](../sensor/optical_flow.md) sensor or [VIO](../computer_vision/visual_inertial_odometry.md) setup.
|
||||
|
||||
To enable the mode:
|
||||
|
||||
1. Set [EKF2_GPS_MODE](../advanced_config/parameter_reference.md#EKF2_GPS_MODE) to `1`.
|
||||
2. Ensure that GNSS arming checks are enabled (a reliable GNSS signal is required before arming):
|
||||
- [COM_ARM_WO_GPS](../advanced_config/parameter_reference.md#COM_ARM_WO_GPS) - set to `0`
|
||||
- [EKF2_GPS_CHECK](../advanced_config/parameter_reference.md#EKF2_GPS_CHECK) - set to default.
|
||||
|
||||
## See Also
|
||||
|
||||
- [GNSS Fault Detection](../advanced_config/tuning_the_ecl_ekf.md#gnss-fault-detection) in _Using PX4's Navigation Filter (EKF2)_
|
||||
- [Fuse, Reset, or Reject? Handling Various Data-sources in EKF2](https://www.youtube.com/watch?v=CMGQJNPiTJg) - _PX4 Developer Summit 2025_, Marco Hauswirth, Auterion AG
|
||||
@@ -10,6 +10,7 @@ This topic lists configuration topics that are not particularly vehicle specific
|
||||
## Feature configuration
|
||||
|
||||
- [Using PX4's Navigation Filter (EKF2)](../advanced_config/tuning_the_ecl_ekf.md)
|
||||
- [GNSS-Denied and Degraded Flight](../advanced_config/gnss_degraded_or_denied_flight.md)
|
||||
- [Flight Termination Configuration](../advanced_config/flight_termination.md)
|
||||
- [Land Detector Configuration](../advanced_config/land_detector.md)
|
||||
- [Prearm/Arm/Disarm Configuration](../advanced_config/prearm_arm_disarm.md)
|
||||
|
||||
@@ -38,7 +38,7 @@ In order to detect landing, the multicopter first has to go through three differ
|
||||
If a condition cannot be reached because of missing sensors, then the condition is true by default.
|
||||
For instance, in [Acro mode](../flight_modes_mc/acro.md) and no sensor is active except for the gyro sensor, then the detection solely relies on thrust output and time.
|
||||
|
||||
In order to proceed to the next state, each condition has to be true for a third of the configured total land detector trigger time [LNDMC_TRIG_TIME](../advanced_config/parameter_reference.md#LNDMC_TRIG_TIME).
|
||||
In order to proceed to the next state, each condition has to be true for 300ms.
|
||||
If the vehicle is equipped with a distance sensor, but the distance to ground is currently not measurable (usually because it is too large), the trigger time is increased by a factor of 3.
|
||||
|
||||
If one condition fails, the land detector drops out of the current state immediately.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -361,6 +361,10 @@ The mode is set using the [EKF2_GPS_MODE](../advanced_config/parameter_reference
|
||||
EKF2 may reset if no other sources of position or velocity are available.
|
||||
If GNSS altitude OR horizontal position data drifts, the system disables fusion of both measurements simultaneously (even if one would still pass validation) and avoids performing resets.
|
||||
|
||||
::: tip
|
||||
See also [Fault Detection](https://youtu.be/CMGQJNPiTJg?si=sFtdf4AQbcOH8-u8) in "Fuse, Reset, or Reject? Handling Various Data-sources in EKF2" _PX4 Developer Summit 2025_, Marco Hauswirth, Auterion AG
|
||||
:::
|
||||
|
||||
##### Detection Logic
|
||||
|
||||
Horizontal Position:
|
||||
@@ -892,3 +896,4 @@ If no terrain estimate is available this parameter will have no effect and the s
|
||||
## Further Information
|
||||
|
||||
- [PX4 State Estimation Overview](https://youtu.be/HkYRJJoyBwQ), _PX4 Developer Summit 2019_, Dr. Paul Riseborough): Overview of the estimator, and major changes from 2018/19, and the expected improvements through 2019/20.
|
||||
- [Fuse, Reset, or Reject? Handling Various Data-sources in EKF2](https://www.youtube.com/watch?v=CMGQJNPiTJg) - _PX4 Developer Summit 2025_, Marco Hauswirth, Auterion AG
|
||||
|
||||
@@ -18,7 +18,7 @@ Further/updated information may be available in the [Cube User Manual](https://d
|
||||
|
||||
## Accessories
|
||||
|
||||
Cube comes with most (or all) of the accessories you will need when [purchased](../flight_controller/pixhawk-2.md#stores).
|
||||
Cube comes with most (or all) of the accessories you will need when [purchased](../flight_controller/pixhawk-2.md#store).
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
<Badge type="info" text="Discontinued" />
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
_Crazyflie 2.0_ has been [discontinued/superseded](../flight_controller/autopilot_experimental.md).
|
||||
Try [Bitcraze Crazyflie 2.1](../complete_vehicles_mc/crazyflie21.md) instead!
|
||||
:::
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
|
||||
- PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://www.bitcraze.io/) for hardware support or compliance issues.
|
||||
@@ -202,7 +202,7 @@ Next, launch the cfbridge by giving the same channel and address as the first an
|
||||
- After using _cfbridge_, you can deactivate the virtualenv if you activated it by pressing `CTRL+z`.
|
||||
Most of the time, launching _cfbridge_ again from the same terminal doesn't connect to crazyflie, this can be solved by closing the terminal and relaunching _cfbridge_ in a new terminal.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
If you change any driver in [crazyflie-lib-python](https://github.com/bitcraze/crazyflie-lib-python) or if launching _cfbridge_ in a new terminal does not find crazyflie, you can try navigating to the crazyflie-lib-python folder and run the script below to rebuild cflib.
|
||||
|
||||
```sh
|
||||
@@ -212,13 +212,17 @@ make venv
|
||||
:::
|
||||
|
||||
::: info
|
||||
To use Joystick, set `COM_RC_IN_MODE` in QGroundControl to "Joystick/No RC Checks".
|
||||
Calibrate the Joystick and set the Joystick message frequency in QGroundControl to any value between 5 to 14 Hz (10 Hz is recommended).
|
||||
To be able to set the frequency, the advanced option should be enabled.
|
||||
This is the rate at which Joystick commands are sent from QGroundControl to Crazyflie 2.0 (to do this, you will need to follow the instructions [here](https://github.com/mavlink/qgroundcontrol) to obtain the latest QGroundControl source code (master) and build it).
|
||||
:::
|
||||
To use a [Joystick](../config/joystick.md):
|
||||
|
||||

|
||||
- Make sure you're using a [`COM_RC_IN_MODE` that allows Joystick](../config/manual_control.md#px4-configuration).
|
||||
- Calibrate the Joystick and set the Joystick message frequency in QGroundControl if needed (25 Hz is the default).
|
||||
To be able to set the frequency, the advanced option should be enabled.
|
||||
|
||||

|
||||
|
||||
This is the rate at which Joystick commands are sent from QGroundControl to Crazyflie 2.0 (to do this, you will need to follow the instructions [here](https://github.com/mavlink/qgroundcontrol) to obtain the latest QGroundControl source code (master) and build it).
|
||||
|
||||
:::
|
||||
|
||||
## Hardware Setup
|
||||
|
||||
@@ -247,7 +251,7 @@ Then, you need to stick the battery on top of the SD card deck using a double si
|
||||
Crazyflie is able to fly in _Altitude_ mode if you use a [Z-ranger deck](https://store.bitcraze.io/collections/decks/products/z-ranger-deck).
|
||||
According to the datasheet, the maximum height (above ground) the range finder can sense is 2 m. However, when tested on dark surfaces this value decreases to 0.5 m. On a light floor, it goes up to max 1.3 m. This means you cannot hold altitudes above this value in _Altitude_ or _Position_ flight modes.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
If the Crazyflie 2.0 height drifts at mid-throttle command in _Altitude mode_ or _Position mode_, first try rebooting the vehicle. If this does not fix the problem, recalibrate the accel and mag (compass).
|
||||
:::
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ For that to work, a few things are required:
|
||||
- PX4 modules need to look like individual executables to the system.
|
||||
This is done via symbolic links.
|
||||
For each module a symbolic link `px4-<module> -> px4` is created in the `bin` directory of the build folder.
|
||||
When executed, the binary path is checked (`argv[0]`), and if it is a module (starts with `px4-`), it sends the command to the main px4 instance (see below).
|
||||
When executed, the binary path is checked (`argv[0]`), and if it is a module (starts with `px4-`), it sends the command to the main PX4 instance (see below).
|
||||
|
||||
:::tip
|
||||
The `px4-` prefix is used to avoid conflicts with system commands (e.g. `shutdown`), and it also allows for simple tab completion by typing `px4-<TAB>`.
|
||||
@@ -30,13 +30,13 @@ For that to work, a few things are required:
|
||||
- The shell needs to know where to find the symbolic links.
|
||||
For that the `bin` directory with the symbolic links is added to the `PATH` variable right before executing the startup scripts.
|
||||
- The shell starts each module as a new (client) process.
|
||||
Each client process needs to communicate with the main instance of px4 (the server), where the actual modules are running as threads.
|
||||
Each client process needs to communicate with the main instance of PX4 (the server), where the actual modules are running as threads.
|
||||
This is done through a [UNIX socket](https://man7.org/linux/man-pages/man7/unix.7.html).
|
||||
The server listens on a socket, to which clients can connect and send a command.
|
||||
The server then sends the output and return code back to the client.
|
||||
- The startup scripts call the module directly, e.g. `commander start`, rather than using the `px4-` prefix.
|
||||
This works via aliases: for each module an alias in the form of `alias <module>=px4-<module>` is created in the file `bin/px4-alias.sh`.
|
||||
- The `rcS` script is executed from the main px4 instance.
|
||||
- The `rcS` script is executed from the main PX4 instance.
|
||||
It does not start any modules, but first updates the `PATH` variable and then simply runs a shell with the `rcS` file as argument.
|
||||
- In addition to that, multiple server instances can be started for multi-vehicle simulations.
|
||||
A client selects the instance via `--instance`.
|
||||
|
||||
@@ -23,8 +23,7 @@ Information about how to set up a joystick is covered in: [QGroundControl > Joys
|
||||
In summary:
|
||||
|
||||
- Open _QGroundControl_
|
||||
- Set the parameter [COM_RC_IN_MODE=1](../advanced_config/parameter_reference.md#COM_RC_IN_MODE) - `Joystick`
|
||||
- See [Parameters](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/parameters.html) for information about setting parameters
|
||||
- Setting the parameter to `2` or `3` also enables Joystick under some circumstances.
|
||||
- [Enable a `COM_RC_IN_MODE` mode that allows Joystick](../config/manual_control.md#px4-configuration).
|
||||
The default `RC or MAVLink keep first` should work if you plan to only have a Joystick connected.
|
||||
- Connect the joystick
|
||||
- Configure the connected joystick in: **Vehicle Setup > Joystick**.
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# Manual Control
|
||||
|
||||
Pilots can control a vehicle manually using either a [Radio Control (RC) System](../getting_started/rc_transmitter_receiver.md) or a [Joystick/Gamepad](../config/joystick.md) controller connected via QGroundControl.
|
||||
PX4 also supports using RC and/or multiple Joysticks, with fallback from one type to the other.
|
||||
|
||||
 <img src="../../assets/peripherals/joystick/micronav.jpg" alt="Photo of MicroNav, a ground controller with integrated joysticks" width="400px">
|
||||
|
||||
## Overview
|
||||
|
||||
_Joystick_ setups use QGroundControl to encode the control information from a "standard" computer gaming joystick into [MAVLink messages](https://mavlink.io/en/services/manual_control.html) that are sent to the vehicle over the (shared) telemetry radio channel.
|
||||
They are often used in integrated GCS/manual control systems because it is cheaper and easier to integrate a joystick than a separate radio system.
|
||||
|
||||
Joysticks are suitable for most applications provided your telemetry channel has a high enough bandwidth/low latency.
|
||||
They are perfect for flying the PX4 simulator, because you can plug them directly into your ground control computer and start flying.
|
||||
|
||||
_RC systems_ use a dedicated ground-based radio transmitter and vehicle-based receiver for sending control information.
|
||||
They offer lower latency than Joysticks, and are very highly recommended when first tuning/testing a new frame design, when flying racers/acrobatically, and in other cases where low latency is important.
|
||||
They can also be useful as a robust backup link for safety.
|
||||
Note RC systems usually require significantly more configuration and calibration, much of which may be brand or model-specific.
|
||||
|
||||
::: info
|
||||
PX4 does not _require_ a manual control system for autonomous flight modes.
|
||||
:::
|
||||
|
||||
## PX4 Configuration
|
||||
|
||||
::: tip
|
||||
This section explains how to configure PX4 to use and prioritise various manual control sources (other configuration is covered in the guides for each type of manual control).
|
||||
:::
|
||||
|
||||
If you only have one manual control system, either RC or Joystick, then by default no manual control selection is required.
|
||||
In this case PX4 locks to the first valid manual control source it detects and uses that source until the vehicle is rebooted.
|
||||
|
||||
If you have multiple control sources, such as an RC system and/or one or more Joysticks, then you can use the [COM_RC_IN_MODE](../advanced_config/parameter_reference.md#COM_RC_IN_MODE) parameter to determine which source is active, specifying selection priorities and fallback behavior ([parameters can be set](../advanced_config/parameters.md#finding-a-parameter) using QGC):
|
||||
|
||||
- `0`: RC only.
|
||||
- `1`: MAVLink only.
|
||||
- `2`: RC or MAVLink with fallback (switches if current source becomes invalid).
|
||||
- `3`: RC or MAVLink keep first (locks to the first valid source until reboot).
|
||||
- `4`: Disable manual control (ignores all sources).
|
||||
- `5`: RC priority, then MAVLink (lower instance before higher) — `RC > MAVLink 1 > MAVLink 2`
|
||||
- `6`: MAVLink priority (lower instance before higher), then RC — `MAVLink 1 > MAVLink 2 > RC`
|
||||
- `7`: RC priority, then MAVLink (higher instance before lower) — `RC > MAVLink 2 > MAVLink 1`
|
||||
- `8`: MAVLink priority (higher instance before lower), then RC — `MAVLink 2 > MAVLink 1 > RC`
|
||||
|
||||
The [MAVLink instance](../peripherals/mavlink_peripherals.md#mavlink-instances) refers to an instance assigned to a serial port, such as [MAV_0_CONFIG](../advanced_config/parameter_reference.md#MAV_0_CONFIG).
|
||||
|
||||
Notes:
|
||||
|
||||
- RC checks are run for any option that uses RC (so not for `MAVLink only` or `Disable manual control`).
|
||||
- When using priority sources, sources are evaluated as soon as they become valid and may trigger an immediate switch (if higher priority than the currently active source).
|
||||
- A [Manual Control Loss Failsafe](../config/safety.md#manual-control-loss-failsafe) is triggered when none of the manual control inputs allowed by the `COM_RC_IN_MODE` mode are available for a time that is greater than the RC Loss Timeout.
|
||||
As long as there is a fallback input source available, the failsafe is not triggered.
|
||||
|
||||
## See Also
|
||||
|
||||
- [Radio Control (RC)](../getting_started/rc_transmitter_receiver.md)
|
||||
- [Joysticks](../config/joystick.md)
|
||||
@@ -1,10 +1,12 @@
|
||||
# Radio Control (RC) Setup
|
||||
|
||||
The _Radio Setup_ screen is used to configure the mapping of your RC controller's main attitude control sticks (roll, pitch, yaw, throttle) to channels, and to calibrate the minimum, maximum, trim and reverse settings for all other transmitter controls/RC channels.
|
||||
The _Radio Setup_ screen is used to configure the mapping of your [RC controller's](../getting_started/rc_transmitter_receiver.md) main attitude control sticks (roll, pitch, yaw, throttle) to channels, and to calibrate the minimum, maximum, trim and reverse settings for all other transmitter controls/RC channels.
|
||||
|
||||
::: info
|
||||
A [Joystick](../config/joystick.md) can be used instead of RC for manual control.
|
||||
The [COM_RC_IN_MODE](../advanced_config/parameter_reference.md#COM_RC_IN_MODE) parameter [can be set](../advanced_config/parameters.md) to define what kind of manual controller(s) are enabled.
|
||||
A [Joystick](../config/joystick.md) can also be used for [Manual Control](../config/manual_control.md).
|
||||
|
||||
By default PX4 will latch the first valid controller it discovers and use it until the vehicle reboots.
|
||||
If you have multiple controllers and you want to define their priority see [Manual Control > PX4 Configuration](../config/manual_control.md#px4-configuration).
|
||||
:::
|
||||
|
||||
## Binding the Receiver
|
||||
|
||||
@@ -111,19 +111,17 @@ The settings and underlying parameters are shown below.
|
||||
|
||||
## Manual Control Loss Failsafe
|
||||
|
||||
The manual control loss failsafe may be triggered if the connection to the [RC transmitter](../getting_started/rc_transmitter_receiver.md) or [joystick](../config/joystick.md) is lost, and there is no fallback.
|
||||
If using an [RC transmitter](../getting_started/rc_transmitter_receiver.md) this is triggered if the RC [transmitter link is lost](../getting_started/rc_transmitter_receiver.md#set-signal-loss-behaviour).
|
||||
If using [joysticks](../config/joystick.md) connected over a MAVLink data link, this is triggered if the joysticks are disconnected or the data link is lost.
|
||||
|
||||
::: info
|
||||
PX4 and the receiver may also need to be configured in order to _detect RC loss_: [Radio Setup > RC Loss Detection](../config/radio.md#rc-loss-detection).
|
||||
:::
|
||||
A [Manual Control Loss Failsafe](../config/safety.md#manual-control-loss-failsafe) is triggered after a [manual control loss timeout](#COM_RC_LOSS_T) in which none of the configured [Manual Controllers](../config/manual_control.md) are available.
|
||||
|
||||

|
||||
|
||||
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).
|
||||
|
||||
::: info
|
||||
PX4 and the receiver may also need to be configured in order to _detect RC loss_: [Radio Setup > RC Loss Detection](../config/radio.md#rc-loss-detection).
|
||||
:::
|
||||
|
||||
Additional (and underlying) parameter settings are shown below.
|
||||
|
||||
| Parameter | Setting | Description |
|
||||
|
||||
@@ -95,7 +95,7 @@ It should be set to a value which ensures that the vehicle reaches a high enough
|
||||
[VT_TRANS_TIMEOUT](../advanced_config/parameter_reference.md#VT_TRANS_TIMEOUT)
|
||||
|
||||
This specifies the upper limit for the duration of the front transition. If the vehicle has not reached the transition airspeed after this time, then the transition will be aborted and a [Quadchute](../config/safety.md#quad-chute-failsafe) event will be triggered.
|
||||
:::note
|
||||
::: info
|
||||
Additionally, if an airspeed sensor is present, the transition will also be aborted if the airspeed has not reached [VT_ARSP_BLEND](../advanced_config/parameter_reference.md#VT_ARSP_BLEND) after the openloop transition time [VT_F_TR_OL_TM](../advanced_config/parameter_reference.md#VT_F_TR_OL_TM) has elapsed. This checks is used to avoid a scenario where the vehicle gains excessive speed when the airspeed sensor is faulty.
|
||||
:::
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ You can also start your simulation, and _then_ attach `gdb`:
|
||||
```
|
||||
|
||||
As the script runs, note the **SITL COMMAND:** output text located right above the large "PX4" text.
|
||||
It will list the location of your px4 bin file for later use.
|
||||
It will list the location of your PX4 bin file for later use.
|
||||
|
||||
```sh
|
||||
SITL COMMAND: "<px4 bin file>" "<build dir>"/etc
|
||||
|
||||
@@ -1,111 +1,119 @@
|
||||
# macOS Development Environment
|
||||
|
||||
The following instructions set up a PX4 development environment for macOS.
|
||||
The following instructions set up a PX4 development environment on macOS.
|
||||
This environment can be used to build PX4 for:
|
||||
|
||||
- Pixhawk and other NuttX-based hardware
|
||||
- [Gazebo Classic Simulation](../sim_gazebo_classic/index.md)
|
||||
- [Gazebo Simulation](../sim_gazebo_gz/index.md) (Gazebo Harmonic)
|
||||
|
||||
It works on both Intel and Apple Silicon Macs.
|
||||
|
||||
:::tip
|
||||
This setup is supported by the PX4 dev team.
|
||||
To build other targets you will need to use a [different OS](../dev_setup/dev_env.md#supported-targets) (or an [unsupported development environment](../advanced/community_supported_dev_env.md)).
|
||||
To build for [other targets](../dev_setup/dev_env.md#supported-targets) you will need to use a [different OS](../dev_setup/dev_env.md#supported-targets) or an [unsupported development environment](../advanced/community_supported_dev_env.md).
|
||||
:::
|
||||
|
||||
## Video Guide
|
||||
## Development Environment Setup
|
||||
|
||||
<lite-youtube videoid="tMbMGiMs1cQ" title="Setting up your PX4 development environment on macOS"/>
|
||||
### Prerequisites
|
||||
|
||||
## Base Setup
|
||||
|
||||
The "base" macOS setup installs the tools needed for building firmware, and includes the common tools that will be needed for installing/using the simulators.
|
||||
|
||||
### Environment Setup
|
||||
|
||||
:::details Apple Silicon MacBook users!
|
||||
If you have an Apple M1, M2 etc. MacBook, make sure to run the terminal as x86 by setting up an x86 terminal:
|
||||
|
||||
1. Locate the Terminal application within the Utilities folder (**Finder > Go menu > Utilities**)
|
||||
2. Select _Terminal.app_ and right-click on it, then choose **Duplicate**.
|
||||
3. Rename the duplicated Terminal app, e.g. to _x86 Terminal_
|
||||
4. Now select the renamed _x86 Terminal_ app and right-click and choose \*_Get Info_
|
||||
5. Check the box for **Open using Rosetta**, then close the window
|
||||
6. Run the _x86 Terminal_ as usual, which will fully support the current PX4 toolchain
|
||||
:::
|
||||
|
||||
First set up the environment
|
||||
|
||||
1. Enable more open files by appending the following line to the `~/.zshenv` file (creating it if necessary):
|
||||
1. **Install Xcode Command Line Tools** — provides `git`, `make`, and the Apple `clang` compiler:
|
||||
|
||||
```sh
|
||||
echo ulimit -S -n 2048 >> ~/.zshenv
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
2. **Install Homebrew** by following the [installation instructions](https://brew.sh).
|
||||
|
||||
3. **Increase the open-file limit.** The PX4 build opens many files simultaneously and the macOS default limit (256) is too low — you may see `"LD: too many open files"` errors without this.
|
||||
|
||||
Add the following line to your shell startup file so it applies to every new terminal session.
|
||||
macOS defaults to **zsh** since Catalina, so add it to `~/.zshrc` (use `~/.bashrc` if you use bash):
|
||||
|
||||
```sh
|
||||
echo "ulimit -S -n 2048" >> ~/.zshrc
|
||||
```
|
||||
|
||||
Then **open a new terminal** (or run `source ~/.zshrc`) for the change to take effect.
|
||||
|
||||
4. **Ensure Python 3 is available.** Some PX4 build scripts require `python3` and `pip3` to be in your `PATH`. The Xcode Command Line Tools include Python 3 by default.
|
||||
|
||||
:::tip
|
||||
If you need to install or manage a different Python version, we recommend [pyenv](https://github.com/pyenv/pyenv), which lets you set global and per-directory Python versions.
|
||||
:::
|
||||
|
||||
### Install Development Tools
|
||||
|
||||
1. **Download PX4 Source Code:**
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git
|
||||
cd PX4-Autopilot
|
||||
git submodule update --init --recursive --force
|
||||
```
|
||||
|
||||
2. **Install development environment libraries** from the [macos.sh](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/setup/macos.sh) helper script:
|
||||
|
||||
```sh
|
||||
./Tools/setup/macos.sh --sim-tools
|
||||
```
|
||||
|
||||
This installs:
|
||||
- **`px4-dev`** — ARM cross-compiler (`arm-gcc-bin@13`), `cmake`, `ninja`, `ccache`, and other build tools
|
||||
- **Python packages** from `requirements.txt`
|
||||
- **`px4-sim`** (via `--sim-tools`) — Gazebo Harmonic simulation (`gz-harmonic`) and related tools
|
||||
|
||||
::: info
|
||||
If you don't do this, the build toolchain may report the error: `"LD: too many open files"`
|
||||
Omit `--sim-tools` if you only need to build for NuttX hardware and don't need simulation.
|
||||
|
||||
Use `--reinstall` to force reinstallation of all Homebrew formulas (useful if something is broken).
|
||||
:::
|
||||
|
||||
1. Enforce Python 3 by appending the following lines to `~/.zshenv`
|
||||
### Gazebo Simulation
|
||||
|
||||
```sh
|
||||
# Point pip3 to macOS system python 3 pip
|
||||
alias pip3=/usr/bin/pip3
|
||||
```
|
||||
The `--sim-tools` flag installs the `px4-sim` Homebrew formula, which pulls in Gazebo Harmonic.
|
||||
|
||||
### Common Tools
|
||||
If you skipped `--sim-tools` during initial setup and want to add simulation later:
|
||||
|
||||
To setup the environment to be able to build for Pixhawk/NuttX hardware (and install the common tools for using simulators):
|
||||
```sh
|
||||
brew tap PX4/px4
|
||||
brew install px4-sim
|
||||
```
|
||||
|
||||
1. Install Homebrew by following these [installation instructions](https://brew.sh).
|
||||
1. Run these commands in your shell to install the common tools:
|
||||
::: info
|
||||
Gazebo requires **XQuartz** for display on macOS.
|
||||
If you don't already have it installed:
|
||||
|
||||
```sh
|
||||
brew tap PX4/px4
|
||||
brew install px4-dev
|
||||
```
|
||||
```sh
|
||||
brew install --cask xquartz
|
||||
```
|
||||
|
||||
1. Install the required Python packages:
|
||||
You may need to log out and back in after installing XQuartz.
|
||||
:::
|
||||
|
||||
```sh
|
||||
# install required packages using pip3
|
||||
python3 -m pip install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging kconfiglib future jsonschema
|
||||
# if this fails with a permissions error, your Python install is in a system path - use this command instead:
|
||||
sudo -H python3 -m pip install --user pyserial empty toml numpy pandas jinja2 pyyaml pyros-genmsg packaging kconfiglib future jsonschema
|
||||
```
|
||||
### Verify Installation
|
||||
|
||||
## Gazebo Classic Simulation
|
||||
After installation, verify the key tools are available:
|
||||
|
||||
To setup the environment for [Gazebo Classic](../sim_gazebo_classic/index.md) simulation:
|
||||
```sh
|
||||
# NuttX cross-compiler (from arm-gcc-bin@13)
|
||||
arm-none-eabi-gcc --version
|
||||
|
||||
1. Run the following commands in your shell:
|
||||
# Build tools
|
||||
cmake --version
|
||||
ninja --version
|
||||
|
||||
```sh
|
||||
brew unlink tbb
|
||||
sed -i.bak '/disable! date:/s/^/ /; /disable! date:/s/./#/3' $(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula/tbb@2020.rb
|
||||
brew install tbb@2020
|
||||
brew link tbb@2020
|
||||
```
|
||||
# Gazebo (if --sim-tools was used)
|
||||
gz sim --versions
|
||||
```
|
||||
|
||||
::: info
|
||||
September 2021: The commands above are a workaround to this bug: [PX4-Autopilot#17644](https://github.com/PX4/PX4-Autopilot/issues/17644).
|
||||
They can be removed once it is fixed (along with this note).
|
||||
:::
|
||||
Quick smoke test — build and run a simulation target:
|
||||
|
||||
1. To install SITL simulation with Gazebo Classic:
|
||||
```sh
|
||||
make px4_sitl gz_x500
|
||||
```
|
||||
|
||||
```sh
|
||||
brew install --cask temurin
|
||||
brew install --cask xquartz
|
||||
brew install px4-sim-gazebo
|
||||
```
|
||||
|
||||
1. Run the macOS setup script: `PX4-Autopilot/Tools/setup/macos.sh`
|
||||
The easiest way to do this is to clone the PX4 source, and then run the script from the directory, as shown:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
cd PX4-Autopilot/Tools/setup
|
||||
sh macos.sh
|
||||
```
|
||||
If everything is set up correctly, this will build PX4 SITL and launch a Gazebo simulation with the x500 quadcopter.
|
||||
|
||||
## Next Steps
|
||||
|
||||
@@ -114,7 +122,7 @@ Once you have finished setting up the command-line toolchain:
|
||||
- Install [VSCode](../dev_setup/vscode.md) (if you prefer using an IDE to the command line).
|
||||
- Install the [QGroundControl Daily Build](../dev_setup/qgc_daily_build.md)
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The _daily build_ includes development tools that are hidden in release builds.
|
||||
It may also provide access to new PX4 features that are not yet supported in release builds.
|
||||
:::
|
||||
|
||||
@@ -287,12 +287,15 @@ PX4 can control LEDs via DroneCAN [LightsCommand](https://dronecan.github.io/Spe
|
||||
|
||||
Configuration:
|
||||
|
||||
1. Set [UAVCAN_LGT_NUM](../advanced_config/parameter_reference.md#UAVCAN_LGT_NUM) to the number of lights (0 disables). You might need to reopen the ground station to have parameters for new instances available.
|
||||
2. For each light slot (0 to NUM-1), set:
|
||||
1. Set [UAVCAN_LGT_NUM](../advanced_config/parameter_reference.md#UAVCAN_LGT_NUM) to the number of lights (0 disables, maximum 2). You need to reboot and reopen the ground station to have parameters for new instances available.
|
||||
2. [UAVCAN_LGT_MODE](../advanced_config/parameter_reference.md#UAVCAN_LGT_MODE) controls when lights should be in active state (always off, when armed, when prearmed, always on).
|
||||
3. For each light slot (0 to NUM-1), set:
|
||||
- `UAVCAN_LGT_IDx`: The `light_id` matching your peripheral.
|
||||
- `UAVCAN_LGT_FNx`: `Status` for system status colours, or `Anti-collision` for white beacon.
|
||||
3. For anti-collision lights, [UAVCAN_LGT_ANTCL](../advanced_config/parameter_reference.md#UAVCAN_LGT_ANTCL) controls when they illuminate (off, armed, prearmed, always on).
|
||||
4. Reboot for any changes to take effect.
|
||||
- `UAVCAN_LGT_FNx`: The light function. Available options:
|
||||
- System status light
|
||||
- Static colors which light up when `UAVCAN_LGT_MODE` is active.
|
||||
- Hybrid modes where the Status is shown when `UAVCAN_LGT_MODE` is inactive, and a static color when active.
|
||||
4. Reboot for changes to take effect.
|
||||
|
||||
## QGC CANNODE Parameter Configuration
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# Accton Godwit G-A1
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://cubepilot.org/#/home) for hardware support or compliance issues.
|
||||
:::
|
||||
|
||||
The G-A1 is a state-of-the-art flight controller developed derived from the [Pixhawk Autopilot v6X Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-012%20Pixhawk%20Autopilot%20v6X%20Standard.pdf).
|
||||
The G-A1 is a state-of-the-art flight controller derived from the [Pixhawk Autopilot v6X Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-012%20Pixhawk%20Autopilot%20v6X%20Standard.pdf).
|
||||
|
||||
It includes an STM32H753 double-precision floating-point FMU processor and an STM32F103 IO coprocessor, multiple IMUs with 6-axis inertial sensors, two pressure/temperature sensors, and a geomagnetic sensor.
|
||||
It also has independent buses and power supplies, and is designed for safety and rich expansion capabilities.
|
||||
|
||||
With an integrated 10/100M Ethernet Physical Layer (PHY), the G-A1 can also communicate with a mission computer (airborne computer), high-end surveying and mapping cameras, and other UxV-mounted equipment for high-speed communications, meeting the needs of advanced UxV systems.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Visit [Accton-IoT Godwit](https://www.accton-iot.com/godwit/) for more information.
|
||||
:::
|
||||
|
||||
@@ -65,7 +65,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
- 92.2 (L) x 51.2 (W) x 28.3 (H) mm
|
||||
- 77.6g (carrier board with IMU)
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
- [Accton-IoT Godwit](https://www.accton-iot.com/godwit/)
|
||||
- [sales@accton-iot.com](sales@accton-iot.com)
|
||||
@@ -115,7 +115,7 @@ PPM receivers should be connected to the PPM interface. And other RC systems can
|
||||
|
||||
## GPS/Compass
|
||||
|
||||
The Godwit G-A1 has a built-in compass
|
||||
The Godwit G-A1 has a built-in compass.
|
||||
Due to potential interference, the autopilot is usually used with an external I2C compass as part of a GPS/Compass combination.
|
||||
|
||||

|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Sky-Drones AIRLink
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://sky-drones.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -26,7 +26,7 @@ AIRLink has two computers and integrated LTE Module:
|
||||
## Specifications
|
||||
|
||||
- **Sensors**
|
||||
- 3x Accelerometers, 3x Gyroscopes, 3x Magnetometers, 3x Pressure sensorss
|
||||
- 3x Accelerometers, 3x Gyroscopes, 3x Magnetometers, 3x Pressure sensors
|
||||
- GNSS, Rangefinders, Lidars, Optical Flow, Cameras
|
||||
- 3x-redundant IMU
|
||||
- Vibration dampening
|
||||
@@ -71,7 +71,7 @@ AIRLink has two computers and integrated LTE Module:
|
||||
- Antenna, 4x4 MIMO
|
||||
- Bands: Worldwide
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
Purchase from the original Sky-Drones Store (worldwide shipping with 1-2 days order processing time):
|
||||
|
||||
@@ -92,7 +92,7 @@ The standard set contains:
|
||||
- 1x FPV camera with CSI cable
|
||||
- 1x WiFi antenna with MMCX connector
|
||||
- 2x/4x LTE/5G antenna with MMCX connector
|
||||
- 1x HDMI to mini HDMI cable1x set of cables (7 cables for all connectors)
|
||||
- 1x HDMI to mini HDMI cable, 1x set of cables (7 cables for all connectors)
|
||||
|
||||
[AIRLink Telemetry](https://sky-drones.com/sets/airlink-telemetry-set.html) based on the Microhard LAN/IP-based RF micromodule is available as an add-on and is fully compatible with AIRLink.
|
||||
|
||||
@@ -344,14 +344,14 @@ AIRLink has 16 PWM ouputs. Main outputs 1-8 and connected to IO MCU. AUX outputs
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make sky-drones_smartap-airlink
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ARK FPV Flight Controller
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://arkelectron.com/contact-us/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -9,11 +9,11 @@ The USA-built ARK FPV flight controller is based on the [ARKV6X](https://arkelec
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
::: info
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## Where To Buy
|
||||
## Where To Buy {#store}
|
||||
|
||||
Order from [Ark Electronics](https://arkelectron.com/product/arkv6x/) (US)
|
||||
|
||||
@@ -76,7 +76,7 @@ See the documentation [Ark Electronics GitBook](https://arkelectron.gitbook.io/a
|
||||
|
||||
## Additional Information
|
||||
|
||||
- Weight: 7.5 g g with MicroSD card
|
||||
- Weight: 7.5 g with MicroSD card
|
||||
- Dimensions: 3.6 x 3.6 x 0.8 cm
|
||||
- USA Built - NDAA compliant
|
||||
- Heater: 1W for warming sensors in extreme cold
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ARK Pixhawk Autopilot Bus Carrier
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://arkelectron.com/contact-us/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -11,7 +11,7 @@ The PAB form factor enables the ARK PAB Carrier to be used with any [PAB-compati
|
||||
|
||||

|
||||
|
||||
### Where To Buy
|
||||
### Where To Buy {#store}
|
||||
|
||||
Order From [Ark Electronics](https://arkelectron.com/product/ark-pixhawk-autopilot-bus-carrier/) (US)
|
||||
|
||||
@@ -39,7 +39,7 @@ Order From [Ark Electronics](https://arkelectron.com/product/ark-pixhawk-autopil
|
||||
- 6 Pin JST-GH
|
||||
- Dual CAN Ports
|
||||
- 4 Pin JST-GH
|
||||
- Triple Telemetry Ports with Flow - Control
|
||||
- Triple Telemetry Ports with Flow Control
|
||||
- 6 Pin JST-GH
|
||||
- Eight PWM Outputs
|
||||
- 10 Pin JST-GH
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
# ARK Pi6X Flow
|
||||
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://arkelectron.com/contact-us/) for hardware support or compliance issues.
|
||||
:::
|
||||
|
||||
The [ARK Pi6X Flow](https://arkelectron.gitbook.io/ark-documentation/flight-controllers/ark-pi6x-flow) integrates a Raspberry Pi Compute Module 4 (CM4) Carrier, [ARKV6X Flight Controller](../flight_controller/ark_v6x.md), [ARK Flow sensors](../dronecan/ark_flow.md) , [ARK PAB Power Module](../power_module/ark_pab_power_module.md), and a 4-in-1 ESC, all mounted onto one compact board.
|
||||
|
||||

|
||||
|
||||
## Where to Buy
|
||||
::: info
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## Where to Buy {#store}
|
||||
|
||||
Order this module from:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ARK Electronics ARKV6X
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://arkelectron.com/contact-us/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -16,7 +16,7 @@ The Pixhawk Autopilot Bus (PAB) form factor enables the ARKV6X to be used on any
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## Where To Buy
|
||||
## Where To Buy {#store}
|
||||
|
||||
Order From [Ark Electronics](https://arkelectron.com/product/arkv6x/) (US)
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
<Badge type="info" text="Discontinued" />
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
This flight controller has been [discontinued](../flight_controller/autopilot_experimental.md) and is no longer commercially available.
|
||||
:::
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://store.mrobotics.io/) for hardware support or compliance issues.
|
||||
:::
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Community Supported & Experimental Autopilots
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
For more information about PX4 project autopilot board support levels see: [px4.io/autopilots/](https://px4.io/autopilots/).
|
||||
:::
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Manufacturer-supported autopilots are maintained and supported by a board manufacturer (manufacturers commit to delivering compatibility with the current stable PX4 release within 4 months of the official release announcement).
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
For more information about PX4 project autopilot board support levels see: [px4.io/autopilots/](https://px4.io/autopilots/).
|
||||
:::
|
||||
|
||||
@@ -18,7 +18,7 @@ The boards in this category are:
|
||||
- [ARK Electronics ARKV6X](../flight_controller/ark_v6x.md) (and [ARK Electronics Pixhawk Autopilot Bus Carrier](../flight_controller/ark_pab.md))
|
||||
- [ARK FPV Flight Controller](../flight_controller/ark_fpv.md)
|
||||
- [ARK Pi6X Flow Flight Controller](../flight_controller/ark_pi6x.md)
|
||||
- [CUAV Nora](../flight_controller/cuav_nora.md)(CUAV X7 variant)
|
||||
- [CUAV Nora](../flight_controller/cuav_nora.md) (CUAV X7 variant)
|
||||
- [CUAV V5+](../flight_controller/cuav_v5_plus.md) (FMUv5)
|
||||
- [CUAV V5 nano](../flight_controller/cuav_v5_nano.md) (FMUv5)
|
||||
- [CUAV X25 EVO](../flight_controller/cuav_x25-evo.md)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
These boards are maintained, updated, tested and otherwise supported by the PX4 project maintainers and Dronecode test team.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
For more information about PX4 project autopilot board support levels see: [px4.io/autopilots/](https://px4.io/autopilots/).
|
||||
:::
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<LinkedBadge type="warning" text="Experimental" url="../flight_controller/autopilot_experimental.md"/>
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://beagleboard.org/blue) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -23,7 +23,7 @@ _BeagleBone Blue_ images can be found here:
|
||||
Information about flashing OS images can be found on [this page](https://github.com/beagleboard/beaglebone-blue/wiki/Flashing-firmware).
|
||||
Other useful information can be found in the [FAQ](<https://github.com/beagleboard/beaglebone-blue/wiki/Frequently-Asked-Questions-(FAQ)>).
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Optionally you can update to a realtime kernel, and if you do, re-check if _librobotcontrol_ works properly with the realtime kernel.
|
||||
:::
|
||||
|
||||
@@ -33,7 +33,7 @@ The latest OS images at time of updating this document is [AM3358 Debian 10.3 20
|
||||
|
||||
The recommended way to build PX4 for _BeagleBone Blue_ is to compile on a development computer and upload the PX4 executable binary directly to the BeagleBone Blue.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
This approach is recommended over [native build](#native_builds) due to speed of deployment and ease of use.
|
||||
:::
|
||||
|
||||
@@ -79,7 +79,7 @@ echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && systemctl restart sshd
|
||||
For _rsync_ over SSH with key authentication, follow the steps here (on the development machine):
|
||||
1. Generate an SSH key if you have not previously done so:
|
||||
|
||||
```
|
||||
```sh
|
||||
ssh-keygen -t rsa
|
||||
```
|
||||
|
||||
@@ -89,13 +89,13 @@ echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && systemctl restart sshd
|
||||
|
||||
1. Define the BeagleBone Blue board as `beaglebone` in **/etc/hosts** and copy the public SSH key to the board for password-less SSH access:
|
||||
|
||||
```
|
||||
```sh
|
||||
ssh-copy-id debian@beaglebone
|
||||
```
|
||||
|
||||
1. Alternatively you can use the beaglebone's IP directly:
|
||||
|
||||
```
|
||||
```sh
|
||||
ssh-copy-id debian@<IP>
|
||||
```
|
||||
|
||||
@@ -115,7 +115,7 @@ echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && systemctl restart sshd
|
||||
|
||||
The ARM Cross Compiler for _BeagleBone Blue_ can be found at [Linaro Toolchain Binaries site](https://www.linaro.org/downloads/#gnu_and_llvm).
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
GCC in the toolchain should be compatible with kernel in _BeagleBone Blue_.
|
||||
General rule of thumb is to choose a toolchain where version of GCC is not higher than version of GCC which comes with the OS image on _BeagleBone Blue_.
|
||||
:::
|
||||
@@ -129,7 +129,7 @@ echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && systemctl restart sshd
|
||||
tar -xf gcc-linaro-13.0.0-2022.06-x86_64_arm-linux-gnueabihf.tar.xz
|
||||
```
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The GCC version of the toolchain should be compatible with kernel in _BeagleBone Blue_.
|
||||
:::
|
||||
|
||||
@@ -147,7 +147,7 @@ echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && systemctl restart sshd
|
||||
|
||||
1. Setup other dependencies by downloading the PX4 source code and then running the setup scripts:
|
||||
|
||||
````
|
||||
````sh
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
ols
|
||||
```
|
||||
@@ -166,7 +166,7 @@ echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && systemctl restart sshd
|
||||
|
||||
Compile and Upload
|
||||
|
||||
```
|
||||
```sh
|
||||
make beaglebone_blue_default upload
|
||||
```
|
||||
|
||||
@@ -185,9 +185,7 @@ sudo ./bin/px4 -s px4.config
|
||||
Currently _librobotcontrol_ requires root access.
|
||||
:::
|
||||
|
||||
<a id="native_builds"></a>
|
||||
|
||||
## Native Builds (optional)
|
||||
## Native Builds (optional) {#native_builds}
|
||||
|
||||
You can also natively build PX4 builds directly on the BeagleBone Blue.
|
||||
|
||||
@@ -211,7 +209,7 @@ Run the following commands on the BeagleBone Blue (i.e. via SSH):
|
||||
|
||||
## Changes in config
|
||||
|
||||
All changes can be made in de px4.config file directly on beaglebone.
|
||||
All changes can be made in the px4.config file directly on beaglebone.
|
||||
For example, you can change the WIFI to wlan.
|
||||
|
||||
::: info
|
||||
@@ -290,8 +288,6 @@ For a quadcopter with GPS and an SBUS receiver, here are typical connections:
|
||||
|
||||
1. Connect the ESC of motor 1, 2, 3 and 4 to channel 1, 2, 3 and 4 of servo outputs on BeagleBone Blue, respectively.
|
||||
If your ESC connector contains a power output pin, remove it and do not connect it to the power output pin of the servo channel on the BeagleBone Blue.
|
||||
|
||||
1. Connect the above mentioned converted SBUS signal to the dsm2 port if you have the matching connector for dsm2, otherwise connect it to any other available UART port and change the corresponding port in **/home/debian/px4/px4.config** accordingly.
|
||||
|
||||
1. Connect the signals of GPS module to GPS port on the BeagleBone Blue.
|
||||
2. Connect the above mentioned converted SBUS signal to the dsm2 port if you have the matching connector for dsm2, otherwise connect it to any other available UART port and change the corresponding port in **/home/debian/px4/px4.config** accordingly.
|
||||
3. Connect the signals of GPS module to GPS port on the BeagleBone Blue.
|
||||
Note that the signal pins of the GPS port on the BeagleBone Blue are only 3.3V tolerant, so choose your GPS module accordingly.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# CUAV Nora Flight Controller
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://www.cuav.net) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -30,7 +30,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
- Car-grade RM3100 compass
|
||||
- High performance processor
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The manufacturer [CUAV Docs](https://doc.cuav.net/flight-controller/x7/en/nora.html) are the canonical reference for Nora.
|
||||
They should be used by preference as they contain the most complete and up to date information.
|
||||
:::
|
||||
@@ -72,7 +72,7 @@ When it runs PX4 firmware, only 8 PWM outputs work.
|
||||
The remaining 6 PWM ports are still being adapted (so it is not compatible with VOLT at time of writing).
|
||||
:::
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
- [CUAV Store](https://store.cuav.net)<\br>
|
||||
- [CUAV Aliexpress](https://www.aliexpress.com/item/4001042501927.html?gps-id=8041884&scm=1007.14677.110221.0&scm_id=1007.14677.110221.0&scm-url=1007.14677.110221.0&pvid=3dc0a3ba-fa82-43d2-b0b3-6280e4329cef&spm=a2g0o.store_home.promoteRecommendProducts_7913969.58)
|
||||
@@ -87,7 +87,7 @@ The remaining 6 PWM ports are still being adapted (so it is not compatible with
|
||||
|
||||

|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The `RCIN` port is limited to powering the rc receiver and cannot be connected to any power/load.
|
||||
:::
|
||||
|
||||
@@ -109,14 +109,14 @@ Under these conditions all power sources will be used in this order to power the
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make cuav_nora_default
|
||||
```
|
||||
|
||||
@@ -125,7 +125,7 @@ make cuav_nora_default
|
||||
The _Nora_ has over-current protection on the 5 Volt Peripheral and 5 Volt high power, which limits the current to 2.5A.
|
||||
The _Nora_ has short circuit protection.
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
Up to 2.5 A can be delivered to the connectors listed as pin 1 (although these are only rated at 1 A).
|
||||
:::
|
||||
|
||||
@@ -153,7 +153,7 @@ The provided debug cable does not connect to the SWD port `Vref` pin (1).
|
||||
|
||||

|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The SWD Vref pin (1) uses 5V as Vref but the CPU is run at 3.3V!
|
||||
|
||||
Some JTAG adapters (SEGGER J-Link) will use the Vref voltage to set the voltage on the SWD lines.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# CUAV Pixhawk V6X
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://store.cuav.net/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -11,7 +11,7 @@ It is based on the [Pixhawk® Autopilot FMUv6X Standard](https://github.co
|
||||
|
||||

|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
This autopilot is [supported](../flight_controller/autopilot_pixhawk_standard.md) by the PX4 maintenance and test teams.
|
||||
:::
|
||||
|
||||
@@ -61,7 +61,7 @@ The Pixhawk® V6X is ideal for corporate research labs, academic research and co
|
||||
- 16- PWM servo outputs
|
||||
- 1 Dedicated R/C input for Spektrum / DSM and S.Bus with analog / PWM RSSI input
|
||||
- 3 TELEM Ports(with full flow control)
|
||||
- 1 UART4(Seial and I2C)
|
||||
- 1 UART4(Serial and I2C)
|
||||
- 2 GPS ports
|
||||
- 1 full GPS plus Safety Switch Port(GPS1)
|
||||
- 1 basic GPS port(with I2C,GPS2)
|
||||
@@ -104,7 +104,7 @@ The Pixhawk® V6X is ideal for corporate research labs, academic research and co
|
||||
|
||||

|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
Order from [CUAV](https://store.cuav.net/).
|
||||
|
||||
@@ -166,20 +166,18 @@ Analog battery monitoring via an ADC is not supported on this particular board,
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make px4_fmu-v6x_default
|
||||
```
|
||||
|
||||
<a id="debug_port"></a>
|
||||
|
||||
## Debug Port
|
||||
## Debug Port {#debug_port}
|
||||
|
||||
The [PX4 System Console](../debug/system_console.md) and [SWD interface](../debug/swd_debug.md) run on the **FMU Debug** port.
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
<Badge type="info" text="Discontinued" /> <!-- 202507 / PX4v1.16 -->
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
This flight controller has been [discontinued](../flight_controller/autopilot_experimental.md) and is no longer commercially available.
|
||||
:::
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://store.cuav.net/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -52,7 +52,7 @@ It is intended primarily for academic and commercial developers.
|
||||
- Other Characteristics:
|
||||
- Operating temperature: -20 ~ 80°C (Measured value)
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
Order from [CUAV](https://cuav.taobao.com/index.htm?spm=2013.1.w5002-16371268426.2.411f26d9E18eAz).
|
||||
|
||||
@@ -60,7 +60,7 @@ Order from [CUAV](https://cuav.taobao.com/index.htm?spm=2013.1.w5002-16371268426
|
||||
|
||||

|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The RCIN interface is limited to powering the rc receiver and cannot be connected to any power/load.
|
||||
:::
|
||||
|
||||
@@ -82,14 +82,14 @@ Under these conditions all power sources will be used in this order to power the
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make px4_fmu-v5_default
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# CUAV V5 nano Autopilot
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://store.cuav.net/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -58,7 +58,7 @@ Main FMU Processor: STM32F765◦32 Bit Arm® Cortex®-M7, 216MHz, 2MB memory, 51
|
||||
- Other Characteristics:
|
||||
- Operating temperature: -20 ~ 85°C (Measured value)
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
[CUAV Store](https://store.cuav.net/shop/v5-nano/)
|
||||
|
||||
@@ -82,20 +82,18 @@ Download **V5 nano** pinouts from [here](http://manual.cuav.net/V5-Plus.pdf).
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make px4_fmu-v5_default
|
||||
```
|
||||
|
||||
<a id="debug_port"></a>
|
||||
|
||||
## Debug Port
|
||||
## Debug Port {#debug_port}
|
||||
|
||||
The [PX4 System Console](../debug/system_console.md) and [SWD interface](../debug/swd_debug.md) operate on the **FMU Debug** port (`DSU7`).
|
||||
The board does not have an I/O debug interface.
|
||||
@@ -119,7 +117,7 @@ The provided debug cable does not connect to the SWD port `Vref` pin (1).
|
||||
|
||||

|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The SWD Vref pin (1) uses 5V as Vref but the CPU is run at 3.3V!
|
||||
|
||||
Some JTAG adapters (SEGGER J-Link) will use the Vref voltage to set the voltage on the SWD lines.
|
||||
@@ -200,7 +198,7 @@ For direct connection to _Segger Jlink_ we recommended you use the 3.3 Volts of
|
||||
|
||||
`PM2` can only measure battery voltage and current, but **not** power the flight controller.
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not support this interface.
|
||||
:::
|
||||
|
||||
@@ -214,7 +212,7 @@ For example, the serial number Batch V011904((V01 is the number of V5, 1904 is t
|
||||
|
||||
#### SBUS / DSM / RSSI interface Pin1 unfused
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
This is a safety issue.
|
||||
:::
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# CUAV V5+ Autopilot
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://store.cuav.net/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -58,7 +58,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
- Other Characteristics:
|
||||
- Operating temperature: -20 ~ 80°c(Measured value)
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
[CUAV Aliexpress](https://www.aliexpress.com/item/32890380056.html?spm=a2g0o.detail.1000060.1.7a7233e7mLTlVl&gps-id=pcDetailBottomMoreThisSeller&scm=1007.13339.90158.0&scm_id=1007.13339.90158.0&scm-url=1007.13339.90158.0&pvid=d899bfab-a7ca-46e1-adf2-72ad1d649822) (International users)
|
||||
|
||||
@@ -101,20 +101,20 @@ Under these conditions all power sources will be used in this order to power the
|
||||
The _V5+_ has over current protection on the 5 Volt Peripheral and 5 Volt high power, which limits the current to 2.5A.
|
||||
The _V5+_ has short circuit protection.
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
Up to 2.5 A can be delivered to the connectors listed as pin 1 (although these are only rated at 1 A).
|
||||
:::
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make px4_fmu-v5_default
|
||||
```
|
||||
|
||||
@@ -142,7 +142,7 @@ The provided debug cable does not connect to the SWD port `Vref` pin (1).
|
||||
|
||||

|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The SWD Vref pin (1) uses 5V as Vref but the CPU is run at 3.3V!
|
||||
|
||||
Some JTAG adapters (SEGGER J-Link) will use the Vref voltage to set the voltage on the SWD lines.
|
||||
@@ -205,7 +205,7 @@ The UAVCAN [NEO V2 PRO GNSS receiver](https://doc.cuav.net/gps/neo-series-gnss/e
|
||||
|
||||
`DSU7` FMU Debug Pin 1 is 5 volts - not the 3.3 volts of the CPU.
|
||||
|
||||
Some JTAG use this voltage to set the IO levels when communicating to the target.
|
||||
Some JTAG adapters use this voltage to set the IO levels when communicating to the target.
|
||||
|
||||
For direct connection to _Segger Jlink_ we recommended you use the 3.3 Volts of DSM/SBUS/RSSI pin 4 as Pin 1 on the debug connector (`Vtref`).
|
||||
|
||||
@@ -219,7 +219,7 @@ For example, the serial number Batch V011904((V01 is the number of V5, 1904 is t
|
||||
|
||||
#### SBUS / DSM / RSSI interface Pin1 unfused
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
This is a safety issue.
|
||||
:::
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# CUAV X25-EVO
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://store.cuav.net/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -85,7 +85,7 @@ These flight controllers are [manufacturer supported](../flight_controller/autop
|
||||
|
||||
- Not provided.
|
||||
|
||||
## Purchase Channels
|
||||
## Purchase Channels {#store}
|
||||
|
||||
Order from [CUAV](https://store.cuav.net/).
|
||||
|
||||
@@ -128,20 +128,18 @@ Digital DroneCAN/UAVCAN battery monitoring is enabled by default.
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users do not need to build this firmware!
|
||||
It is pre-built and installed automatically by _QGroundControl_ when the appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target, execute:
|
||||
|
||||
```
|
||||
```sh
|
||||
make cuav_x25-evo_default
|
||||
```
|
||||
|
||||
<a id="debug_port"></a>
|
||||
|
||||
## Debug Port
|
||||
## Debug Port {#debug_port}
|
||||
|
||||
The [PX4 System Console](../debug/system_console.md) and [SWD Interface](../debug/swd_debug.md) operate on the **FMU Debug** port.
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
<Badge type="info" text="Discontinued" /> <!-- 202507 / PX4v1.16 -->
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
This flight controller has been [discontinued](../flight_controller/autopilot_experimental.md) and is no longer commercially available.
|
||||
It has been superseded by the [CUAV X7+](https://doc.cuav.net/controller/x7/en/).
|
||||
:::
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://www.cuav.net) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -38,7 +38,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
- Car-grade RM3100 compass
|
||||
- High performance processor
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The manufacturer [CUAV Docs](https://doc.cuav.net/flight-controller/x7/en/) are the canonical reference for the X7.
|
||||
They should be used by preference as they contain the most complete and up to date information.
|
||||
:::
|
||||
@@ -79,7 +79,7 @@ They should be used by preference as they contain the most complete and up to da
|
||||
When it runs PX4 firmware, only 8 pwm works, the remaining 6 pwm are still being adapted, so it is not compatible with VOLT now.
|
||||
:::
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
[CUAV Store](https://store.cuav.net)
|
||||
|
||||
@@ -95,7 +95,7 @@ When it runs PX4 firmware, only 8 pwm works, the remaining 6 pwm are still being
|
||||
|
||||

|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The `RCIN` port is limited to powering the RC receiver and cannot be connected to any power/load.
|
||||
:::
|
||||
|
||||
@@ -118,14 +118,14 @@ Under these conditions all power sources will be used in this order to power the
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make cuav_x7pro_default
|
||||
```
|
||||
|
||||
@@ -134,7 +134,7 @@ make cuav_x7pro_default
|
||||
The _X7_ has over-current protection on the 5 Volt Peripheral and 5 Volt high power, which limits the current to 2.5A.
|
||||
The _X7_ has short circuit protection.
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
Up to 2.5 A can be delivered to the connectors listed as pin 1 (although these are only rated at 1 A).
|
||||
:::
|
||||
|
||||
@@ -164,7 +164,7 @@ The provided debug cable does not connect to the SWD port `Vref` pin (1).
|
||||
|
||||

|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The SWD Vref pin (1) uses 5V as Vref but the CPU is run at 3.3V!
|
||||
|
||||
Some JTAG adapters (SEGGER J-Link) will use the Vref voltage to set the voltage on the SWD lines.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# CubePilot Cube Orange Flight Controller
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://cubepilot.org/#/home) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -10,7 +10,7 @@ The [Cube Orange](https://www.cubepilot.com/#/cube/features) flight controller i
|
||||

|
||||
|
||||
The controller is designed to be used with a domain-specific carrier board in order to reduce the wiring, improve reliability, and ease of assembly.
|
||||
For example, a carrier board for a commercial inspection vehicle might include connections for a companion computer, while a carrier board for a racer could includes ESCs for the frame of the vehicle.
|
||||
For example, a carrier board for a commercial inspection vehicle might include connections for a companion computer, while a carrier board for a racer could include ESCs for the frame of the vehicle.
|
||||
|
||||
The ADS-B carrier board includes a customized 1090MHz ADSB-In receiver from uAvionix.
|
||||
This provides attitude and location of commercial manned aircraft within the range of Cube.
|
||||
@@ -18,10 +18,14 @@ This is automatically configured and enabled in the default PX4 firmware.
|
||||
|
||||
Cube includes vibration isolation on two of the IMU's, with a third fixed IMU as a reference / backup.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopilot/the-cube) contains detailed information, including an overview of the [Differences between Cube Colours](https://docs.cubepilot.org/user-guides/autopilot/the-cube/introduction/specifications).
|
||||
:::
|
||||
|
||||
::: info
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## Key Features
|
||||
|
||||
- 32bit STM32H753VI (32bit [ARM Cortex M7](https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M7), 400 MHz, Flash 2MB, RAM 1MB).
|
||||
@@ -36,9 +40,7 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi
|
||||
- High-power, multi-tone piezo audio indicator
|
||||
- microSD card for high-rate logging over extended periods of time
|
||||
|
||||
<a id="stores"></a>
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
- [Reseller list](https://www.cubepilot.com/#/reseller/list)
|
||||
|
||||
@@ -223,14 +225,14 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target, open up the terminal and enter:
|
||||
|
||||
```
|
||||
```sh
|
||||
make cubepilot_cubeorange
|
||||
```
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# CubePilot Cube Orange+ Flight Controller
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://cubepilot.org/#/home) for hardware support or compliance issues.
|
||||
:::
|
||||
|
||||
The [Cube Orange+](https://www.cubepilot.com/#/cube/features) flight controller is a flexible autopilot intended primarily for manufacturers of commercial systems.
|
||||
Cube Orange+ is similar to Cube Orange, but has a more powerful dual-core processor (STM32H757, and some different sensors parts.
|
||||
Cube Orange+ is similar to Cube Orange, but has a more powerful dual-core processor (STM32H757), and some different sensor parts.
|
||||
|
||||

|
||||
|
||||
The controller is designed to be used with a domain-specific carrier board in order to reduce the wiring, improve reliability, and ease of assembly.
|
||||
For example, a carrier board for a commercial inspection vehicle might include connections for a companion computer, while a carrier board for a racer could includes ESCs for the frame of the vehicle.
|
||||
For example, a carrier board for a commercial inspection vehicle might include connections for a companion computer, while a carrier board for a racer could include ESCs for the frame of the vehicle.
|
||||
|
||||
The ADS-B carrier board includes a customized 1090MHz ADSB-In receiver from uAvionix.
|
||||
This provides attitude and location of commercial manned aircraft within the range of Cube.
|
||||
@@ -19,10 +19,14 @@ This is automatically configured and enabled in the default PX4 firmware.
|
||||
|
||||
Cube includes vibration isolation on two of the IMU's, with a third fixed IMU as a reference / backup.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopilot/the-cube) contains detailed information, including an overview of the [Differences between Cube Colours](https://docs.cubepilot.org/user-guides/autopilot/the-cube/introduction/specifications).
|
||||
:::
|
||||
|
||||
::: info
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## Key Features
|
||||
|
||||
- 32bit STM32H757ZI (32bit [ARM Cortex M7](https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M7), 400 MHz, Flash 2MB, RAM 1MB).
|
||||
@@ -37,9 +41,7 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi
|
||||
- High-power, multi-tone piezo audio indicator
|
||||
- microSD card for high-rate logging over extended periods of time
|
||||
|
||||
<a id="stores"></a>
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
- [Reseller list](https://www.cubepilot.com/#/reseller/list)
|
||||
|
||||
@@ -224,13 +226,13 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The firmware for Orange+ will be present in releases from PX4 v1.14.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target, open up the terminal and enter:
|
||||
|
||||
```
|
||||
```sh
|
||||
make cubepilot_cubeorangeplus
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# CubePilot Cube Yellow Flight Controller
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://cubepilot.org/#/home) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -10,14 +10,18 @@ The Cube Yellow flight controller is a flexible autopilot intended primarily for
|
||||

|
||||
|
||||
The controller is designed to be used with a domain-specific carrier board in order to reduce the wiring, improve reliability, and ease of assembly.
|
||||
For example, a carrier board for a commercial inspection vehicle might include connections for a companion computer, while a carrier board for a racer could includes ESCs for the frame of the vehicle.
|
||||
For example, a carrier board for a commercial inspection vehicle might include connections for a companion computer, while a carrier board for a racer could include ESCs for the frame of the vehicle.
|
||||
|
||||
Cube includes vibration isolation on two of the IMU's, with a third fixed IMU as a reference / backup.
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopilot/the-cube) contains detailed information, including an overview of the [Differences between Cube Colours](https://docs.cubepilot.org/user-guides/autopilot/the-cube/introduction/specifications).
|
||||
:::
|
||||
|
||||
::: info
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## Key Features
|
||||
|
||||
- 32bit STM32F777VI (32bit [ARM Cortex M7](https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M7), 400 MHz, Flash 2MB, RAM 512 KB).
|
||||
@@ -32,9 +36,7 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi
|
||||
- High-power, multi-tone piezo audio indicator
|
||||
- microSD card for high-rate logging over extended periods of time
|
||||
|
||||
<a id="stores"></a>
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
- [Reseller list](https://www.cubepilot.com/#/reseller/list)
|
||||
|
||||
@@ -47,7 +49,7 @@ The manufacturer [Cube User Guide](https://docs.cubepilot.org/user-guides/autopi
|
||||
- **Processor:**
|
||||
- STM32F777VI (32bit [ARM Cortex M7](https://en.wikipedia.org/wiki/ARM_Cortex-M#Cortex-M7))
|
||||
- 400 MHz
|
||||
- 512 KB MB RAM
|
||||
- 512 KB RAM
|
||||
- 2 MB Flash
|
||||
- **Failsafe co-processor:** <!-- inconsistent info on failsafe processor: 32 bit STM32F103 failsafe co-processor -->
|
||||
- STM32F100 (32bit _ARM Cortex-M3_)
|
||||
@@ -121,14 +123,14 @@ Board schematics and other documentation can be found here: [The Cube Project](h
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make cubepilot_cubeyellow
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Holybro Durandal
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://holybro.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -19,7 +19,7 @@ At high level, some of the key features are:
|
||||
- Internal vibration isolation system.
|
||||
- Dual high-performance, low-noise IMUs on board are designed for demanding stabilization applications.
|
||||
|
||||
A summary of the key features, [assembly](../assembly/quick_start_durandal.md), and [purchase](#purchase) links can be found below.
|
||||
A summary of the key features, [assembly](../assembly/quick_start_durandal.md), and [purchase](#store) links can be found below.
|
||||
|
||||
::: info
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
@@ -86,9 +86,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
|
||||
For more information see: [Durandal Technical Data Sheet](https://cdn.shopify.com/s/files/1/0604/5905/7341/files/Durandal_technical_data_sheet_90f8875d-8035-4632-a936-a0d178062077.pdf).
|
||||
|
||||
<a id="purchase"></a>
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
Order from [Holybro](https://holybro.com/products/durandal).
|
||||
|
||||
@@ -155,14 +153,14 @@ The [Durandal Wiring Quick Start](../assembly/quick_start_durandal.md) provides
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make holybro_durandal-v1_default
|
||||
```
|
||||
|
||||
@@ -372,7 +370,7 @@ These can also be downloaded from [here](https://cdn.shopifycdn.net/s/files/1/06
|
||||
|
||||
<a id="warn_sensor"></a>
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
\++ Sensors connected to pins 8, 9 must not send a signal exceeding the indicated voltage.
|
||||
:::
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Gear Up AirBrainH743
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://takeyourgear.com/) for hardware support.
|
||||
:::
|
||||
@@ -31,7 +31,7 @@ For more information and pinout, check the [GitHub documentation](https://github
|
||||
|
||||
## Connectors and Pins
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
The pin order is different from the Pixhawk standard (compatible to the Betaflight standard).
|
||||
:::
|
||||
|
||||
@@ -74,7 +74,7 @@ Download the [gearup_airbrainh743_bootloader.bin](https://github.com/PX4/PX4-Aut
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make gearup_airbrainh743_default
|
||||
```
|
||||
|
||||
@@ -84,7 +84,7 @@ Firmware can be installed in any of the normal ways:
|
||||
|
||||
- Build and upload the source:
|
||||
|
||||
```
|
||||
```sh
|
||||
make gearup_airbrainh743_default upload
|
||||
```
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<Badge type="info" text="Discontinued" />
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://holybro.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -15,7 +15,7 @@ It runs the PX4 flight stack on the [NuttX](https://nuttx.apache.org/) OS.
|
||||
|
||||
As a CC-BY-SA 3.0 licensed Open Hardware design, schematics and design files should be [available here](https://github.com/pixhawk/Hardware).
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The Holybro pix32 is software compatible with the [3DR Pixhawk 1](../flight_controller/pixhawk.md).
|
||||
It is not connector compatible, but is otherwise physically very similar to the 3DR Pixhawk or mRo Pixhawk.
|
||||
:::
|
||||
@@ -56,7 +56,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
- External microUSB port
|
||||
- Molex PicoBlade connectors
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
[shop.holybro.com](https://holybro.com/products/pix32pixhawk-flight-controller)
|
||||
|
||||
@@ -67,14 +67,14 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make px4_fmu-v2_default
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Holybro Pix32 v5
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://holybro.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -71,7 +71,7 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
|
||||
Additional information can be found in the [Pix32 V5 Technical Data Sheet](https://cdn.shopify.com/s/files/1/0604/5905/7341/files/Holybro_PIX32-V5_technical_data_sheet_v1.1.pdf).
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
Order from [Holybro website](https://holybro.com/products/pix32-v5).
|
||||
|
||||
@@ -118,14 +118,14 @@ Under these conditions the system will not draw any power (will not be operation
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make holybro_pix32v5_default
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Holybro Pix32 v6
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://holybro.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -12,7 +12,7 @@ It is equipped with a high performance H7 Processor, and comes with IMU redundan
|
||||
<img src="../../assets/flight_controller/pix32v6/pix32v6_fc_only.png" width="550px" title="pix32v6 Upright Image" />
|
||||
|
||||
<!--
|
||||
:::tip
|
||||
::: tip
|
||||
This autopilot is [supported](../flight_controller/autopilot_pixhawk_standard.md) by the PX4 maintenance and test teams.
|
||||
:::
|
||||
-->
|
||||
@@ -85,7 +85,7 @@ This flight controller is perfect for people that is looking for a affordable an
|
||||
- Other Characteristics:
|
||||
- Operating & storage temperature: -40 ~ 85°c
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
Order from [Holybro](https://holybro.com/products/pix32-v6).
|
||||
|
||||
@@ -141,20 +141,18 @@ Holybro makes various analog [power modules](../power_module/index.md) for diffe
|
||||
|
||||
## Building Firmware
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
Most users will not need to build this firmware!
|
||||
It is pre-built and automatically installed by _QGroundControl_ when appropriate hardware is connected.
|
||||
:::
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make px4_fmu-v6c_default
|
||||
```
|
||||
|
||||
<a id="debug_port"></a>
|
||||
|
||||
## Debug Port
|
||||
## Debug Port {#debug_port}
|
||||
|
||||
The [PX4 System Console](../debug/system_console.md) and [SWD interface](../debug/swd_debug.md) run on the **FMU Debug** port.
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
<Badge type="info" text="Discontinued" />
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
This frame has been [discontinued](../flight_controller/autopilot_experimental.md) and is no longer commercially available.
|
||||
:::
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://holybro.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -34,13 +34,13 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
- 6 PWM outputs
|
||||
- Built-in OSD chip (AB7456 via SPI)
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
The board can be bought from one of the following shops (for example):
|
||||
|
||||
- [getfpv](https://www.getfpv.com/holybro-kakute-f7-tekko32-f3-metal-65a-4-in-1-esc-combo.html)
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The _Kakute F7_ is designed to work with the _Tekko32_ 4-in-1 ESC and they can be bought in combination.
|
||||
:::
|
||||
|
||||
@@ -84,7 +84,7 @@ Download the [kakutef7_bl.hex](https://github.com/PX4/PX4-Autopilot/raw/main/doc
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make holybro_kakutef7_default
|
||||
```
|
||||
|
||||
@@ -93,7 +93,7 @@ make holybro_kakutef7_default
|
||||
The firmware can be installed in any of the normal ways:
|
||||
|
||||
- Build and upload the source
|
||||
```
|
||||
```sh
|
||||
make holybro_kakutef7_default upload
|
||||
```
|
||||
- [Load the firmware](../config/firmware.md) using _QGroundControl_.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<Badge type="tip" text="PX4 v1.16" />
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://holybro.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -13,7 +13,7 @@ The [Holybro Kakute H743 Wing](https://holybro.com/products/kakute-h743-wing) is
|
||||
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
The board can be bought from one of the following shops (for example):
|
||||
|
||||
@@ -43,7 +43,7 @@ Download the [holybro_kakuteh7-wing.hex](https://github.com/PX4/PX4-Autopilot/ra
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make holybro_kakuteh7-wing_default
|
||||
```
|
||||
|
||||
@@ -58,7 +58,7 @@ Firmware can be manually installed in any of the normal ways:
|
||||
|
||||
- Build and upload the source:
|
||||
|
||||
```
|
||||
```sh
|
||||
make holybro_kakuteh7-wing_default upload
|
||||
```
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<Badge type="tip" text="PX4 v1.13" />
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://holybro.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -36,13 +36,13 @@ This flight controller is [manufacturer supported](../flight_controller/autopilo
|
||||
- Dimensions: 35x35mm
|
||||
- Weight: 8g
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
The board can be bought from one of the following shops (for example):
|
||||
|
||||
- [Holybro](https://holybro.com/products/kakute-h7)
|
||||
|
||||
:::tip
|
||||
::: tip
|
||||
The _Kakute H7_ is designed to work with the _Tekko32_ 4-in-1 ESC and they can be bought in combination.
|
||||
:::
|
||||
|
||||
@@ -102,7 +102,7 @@ The firmware can be installed in any of the normal ways:
|
||||
You can use either pre-built firmware or your own custom firmware.
|
||||
|
||||
::: info
|
||||
If you are loading the pre-built firmware via QGroundcontrol, you must use QGC Daily or QGC version newer than 4.1.7.
|
||||
If you are loading the pre-built firmware via QGroundControl, you must use QGC Daily or QGC version newer than 4.1.7.
|
||||
:::
|
||||
|
||||
## PX4 Configuration
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<Badge type="tip" text="PX4 v1.13" />
|
||||
|
||||
:::warning
|
||||
::: warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
Contact the [manufacturer](https://holybro.com/) for hardware support or compliance issues.
|
||||
:::
|
||||
@@ -40,7 +40,7 @@ PX4 runs on the H7 mini v1.3 and later.
|
||||
- Dimensions: 30x31x6mm
|
||||
- Weight: 5.5g
|
||||
|
||||
## Where to Buy
|
||||
## Where to Buy {#store}
|
||||
|
||||
The board can be bought from one of the following shops (for example):
|
||||
|
||||
@@ -86,14 +86,14 @@ Download the [holybro_kakuteh7mini_bootloader.hex](https://github.com/PX4/PX4-Au
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target:
|
||||
|
||||
```
|
||||
```sh
|
||||
make holybro_kakuteh7mini_default
|
||||
```
|
||||
|
||||
## Installing PX4 Firmware
|
||||
|
||||
::: info
|
||||
If you are loading the pre-built firmware via QGroundcontrol, you must use QGC Daily or QGC version newer than 4.1.7.
|
||||
If you are loading the pre-built firmware via QGroundControl, you must use QGC Daily or QGC version newer than 4.1.7.
|
||||
Prior to that release you will need to manually build and install the firmware.
|
||||
:::
|
||||
|
||||
@@ -101,7 +101,7 @@ Firmware can be manually installed in any of the normal ways:
|
||||
|
||||
- Build and upload the source:
|
||||
|
||||
```
|
||||
```sh
|
||||
make holybro_kakuteh7mini_default upload
|
||||
```
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user