From 189e72300e12f7541ef028679e627739b3cbdec5 Mon Sep 17 00:00:00 2001 From: David G Date: Mon, 22 Sep 2025 11:09:50 +0200 Subject: [PATCH 1/5] add toggle cm (needs correct link in nav plugins), fix malformed table in configuring-bt-navigator.rst:243 Signed-off-by: David G --- .../actions/ToggleCollisionMonitor.rst | 50 +++++++++++++++++++ .../packages/configuring-bt-navigator.rst | 6 +-- configuration/packages/configuring-bt-xml.rst | 1 + plugins/index.rst | 3 ++ 4 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst diff --git a/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst b/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst new file mode 100644 index 000000000..58b83959f --- /dev/null +++ b/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst @@ -0,0 +1,50 @@ +.. _bt_toggle_colllsion_monitor_service: + + +ToggleCollisionMonitor +====================== + +Calls the ToggleCollisionMonitor serice. Used to toggle the collision monitor on (enabled) and off (disabled). + +Input Ports +----------- + +:enable: + + ============== ======= + Type Default + -------------- ------- + bool true + ============== ======= + + Description + Wether to enable or disable the collision monitor. + +:service_name: + + ============== ======= + Type Default + -------------- ------- + string N/A + ============== ======= + + Description + Service name. + +:server_timeout: + + ============== ======= + Type Default + -------------- ------- + double 10 + ============== ======= + + Description + Server timeout (ms). + +Example +------- + +.. code-block:: xml + + diff --git a/configuration/packages/configuring-bt-navigator.rst b/configuration/packages/configuring-bt-navigator.rst index 0ed15cdad..7331978ab 100644 --- a/configuration/packages/configuring-bt-navigator.rst +++ b/configuration/packages/configuring-bt-navigator.rst @@ -238,11 +238,11 @@ Parameters :bt_search_directories: - ============== ================================================= + ============== ================================================== Type Default - -------------- ----------------------------- + -------------- -------------------------------------------------- vector $(find-pkg-share nav2_bt_navigator)/behavior_trees - ============== ================================================= + ============== ================================================== Description List of directories that hosts behavior trees XML files. It is needed to register all behavior trees as well as subtrees. diff --git a/configuration/packages/configuring-bt-xml.rst b/configuration/packages/configuring-bt-xml.rst index 3b1ab8090..a9bcf352f 100644 --- a/configuration/packages/configuring-bt-xml.rst +++ b/configuration/packages/configuring-bt-xml.rst @@ -63,6 +63,7 @@ Action Plugins bt-plugins/actions/AppendGoalPoseToGoals.rst bt-plugins/actions/ExtractRouteNodesAsGoals.rst bt-plugins/actions/GetNextFewGoals.rst + bt-plugins/actions/ToggleCollisionMonitor.rst Condition Plugins ***************** diff --git a/plugins/index.rst b/plugins/index.rst index 12b194360..2434d612a 100644 --- a/plugins/index.rst +++ b/plugins/index.rst @@ -457,6 +457,8 @@ Behavior Tree Nodes +---------------------------------------------+---------------------+------------------------------------------+ | `Get Next Few Goals Action`_ | Steve Macenski | Obtains the next N goals in a goal vector| +---------------------------------------------+---------------------+------------------------------------------+ +| `Toggle Collision Monitor Service`_ | David Grbac | Calls toggle collision monitor service | ++---------------------------------------------+---------------------+------------------------------------------+ .. _Back Up Action: https://github.com/ros-navigation/navigation2/tree/main/nav2_behavior_tree/plugins/action/back_up_action.cpp .. _Drive On Heading Action: https://github.com/ros-navigation/navigation2/tree/main/nav2_behavior_tree/plugins/action/drive_on_heading_action.cpp @@ -501,6 +503,7 @@ Behavior Tree Nodes .. _Append Goal Pose To Goals Action: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/append_goal_pose_to_goals_action.cpp .. _Extract Route Nodes To Goals Action: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/extract_route_nodes_as_goals_action.cpp .. _Get Next Few Goals Action: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/get_next_few_goals_action.cpp +.. _Toggle Collision Monitor Service: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/get_next_few_goals_action.cpp +------------------------------------+--------------------+------------------------+ From afe1a5c9f36038d15b3f30f7daad692ab52a5cf3 Mon Sep 17 00:00:00 2001 From: David G Date: Wed, 24 Sep 2025 10:08:02 +0200 Subject: [PATCH 2/5] update link in plugins list Signed-off-by: David G --- plugins/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/index.rst b/plugins/index.rst index 2434d612a..d3aa33a09 100644 --- a/plugins/index.rst +++ b/plugins/index.rst @@ -503,7 +503,7 @@ Behavior Tree Nodes .. _Append Goal Pose To Goals Action: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/append_goal_pose_to_goals_action.cpp .. _Extract Route Nodes To Goals Action: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/extract_route_nodes_as_goals_action.cpp .. _Get Next Few Goals Action: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/get_next_few_goals_action.cpp -.. _Toggle Collision Monitor Service: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/get_next_few_goals_action.cpp +.. _Toggle Collision Monitor Service: https://github.com/ros-navigation/navigation2/blob/main/nav2_behavior_tree/plugins/action/toggle_collision_monitor_service.cpp +------------------------------------+--------------------+------------------------+ From c178b0613434ec08c4eeb70f3ee98ee5a31f57d6 Mon Sep 17 00:00:00 2001 From: David G Date: Wed, 24 Sep 2025 12:23:42 +0200 Subject: [PATCH 3/5] Add migration guide entry Signed-off-by: David G --- migration/Kilted.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/migration/Kilted.rst b/migration/Kilted.rst index 6746fd4b2..5b223f052 100644 --- a/migration/Kilted.rst +++ b/migration/Kilted.rst @@ -390,3 +390,34 @@ adding virtual obstacles on maps, dynamic objects simulation/highlighting, hidin To run Vector Object server a new ``vector_object_server.launch.py`` launch-file is being supplied. :ref:`navigation2_with_vector_objects` tutorial explains how launch Vector Object server and navigate with vector objects added to raster costmaps. The information about Vector Object server parameters set-up could be found at :ref:`configuring_vector_object_server` configuration guide. + + +Toggle collision monitor service and BT plugin +---------------------------------------------- + +`PR #5493 `_ and `PR #5532 `_ introduce a new toggle service for the collision monitor. +This service allows enabling or disabling all collision monitor polygons while keeping sensor checks within the collision monitor active. + +The service is defined using a new interface, ``Toggle.srv``: + +.. code-block:: text + + bool enable + --- + bool success + string message + +This interface can be extended in the future if needed. + +A corresponding Behavior Tree (BT) plugin was also created to call this service. +The plugin is based on ``BtServiceNode`` and provides the following input ports: + +- ``service_name``: name of the toggle service +- ``server_timeout``: timeout for service calls +- ``enable``: boolean flag to enable or disable the collision monitor + +An example usage in a Behavior Tree XML file: + +.. code-block:: xml + + From 9454b8a78acc547a711608ada9d566dd841be403 Mon Sep 17 00:00:00 2001 From: David G Date: Wed, 24 Sep 2025 16:11:17 +0200 Subject: [PATCH 4/5] fix pre commit Signed-off-by: David G --- .../bt-plugins/actions/ToggleCollisionMonitor.rst | 2 +- migration/Kilted.rst | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst b/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst index 58b83959f..54bcd4804 100644 --- a/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst +++ b/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst @@ -4,7 +4,7 @@ ToggleCollisionMonitor ====================== -Calls the ToggleCollisionMonitor serice. Used to toggle the collision monitor on (enabled) and off (disabled). +Calls the ToggleCollisionMonitor service. Used to toggle the collision monitor on (enabled) and off (disabled). Input Ports ----------- diff --git a/migration/Kilted.rst b/migration/Kilted.rst index 5b223f052..f3f3962ca 100644 --- a/migration/Kilted.rst +++ b/migration/Kilted.rst @@ -395,7 +395,7 @@ The information about Vector Object server parameters set-up could be found at : Toggle collision monitor service and BT plugin ---------------------------------------------- -`PR #5493 `_ and `PR #5532 `_ introduce a new toggle service for the collision monitor. +`PR #5493 `_ and `PR #5532 `_ introduce a new toggle service for the collision monitor. This service allows enabling or disabling all collision monitor polygons while keeping sensor checks within the collision monitor active. The service is defined using a new interface, ``Toggle.srv``: @@ -409,12 +409,12 @@ The service is defined using a new interface, ``Toggle.srv``: This interface can be extended in the future if needed. -A corresponding Behavior Tree (BT) plugin was also created to call this service. +A corresponding Behavior Tree (BT) plugin was also created to call this service. The plugin is based on ``BtServiceNode`` and provides the following input ports: -- ``service_name``: name of the toggle service -- ``server_timeout``: timeout for service calls -- ``enable``: boolean flag to enable or disable the collision monitor +- ``service_name``: name of the toggle service +- ``server_timeout``: timeout for service calls +- ``enable``: boolean flag to enable or disable the collision monitor An example usage in a Behavior Tree XML file: From 7c0d3e152cb241166509dc2ac939c959486a8189 Mon Sep 17 00:00:00 2001 From: David G Date: Wed, 24 Sep 2025 16:13:47 +0200 Subject: [PATCH 5/5] fix spelling :) Signed-off-by: David G --- .../packages/bt-plugins/actions/ToggleCollisionMonitor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst b/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst index 54bcd4804..6c0e06c09 100644 --- a/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst +++ b/configuration/packages/bt-plugins/actions/ToggleCollisionMonitor.rst @@ -18,7 +18,7 @@ Input Ports ============== ======= Description - Wether to enable or disable the collision monitor. + Whether to enable or disable the collision monitor. :service_name: