Fabric tracks plan lifecycle internally with fabric::PlanStatus and exposes it through fabric_msgs/msg/FabricStatus.
The current server code uses the following statuses during normal processing:
- UNKNOWN: Initial or indeterminate state.
- QUEUED: Plan is queued for processing.
- PARSING: Plan is being parsed.
- PARSE_FAILED: Parsing failed due to invalid format or errors.
- VALIDATING: Plan is being validated for compatibility.
- VALIDATION_FAILED: Validation failed (see
rejected_listfor reasons). - BONDING: Establishing a bond with the capabilities server.
- BOND_FAILED: Failed to establish bond.
- CAPABILITY_STARTING: Capabilities are being started.
- CAPABILITY_START_FAILED: Failed to start capabilities.
- CAPABILITY_CONNECTING: Capabilities are being connected.
- CAPABILITY_CONNECT_FAILED: Failed to connect capabilities.
- RUNNING: Plan is actively running.
- COMPLETED: Plan execution completed successfully.
- CANCELLED: Plan execution was cancelled before completion.
When /fabric/cancel_plan targets the active plan, the server now marks it CANCELLED, stops the bond, wakes the processing thread, and frees allocated capabilities before moving on.
The status of any plan can be retrieved using the /fabric/get_plan_status ROS2 service.
Request fields:
headerplan_id
Response fields:
headerstatusasfabric_msgs/msg/FabricStatusrejected_list
ros2 service call /fabric/get_plan_status fabric_msgs/srv/GetPlanStatus "{plan_id: '<your_plan_id>'}"
status:
code: 5 # VALIDATION_FAILED
rejected_list:
- "Missing required capability: foo"
- "Incompatible provider: bar"
In the current implementation, rejected_list is populated by parser syntax checks. Validation failures from CompatibilityValidation throw immediately and may leave rejected_list empty.
When responding to a status request, the server maps PlanStatus to fabric_msgs/msg/FabricStatus in status_msg().
New statuses can be added by extending PlanStatus and updating the status mapping in the server.