Skip to content

Conversation

DrinkingHook
Copy link

Issue Description

Problem Summary
In multi-axis vehicles with RTL_TYPE set to 1 (mission land on RTL), the RTL behavior during mid-mission return incorrectly prioritizes landing at the mission_land waypoint, even if the home position is closer. This results in the vehicle flying directly to mission_land for landing, potentially leading to inefficient or unsafe paths.

Question
Since I am a beginner, I don't know if this is the original design. If so, I'm sorry to bother you.

  1. If this is a specific mode and mission_land exists, then all models will fly directly to mission_land after triggering return. However, the VEHICLE_TYPE_ROTARY_WING model of VTOL does not follow this design, but because it is almost similar to multi-axis, I submitted this PR.

Expected Behavior
The RTL logic should evaluate the distance to both the home position and mission_land, then select the closer one for landing—similar to the gz_standard_vto model in Gazebo simulation. Fixed-wing models should continue to land at mission_land as per current design.

Reproduction Steps

  1. Configure a multi-axis vehicle model in PX4 SITL or hardware setup.
  2. Set RTL_TYPE to 1.
  3. Start a mission with a defined mission_land waypoint farther from home.
  4. Trigger RTL mid-mission
  5. Observe the vehicle path: It flies straight to mission_land regardless of proximity to home.

Testing

  • Verified in SITL with gz_standard_vto and 'gz_x500'
  • Confirmed fixed-wing behavior unchanged.
  • Edge cases tested: RTL near home vs. far from both points.

Screenshot

  1. before the change
图片
  1. adjusted
图片 图片

@DrinkingHook DrinkingHook deleted the fix branch October 14, 2025 02:57
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.

1 participant