Skip to content

Commit 0520aab

Browse files
bektaskemalKemal BektasSteveMacenski
authored
Updates for the cancel checker (PR #4148) (#531)
* Add Jazzy migration guide for cancel checker Signed-off-by: Kemal Bektas <kemal.bektas@node-robotics.com> * Update planner configurations for terminal_checking_interval Signed-off-by: Kemal Bektas <kemal.bektas@node-robotics.com> * Update Iron.rst --------- Signed-off-by: Kemal Bektas <kemal.bektas@node-robotics.com> Co-authored-by: Kemal Bektas <kemal.bektas@node-robotics.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
1 parent 4727a0e commit 0520aab

File tree

5 files changed

+60
-0
lines changed

5 files changed

+60
-0
lines changed

configuration/packages/configuring-thetastar.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ The parameters of the planner are:
8181
Description
8282
Whether to allow planning in unknown space.
8383

84+
:``<name>``.terminal_checking_interval:
85+
86+
==== =======
87+
Type Default
88+
---- -------
89+
int 5000
90+
==== =======
91+
92+
Description
93+
Number of iterations between checking if the goal has been cancelled or planner timed out
94+
8495
.. Note::
8596
Do go through the README file available on this repo's link to develop a better understanding of how you could tune this planner.
8697
This planner requires you to tune the `cost_scaling_factor` parameter of your costmap too, to get good results.

configuration/packages/smac/configuring-smac-2d.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ Parameters
8181
Description
8282
Maximum number of iterations after the search is within ``tolerance`` before returning approximate path with best heuristic if exact path is not found.
8383

84+
:``<name>``.terminal_checking_interval:
85+
86+
==== =======
87+
Type Default
88+
---- -------
89+
int 5000
90+
==== =======
91+
92+
Description
93+
Number of iterations between checking if the goal has been cancelled or planner timed out
94+
8495
:``<name>``.max_planning_time:
8596

8697
====== =======

configuration/packages/smac/configuring-smac-hybrid.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ Parameters
8181
Description
8282
Maximum number of iterations once a visited node is within the goal tolerances to continue to try to find an exact match before returning the best path solution within tolerances. Negative values convert to infinite.
8383

84+
:``<name>``.terminal_checking_interval:
85+
86+
==== =======
87+
Type Default
88+
---- -------
89+
int 5000
90+
==== =======
91+
92+
Description
93+
Number of iterations between checking if the goal has been cancelled or planner timed out
94+
8495
:``<name>``.max_planning_time:
8596

8697
====== =======

configuration/packages/smac/configuring-smac-lattice.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ Parameters
6363
Description
6464
Maximum number of iterations once a visited node is within the goal tolerances to continue to try to find an exact match before returning the best path solution within tolerances.
6565

66+
:``<name>``.terminal_checking_interval:
67+
68+
==== =======
69+
Type Default
70+
---- -------
71+
int 5000
72+
==== =======
73+
74+
Description
75+
Number of iterations between checking if the goal has been cancelled or planner timed out
76+
6677
:``<name>``.max_planning_time:
6778

6879
====== =======

migration/Iron.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,19 @@ In the GIF, it can be seen that there are two controller_ids namely, `FollowPath
254254
In this case, the `FollowPath` is the default controller_id. The difference between the two controller_ids is that HighSpeedFollowPath has a higher max velocity compared to the FollowPath. This difference can be well noted in the GIF.
255255

256256
.. attention:: If a server is unavailable, then the combo box or the drop down list of the particular component will be empty.
257+
258+
Cancel Checker Interface For GlobalPlanner
259+
*******************************************
260+
`PR #4148 <https://github.com/ros-planning/navigation2/pull/4148>`_ introduces a new interface for the ``GlobalPlanner`` to allow for the cancellation of the current planning task.
261+
Before the planners would continue to plan even if the goal was cancelled, now they can check it and stop planning if the goal is cancelled.
262+
New interface for ``GlobalPlanner::createPlan``:
263+
264+
.. code-block:: cpp
265+
266+
virtual nav_msgs::msg::Path createPlan(
267+
const geometry_msgs::msg::PoseStamped & start,
268+
const geometry_msgs::msg::PoseStamped & goal,
269+
std::function<bool()> cancel_checker)
270+
271+
This is implemented for all the planners in the stack, you can check them for the example use of ``cancel_checker`` function (simply check ``cancel_checker()``).
272+
Smac and Theta* planners have a new parameter ``terminal_checking_interval`` which is the frequency of the cancel or timeout checking in terms of number of iterations.

0 commit comments

Comments
 (0)