From 20620c9f683ed94f6d01bfd0c63a7b68be08f8c1 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 17 Sep 2026 15:48:39 +1000 Subject: [PATCH 1/5] add(mission_items): MAV_CMD_DO_SET_ACTUATOR section from XML Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_015vfxPtFUmbpBanejKR43NK --- en/services/mission_item_detail.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/en/services/mission_item_detail.md b/en/services/mission_item_detail.md index e7ec5d407..1b9744c5e 100644 --- a/en/services/mission_item_detail.md +++ b/en/services/mission_item_detail.md @@ -185,6 +185,30 @@ Forward-moving vehicles (e.g. fixed-wing) _circle_ the point with the specified | 6: Longitude | Longitude | | | 7: Altitude | Altitude | m | +## `DO_` Items + +Action items typically have the prefix `MAV_CMD_DO_`. They trigger an immediate action (e.g. changing speed, activating a servo) rather than defining a position on the path. + +### MAV_CMD_DO_SET_ACTUATOR {#MAV_CMD_DO_SET_ACTUATOR} + +Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). + +#### Params + +| Param (:Label) | Description | Units | +| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| 1: Actuator 1 | Actuator 1 value, scaled from [-1 to 1]. NaN to ignore. | min:-1 max:1 | +| 2: Actuator 2 | Actuator 2 value, scaled from [-1 to 1]. NaN to ignore. | min:-1 max:1 | +| 3: Actuator 3 | Actuator 3 value, scaled from [-1 to 1]. NaN to ignore. | min:-1 max:1 | +| 4: Actuator 4 | Actuator 4 value, scaled from [-1 to 1]. NaN to ignore. | min:-1 max:1 | +| 5: Actuator 5 | Actuator 5 value.
If sent in COMMAND_LONG: value is scaled from [-1 to 1]. NaN to ignore.
If sent in COMMAND_INT or MISSION_ITEM_INT: value is scaled by 1e7. INT32_MAX to ignore. | | +| 6: Actuator 6 | Actuator 6 value.
If sent in COMMAND_LONG: value is scaled from [-1 to 1]. NaN to ignore.
If sent in COMMAND_INT or MISSION_ITEM_INT: value is scaled by 1e7. INT32_MAX to ignore. | | +| 7: Index | Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7) | min:0 increment:1 | + +#### Autopilot Support + +- Untested + ## `CONDITION_` Items ### MAV_CMD_CONDITION_GATE {#condition_gate} From d23df73467bca4de4fb4c6645de74db7083e912a Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 17 Sep 2026 15:52:48 +1000 Subject: [PATCH 2/5] add(mission_items): refine MAV_CMD_DO_SET_ACTUATOR Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_015vfxPtFUmbpBanejKR43NK --- en/services/mission_item_detail.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/en/services/mission_item_detail.md b/en/services/mission_item_detail.md index 1b9744c5e..b363f8baa 100644 --- a/en/services/mission_item_detail.md +++ b/en/services/mission_item_detail.md @@ -191,7 +191,10 @@ Action items typically have the prefix `MAV_CMD_DO_`. They trigger an immediate ### MAV_CMD_DO_SET_ACTUATOR {#MAV_CMD_DO_SET_ACTUATOR} -Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). +[MAV_CMD_DO_SET_ACTUATOR](../messages/common.md#MAV_CMD_DO_SET_ACTUATOR) causes a vehicle to set up to six actuators (e.g. servos) to specified values. + +Each actuator value is scaled `-1` to `1`; the sentinel value for a param (`NaN` in `COMMAND_LONG`, the field's max-value in `COMMAND_INT`/`MISSION_ITEM_INT`) leaves that actuator unchanged. +Which physical output (e.g. a MAIN/AUX PWM channel, or a UAVCAN device) each actuator number drives is flight-stack-specific, set by a parameter outside this command. #### Params @@ -205,8 +208,21 @@ Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped | 6: Actuator 6 | Actuator 6 value.
If sent in COMMAND_LONG: value is scaled from [-1 to 1]. NaN to ignore.
If sent in COMMAND_INT or MISSION_ITEM_INT: value is scaled by 1e7. INT32_MAX to ignore. | | | 7: Index | Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7) | min:0 increment:1 | +#### Index (addressing more than six actuators) {#do_set_actuator_index} + +Param 7 (_Index_) selects an alternate actuator set: `0` addresses Actuator 1-6, `1` addresses what a flight stack labels Actuator 7-12, and so on. +This lets a vehicle with more than six mapped outputs be fully addressed by sending the command more than once, each with a different _Index_. + #### Autopilot Support +PX4: + +- Params 1-4 (Actuator 1-4) supported. +- Params 5/6 (Actuator 5/6) are not reliably set by a mission item or `COMMAND_INT` on any current release — the `int32` scaling those wire encodings require is not yet implemented (open, unmerged as of this writing: [PX4-Autopilot#28723](https://github.com/PX4/PX4-Autopilot/pull/28723)). `COMMAND_LONG` (a plain float, unaffected by this) works on all current releases. +- Only _Index_ `0` is implemented; other values have no effect ([`FunctionActuatorSet.hpp`](https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/mixer_module/functions/FunctionActuatorSet.hpp)). + +ArduPilot: + - Untested ## `CONDITION_` Items From fba8f346afeb65a1f0f84f48d3ba00e4817fdcc2 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 17 Sep 2026 16:04:39 +1000 Subject: [PATCH 3/5] Apply batched suggestions from code review Co-authored-by: Hamish Willee --- en/services/mission_item_detail.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/en/services/mission_item_detail.md b/en/services/mission_item_detail.md index b363f8baa..c07cc3e16 100644 --- a/en/services/mission_item_detail.md +++ b/en/services/mission_item_detail.md @@ -191,7 +191,8 @@ Action items typically have the prefix `MAV_CMD_DO_`. They trigger an immediate ### MAV_CMD_DO_SET_ACTUATOR {#MAV_CMD_DO_SET_ACTUATOR} -[MAV_CMD_DO_SET_ACTUATOR](../messages/common.md#MAV_CMD_DO_SET_ACTUATOR) causes a vehicle to set up to six actuators (e.g. servos) to specified values. +[MAV_CMD_DO_SET_ACTUATOR](../messages/common.md#MAV_CMD_DO_SET_ACTUATOR) sets up to six actuators at a tune(e.g. servos) to specified values. +More than 6 actuators can be set using the index param (`param7`). Each actuator value is scaled `-1` to `1`; the sentinel value for a param (`NaN` in `COMMAND_LONG`, the field's max-value in `COMMAND_INT`/`MISSION_ITEM_INT`) leaves that actuator unchanged. Which physical output (e.g. a MAIN/AUX PWM channel, or a UAVCAN device) each actuator number drives is flight-stack-specific, set by a parameter outside this command. @@ -208,17 +209,13 @@ Which physical output (e.g. a MAIN/AUX PWM channel, or a UAVCAN device) each act | 6: Actuator 6 | Actuator 6 value.
If sent in COMMAND_LONG: value is scaled from [-1 to 1]. NaN to ignore.
If sent in COMMAND_INT or MISSION_ITEM_INT: value is scaled by 1e7. INT32_MAX to ignore. | | | 7: Index | Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7) | min:0 increment:1 | -#### Index (addressing more than six actuators) {#do_set_actuator_index} - -Param 7 (_Index_) selects an alternate actuator set: `0` addresses Actuator 1-6, `1` addresses what a flight stack labels Actuator 7-12, and so on. -This lets a vehicle with more than six mapped outputs be fully addressed by sending the command more than once, each with a different _Index_. - #### Autopilot Support PX4: - Params 1-4 (Actuator 1-4) supported. -- Params 5/6 (Actuator 5/6) are not reliably set by a mission item or `COMMAND_INT` on any current release — the `int32` scaling those wire encodings require is not yet implemented (open, unmerged as of this writing: [PX4-Autopilot#28723](https://github.com/PX4/PX4-Autopilot/pull/28723)). `COMMAND_LONG` (a plain float, unaffected by this) works on all current releases. +- Params 5/6 (Actuator 5/6) can only reliably be set using `COMMAND_LONG` in PX4 v1.18 and earlier. + This will be fixed in [PX4-Autopilot#28723](https://github.com/PX4/PX4-Autopilot/pull/28723)). - Only _Index_ `0` is implemented; other values have no effect ([`FunctionActuatorSet.hpp`](https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/mixer_module/functions/FunctionActuatorSet.hpp)). ArduPilot: From 3817b55e4a88ab460af70313918bbe2b11711740 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 17 Sep 2026 16:04:47 +1000 Subject: [PATCH 4/5] Apply suggestion from @hamishwillee --- en/services/mission_item_detail.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/en/services/mission_item_detail.md b/en/services/mission_item_detail.md index c07cc3e16..614fc53b9 100644 --- a/en/services/mission_item_detail.md +++ b/en/services/mission_item_detail.md @@ -195,7 +195,9 @@ Action items typically have the prefix `MAV_CMD_DO_`. They trigger an immediate More than 6 actuators can be set using the index param (`param7`). Each actuator value is scaled `-1` to `1`; the sentinel value for a param (`NaN` in `COMMAND_LONG`, the field's max-value in `COMMAND_INT`/`MISSION_ITEM_INT`) leaves that actuator unchanged. -Which physical output (e.g. a MAIN/AUX PWM channel, or a UAVCAN device) each actuator number drives is flight-stack-specific, set by a parameter outside this command. +Which physical output (e.g. a MAIN/AUX PWM channel, or a UAVCAN device) each actuator number drives is flight-stack-specific (typically mapped by flight-stack parameters). + +Noet that changes to the outputs can be observed via [ACTUATOR_OUTPUT_STATUS](../messages/common.md#ACTUATOR_OUTPUT_STATUS). #### Params From da0f6262ff692658fd5020022befa61fea7a496c Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 17 Sep 2026 16:05:49 +1000 Subject: [PATCH 5/5] typo --- en/services/mission_item_detail.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/services/mission_item_detail.md b/en/services/mission_item_detail.md index 614fc53b9..9bdd6ccc5 100644 --- a/en/services/mission_item_detail.md +++ b/en/services/mission_item_detail.md @@ -197,7 +197,7 @@ More than 6 actuators can be set using the index param (`param7`). Each actuator value is scaled `-1` to `1`; the sentinel value for a param (`NaN` in `COMMAND_LONG`, the field's max-value in `COMMAND_INT`/`MISSION_ITEM_INT`) leaves that actuator unchanged. Which physical output (e.g. a MAIN/AUX PWM channel, or a UAVCAN device) each actuator number drives is flight-stack-specific (typically mapped by flight-stack parameters). -Noet that changes to the outputs can be observed via [ACTUATOR_OUTPUT_STATUS](../messages/common.md#ACTUATOR_OUTPUT_STATUS). +Note that changes to the outputs can be observed via [ACTUATOR_OUTPUT_STATUS](../messages/common.md#ACTUATOR_OUTPUT_STATUS). #### Params