Skip to content

fix(navigator): keep a VTOL in multicopter mode through mission RTL [1.18] - #28538

Merged
mbjd merged 1 commit into
PX4:release/1.18from
Saibernard:backport-1.18-vtol-rtl
Sep 4, 2026
Merged

fix(navigator): keep a VTOL in multicopter mode through mission RTL [1.18]#28538
mbjd merged 1 commit into
PX4:release/1.18from
Saibernard:backport-1.18-vtol-rtl

Conversation

@Saibernard

Copy link
Copy Markdown
Contributor

Backport of #28399 to release/1.18, adapted for the branch.

Mission RTL forced a VTOL flying as a multicopter into fixed-wing mode at return altitude, and the vehicle could stay armed instead of starting the landing sequence. The navigator change is the same as on main. The tests are adapted to the test code on this branch.

…X4#28399)

* fix(navigator): preserve VTOL mode in direct mission RTL

Remove the unconditional multicopter-to-fixed-wing transition from direct mission-land RTL so the return uses the VTOL mode active when RTL starts. This allows an MC-mode vehicle to proceed through the mission landing sequence instead of becoming stuck after an unnecessary forward transition.

Add module-level and MAVSDK SITL regressions covering an airborne multicopter-mode VTOL with a planned mission landing.

Refs PX4#27817

Refs PX4#24323

Assisted-by: Codex:gpt-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>

* fix(navigator): drop the fixed wing transition from the fast RTL modes too

The fast and the reverse mission RTL carried the same request for a
transition to fixed wing as the direct mission land RTL. The VTOL
attitude controller rejects that command during RTL, so a VTOL in
multicopter mode waited on it forever instead of flying the mission.
Remove both. A VTOL in multicopter mode now flies the mission RTL as a
multicopter, the same as direct RTL does. Reported in PX4#24323.

Two unit tests pin the active item to a waypoint for a VTOL in
multicopter mode, and two MAVSDK cases fly it on the standard VTOL in
SIH: the mission landing and the reverse mission both stay in
multicopter mode to touchdown, within 5 m of the land item and of home.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>

---------

Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
(cherry picked from commit 290f56d)
@github-actions github-actions Bot added kind:bug Something is broken or behaving incorrectly. kind:test Adds or improves tests. scope:navigation Missions, RTL, geofence, takeoff, landing, or navigator behavior. scope:testing Unit, integration, fuzzing, or test data. labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: -176 byte (-0.01 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +44  [ = ]       0    .debug_abbrev
  -0.0% -2.61Ki  [ = ]       0    .debug_info
  -0.0%    -313  [ = ]       0    .debug_line
    +133%      +4  [ = ]       0    [Unmapped]
    -0.0%    -317  [ = ]       0    [section .debug_line]
  -0.0%     -48  [ = ]       0    .debug_loclists
  -0.0%      -8  [ = ]       0    .debug_rnglists
  +2.0%    +176  [ = ]       0    [Unmapped]
  -0.0%    -176  -0.0%    -176    .text
    +4.8%      +4  +4.8%      +4    FlightTask
     +44%      +4   +44%      +4    g_nullstring
   -12.5%      -4 -12.5%      -4    Takeoff::on_activation()
    -0.0%      -4  -0.0%      -4    g_cromfs_image
    -0.0%     -12  -0.0%     -12    [section .text]
    -6.6%     -48  -6.6%     -48    RtlDirectMissionLand::setActiveMissionItems()
   -15.1%     -52 -15.1%     -52    RtlMissionFastReverse::setActiveMissionItems()
   -11.6%     -64 -11.6%     -64    RtlMissionFast::setActiveMissionItems()
  -0.0% -2.93Ki  -0.0%    -176    TOTAL

px4_fmu-v6x [Total VM Diff: -184 byte (-0.01 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +44  [ = ]       0    .debug_abbrev
  -0.0% -2.61Ki  [ = ]       0    .debug_info
  -0.0%    -313  [ = ]       0    .debug_line
    [NEW]      +4  [ = ]       0    [Unmapped]
    -0.0%    -317  [ = ]       0    [section .debug_line]
  -0.0%     -48  [ = ]       0    .debug_loclists
  -0.0%      -8  [ = ]       0    .debug_rnglists
  +3.2%    +184  [ = ]       0    [Unmapped]
  -0.0%    -184  -0.0%    -184    .text
    +4.8%      +4  +4.8%      +4    FlightTask
   -12.5%      -4 -12.5%      -4    Takeoff::on_activation()
    -0.0%      -4  -0.0%      -4    g_cromfs_image
    -0.0%     -16  -0.0%     -16    [section .text]
    -6.6%     -48  -6.6%     -48    RtlDirectMissionLand::setActiveMissionItems()
   -15.1%     -52 -15.1%     -52    RtlMissionFastReverse::setActiveMissionItems()
   -11.6%     -64 -11.6%     -64    RtlMissionFast::setActiveMissionItems()
  -0.0% -2.93Ki  -0.0%    -184    TOTAL

Updated: 2026-09-04T02:52:50

@dakejahl
dakejahl requested a review from mbjd September 4, 2026 03:36
@mbjd
mbjd merged commit e3b0768 into PX4:release/1.18 Sep 4, 2026
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug Something is broken or behaving incorrectly. kind:test Adds or improves tests. scope:navigation Missions, RTL, geofence, takeoff, landing, or navigator behavior. scope:testing Unit, integration, fuzzing, or test data.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants