Skip to content

Commit 1f29604

Browse files
authored
Refactor the plugin names for bt_navigator to use double colons (ros-navigation#539)
* Refactor the plugin names for bt_navigator to use double colons * Refactor the plugin names for planner_server to use double colons Signed-off-by: Alan Xue <[email protected]> * Refactor the plugin names for behavior_server to use double colons Signed-off-by: Alan Xue <[email protected]> * Refactor the section of plugin tutorials to use double colons Signed-off-by: Alan Xue <[email protected]> * Update the migration guide from Iron to Jazzy to include the standardization of plugin naming using double colons (::). Signed-off-by: Alan Xue <[email protected]> * Add comment on '/' to '::' syntax change in example YAML files * List of Plugins Affected by Naming Standardization --------- Signed-off-by: Alan Xue <[email protected]>
1 parent 4c1c9e6 commit 1f29604

15 files changed

+57
-44
lines changed

configuration/packages/configuring-behavior-server.rst

+15-13
Original file line numberDiff line numberDiff line change
@@ -151,30 +151,32 @@ Behavior Server Parameters
151151
ros__parameters:
152152
behavior_plugins: ["spin", "backup", "drive_on_heading", "wait"]
153153
spin:
154-
plugin: "nav2_behaviors/Spin"
154+
plugin: "nav2_behaviors::Spin" # In Iron and older versions, "/" was used instead of "::"
155155
backup:
156-
plugin: "nav2_behaviors/BackUp"
156+
plugin: "nav2_behaviors::BackUp" # In Iron and older versions, "/" was used instead of "::"
157157
drive_on_heading:
158-
plugin: "nav2_behaviors/DriveOnHeading"
158+
plugin: "nav2_behaviors::DriveOnHeading" # In Iron and older versions, "/" was used instead of "::"
159159
wait:
160-
plugin: "nav2_behaviors/Wait"
160+
plugin: "nav2_behaviors::Wait" # In Iron and older versions, "/" was used instead of "::"
161161
..
162162
163163
Default Plugins
164164
***************
165+
.. note::
166+
In Iron and older versions, "/" was used instead of "::".
165167

166168
When the :code:`behavior_plugins` parameter is not overridden, the following default plugins are loaded:
167169

168170
================== =====================================================
169171
Namespace Plugin
170172
------------------ -----------------------------------------------------
171-
"spin" "nav2_behaviors/Spin"
173+
"spin" "nav2_behaviors::Spin"
172174
------------------ -----------------------------------------------------
173-
"backup" "nav2_behaviors/BackUp"
175+
"backup" "nav2_behaviors::BackUp"
174176
------------------ -----------------------------------------------------
175-
"drive_on_heading" "nav2_behaviors/DriveOnHeading"
177+
"drive_on_heading" "nav2_behaviors::DriveOnHeading"
176178
------------------ -----------------------------------------------------
177-
"wait" "nav2_behaviors/Wait"
179+
"wait" "nav2_behaviors::Wait"
178180
================== =====================================================
179181

180182
Spin Behavior Parameters
@@ -359,15 +361,15 @@ Example
359361
cycle_frequency: 10.0
360362
behavior_plugins: ["spin", "backup", "drive_on_heading", "wait", "assisted_teleop"]
361363
spin:
362-
plugin: "nav2_behaviors/Spin"
364+
plugin: "nav2_behaviors::Spin" # In Iron and older versions, "/" was used instead of "::"
363365
backup:
364-
plugin: "nav2_behaviors/BackUp"
366+
plugin: "nav2_behaviors::BackUp" # In Iron and older versions, "/" was used instead of "::"
365367
drive_on_heading:
366-
plugin: "nav2_behaviors/DriveOnHeading"
368+
plugin: "nav2_behaviors::DriveOnHeading" # In Iron and older versions, "/" was used instead of "::"
367369
wait:
368-
plugin: "nav2_behaviors/Wait"
370+
plugin: "nav2_behaviors::Wait" # In Iron and older versions, "/" was used instead of "::"
369371
assisted_teleop:
370-
plugin: "nav2_behaviors/AssistedTeleop"
372+
plugin: "nav2_behaviors::AssistedTeleop" # In Iron and older versions, "/" was used instead of "::"
371373
local_frame: odom
372374
global_frame: map
373375
robot_base_frame: base_link

configuration/packages/configuring-bt-navigator.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ Example
246246
path_blackboard_id: path
247247
navigators: ['navigate_to_pose', 'navigate_through_poses']
248248
navigate_to_pose:
249-
plugin: "nav2_bt_navigator/NavigateToPoseNavigator"
249+
plugin: "nav2_bt_navigator::NavigateToPoseNavigator" # In Iron and older versions, "/" was used instead of "::"
250250
navigate_through_poses:
251-
plugin: "nav2_bt_navigator/NavigateThroughPosesNavigator"
251+
plugin: "nav2_bt_navigator::NavigateThroughPosesNavigator" # In Iron and older versions, "/" was used instead of "::"
252252
plugin_lib_names:
253253
- nav2_compute_path_to_pose_action_bt_node
254254
- nav2_follow_path_action_bt_node

configuration/packages/configuring-navfn.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Example
6666
ros__parameters:
6767
planner_plugins: ['GridBased']
6868
GridBased:
69-
plugin: 'nav2_navfn_planner/NavfnPlanner'
69+
plugin: 'nav2_navfn_planner::NavfnPlanner' # In Iron and older versions, "/" was used instead of "::"
7070
use_astar: True
7171
allow_unknown: True
7272
tolerance: 1.0

configuration/packages/configuring-planner-server.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Parameters
3636
ros__parameters:
3737
planner_plugins: ["GridBased"]
3838
GridBased:
39-
plugin: "nav2_navfn_planner/NavfnPlanner"
39+
plugin: "nav2_navfn_planner::NavfnPlanner" # In Iron and older versions, "/" was used instead of "::"
4040
..
4141
4242
:expected_planner_frequency:
@@ -72,7 +72,7 @@ When the :code:`planner_plugins` parameter is not overridden, the following defa
7272
================= =====================================================
7373
Namespace Plugin
7474
----------------- -----------------------------------------------------
75-
"GridBased" "nav2_navfn_planner/NavfnPlanner"
75+
"GridBased" "nav2_navfn_planner::NavfnPlanner"
7676
================= =====================================================
7777

7878
Example
@@ -84,4 +84,4 @@ Example
8484
expected_planner_frequency: 20.0
8585
planner_plugins: ['GridBased']
8686
GridBased:
87-
plugin: 'nav2_navfn_planner/NavfnPlanner'
87+
plugin: 'nav2_navfn_planner::NavfnPlanner' # In Iron and older versions, "/" was used instead of "::"

configuration/packages/configuring-thetastar.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Example
107107
use_sim_time: True
108108
planner_plugins: ["GridBased"]
109109
GridBased:
110-
plugin: "nav2_theta_star_planner/ThetaStarPlanner"
110+
plugin: "nav2_theta_star_planner::ThetaStarPlanner" # In Iron and older versions, "/" was used instead of "::"
111111
how_many_corners: 8
112112
w_euc_cost: 1.0
113113
w_traversal_cost: 2.0

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Example
179179
use_sim_time: True
180180
181181
GridBased:
182-
plugin: "nav2_smac_planner/SmacPlanner2D"
182+
plugin: "nav2_smac_planner::SmacPlanner2D" # In Iron and older versions, "/" was used instead of "::"
183183
tolerance: 0.125 # tolerance for planning if unable to reach exact pose, in meters
184184
downsample_costmap: false # whether or not to downsample the map
185185
downsampling_factor: 1 # multiplier for the resolution of the costmap layer (e.g. 2 on a 5cm costmap would be 10cm)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ Example
388388
use_sim_time: True
389389
390390
GridBased:
391-
plugin: "nav2_smac_planner/SmacPlannerHybrid"
391+
plugin: "nav2_smac_planner::SmacPlannerHybrid" # In Iron and older versions, "/" was used instead of "::"
392392
downsample_costmap: false # whether or not to downsample the map
393393
downsampling_factor: 1 # multiplier for the resolution of the costmap layer (e.g. 2 on a 5cm costmap would be 10cm)
394394
tolerance: 0.25 # dist-to-goal heuristic cost (distance) for valid tolerance endpoints if exact goal cannot be found.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Example
338338
use_sim_time: True
339339
340340
GridBased:
341-
plugin: "nav2_smac_planner/SmacPlannerLattice"
341+
plugin: "nav2_smac_planner::SmacPlannerLattice" # In Iron and older versions, "/" was used instead of "::"
342342
allow_unknown: true # Allow traveling in unknown space
343343
tolerance: 0.25 # dist-to-goal heuristic cost (distance) for valid tolerance endpoints if exact goal cannot be found.
344344
max_iterations: 1000000 # Maximum total iterations to search for before failing (in case unreachable), set to -1 to disable

migration/Iron.rst

+11
Original file line numberDiff line numberDiff line change
@@ -304,3 +304,14 @@ New graceful cancellation API for Controllers
304304
*********************************************
305305

306306
`PR #4136 <https://github.com/ros-planning/navigation2/pull/4136>`_ introduces a new graceful cancellation API for controllers. Previously when a goal was canceled, the controller would stop the robot immediately. This API allows the controller to stop the robot in a more graceful way. The new API is implemented in the ``RegulatedPurePursuitController`` by adding a new parameter ``cancel_deceleration``. So when the goal is canceled, a constant deceleration will be used while continuing to track the path to stop the robot instead of stopping immediately. This API can be should be added to all controllers that have acceleration limits.
307+
308+
Standardization of Plugin Naming with Double Colons (::)
309+
********************************************************
310+
311+
`PR #4220`_ standardizes plugin naming across the Navigation2 package to use double colons (::), replacing the previous mixed use of slashes (/) and double colons. Affected plugins include:
312+
313+
- Behavior Server: ``nav2_behaviors::Spin``, ``nav2_behaviors::BackUp``, ``nav2_behaviors::DriveOnHeading``, ``nav2_behaviors::Wait``, ``nav2_behaviors::AssistedTeleop``
314+
- Planner Server: ``nav2_navfn_planner::NavfnPlanner``, ``nav2_smac_planner::SmacPlanner2D``, ``nav2_smac_planner::SmacPlannerHybrid``, ``nav2_theta_star_planner::ThetaStarPlanner``
315+
- Controller Server: ``nav2_regulated_pure_pursuit_controller::RegulatedPurePursuitController``, ``nav2_dwb_controller::DWBLocalPlanner``
316+
- BT Navigator: ``nav2_bt_navigator::NavigateToPoseNavigator``, ``nav2_bt_navigator::NavigateThroughPosesNavigator``
317+

plugin_tutorials/docs/writing_new_behavior_plugin.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ It is good practice to place these lines at the end of the file but technically,
172172
.. code-block:: xml
173173
174174
<library path="nav2_sms_behavior_plugin">
175-
<class name="nav2_sms_behavior/SendSms" type="nav2_sms_behavior::SendSms" base_class_type="nav2_core::Behavior">
175+
<class type="nav2_sms_behavior::SendSms" base_class_type="nav2_core::Behavior">
176176
<description>This is an example plugin which produces an SMS text message recovery.</description>
177177
</class>
178178
</library>
@@ -211,11 +211,11 @@ To enable the plugin, we need to modify the ``nav2_params.yaml`` file as below t
211211
behavior_plugins: ["spin", "backup", "wait"] # Humble and later
212212
recovery_plugins: ["spin", "backup", "wait"] # Galactic and earlier
213213
spin:
214-
plugin: "nav2_behaviors/Spin"
214+
plugin: "nav2_behaviors::Spin" # In Iron and older versions, "/" was used instead of "::"
215215
backup:
216-
plugin: "nav2_behaviors/BackUp"
216+
plugin: "nav2_behaviors::BackUp" # In Iron and older versions, "/" was used instead of "::"
217217
wait:
218-
plugin: "nav2_behaviors/Wait"
218+
plugin: "nav2_behaviors::Wait" # In Iron and older versions, "/" was used instead of "::"
219219
global_frame: odom
220220
robot_base_frame: base_link
221221
transform_timeout: 0.1
@@ -240,13 +240,13 @@ with
240240
behavior_plugins: ["spin", "backup", "wait","send_sms"] # Humble and newer
241241
recovery_plugins: ["spin", "backup", "wait","send_sms"] # Galactic and earlier
242242
spin:
243-
plugin: "nav2_behaviors/Spin"
243+
plugin: "nav2_behaviors::Spin" # In Iron and older versions, "/" was used instead of "::"
244244
backup:
245-
plugin: "nav2_behaviors/BackUp"
245+
plugin: "nav2_behaviors::BackUp" # In Iron and older versions, "/" was used instead of "::"
246246
wait:
247-
plugin: "nav2_behaviors/Wait"
247+
plugin: "nav2_behaviors::Wait" # In Iron and older versions, "/" was used instead of "::"
248248
send_sms:
249-
plugin: "nav2_sms_behavior/SendSms"
249+
plugin: "nav2_sms_behavior::SendSms" # In Iron and older versions, "/" was used instead of "::"
250250
account_sid: ... # your sid
251251
auth_token: ... # your token
252252
from_number: ... # your number

plugin_tutorials/docs/writing_new_costmap2d_plugin.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ This part is usually placed at the end of cpp-file where the plugin class was wr
152152
.. code-block:: xml
153153
154154
<library path="nav2_gradient_costmap_plugin_core">
155-
<class name="nav2_gradient_costmap_plugin/GradientLayer" type="nav2_gradient_costmap_plugin::GradientLayer" base_class_type="nav2_costmap_2d::Layer">
155+
<class type="nav2_gradient_costmap_plugin::GradientLayer" base_class_type="nav2_costmap_2d::Layer">
156156
<description>This is an example plugin which puts repeating costs gradients to costmap</description>
157157
</class>
158158
</library>
@@ -223,11 +223,11 @@ In this case each plugin object will be handled by its own parameters tree in a
223223
.. code-block:: text
224224
225225
gradient_layer_1:
226-
plugin: nav2_gradient_costmap_plugin/GradientLayer
226+
plugin: nav2_gradient_costmap_plugin::GradientLayer # In Iron and older versions, "/" was used instead of "::"
227227
enabled: True
228228
...
229229
gradient_layer_2:
230-
plugin: nav2_gradient_costmap_plugin/GradientLayer
230+
plugin: nav2_gradient_costmap_plugin::GradientLayer # In Iron and older versions, "/" was used instead of "::"
231231
enabled: False
232232
...
233233

plugin_tutorials/docs/writing_new_nav2controller_plugin.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,14 @@ To enable the plugin, we need to modify the ``nav2_params.yaml`` file as below
265265
controller_plugins: ["FollowPath"]
266266
267267
FollowPath:
268-
plugin: "nav2_pure_pursuit_controller::PurePursuitController"
268+
plugin: "nav2_pure_pursuit_controller::PurePursuitController" # In Iron and older versions, "/" was used instead of "::"
269269
debug_trajectory_details: True
270270
desired_linear_vel: 0.2
271271
lookahead_dist: 0.4
272272
max_angular_vel: 1.0
273273
transform_tolerance: 1.0
274274
275-
In the above snippet, you can observe the mapping of our ``nav2_pure_pursuit_controller/PurePursuitController`` controller to its id ``FollowPath``.
275+
In the above snippet, you can observe the mapping of our ``nav2_pure_pursuit_controller::PurePursuitController`` controller to its id ``FollowPath``.
276276
To pass plugin-specific parameters we have used ``<plugin_id>.<plugin_specific_parameter>``.
277277

278278
4- Run Pure Pursuit Controller plugin

plugin_tutorials/docs/writing_new_nav2planner_plugin.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ It is good practice to place these lines at the end of the file, but technically
162162
.. code-block:: xml
163163
164164
<library path="nav2_straightline_planner_plugin">
165-
<class name="nav2_straightline_planner/StraightLine" type="nav2_straightline_planner::StraightLine" base_class_type="nav2_core::GlobalPlanner">
165+
<class type="nav2_straightline_planner::StraightLine" base_class_type="nav2_core::GlobalPlanner">
166166
<description>This is an example plugin which produces straight path.</description>
167167
</class>
168168
</library>
@@ -200,7 +200,7 @@ To enable the plugin, we need to modify the ``nav2_params.yaml`` file as below t
200200
plugins: ["GridBased"]
201201
use_sim_time: True
202202
GridBased:
203-
plugin: "nav2_navfn_planner/NavfnPlanner" # For Foxy and later
203+
plugin: "nav2_navfn_planner::NavfnPlanner" # For Foxy and later. In Iron and older versions, "/" was used instead of "::"
204204
tolerance: 2.0
205205
use_astar: false
206206
allow_unknown: true
@@ -214,10 +214,10 @@ with
214214
plugins: ["GridBased"]
215215
use_sim_time: True
216216
GridBased:
217-
plugin: "nav2_straightline_planner/StraightLine"
217+
plugin: "nav2_straightline_planner::StraightLine"
218218
interpolation_resolution: 0.1
219219
220-
In the above snippet, you can observe the mapping of our ``nav2_straightline_planner/StraightLine`` planner to its id ``GridBased``. To pass plugin-specific parameters, we have used ``<plugin_id>.<plugin_specific_parameter>``.
220+
In the above snippet, you can observe the mapping of our ``nav2_straightline_planner::StraightLine`` planner to its id ``GridBased``. To pass plugin-specific parameters, we have used ``<plugin_id>.<plugin_specific_parameter>``.
221221

222222
4- Run StraightLine plugin
223223
---------------------------

plugin_tutorials/docs/writing_new_navigator_plugin.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ To enable the plugin, we need to modify the ``nav2_params.yaml`` file as below
332332
path_blackboard_id: path
333333
navigators: ['navigate_to_pose', 'navigate_through_poses']
334334
navigate_to_pose:
335-
plugin: "nav2_bt_navigator/NavigateToPoseNavigator"
335+
plugin: "nav2_bt_navigator::NavigateToPoseNavigator" # In Iron and older versions, "/" was used instead of "::"
336336
navigate_through_poses:
337-
plugin: "nav2_bt_navigator/NavigateThroughPosesNavigator"
337+
plugin: "nav2_bt_navigator::NavigateThroughPosesNavigator" # In Iron and older versions, "/" was used instead of "::"
338338
339339
340-
In the above snippet, you can observe the mapping of our ``nav2_bt_navigator/NavigateToPoseNavigator`` plugin to its id ``navigate_to_pose``.
340+
In the above snippet, you can observe the mapping of our ``nav2_bt_navigator::NavigateToPoseNavigator`` plugin to its id ``navigate_to_pose``.
341341
To pass plugin-specific parameters we have used ``<plugin_id>.<plugin_specific_parameter>``.
342342

343343
4- Run plugin

setup_guides/algorithm/select_algorithm.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Example Configuration
6666
ros__parameters:
6767
planner_plugins: ['GridBased']
6868
GridBased:
69-
plugin: 'nav2_navfn_planner/NavfnPlanner'
69+
plugin: 'nav2_navfn_planner::NavfnPlanner' # In Iron and older versions, "/" was used instead of "::"
7070
7171
An example configuration of the planner server is shown above. The ``planner_plugins`` parameter accepts a list of mapped planner plugin names. For each plugin namespace defined in ``planner_plugins`` (``GridBased`` in our example), we specify the type of plugin to be loaded in the ``plugin`` parameter. Additional configurations must then be specified in this namespace based on the algorithm to be used. Please see the `Configuration Guide <https://navigation.ros.org/configuration/index.html>`_ for more details.
7272

0 commit comments

Comments
 (0)