Open garfieldG opened 3 years ago
@bresch Hi, maybe you can help
anything new?
@garfieldG Hi, the fix for the vertical geofence is this one here: https://github.com/PX4/PX4-Autopilot/pull/17566
Some checks did not pass so I rebased on master and pushed gain, should be merged soon. Can you please retest with that one?
@garfieldG
Change geofence mode to none. Fly to a waypoint outside the max radius. Switch the geofence mode to hold. see the error.
I don't think this is an error, it's just not supported this way. If you have geofence deactivated and you fly outside of the geofence you cannot expect the system to bring you back into the geofence. In some cases this might actually be dangerous and not expected. If you want to use a geofence, just have it enabled always.
I think it's an error as long you can change the gf action, otherwise the action should be set once and after that you shouldn't be able to change it
Recent report on Geofence not working properly from here:
Hi, we’ve come across a bug which results in a number of issues with the altitude limit in the Geofence.
In summary, an altitude breach violation can trigger unexpectedly, causing the drone to ascend to an inappropriate set-point. This breach violation will continuously trigger, causing the drone to climb even higher, unless you are aware of it’s behaviour. Below is a more in-depth explanation of trigger cases.
This can be very jarring for the remote pilot and I could easily see this leading to an incident either by uncontrolled drone behaviour or by the remote pilot panicking. I’ve got the appropriate logs and am more than happy to share them if desired. Any help here would be greatly appreciated!
Summary When approaching the Geofence height, PX4 triggers the breach violation significantly prematurely (~5-10m below parameter). This will continuously re-trigger whilst setting incorrect HOLD (LOITER) altitudes.
Detailed
If Geofence is set (for example) to 30m, a breach violation actually triggers at ~24m.
Range sensor (downwards facing LIDAR) set to provide altitude and shows 24m.
The drone enters LOITER mode but the set-point is several metres above the drone; an unexpected and non-RP controlled ascension occurs.
If the RP gives any stick input without switching modes, the breach violation re-triggers with a higher LOITER set-point, causing the drone to climb further.
If the RP changes to POSITION mode and fails to return to the permitted Geofence zone in one motion (i.e if segmented consecutive steps are attempted), the breach violation re-triggers with a higher LOITER set-point, causing the drone to climb further.
If the RP initiates RTL, the breach violation re-triggers. Re-initiation of RTL overwrites the breach violation and is carried out successfully.
If the drone continues to climb (intentionally or by compiled breach violations), an altitude will be reached where the breach violation is no longer triggered.
Example, when Geofence = 30m, at altitudes above 35m the RP can fly uninterrupted.
Returning below 35m will re-trigger the breach violation.
On the image below, you can see LOITER continuously being triggered which creates a set-point higher than the drone causing it to ascend further. You can also see that this only occurs within a ~5-10m band of altitude around the Geofence ceiling. Here, the Geofence altitude was set to 5m, but the LOITER action was triggered when the Distance Sensor (downward facing LIDAR) read 0.5m.
This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
Describe the bug Hi,
While playing with the geofence on sitl I encountered few issues regarding it :
To Reproduce Steps to reproduce the behavior: first issue :
third issue :
Expected behavior first issue : mc shouldn't go above the allowed altitude. second issue : mc should return to the allowed radius. third issue : mission should be accepted.
Drone (please complete the following information):