Skip to content

Navigator: Set altitude acceptance radius to infinity when moving to land point after transition#24115

Merged
sfuhrer merged 2 commits intomainfrom
pr-vtol_land_acceptance_radius
Dec 20, 2024
Merged

Navigator: Set altitude acceptance radius to infinity when moving to land point after transition#24115
sfuhrer merged 2 commits intomainfrom
pr-vtol_land_acceptance_radius

Conversation

@RomanBapst
Copy link
Copy Markdown
Contributor

Solved Problem

After a VTOL backtransition the vehicle might not be close enough to the land point and thus needs to move horizontally.
It can happened that during this process the vehicle loses altitude and thus reaches the land point without being within the acceptance radius of the land point. In cases of strong wind or depleted batteries, it might not be possible for the vehicle to climb into the acceptance radius. However, this is also unnecessary, as the goal is eventually to descend.

Solution

Set the altitude acceptance radius to infinity when we are moving to the land point after the backtransition.

Changelog Entry

For release notes:

Feature/Bugfix XYZ
New parameter: XYZ_Z
Documentation: Need to clarify page ... / done, read docs.px4.io/...

Alternatives

We could also ...

Test coverage

Context

Related links, screenshot before/after, video

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 16, 2024

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 176 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +176  +0.0%    +176    .text
  +3.1%     +56  +3.1%     +56    ../../src/modules/navigator/mission.cpp
  +0.4%     +40  +0.4%     +40    ../../src/modules/navigator/navigator_main.cpp
  +3.1%     +36  +3.1%     +36    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
  +1.8%     +32  +1.8%     +32    ../../src/modules/navigator/rtl_direct_mission_land.cpp
  +0.0%      +5  +0.0%      +5    [section .text]
  +0.6%      +4  +0.6%      +4    ../../src/modules/navigator/mission_feasibility_checker.cpp
  +0.2%      +3  +0.2%      +3    ../../src/systemcmds/ver/ver.cpp
+0.0%    +124  [ = ]       0    .debug_abbrev
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
  +0.6%     +18  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +1.5%     +50  [ = ]       0    ../../src/modules/navigator/rtl_direct_mission_land.cpp
-0.0%      -8  [ = ]       0    .debug_aranges
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
+0.0%    +201  [ = ]       0    .debug_info
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
  +0.1%     +34  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +0.0%     +53  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  -0.0%      -4  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
  +0.1%     +98  [ = ]       0    ../../src/modules/navigator/rtl_direct_mission_land.cpp
  +0.0%     +24  [ = ]       0    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
+0.0%    +179  [ = ]       0    .debug_line
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  +0.3%     +18  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +0.3%     +65  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  +0.1%     +13  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
  +0.9%     +62  [ = ]       0    ../../src/modules/navigator/rtl_direct_mission_land.cpp
  +0.9%     +48  [ = ]       0    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
  -0.2%      -2  [ = ]       0    task/task_cancelpt.c
+0.0%    +281  [ = ]       0    .debug_loc
  +1.6%     +60  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +0.3%     +78  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  +0.6%     +54  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
  +0.3%     +19  [ = ]       0    ../../src/modules/navigator/rtl_direct_mission_land.cpp
  +2.0%     +70  [ = ]       0    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
+0.0%     +25  [ = ]       0    .debug_ranges
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  +1.2%      +8  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +0.3%     +24  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  +1.2%     +24  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
  -3.7%     -24  [ = ]       0    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
  +1.5%      +1  [ = ]       0    task/task_cancelpt.c
+0.0%     +50  [ = ]       0    .debug_str
  +7.0%     +50  [ = ]       0    ../../src/modules/navigator/mission.cpp
-1.0%    -176  [ = ]       0    [Unmapped]
+0.0%    +852  +0.0%    +176    TOTAL

px4_fmu-v6x [Total VM Diff: 168 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +168  +0.0%    +168    .text
  +3.1%     +56  +3.1%     +56    ../../src/modules/navigator/mission.cpp
  +0.4%     +40  +0.4%     +40    ../../src/modules/navigator/navigator_main.cpp
  +3.1%     +36  +3.1%     +36    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
  +1.8%     +32  +1.8%     +32    ../../src/modules/navigator/rtl_direct_mission_land.cpp
  +0.6%      +4  +0.6%      +4    ../../src/modules/navigator/mission_feasibility_checker.cpp
+0.0%    +124  [ = ]       0    .debug_abbrev
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
  +0.6%     +18  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +1.5%     +50  [ = ]       0    ../../src/modules/navigator/rtl_direct_mission_land.cpp
-0.0%      -8  [ = ]       0    .debug_aranges
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
+0.0%    +201  [ = ]       0    .debug_info
  -0.2%      -4  [ = ]       0    ../../src/lib/version/version.c
  +0.1%     +34  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +0.0%     +53  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  -0.0%      -4  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
  +0.1%     +98  [ = ]       0    ../../src/modules/navigator/rtl_direct_mission_land.cpp
  +0.0%     +24  [ = ]       0    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
+0.0%    +179  [ = ]       0    .debug_line
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  +0.3%     +18  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +0.3%     +65  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  +0.1%     +13  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
  +0.9%     +62  [ = ]       0    ../../src/modules/navigator/rtl_direct_mission_land.cpp
  +0.9%     +48  [ = ]       0    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
  -0.2%      -2  [ = ]       0    task/task_cancelpt.c
+0.0%    +280  [ = ]       0    .debug_loc
  +1.6%     +60  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +0.2%     +62  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  +0.6%     +54  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
  +0.5%     +34  [ = ]       0    ../../src/modules/navigator/rtl_direct_mission_land.cpp
  +2.0%     +70  [ = ]       0    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
+0.0%     +22  [ = ]       0    .debug_ranges
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  +1.2%      +8  [ = ]       0    ../../src/modules/navigator/mission.cpp
  +0.3%     +24  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  +1.2%     +24  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
  -3.7%     -24  [ = ]       0    ../../src/modules/navigator/rtl_mission_fast_reverse.cpp
  -3.0%      -2  [ = ]       0    task/task_cancelpt.c
+0.0%     +50  [ = ]       0    .debug_str
  +7.0%     +50  [ = ]       0    ../../src/modules/navigator/mission.cpp
-0.2%    -168  [ = ]       0    [Unmapped]
+0.0%    +848  +0.0%    +168    TOTAL

Updated: 2024-12-20T06:59:46

@RomanBapst RomanBapst force-pushed the pr-vtol_land_acceptance_radius branch from 35ce352 to f57ebfb Compare December 16, 2024 13:26
Comment thread src/modules/navigator/mission.cpp
@sfuhrer sfuhrer changed the title Set altitude acceptance radius to infinity when moving to land point after transition Navigator: Set altitude acceptance radius to infinity when moving to land point after transition Dec 19, 2024
Copy link
Copy Markdown
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

I agree with the logic, just need to double check the one comment.
How extensive did you SITL test it?

Comment thread src/modules/navigator/mission.cpp
Comment thread src/modules/navigator/navigator_main.cpp
@RomanBapst
Copy link
Copy Markdown
Contributor Author

@sfuhrer I tested this in SITL for all three cases by deliberately making the vehicle overshoot the transition and by adding a hack which increases the altitude setpoint of the land point, once the transition is finished.
I was able to compare behavior with and without the fix.

for land waypoint after backtransition -> avoid
vehicle with depleted battery from not reaching the alt
setpoint and getting stuck
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Signed-off-by: RomanBapst <bapstroman@gmail.com>
@RomanBapst RomanBapst force-pushed the pr-vtol_land_acceptance_radius branch from 640a100 to b9b82ec Compare December 20, 2024 06:54
Copy link
Copy Markdown
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

Thanks!

@sfuhrer sfuhrer merged commit b765769 into main Dec 20, 2024
@sfuhrer sfuhrer deleted the pr-vtol_land_acceptance_radius branch December 20, 2024 08:21
JoelJ18 pushed a commit to microstrain-robotics/PX4-Autopilot that referenced this pull request Jan 27, 2025
…land point after transition (PX4#24115)

* Navigator: set alt acceptance radius to infinity
for land waypoint after backtransition -> avoid
vehicle with depleted battery from not reaching the alt
setpoint and getting stuck

Signed-off-by: RomanBapst <bapstroman@gmail.com>
AkaiEurus pushed a commit to AkaiEurus/PX4-Autopilot that referenced this pull request Jan 3, 2026
sfuhrer pushed a commit that referenced this pull request Jan 21, 2026
Co-authored-by: EurusAkai <1826983968@qq.com>
mbjd pushed a commit that referenced this pull request Feb 17, 2026
Co-authored-by: EurusAkai <1826983968@qq.com>
TheLukaDragar pushed a commit to TheLukaDragar/PX4-Autopilot that referenced this pull request Feb 24, 2026
Co-authored-by: EurusAkai <1826983968@qq.com>
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