Skip to content

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Sep 26, 2025

Solved Problem

The setpoint gets invalid (IDLE) during RTL with RTL_TYPE=2 and a mission containing NAV_CMD_CONDITION_GATE.

Solution

Skip NAV_CMD_CONDITION_GATE.

Changelog Entry

For release notes:

Bugfix: Navigator: fix RTL_TYP=2 with NAV_CMD_CONDITION_GATE

Alternatives

I don't understand why the GATE is even considered, it should already not be considered as not being in the list of MissionBlock::item_contains_position().

Test coverage

SITL tested.

Signed-off-by: Silvan <silvan@auterion.com>
Signed-off-by: Silvan <silvan@auterion.com>
@sfuhrer sfuhrer requested a review from KonradRudin September 26, 2025 15:09
Copy link

github-actions bot commented Sep 26, 2025

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 80 byte (0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +80  +0.0%     +80    .text
   +38%     +36   +38%     +36    RtlMissionFast::on_activation()
   +33%     +34   +33%     +34    RtlMissionFastReverse::on_activation()
  +0.0%      +8  +0.0%      +8    [section .text]
  +5.3%      +2  +5.3%      +2    RtlMissionFastReverse::updateParamsImpl()
+0.0%     +25  [ = ]       0    .debug_abbrev
+0.0%      +8  [ = ]       0    .debug_frame
+0.0%    +192  [ = ]       0    .debug_info
+0.0%     +95  [ = ]       0    .debug_line
   +50%      +2  [ = ]       0    [Unmapped]
  +0.0%     +93  [ = ]       0    [section .debug_line]
-0.0%      -9  [ = ]       0    .debug_loclists
+0.0%     +29  [ = ]       0    .debug_rnglists
+0.0%     +28  [ = ]       0    .debug_str
-0.9%     -80  [ = ]       0    [Unmapped]
+0.0%    +368  +0.0%     +80    TOTAL

px4_fmu-v6x [Total VM Diff: 80 byte (0 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%     +80  +0.0%     +80    .text
   +38%     +36   +38%     +36    RtlMissionFast::on_activation()
   +33%     +34   +33%     +34    RtlMissionFastReverse::on_activation()
  +0.0%      +8  +0.0%      +8    [section .text]
  +5.3%      +2  +5.3%      +2    RtlMissionFastReverse::updateParamsImpl()
+0.0%     +25  [ = ]       0    .debug_abbrev
+0.0%      +8  [ = ]       0    .debug_frame
+0.0%    +192  [ = ]       0    .debug_info
+0.0%     +95  [ = ]       0    .debug_line
   +50%      +2  [ = ]       0    [Unmapped]
  +0.0%     +93  [ = ]       0    [section .debug_line]
-0.0%      -9  [ = ]       0    .debug_loclists
+0.0%     +29  [ = ]       0    .debug_rnglists
+0.0%     +28  [ = ]       0    .debug_str
-1.7%     -80  [ = ]       0    [Unmapped]
+0.0%    +368  +0.0%     +80    TOTAL

Updated: 2025-10-06T10:40:33

@KonradRudin
Copy link
Contributor

@sfuhrer sorry for the late reply. I checked it and your solution was a patch fix. The issue was that in the on_actuvation function, we did not check, if the mission item is actually a position item, when RTL was triggered during a mission. I added now my alternativ solution which fixes this instead of fixing the condition gate specifically. Happy for feedback. Maybe we should add another reviewer for this then

Copy link
Contributor

@dakejahl dakejahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why all of the explicit type casts with the macro? Looks really bad and appears unnecessary

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants