From c76340c97e03ac2fba895cd43169b80ef722effa Mon Sep 17 00:00:00 2001 From: Joseph Duchesne Date: Wed, 11 Dec 2024 07:35:17 +0000 Subject: [PATCH] Added documentation for PathCompleteGoalChecker, and GoalChecker plugin interface changes. Made PathCompleteGoalChecker the default in examples. Signed-off-by: Joseph Duchesne --- .../bt-plugins/actions/FollowPath.rst | 2 +- .../configuring-controller-server.rst | 7 ++-- .../packages/configuring-dwb-controller.rst | 2 +- ...configuring-graceful-motion-controller.rst | 2 +- .../packages/configuring-regulated-pp.rst | 2 +- .../configuring-rotation-shim-controller.rst | 2 +- migration/Jazzy.rst | 34 ++++++++++++++++++- plugins/index.rst | 32 ++++++++++------- tutorials/docs/using_shim_controller.rst | 2 +- 9 files changed, 62 insertions(+), 23 deletions(-) diff --git a/configuration/packages/bt-plugins/actions/FollowPath.rst b/configuration/packages/bt-plugins/actions/FollowPath.rst index b596a02d9..aacb9d2c3 100644 --- a/configuration/packages/bt-plugins/actions/FollowPath.rst +++ b/configuration/packages/bt-plugins/actions/FollowPath.rst @@ -40,7 +40,7 @@ Input Ports ====== ======= Description - Mapped name of the goal checker plugin type to use, e.g. SimpleGoalChecker. + Mapped name of the goal checker plugin type to use, e.g. PathCompleteGoalChecker. :server_name: diff --git a/configuration/packages/configuring-controller-server.rst b/configuration/packages/configuring-controller-server.rst index 68ae28fc6..29ec4f4f6 100644 --- a/configuration/packages/configuring-controller-server.rst +++ b/configuration/packages/configuring-controller-server.rst @@ -133,7 +133,7 @@ Parameters ros__parameters: goal_checker_plugins: ["goal_checker"] goal_checker: - plugin: "nav2_controller::SimpleGoalChecker" + plugin: "nav2_controller::PathCompleteGoalChecker" :min_x_velocity_threshold: @@ -240,6 +240,7 @@ Provided Plugins nav2_controller-plugins/pose_progress_checker.rst nav2_controller-plugins/simple_goal_checker.rst nav2_controller-plugins/stopped_goal_checker.rst + nav2_controller-plugins/path_complete_goal_checker.rst Default Plugins *************** @@ -251,7 +252,7 @@ When the :code:`progress_checker_plugins`, :code:`goal_checker_plugin` or :code: ------------------ ----------------------------------------------------- "progress_checker" "nav2_controller::SimpleProgressChecker" ------------------ ----------------------------------------------------- - "goal_checker" "nav2_controller::SimpleGoalChecker" + "goal_checker" "nav2_controller::PathCompleteGoalChecker" ------------------ ----------------------------------------------------- "FollowPath" "dwb_core::DWBLocalPlanner" ================== ===================================================== @@ -277,7 +278,7 @@ Example required_movement_radius: 0.5 movement_time_allowance: 10.0 goal_checker: - plugin: "nav2_controller::SimpleGoalChecker" + plugin: "nav2_controller::PathCompleteGoalChecker" xy_goal_tolerance: 0.25 yaw_goal_tolerance: 0.25 stateful: True diff --git a/configuration/packages/configuring-dwb-controller.rst b/configuration/packages/configuring-dwb-controller.rst index b3fb7a896..3e8517e25 100644 --- a/configuration/packages/configuring-dwb-controller.rst +++ b/configuration/packages/configuring-dwb-controller.rst @@ -72,7 +72,7 @@ Example required_movement_radius: 0.5 movement_time_allowance: 10.0 goal_checker: - plugin: "nav2_controller::SimpleGoalChecker" + plugin: "nav2_controller::PathCompleteGoalChecker" xy_goal_tolerance: 0.25 yaw_goal_tolerance: 0.25 stateful: True diff --git a/configuration/packages/configuring-graceful-motion-controller.rst b/configuration/packages/configuring-graceful-motion-controller.rst index e6b1f56d3..2c2ee8406 100644 --- a/configuration/packages/configuring-graceful-motion-controller.rst +++ b/configuration/packages/configuring-graceful-motion-controller.rst @@ -210,7 +210,7 @@ Example required_movement_radius: 0.5 movement_time_allowance: 10.0 goal_checker: - plugin: "nav2_controller::SimpleGoalChecker" + plugin: "nav2_controller::PathCompleteGoalChecker" xy_goal_tolerance: 0.25 yaw_goal_tolerance: 0.25 stateful: True diff --git a/configuration/packages/configuring-regulated-pp.rst b/configuration/packages/configuring-regulated-pp.rst index 38a726997..59c2b8652 100644 --- a/configuration/packages/configuring-regulated-pp.rst +++ b/configuration/packages/configuring-regulated-pp.rst @@ -332,7 +332,7 @@ Example required_movement_radius: 0.5 movement_time_allowance: 10.0 goal_checker: - plugin: "nav2_controller::SimpleGoalChecker" + plugin: "nav2_controller::PathCompleteGoalChecker" xy_goal_tolerance: 0.25 yaw_goal_tolerance: 0.25 stateful: True diff --git a/configuration/packages/configuring-rotation-shim-controller.rst b/configuration/packages/configuring-rotation-shim-controller.rst index 3186199aa..8d347ed53 100644 --- a/configuration/packages/configuring-rotation-shim-controller.rst +++ b/configuration/packages/configuring-rotation-shim-controller.rst @@ -138,7 +138,7 @@ Example required_movement_radius: 0.5 movement_time_allowance: 10.0 goal_checker: - plugin: "nav2_controller::SimpleGoalChecker" + plugin: "nav2_controller::PathCompleteGoalChecker" xy_goal_tolerance: 0.25 yaw_goal_tolerance: 0.25 stateful: True diff --git a/migration/Jazzy.rst b/migration/Jazzy.rst index fef61808e..3e7c4c4fb 100644 --- a/migration/Jazzy.rst +++ b/migration/Jazzy.rst @@ -198,4 +198,36 @@ This can be useful, for example, in cases where you want to move the robot even Default value: -- false \ No newline at end of file +- false + +Extended GoalChecker Interface +****************************** + +In `PR #4789 `_ the GoalChecker interface gained a new parameter `path` in the method `is_goal_reached`. + +Before: + +.. code-block:: cpp + + bool isGoalReached( + const geometry_msgs::msg::Pose & query_pose, const geometry_msgs::msg::Pose & goal_pose + const geometry_msgs::msg::Twist & velocity); + +After: + +.. code-block:: cpp + + bool isGoalReached( + const geometry_msgs::msg::Pose & query_pose, const geometry_msgs::msg::Pose & goal_pose, + const geometry_msgs::msg::Twist & velocity, const nav_msgs::msg::Path & current_path); + +This allows for GoalChecker plugins to account for the current path in deciding if the goal has been reached or not. + +The new argument `current_path` can be ignored by existing out of tree plugins that do not make use of it, once they are updated to use the new method signature. + +New (default) Goal Checker Plugin: PathCompleteGoalChecker +******************************************************** + +In `PR #4789 `_ a new goal checker plugin: :ref:`configuring_nav2_controller_path_complete_goal_checker_plugin` was introduced. + +This was made the default goal checker, resolving a `premature path completion bug `_. diff --git a/plugins/index.rst b/plugins/index.rst index 12772dc02..78982ba13 100644 --- a/plugins/index.rst +++ b/plugins/index.rst @@ -291,22 +291,28 @@ Waypoint Task Executors Goal Checkers ============= -+---------------------------------+------------------------+----------------------------------+ -| Plugin Name | Creator | Description | -+=================================+========================+==================================+ -| `SimpleGoalChecker`_ | David Lu!! | A plugin check whether robot | -| | | is within translational distance | -| | | and rotational distance of goal. | -| | | | -+---------------------------------+------------------------+----------------------------------+ -| `StoppedGoalChecker`_ | David Lu!! | A plugin check whether robot | -| | | is within translational distance | -| | | , rotational distance of goal, | -| | | and velocity threshold. | -+---------------------------------+------------------------+----------------------------------+ ++---------------------------------+------------------------+-----------------------------------+ +| Plugin Name | Creator | Description | ++=================================+========================+===================================+ +| `SimpleGoalChecker`_ | David Lu!! | A plugin check whether robot | +| | | is within translational distance | +| | | and rotational distance of goal. | +| | | | ++---------------------------------+------------------------+-----------------------------------+ +| `StoppedGoalChecker`_ | David Lu!! | A plugin check whether robot | +| | | is within translational distance | +| | | , rotational distance of goal, | +| | | and velocity threshold. | ++---------------------------------+------------------------+-----------------------------------+ +| `PathCompleteGoalChecker`_ | Joseph Duchesne | A plugin that checks if robot is | +| | | within translational & rotational | +| | | distance of goal, once path | +| | | length is below a threshold. | ++---------------------------------+------------------------+-----------------------------------+ .. _SimpleGoalChecker: https://github.com/ros-navigation/navigation2/blob/main/nav2_controller/plugins/simple_goal_checker.cpp .. _StoppedGoalChecker: https://github.com/ros-navigation/navigation2/blob/main/nav2_controller/plugins/stopped_goal_checker.cpp +.. _PathCompleteGoalChecker: https://github.com/ros-navigation/navigation2/blob/main/nav2_controller/plugins/path_complete_goal_checker.cpp Progress Checkers ================= diff --git a/tutorials/docs/using_shim_controller.rst b/tutorials/docs/using_shim_controller.rst index 4d1a745e0..d3f7b9ea6 100644 --- a/tutorials/docs/using_shim_controller.rst +++ b/tutorials/docs/using_shim_controller.rst @@ -59,7 +59,7 @@ As such, its configuration looks very similar to that of any other plugin. In th required_movement_radius: 0.5 movement_time_allowance: 10.0 goal_checker: - plugin: "nav2_controller::SimpleGoalChecker" + plugin: "nav2_controller::PathCompleteGoalChecker" xy_goal_tolerance: 0.25 yaw_goal_tolerance: 0.25 stateful: True