From f1379b9a4f8d00846d2bbb928179857e91757d6f Mon Sep 17 00:00:00 2001 From: Maurice-1235 Date: Thu, 15 May 2025 00:32:08 +0800 Subject: [PATCH] Update arguments for custom planner and controller Signed-off-by: Maurice-1235 --- plugin_tutorials/docs/writing_new_nav2controller_plugin.rst | 4 ++-- plugin_tutorials/docs/writing_new_nav2planner_plugin.rst | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin_tutorials/docs/writing_new_nav2controller_plugin.rst b/plugin_tutorials/docs/writing_new_nav2controller_plugin.rst index fb498ecac6..0ecc50477d 100644 --- a/plugin_tutorials/docs/writing_new_nav2controller_plugin.rst +++ b/plugin_tutorials/docs/writing_new_nav2controller_plugin.rst @@ -70,8 +70,8 @@ The list of methods, their descriptions, and necessity are presented in the tabl | computeVelocityCommands() | Method is called when a new velocity command is demanded by the controller server | Yes | | | in-order for the robot to follow the global path. This method returns a | | | | `geometry_msgs\:\:msg\:\:TwistStamped` which represents the velocity command for the | | -| | robot to drive. This method passes 2 parameters: reference to the current robot | | -| | pose and its current velocity. | | +| | robot to drive. This method passes 3 parameters: reference to the current robot | | +| | pose, its current velocity, and a pointer to the `nav2_core::GoalChecker`. | | +---------------------------+---------------------------------------------------------------------------------------+------------------------+ | cancel() | Method is called when the controller server receives a cancel request. If this method | No | | | is unimplemented, the controller will immediately stop when receiving a cancel | | diff --git a/plugin_tutorials/docs/writing_new_nav2planner_plugin.rst b/plugin_tutorials/docs/writing_new_nav2planner_plugin.rst index b9a6a8c2b4..6d119cc580 100644 --- a/plugin_tutorials/docs/writing_new_nav2planner_plugin.rst +++ b/plugin_tutorials/docs/writing_new_nav2planner_plugin.rst @@ -60,7 +60,8 @@ Let's learn more about the methods needed to write a planner plugin. +----------------------+-----------------------------------------------------------------------------+-------------------------+ | createPlan() | Method is called when planner server demands a global plan for specified | Yes | | | start and goal pose. This method returns `nav_msgs\:\:msg\:\:Path` carrying | | -| | global plan. This method takes 2 input params: start pose and goal pose. | | +| | global plan. This method takes 3 input params: start pose, goal pose and | | +| | a function to check if the action has been canceled. | | +----------------------+-----------------------------------------------------------------------------+-------------------------+ For this tutorial, we will be using methods ``StraightLine::configure()`` and ``StraightLine::createPlan()`` to create straight-line planner.