Mission rules: detection triggers with enter and exit instructions - #306
Draft
jp-pino wants to merge 1 commit into
Draft
Mission rules: detection triggers with enter and exit instructions#306jp-pino wants to merge 1 commit into
jp-pino wants to merge 1 commit into
Conversation
jp-pino
force-pushed
the
jp-pino/mission-rules
branch
from
September 9, 2026 20:45
e557c85 to
a26e722
Compare
jp-pino
added this pull request to stack #304
September 9, 2026 20:59
… telemetry Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
jp-pino
force-pushed
the
jp-pino/mission-rules
branch
from
September 9, 2026 21:16
a26e722 to
0fe0fdd
Compare
jp-pino
commented
Sep 10, 2026
Comment on lines
+117
to
+127
| // MissionRule runs instructions when its trigger fires and when it releases. | ||
| message MissionRule { | ||
| uint32 id = 1; // Rule id, defined by the client. | ||
| string name = 2; // Rule name, for the log and the app. | ||
| bool enabled = 3; // A disabled rule never fires. | ||
| oneof trigger { | ||
| DetectionTrigger detection_trigger = 4; // Fire on detections. | ||
| } | ||
| repeated Instruction enter_instructions = 5; // Run when the rule fires. Instructions that move the drone are refused. | ||
| repeated Instruction exit_instructions = 6; // Run when the rule releases. | ||
| } |
Contributor
Author
There was a problem hiding this comment.
@follesoe protocol-wise I think this is a good design. The trigger can then be extended to be a DepthTrigger, AltitudeTrigger, LocationTrigger, among other ideas. What do you think?
follesoe
reviewed
Sep 10, 2026
Comment on lines
+117
to
+127
| // MissionRule runs instructions when its trigger fires and when it releases. | ||
| message MissionRule { | ||
| uint32 id = 1; // Rule id, defined by the client. | ||
| string name = 2; // Rule name, for the log and the app. | ||
| bool enabled = 3; // A disabled rule never fires. | ||
| oneof trigger { | ||
| DetectionTrigger detection_trigger = 4; // Fire on detections. | ||
| } | ||
| repeated Instruction enter_instructions = 5; // Run when the rule fires. Instructions that move the drone are refused. | ||
| repeated Instruction exit_instructions = 6; // Run when the rule releases. | ||
| } |
| uint32 id = 1; // Rule id, defined by the client. | ||
| string name = 2; // Rule name, for the log and the app. | ||
| bool enabled = 3; // A disabled rule never fires. | ||
| oneof trigger { |
Member
There was a problem hiding this comment.
Consider making this a list of triggers that are AND evaluated, so we have a repeated list of oneof triggers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rules that run instructions on their own, independently of a mission, when something is detected.
DetectionTrigger { class_names, model_name, camera, min_confidence, min_area_fraction, hold_ms, release_ms, cooldown_ms }.MissionRule { id, name, enabled, trigger, enter_instructions, exit_instructions }: the enter instructions run when the trigger has matched forhold_ms, the exit instructions when it has been unmatched forrelease_ms;cooldown_msthen passes before the rule can fire again. Instructions that move the drone are refused.MissionRuleStatus(MissionRuleStateIDLE / ACTIVE / COOLDOWN / DISABLED, episodes, last fired, last result) inMissionRulesTel.SetMissionRulesReq/Rep(accepted, reason),GetMissionRulesReq/Rep,ClearMissionRulesCtrl.NOTIFICATION_TYPE_MISSION_RULE_FIRED(38) andNOTIFICATION_TYPE_MISSION_RULE_RELEASED(39).Depends on #305.