Repository navigation
Robust capabilities and missions, fleet-aware navigation manager and BT capability nodes - #5
Merged
Merged
Conversation
…d fleet obstacles - ActionServerBase/Capability: goals only while ACTIVE (enable/disable_goals, stop()); a queued goal counts as busy without preemption; exceptions from the callbacks reject the goal; a canceled queued goal ends CANCELED. - ActionClient: send_goal_and_wait cancels on timeout and returns SERVER_UNAVAILABLE when the server goes away; cancel_all_goals cancels only this client's goals; no throw or hang after the context shuts down. - Deployment: try_add_capabilities_from_parameters() and try_start(), which roll back instead of exiting. - FleetSession/RobotHandle (C++ and Python): a live capability registry, explicit robot lifetime; run outcomes when a capability dies (UNREACHABLE) or ignores a cancel (TIMEOUT); Python ActionServerBase/Capability. - Navigate BT node: response_timeout, and goals sent while the client still waits for an answer are no longer lost. - Navigation manager: conflicts only for robots navigating with a recent path, paths trimmed to the robot, hysteresis, no deadlock with both robots paused, priority after max_pause_sec, re-pause without flooding, operator pauses left alone; absolute map/routes paths and routes.save_path_file; RViz route edits applied once; TF relay of each robot's frames (robots.relay_tf*) and the other robots shared as obstacles (robots.share_obstacles*); no throw when publishing during shutdown. - CI builds and tests every package; copyright and cpplint enabled everywhere. Signed-off-by: Francisco Martín Rico <[email protected]>
CallNavigation, CallPerception and CallManipulation run one goal of /<robot>/navigation, /perception or /manipulation from any BehaviorTree.CPP tree, e.g. the actions of a PlanSys2 plan; halting the node cancels the goal, and navigation and manipulation report their progress as completion. Signed-off-by: Francisco Martín Rico <[email protected]>
Without it colcon tests them with unittest, which finds none of their pytest tests: 'NO TESTS RAN' failed the CI. 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.
Two commits.
1. Robust capabilities and missions, conflict monitor fixes, TF relay and fleet obstacles
easyfleet_core):ActionServerBaseaccepts goals only while the capability is ACTIVE (enable_goals()/disable_goals()), and subclasses callstop()in their destructor so the worker is joined before they go. Without preemption a queued goal counts as busy; exceptions from the goal/cancel callbacks reject the goal; a canceled queued goal ends CANCELED.send_goal_and_wait()cancels the goal when it times out and returnsSERVER_UNAVAILABLEwhen the server stays away longer thandefault_server_timeout(it could block forever);cancel_all_goals()cancels only this client's goals, also those still waiting for acceptance; no throw or hang once the context is shut down.try_add_capabilities_from_parameters()andtry_start()return false (rolling back to UNCONFIGURED) instead of exiting.easyfleet_mission_manager, C++ and Python):FleetSessionkeeps a live capability registry (capabilities that appear, restart or die after discovery); explicit robot lifetime (RobotHandledetaches on destruction); a goal on a capability that stops its heartbeats ends UNREACHABLE, and one whose cancel is never answered ends TIMEOUT after 5 s. Python getsActionServerBaseandCapability.API changes:
RobotHandle::capabilities()returns by value;check_timeout(bool alive); the outcome helpers are templated on the outcome enum.response_timeoutport; a goal set while EasyNav still has to answer the previous one is sent later instead of lost.conflict.path_timeout_sec), from where they are (conflict.pose_timeout_sec);conflict.resume_hysteresis_factor; no deadlock with both robots paused; priority afterconflict.max_pause_sec; PAUSE re-sent after a new goal without flooding; operator pauses left alone;routes.save_path_filefor RViz edits (instead of writing into the installed share), each RViz click applied once;robots.relay_tf*: each robot's TF under/<robot>/tf, only selected frames relayed to/tffor a fleet view;robots.share_obstacles*: each robot gets the other robots as aPointCloud2on/<robot>/fleet_obstacles(a Kobuki's lidar barely sees another Kobuki); never an empty cloud;2. easyfleet_bt_nodes
CallNavigation,CallPerceptionandCallManipulationrun one goal of/<robot>/navigation,/perceptionor/manipulationfrom any BehaviorTree.CPP tree, e.g. the actions of a PlanSys2 plan:{arg0}in a PlanSys2 action), the action name from/<robot>/<type>oraction_name;min_detectionsand stops the capability;distance_remaining) and manipulation (progress) report their progress as the blackboard'scompletion, which PlanSys2 shows as the action's.Tests: every point above adds or extends tests (
test_action_client_server_loss,test_deployment_no_capabilities, Pythontest_action_server_base/test_capability,fleet_obstacles_tests, +750 lines intest_navigation_manager, 18 cases ineasyfleet_bt_nodes). All pass locally (easyfleet_bt_nodes30 times in a row), excepttest_action_client_server_losswith Fast DDS on this machine: its cross-process discovery on localhost is broken here today (demo talker/listener do not talk either); it passes with Zenoh in 1.3 s.Four Kobukis in a 200 x 200 m warehouse ran a PlanSys2 mission on these (EasyNavigation/easyfleet_example_deployments, warehouse PR).