Skip to content

Add executive authority model, mission_executor BT layer, and enforce executive gating in trajectory_manager#7

Open
varadVaidya wants to merge 2 commits into
mainfrom
codex/refactor-architecture-for-uav-management
Open

Add executive authority model, mission_executor BT layer, and enforce executive gating in trajectory_manager#7
varadVaidya wants to merge 2 commits into
mainfrom
codex/refactor-architecture-for-uav-management

Conversation

@varadVaidya

Copy link
Copy Markdown
Collaborator

Motivation

  • Introduce a clear executive boundary so mission logic cannot bypass vehicle-level safety and authorization decisions.
  • Separate mission/application concerns (behavior trees) from executive responsibilities to simplify guarantees about what may command motion.
  • Make manager lifecycle on_configure() non-blocking by removing deterministic startup sleep/gates to avoid brittle launch-order dependencies.

Description

  • Add executive contract fields to peregrine_interfaces::msg::UAVState (fault_latched, motion_authorized, takeoff_authorized, landing_authorized, executive_reason) and a new service peregrine_interfaces::srv::ClearEmergency to explicitly clear latched emergencies.
  • Implement executive semantics in uav_manager: compute and publish the new uav_state fields in publishUavState(), expose clear_emergency service, and remove forwarding of generic motion actions (go_to/execute_trajectory) from the executive.
  • Add trajectory_manager executive gate (executive_gate.hpp) and subscription to uav_state, and enforce policy at goal acceptance and during execution (reject goals when executive denies motion, abort active goals when authority is revoked, and forbid takeoff/land via the generic execute_trajectory action).
  • Remove blocking startup/topic-discovery waits and <thread> sleeps from estimation_manager, trajectory_manager, and control_manager on_configure() implementations and replace with non-blocking lifecycle activation behavior and comments clarifying responsibilities.
  • Add a new mission_executor package implementing a BehaviorTree-based mission application layer with a reusable example tree and launch integration in peregrine_bringup.
  • Update documentation (ARCHITECTURE.md, package READMEs) to reflect the layered separation (mission/executive/motion) and executive gating rules.
  • Add unit tests for the executive gate (trajectory_manager/test_executive_gate.cpp) and update trajectory_manager CMake to run the test, plus add/adjust uav_manager unit tests related to emergency behavior.

Testing

  • Ran ament/unit tests: trajectory_manager::ExecutiveGateTest (3 cases) executed and passed.
  • Ran uav_manager supervisor unit tests (including emergency/clear behavior) and they passed.
  • Full workspace build and test (colcon/ament) performed locally; build and the added tests completed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant