Skip to content

Persistent orders, robot status and link watchdog - #6

Merged
fmrico merged 1 commit into
rollingfrom
robot_status_orders_link
Oct 26, 2026
Merged

fmrico merged 1 commit into
rollingfrom
robot_status_orders_link

Conversation

@fmrico

@fmrico fmrico commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Persistent orders, robot status and link watchdog

A mission manager can now ask a robot what happened to an order after a link outage, see each robot's aggregated status, and let each capability decide what to do when it stops hearing the fleet. Existing missions and deployments behave as before: order_id defaults to empty and link_timeout to 0 (no monitoring).

Interfaces

  • order_id field in the Navigation, Perception and Manipulation goals. When it is empty, the goal UUID (32 hex digits) is used.
  • New OrderStatus, RobotStatus and FleetHeartbeat messages and the GetOrder service.
  • CapabilityStatus adds order_id, order_state and link_state (LINK_NOT_MONITORED, LINK_WAITING, LINK_OK, LINK_LOST).

Robot side (easyfleet_core, mirrored in easyfleet_mission_manager_py)

  • ActionServerBase:
    • halt_active_goal() stops the running goal and aborts a queued one without disabling goals;
    • a goal-accepted callback receives the UUID and the order_id (actions without that field, e.g. Fibonacci, keep working).
  • Capability:
    • keeps its recent orders (<capability>.order_history, 20 by default), with the states taken from its own action status topic;
    • serves them on /<robot>/<capability>/get_order;
    • adds the current or last order and the link state to its heartbeat.
  • Link watchdog per capability:
    • <capability>.link_timeout (s, 0 = off) and <capability>.on_link_lost (continue | cancel);
    • the link stays WAITING until the first /fleet_heartbeat, so a goal is never stopped by a fleet the capability never heard;
    • cancel stops the running goal when the link is lost, and goals keep being accepted afterwards.
  • RobotStatusPublisher:
    • publishes /robot_status with the hosted capabilities and, optionally, the pose (robot_status.pose_topic) and battery (robot_status.battery_topic);
    • the rate is robot_status.rate_hz, 1 by default;
    • Deployment creates it after a successful start and spins it.

Fleet side (easyfleet_mission_manager, mirrored in Python)

  • FleetSession:
    • publishes /fleet_heartbeat at 1 Hz;
    • merges the /robot_status messages of each robot, including several processes of the same robot;
    • asks a robot for an order with get_order(robot, order_id).
  • RobotHandle::status() and RobotHandle::get_order().
  • CapabilityInfo carries the order and link fields from the heartbeat.

Fix

  • Python ActionServerBase.disable_goals() no longer waits for goals that were accepted but not dispatched yet. They are aborted when dispatched, as in C++. Before, a capability torn down with a stopped executor could hang forever.

Tests

  • easyfleet_core:
    • test_order_history and test_link_watchdog (pure);
    • test_capability_orders (orders, get_order, preempted/canceled/deactivated orders, history size, namespaces, the link policies);
    • test_robot_status;
    • new cases in test_action_server_base and test_deployment.
  • easyfleet_mission_manager: test_fleet_session_status covers:
    • the fleet heartbeat, and a capability losing it when the session goes;
    • get_order end to end;
    • robot status merging and stale capabilities.
  • Python: test_orders_and_link.py and test_orders_link_status.py, the same coverage.
  • colcon test of easyfleet_core, easyfleet_mission_manager, easyfleet_bt_nodes and easyfleet_navigation_manager passes, lint included.
  • The Python suite passes over Zenoh.
  • test_action_client_server_loss fails locally with Fast DDS across processes, as it already did before this change on this machine, and passes with Zenoh.

Goals carry an order_id; each capability keeps its recent orders and
serves them on <capability>/get_order. Capabilities watch
/fleet_heartbeat (link_timeout, on_link_lost) and report the order and
link state in their heartbeat. Deployment publishes /robot_status, and
FleetSession publishes the fleet heartbeat, merges robot status and
queries orders. Python mirrors the same API.

Signed-off-by: Francisco Martín Rico <[email protected]>
@fmrico
fmrico merged commit 9185d5f into rolling Oct 26, 2026
1 check passed
@fmrico
fmrico deleted the robot_status_orders_link branch October 26, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant