Skip to content

Commit

Permalink
Refactor the section of plugin tutorials to use double colons
Browse files Browse the repository at this point in the history
  • Loading branch information
alanxuefei committed Mar 28, 2024
1 parent 4b56b20 commit 9c6e1a2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions plugin_tutorials/docs/writing_new_behavior_plugin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ It is good practice to place these lines at the end of the file but technically,
.. code-block:: xml
<library path="nav2_sms_behavior_plugin">
<class name="nav2_sms_behavior/SendSms" type="nav2_sms_behavior::SendSms" base_class_type="nav2_core::Behavior">
<class type="nav2_sms_behavior::SendSms" base_class_type="nav2_core::Behavior">
<description>This is an example plugin which produces an SMS text message recovery.</description>
</class>
</library>
Expand Down Expand Up @@ -246,7 +246,7 @@ with
wait:
plugin: "nav2_behaviors::Wait"
send_sms:
plugin: "nav2_sms_behavior/SendSms"
plugin: "nav2_sms_behavior::SendSms"
account_sid: ... # your sid
auth_token: ... # your token
from_number: ... # your number
Expand Down
6 changes: 3 additions & 3 deletions plugin_tutorials/docs/writing_new_costmap2d_plugin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ This part is usually placed at the end of cpp-file where the plugin class was wr
.. code-block:: xml
<library path="nav2_gradient_costmap_plugin_core">
<class name="nav2_gradient_costmap_plugin/GradientLayer" type="nav2_gradient_costmap_plugin::GradientLayer" base_class_type="nav2_costmap_2d::Layer">
<class type="nav2_gradient_costmap_plugin::GradientLayer" base_class_type="nav2_costmap_2d::Layer">
<description>This is an example plugin which puts repeating costs gradients to costmap</description>
</class>
</library>
Expand Down Expand Up @@ -223,11 +223,11 @@ In this case each plugin object will be handled by its own parameters tree in a
.. code-block:: text
gradient_layer_1:
plugin: nav2_gradient_costmap_plugin/GradientLayer
plugin: nav2_gradient_costmap_plugin::GradientLayer
enabled: True
...
gradient_layer_2:
plugin: nav2_gradient_costmap_plugin/GradientLayer
plugin: nav2_gradient_costmap_plugin::GradientLayer
enabled: False
...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ To enable the plugin, we need to modify the ``nav2_params.yaml`` file as below
max_angular_vel: 1.0
transform_tolerance: 1.0
In the above snippet, you can observe the mapping of our ``nav2_pure_pursuit_controller/PurePursuitController`` controller to its id ``FollowPath``.
In the above snippet, you can observe the mapping of our ``nav2_pure_pursuit_controller::PurePursuitController`` controller to its id ``FollowPath``.
To pass plugin-specific parameters we have used ``<plugin_id>.<plugin_specific_parameter>``.

4- Run Pure Pursuit Controller plugin
Expand Down
6 changes: 3 additions & 3 deletions plugin_tutorials/docs/writing_new_nav2planner_plugin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ It is good practice to place these lines at the end of the file, but technically
.. code-block:: xml
<library path="nav2_straightline_planner_plugin">
<class name="nav2_straightline_planner/StraightLine" type="nav2_straightline_planner::StraightLine" base_class_type="nav2_core::GlobalPlanner">
<class type="nav2_straightline_planner::StraightLine" base_class_type="nav2_core::GlobalPlanner">
<description>This is an example plugin which produces straight path.</description>
</class>
</library>
Expand Down Expand Up @@ -214,10 +214,10 @@ with
plugins: ["GridBased"]
use_sim_time: True
GridBased:
plugin: "nav2_straightline_planner/StraightLine"
plugin: "nav2_straightline_planner::StraightLine"
interpolation_resolution: 0.1
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>``.
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>``.

4- Run StraightLine plugin
---------------------------
Expand Down

0 comments on commit 9c6e1a2

Please sign in to comment.