-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
ArduPlane Terrain Following not functional in Guided mode #26953
Comments
Log Attached... you must bunzip2 it. It's actually a .bin. Or just use SITL ... i can't get it to work under any circumstances - except for a different mode. |
Circle is a non-gps mode therefore it cannot provide terrain following. |
Boy, it sure could fool me - it holds the path like it's laser guided. Anyway, that being the case, we could just ignore that part of the issue. I definitely think it's an issue that guided mode doesn't honor it. Unfortunately, i suspect there are some seriously complicating factors involving the GCS softwares and how the target coordinates are specified, but it seems to me this is an issue that could cause some costly disasters - and it's worth figuring out a way to deal with it. |
According to this documentation, GUIDED should support terrain following: Did you enable bit 6 of It would help if you could give us the steps to reproduce this in SITL. |
@iNotMario, I'm not a Plane expert but I think @LupusTheCanine's comment may not be correct. I'm pretty sure that Circle mode (on plane) uses a GPS if present. It probably also works while deadreckoning but if a GPS is present surely it uses it. |
According to the wiki, terrain following is not supported in Circle mode. |
Also, for the record re. Circle mode. |
Which GCS did you test with? The MAVLink message may be using AMSL instead of AGL altitude. |
QGroundControl ... However, notably, others have had issues with Mission Planner (see discussion linked in OP). The first thing that comes to mind is to [when TERRAIN_FOLLOW] simply convert the destination to AGL by subtracting the terrain height at that location - then executing as AGL. That would allow terrain following while still honoring the target height. |
As with many things in MAVLink and guided mode, certain cases like this becomes ambiguous on what the "right" behavior is. Whether or not it should do something is ultimately up to what the docs say, and the docs don't seem to specify. The best near term action is to reproduce this in SITL to confirm the behavior, then perhaps go speak with the MAVLink maintains to ask for what the expected behavior is. Last thing we want is for people to crash into terrain, but the AMSL guided command may intended to be taken as-is and ignore terrain. In this case, clear documentation, and perhaps some warnings in the GCS, could reduce the risk of a crash. |
So i believe the mavlink specs are defined here: From the docs, it appears to not actually say anything about the means of getting there, only the coordinate system of the destination - no matter which system is specified. I would infer this means it's specifying something only about the destination - not about the path that Plane takes to get there - and perhaps that's where the decision rests in Plane's hands. It looks to me like the current behavior for AGL is, itself, a presumption. (A good one, IMO) If we decide that's true, then i think we should apply the assumption to the other "frames", too. I will do a little digging into QGC and see what it's sending. You're probably right that it's not specifying AGL, i suspect 0 (AMSL) by default, but that's just a guess for now. |
In my case with QGC, all terrain shows as loaded, and i can watch Alt-Above-Terrain drop towards 0 with no change in AMSL. AKA, Blocks Pending = 0, it still doesn't follow the terrain. It's not clear to me exactly, but is it that you're using --map to do the "fly to"? I've never used that option before. I will try and see how it reacts with QGC also feeding it terrain data. |
How are you sending the guided command from QGC? With fly to, I can only fly 3000' horizontally, and mountains are far away |
QGC has an option in the Application settings for Max distance. "Fly View" -> "Guided Commands" -> "Go to Location Max Distance" (The exact path varies significantly with different versions, i'm describing recent Daily builds) Mt Jerrabomberra is WSW of the default SITL airport. It's actually pretty close. It's not a very big mountain - but it doesn't need to be. |
@Ryanf55 in newer mavproxy you can do this:
and guided requests will be AGL. This is needed to get GUIDED mode terrain following |
Issue details
It appears that the terrain following functionality does not actually follow the Terrain in either Guided or Circle modes.
All terrain blocks are loaded, none pending.
It works perfectly in Cruise, FBW-B, Loiter, QRTL, RTL Modes.
SITL Command:
sim_vehicle.py -v Plane -f quadplane
GCS: QGroundControl
Please see this discussion for other reports:
https://discuss.ardupilot.org/t/terrain-follow-in-guided-mode/91703/16
Version
4.5.1
Probably Earlier
Platform
[ ] All
[ ] AntennaTracker
[ ] Copter
[X] Plane
[ ] Rover
[ ] Submarine
Airframe type
QuadPlane (QuadRotor VTOL)
Hardware type
SITL, CUAV-X7
Logs
My Current log is 1GB+. I will do a more concise simulation and upload for your viewing pleasure.
The text was updated successfully, but these errors were encountered: