Skip to content

feat(manual_control): Publish source of manual control setpoint via mavlink #27857

Open
RomanBapst wants to merge 3 commits into
mainfrom
pr-manual_control_status
Open

feat(manual_control): Publish source of manual control setpoint via mavlink #27857
RomanBapst wants to merge 3 commits into
mainfrom
pr-manual_control_status

Conversation

@RomanBapst

@RomanBapst RomanBapst commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Solved Problem

When both RC input and manual control via a mavlink input device (such as Joystick) are available, it's not clear which device is currently used for manual control. PX4 implements COM_RC_IN_MODE parameters, which specifies input priorities, and the ManualControlSetpoint topic includes a source parameter, however this info is not published via mavlink and trying to figure out the source from the parameter value alone is not possible.

PX4 implements the MANUAL_CONTROL mavlink output stream, however, according to mavlink specs, this message is intended to be published by the controlling device, not the autopilot.

Therefore, I think it makes sense to add a new MANUAL_CONTROL_STATUS message, which captures the source of manual control.

Solution

  1. Capture the sender system and component id of the manual control message sender in the manual control setpoint topic, in the case where manual control message are received via mavlink interface by the autopilot.
  2. Publish a new MANUAL_CONTROL_STATUS message via mavlink, which specifies the source of manual control messages the autopilot is currently relying on.

Changelog Entry

For release notes:

Feature: Implement new MANUAL_CONTROL_STATUS mavlink messsage, which contains information about source of manual_control_setpoint messages.

Alternatives

Test coverage

Context

Mavlink PR: mavlink/mavlink#2540

- add translations for compatibility

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Signed-off-by: RomanBapst <bapstroman@gmail.com>
@github-actions github-actions Bot added the kind:feature Request or change that adds new functionality. label Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

💡 Commit messages could be improved

Not blocking, but these commit messages could use some cleanup.

Commit Message Suggestion
b196ce7118 update mavlink to include MANUAL_CONTROL_STATUS message Missing conventional commit format (e.g. "feat(ekf2): add something")

See the commit message convention for details.


This comment will be automatically removed once the issues are resolved.

@github-actions github-actions Bot added scope:offboard Offboard mode, external setpoints, companion-computer control, or offboard failsafe behavior. scope:mavlink MAVLink module, streams, commands, or protocol handling. scope:uorb uORB messages, generated interfaces, or message translation. scope:middleware DDS, ROS 2, Cyphal/UAVCAN, zenoh, or bridge layers. labels Jul 10, 2026
@RomanBapst RomanBapst requested a review from MaEtUgR July 10, 2026 07:58
@github-actions

Copy link
Copy Markdown
Contributor

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 88 byte (0 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +88  +0.0%     +88    .text
    +0.5%     +36  +0.5%     +36    on_topic_update()
     +10%     +36   +10%     +36    ucdr_serialize_manual_control_setpoint()
    +0.1%     +28  +0.1%     +28    uORB::compressed_fields
    +2.4%     +12  +2.4%     +12    MavlinkReceiver::handle_message_manual_control()
    -0.7%      -4  -0.7%      -4    MavlinkReceiver::handle_message_hil_sensor()
   -33.3%      -4 -33.3%      -4    Zero
    -0.2%      -8  -0.2%      -8    UxrceddsClient::run()
    -0.0%      -8  -0.0%      -8    [section .text]
  +0.0%     +55  [ = ]       0    .debug_abbrev
  +0.0%    +481  [ = ]       0    .debug_info
  +0.0%    +136  [ = ]       0    .debug_line
    +200%      +4  [ = ]       0    [Unmapped]
    +0.0%    +132  [ = ]       0    [section .debug_line]
  -0.0%     -22  [ = ]       0    .debug_loclists
  +0.0%      +1  [ = ]       0    .debug_rnglists
  +0.0%     +37  [ = ]       0    .debug_str
  -1.0%     -88  [ = ]       0    [Unmapped]
  +0.0%    +688  +0.0%     +88    TOTAL

px4_fmu-v6x [Total VM Diff: 96 byte (0 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +96  +0.0%     +96    .text
    +0.5%     +36  +0.5%     +36    on_topic_update()
     +10%     +36   +10%     +36    ucdr_serialize_manual_control_setpoint()
    +0.1%     +28  +0.1%     +28    uORB::compressed_fields
    +2.4%     +12  +2.4%     +12    MavlinkReceiver::handle_message_manual_control()
     +50%      +4   +50%      +4    Zero
    -0.7%      -4  -0.7%      -4    MavlinkReceiver::handle_message_hil_sensor()
    -0.2%      -8  -0.2%      -8    UxrceddsClient::run()
    -0.0%      -8  -0.0%      -8    [section .text]
  +0.0%     +55  [ = ]       0    .debug_abbrev
  +0.0%    +481  [ = ]       0    .debug_info
  +0.0%    +128  [ = ]       0    .debug_line
   -66.7%      -4  [ = ]       0    [Unmapped]
    +0.0%    +132  [ = ]       0    [section .debug_line]
  +0.0%     +77  [ = ]       0    .debug_loclists
  -0.0%      -2  [ = ]       0    .debug_rnglists
  +0.0%     +37  [ = ]       0    .debug_str
  -1.8%     -96  [ = ]       0    [Unmapped]
  +0.0%    +776  +0.0%     +96    TOTAL

Updated: 2026-07-10T08:04:05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:feature Request or change that adds new functionality. scope:mavlink MAVLink module, streams, commands, or protocol handling. scope:middleware DDS, ROS 2, Cyphal/UAVCAN, zenoh, or bridge layers. scope:offboard Offboard mode, external setpoints, companion-computer control, or offboard failsafe behavior. scope:uorb uORB messages, generated interfaces, or message translation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant