Skip to content

Commit bc0c4ea

Browse files
authored
Add documentation of WayPointTaskExecutor plugin to navigation.ros.org (#91)
* nav2_waypoint_follower; add task executor plugin info. Signed-off-by: jediofgever <[email protected]> * waypoint task executor plugin; corrections on documentation and configuration Signed-off-by: jediofgever <[email protected]> * docs and info related to PR #1993, ready to review Signed-off-by: jediofgever <[email protected]>
1 parent a808077 commit bc0c4ea

File tree

4 files changed

+122
-0
lines changed

4 files changed

+122
-0
lines changed

configuration/packages/configuring-waypoint-follower.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,50 @@ Parameters
3636
Description
3737
Rate to check for results from current navigation task.
3838

39+
:waypoint_task_executor_plugin:
40+
41+
============== ========================
42+
Type Default
43+
-------------- ------------------------
44+
string 'waypoint_task_executor'
45+
============== ========================
46+
47+
Description
48+
A plugin to define tasks to be executed when robot arrives to a waypoint.
49+
50+
Note
51+
The plugin namespace defined needs to have a :code:`plugin` parameter defining the type of plugin to be loaded in the namespace.
52+
53+
Example:
54+
55+
.. code-block:: yaml
56+
57+
waypoint_follower:
58+
ros__parameters:
59+
waypoint_task_executor_plugin: "waypoint_task_executor"
60+
waypoint_task_executor:
61+
plugin: "nav2_waypoint_follower::WaitAtWaypoint"
62+
..
63+
64+
Provided Plugins
65+
****************
66+
The plugins listed below are inside the ``nav2_waypoint_follower`` namespace.
67+
68+
.. toctree::
69+
:maxdepth: 1
70+
71+
nav2_waypoint_follower-plugins/wait_at_waypoint.rst
72+
73+
74+
Default Plugins
75+
***************
76+
77+
========================== ===================================================
78+
Namespace Plugin
79+
-------------------------- ---------------------------------------------------
80+
"waypoint_task_executor" "nav2_waypoint_follower::WaitAtWaypoint"
81+
========================== ===================================================
82+
3983
Example
4084
*******
4185
.. code-block:: yaml
@@ -44,3 +88,9 @@ Example
4488
ros__parameters:
4589
loop_rate: 20
4690
stop_on_failure: false
91+
waypoint_task_executor_plugin: "waypoint_task_executor"
92+
waypoint_task_executor:
93+
plugin: "nav2_waypoint_follower::WaitAtWaypoint"
94+
enabled: True
95+
waypoint_pause_duration: 0
96+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. _configuring_nav2_waypoint_follower_waypoint_task_execution_plugin:
2+
3+
WaitAtWaypoint
4+
=================
5+
6+
Lets robot to pause for a specified amount of time after reaching each waypoints.
7+
8+
Parameters
9+
**********
10+
11+
``<nav2_waypoint_follower plugin>``: nav2_waypoint_follower plugin name defined in the **waypoint_task_executor_plugin_id** parameter in :ref:`configuring_waypoint_follower`.
12+
13+
:``<nav2_waypoint_follower plugin>``.enabled:
14+
15+
============== =============================
16+
Type Default
17+
-------------- -----------------------------
18+
bool true
19+
============== =============================
20+
21+
Description
22+
Whether waypoint_task_executor plugin is enabled.
23+
24+
25+
:``<nav2_waypoint_follower plugin>``.waypoint_pause_duration:
26+
27+
============== =============================
28+
Type Default
29+
-------------- -----------------------------
30+
int 0
31+
============== =============================
32+
33+
Description
34+
Amount of time in milliseconds, for robot to sleep/wait after each waypoint is reached. If zero, robot will directly continue to next waypoint.
35+

migration/Foxy.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,32 @@ BackUp Recovery Interface Changes
2424
``target.x`` in a backup recovery goal should be positive indicating the distance to drive backward.
2525
In both cases negative values are silently inverted.
2626

27+
New Plugins
28+
***********
29+
30+
``nav2_waypoint_follower`` has an action server that takes in a list of waypoints to follow and follow them in order. In some cases we might want robot to
31+
perform some tasks/behaviours at arrivals of these waypoints. In order to perform such tasks, a generic plugin interface `WaypointTaskExecutor` has been added to ``nav2_core``.
32+
Users can inherit from this interface to implement their own plugin to perform more specific tasks at waypoint arrivals for their needs. An example implementation `WaitAtWaypoint`, is included in
33+
``nav2_waypoint_follower`` as a run-time loadable plugin. `WaitAtWaypoint` simply lets robot to pause for a specified amount of time in milliseconds, at waypoint arrivals. Loading a plugin of this type
34+
is done through `nav2_bringup/params/nav2_param.yaml`, by specifying plugin's name, type and it's used parameters.
35+
36+
For instance;
37+
.. code-block:: yaml
38+
39+
waypoint_follower:
40+
ros__parameters:
41+
loop_rate: 20
42+
stop_on_failure: false
43+
waypoint_task_executor_plugin: "waypoint_task_executor"
44+
waypoint_task_executor:
45+
plugin: "nav2_waypoint_follower::WaitAtWaypoint"
46+
enabled: True
47+
waypoint_pause_duration: 0
48+
49+
Original GitHub tickets:
50+
51+
- `WaypointTaskExecutor <https://github.com/ros-planning/navigation2/pull/1993>`_
52+
2753
Costmap Filters
2854
***************
2955

plugins/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,3 +270,14 @@ Behavior Tree Nodes
270270
.. _Pipeline Sequence: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/control/pipeline_sequence.cpp
271271
.. _Recovery: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/control/recovery_node.cpp
272272
.. _Round Robin: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/control/round_robin_node.cpp
273+
274+
+---------------------------------+------------------------+----------------------------------+
275+
| Waypoint Follower Plugin Name | Creator | Description |
276+
+=================================+========================+==================================+
277+
| `Waypoint Task Executor`_ | Fetullah Atas | A plugin interface to define |
278+
| | | specific tasks to be executed on |
279+
| | | waypoint arrivals. |
280+
| | | |
281+
+---------------------------------+----------------------------------+------------------------+
282+
283+
.. _Waypoint Task Executor: https://github.com/ros-planning/navigation2/tree/main/nav2_waypoint_follower/plugins/wait_at_waypoint.cpp

0 commit comments

Comments
 (0)