Repository navigation
Persistent orders, robot status and link watchdog - #6
Merged
Merged
Conversation
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]>
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.
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_iddefaults to empty andlink_timeoutto 0 (no monitoring).Interfaces
order_idfield in the Navigation, Perception and Manipulation goals. When it is empty, the goal UUID (32 hex digits) is used.OrderStatus,RobotStatusandFleetHeartbeatmessages and theGetOrderservice.CapabilityStatusaddsorder_id,order_stateandlink_state(LINK_NOT_MONITORED,LINK_WAITING,LINK_OK,LINK_LOST).Robot side (
easyfleet_core, mirrored ineasyfleet_mission_manager_py)ActionServerBase:halt_active_goal()stops the running goal and aborts a queued one without disabling goals;order_id(actions without that field, e.g. Fibonacci, keep working).Capability:<capability>.order_history, 20 by default), with the states taken from its own action status topic;/<robot>/<capability>/get_order;<capability>.link_timeout(s, 0 = off) and<capability>.on_link_lost(continue|cancel);WAITINGuntil the first/fleet_heartbeat, so a goal is never stopped by a fleet the capability never heard;cancelstops the running goal when the link is lost, and goals keep being accepted afterwards.RobotStatusPublisher:/robot_statuswith the hosted capabilities and, optionally, the pose (robot_status.pose_topic) and battery (robot_status.battery_topic);robot_status.rate_hz, 1 by default;Deploymentcreates it after a successful start and spins it.Fleet side (
easyfleet_mission_manager, mirrored in Python)FleetSession:/fleet_heartbeatat 1 Hz;/robot_statusmessages of each robot, including several processes of the same robot;get_order(robot, order_id).RobotHandle::status()andRobotHandle::get_order().CapabilityInfocarries the order and link fields from the heartbeat.Fix
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_historyandtest_link_watchdog(pure);test_capability_orders(orders,get_order, preempted/canceled/deactivated orders, history size, namespaces, the link policies);test_robot_status;test_action_server_baseandtest_deployment.easyfleet_mission_manager:test_fleet_session_statuscovers:get_orderend to end;test_orders_and_link.pyandtest_orders_link_status.py, the same coverage.colcon testofeasyfleet_core,easyfleet_mission_manager,easyfleet_bt_nodesandeasyfleet_navigation_managerpasses, lint included.test_action_client_server_lossfails locally with Fast DDS across processes, as it already did before this change on this machine, and passes with Zenoh.