-
Notifications
You must be signed in to change notification settings - Fork 13.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
Add parameter for requiring Geofence for arming #11962
base: main
Are you sure you want to change the base?
Conversation
Overall this looks functional, although we've been slowly trying to consolidate the pre-arm logic with all of the arming requirements rolled into a single state machine helper with arming requirements bitfield. The existing commander geofence logic could populate something like |
great feature! We will definitely enable it for our systems in the future. |
Thinking about this a bit more, could we simply use the existing |
@dagar, yes, makes sense! |
The only little problem it that you would need to change this parameter if you want to test your drone in And when you go out, it's easier to forget to change Maybe disable this check in "positionless" modes, like |
I think we've hit on something that may be ambiguous or open to interpretation. What's the desired geofence behavior with respect to different modes? @Antiheavy @okalachev Manual mode being able to ignore position dependent things like a geofence makes sense to me, but potentially introduces holes in the user experience and someone will inevitably want it regardless. |
There is a wish to enforce the testers and the autonomous systems' operators to not forget to set GeoFence before flight, most importantly autonomous flights in mission mode. Sometimes But, in most cases, this requirement should not disturb to test the drone in manual modes ( |
If this setting is linked to the |
@okalachev I think you are right, saw people forgot to add geofence before. |
If you violate a geofence and you enabled enforcement you should not be allowed to fly in it, no matter which mode the vehicle is in. A geofence doesn’t prevent any failures in an autonomous mode - it enforces merely location-specific compliance. So it should indeed be based on GF_ACTION for all flight modes. We can’t justify a geofence implementation in front of a regulator that can be circumvented by something as basic as changing flight modes. |
@LorenzMeier, @dagar, what do you think of this: The vehicle can be armed, when:
Also, now I tested and found an issue: the vehicle is getting armed, even when it's outside of the fence. I think, this check also should be on the pre-arm stage, and it should not get armed, when outside the fence. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still seems like a valid topic |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Hi! Does this PR just stuck or this functionality was done in some other way? From my point of view this issue is important from security reasons. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
For autonomous systems GeoFence can do much job, even rescuing some property from damage (if system's GPS functioning properly).
I propose adding a parameter (
COM_ARM_GEOFENCE
), which makes GeoFence required for arming.The options are to require GeoFence only for mission mode or for all the modes. The alternative may be requiring it for all the position assisted modes (
OFFBOARD
,POSCTL
,TAKEOFF
, ...), which may be more complicated.Tested in SITL.