Skip to content

feat(fault_pack): promote /rosout WARN+/ERROR/FATAL to faults #420

@mfaferek93

Description

@mfaferek93

Brownfield robots emit no structured faults but every node logs to /rosout. Promote selected log entries to FaultManager faults, attributed to the originating node, with zero changes to the publisher.

Scope

  • Subscribe /rosout (rcl_interfaces/msg/Log).
  • Level mapping: WARN -> SEVERITY_WARN, ERROR -> SEVERITY_ERROR, FATAL -> SEVERITY_CRITICAL; INFO/DEBUG dropped. Configurable severity_floor (default WARN). ERROR/FATAL confirm immediately; WARN lands PREFAILED when confirmation_threshold <= -2.
  • source_id = node FQN: prepend /, strip sub-logger suffix after . (controller_manager.resource_manager -> /controller_manager). Required so faults associate with runtime-discovered entities and their snapshots route in the UI.
  • fault_code auto-generated and stable across occurrences (node + normalized message template: digits/hex/paths stripped, hashed).
  • Per-node reporter (own debounce); exclude own logs; include_only_nodes / exclude_nodes filters.

Acceptance

  • A node logging RCLCPP_ERROR yields a CONFIRMED fault in list_faults with source = that node FQN.
  • GET /api/v1/apps/<node>/faults returns the fault, and its rosbag/snapshot is reachable via the entity bulk-data path.
  • WARN appears as PREFAILED under confirmation_threshold <= -2.
  • Unit tests: level -> severity mapping, fault_code generation/stability, source_id normalization.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions