Skip to content

ArduPlane - Allow terrain lookahead to work for lawnmower type missions #30151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Ryanf55 opened this issue May 24, 2025 · 0 comments
Open

Comments

@Ryanf55
Copy link
Contributor

Ryanf55 commented May 24, 2025

Feature request

Is your feature request related to a problem? Please describe.
Use case: Fixed AGL mapping (lawmower) in steep terrain with TERRAIN_FOLLOW=1

When a plane receives a mission, if there is a hill in the middle of a lawnmower that is steep, then lookahead does not register the hill until after the vehicle is too close to the hill. This results in an undershoot of the mission plan, and a crash into terrain.

Describe the solution you'd like

Change float Plane::lookahead_adjustment(void) to consider the projected nominal mission path. If lookahead is needed, the plane should start climbing earlier, so we don't have to resort to "Can't make that climb" to save the vehicle. The plane should bias being above the mission points, or have some option bit to configure that because being to low can mean a crash.

Describe alternatives you've considered

Post-process the AGL flight plan, use a companion computer or Lua, and feed the autopilot intermediate waypoints in absolute frame.

Platform
[ ] All
[ ] AntennaTracker
[ ] Copter
[x] Plane
[ ] Rover
[ ] Submarine

Additional context
Here is a discontinuity in desired height as soon as the current lookahead detects a hill in the flight path. This is from a partner vehicle on a real survey mission.

Image

Steps to reproduce

./Tools/autotest/sim_vehicle.py -v Plane --console --map --custom-location "39.9948854, -105.2789980, 1786, 0"
param set TERRAIN_FOLLOW 1
mode takeoff
arm throttle
# wait a bit for altitude
mode auto

Image

Mission:
30151-lookahead-auto.txt

Autotest result:
00000001.zip

Relates to #29914

@Ryanf55 Ryanf55 changed the title ArduPlane - Allow lookahead_adjustment to consider multiple non-straight waypoints ArduPlane - Allow terrain lookahead to work for lawnmower type missions May 24, 2025
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

No branches or pull requests

1 participant