Skip to content

Commit

Permalink
[skip ci] publish latest
Browse files Browse the repository at this point in the history
Signed-off-by: navigation2-ci <navigation2-ci@circleci.com>
  • Loading branch information
navigation2-ci committed Feb 4, 2025
1 parent 877310c commit 258d319
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
Binary file modified _images/patience_and_recovery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Prerequisites

- Read the short explanation in `navigation concepts <../../concepts/index.html>`_

- Read the general tutorial and guide (not Nav2 specific) on the `BehaviorTree CPP V3 <https://www.behaviortree.dev/>`_ website. Specifically, the "Learn the Basics" section on the BehaviorTree CPP V3 website explains the basic generic nodes that will be used that this guide will build upon.
- Read the general tutorial and guide (not Nav2 specific) on the `BehaviorTree CPP V4 <https://www.behaviortree.dev/>`_ website. Specifically, the "Basic Concepts" section on the BehaviorTree CPP V4 website explains the basic generic nodes that will be used that this guide will build upon.

- Become familiar with the custom `Nav2 specific BT nodes <nav2_specific_nodes.html>`_

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Navigate To Pose and Pause Near Goal-Obstacle
#############################################

.. note:: As a prerequisite, we encourage the users to go through the `Behavior Tree documentation <https://behaviortree.github.io/BehaviorTree.CPP/>`_, which explains about different behaviors nodes used in these trees such as ``ReactiveSequence``, ``SequenceStar`` and ``RetryUntilSucessfull``.
.. note:: As a prerequisite, we encourage the users to go through the `Behavior Tree documentation <https://behaviortree.github.io/BehaviorTree.CPP/>`_, which explains about different behaviors nodes used in these trees such as ``ReactiveSequence``, ``SequenceWithMemory`` and ``RetryUntilSuccessful``.

This behavior tree is a soft extension to the :ref:`behavior_tree_nav_to_pose`.
Apart from the functionalities of :ref:`behavior_tree_nav_to_pose`, this behavior tree allows the robot to efficiently handle an obstacle (e.g. forklift, person, or other temporary obstacles) close to the goal by pausing the robot's navigation and wait for a user-specified time to check if the obstacle has cleared.
Expand All @@ -16,9 +16,9 @@ If there is no significantly longer path, the monitor node goes into the ``Follo
.. image:: ../images/walkthrough/patience_and_recovery.png

Once there is a significantly longer path, the child node for the ``PathLongerOnApproach`` node ticks.
The child node is a ``RetryUntilSuccesfull`` decorator node, which inturns have a ``SequenceStar`` node as its child.
Firstly, the ``SequenceStar`` node cancels the controller server by ticking the ``CancelControl`` node. The cancellation of the controller server halts the further navigation of the robot.
Next, the ``SequenceStar`` node ticks the ``Wait`` node, which enables the robot to wait for the given user-specified time.
The child node is a ``RetryUntilSuccesful`` decorator node, which inturns have a ``SequenceWithMemory`` node as its child.
Firstly, the ``SequenceWithMemory`` node cancels the controller server by ticking the ``CancelControl`` node. The cancellation of the controller server halts the further navigation of the robot.
Next, the ``SequenceWithMemory`` node ticks the ``Wait`` node, which enables the robot to wait for the given user-specified time.
Here we need to note that, the ``MonitorAndFollowPath`` is a ``ReactiveSequence`` node, therefore the ``PathLongerOnApproach`` node needs to return SUCCESS, before the ``FollowPath`` node can be ticked once again.

In the below GIF, it can be seen that the robot is approaching the goal location, but it found an obstacle in the goal proximity, because of which the global planner, plans a longer path around.
Expand Down Expand Up @@ -53,10 +53,10 @@ In conclusion, this particular BT would serve, both as an example and ready-to-u
<ReactiveSequence name="MonitorAndFollowPath">
<PathLongerOnApproach path="{path}" prox_len="3.0" length_factor="2.0">
<RetryUntilSuccessful num_attempts="1">
<SequenceStar name="CancelingControlAndWait">
<SequenceWithMemory name="CancelingControlAndWait">
<CancelControl name="ControlCancel"/>
<Wait wait_duration="5.0"/>
</SequenceStar>
</SequenceWithMemory>
</RetryUntilSuccessful>
</PathLongerOnApproach>
<RecoveryNode number_of_retries="1" name="FollowPath">
Expand Down
4 changes: 2 additions & 2 deletions _sources/plugin_tutorials/docs/writing_new_bt_plugin.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ Select this BT XML file in your specific navigation request in ``NavigateToPose`
</PipelineSequence>
<ReactiveFallback name="RecoveryFallback">
<GoalUpdated/>
<SequenceStar name="RecoveryActions">
<SequenceWithMemory name="RecoveryActions">
<ClearEntireCostmap name="ClearLocalCostmap-Subtree" service_name="local_costmap/clear_entirely_local_costmap"/>
<ClearEntireCostmap name="ClearGlobalCostmap-Subtree" service_name="global_costmap/clear_entirely_global_costmap"/>
<Spin spin_dist="1.57"/>
<Wait wait_duration="5"/>
</SequenceStar>
</SequenceWithMemory>
</ReactiveFallback>
</RecoveryNode>
</BehaviorTree>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ <h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to
<blockquote>
<div><ul class="simple">
<li><p>Read the short explanation in <a class="reference external" href="../../concepts/index.html">navigation concepts</a></p></li>
<li><p>Read the general tutorial and guide (not Nav2 specific) on the <a class="reference external" href="https://www.behaviortree.dev/">BehaviorTree CPP V3</a> website. Specifically, the “Learn the Basics” section on the BehaviorTree CPP V3 website explains the basic generic nodes that will be used that this guide will build upon.</p></li>
<li><p>Read the general tutorial and guide (not Nav2 specific) on the <a class="reference external" href="https://www.behaviortree.dev/">BehaviorTree CPP V4</a> website. Specifically, the “Basic Concepts” section on the BehaviorTree CPP V4 website explains the basic generic nodes that will be used that this guide will build upon.</p></li>
</ul>
</div></blockquote>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@
<h1>Navigate To Pose and Pause Near Goal-Obstacle<a class="headerlink" href="#navigate-to-pose-and-pause-near-goal-obstacle" title="Permalink to this heading"></a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>As a prerequisite, we encourage the users to go through the <a class="reference external" href="https://behaviortree.github.io/BehaviorTree.CPP/">Behavior Tree documentation</a>, which explains about different behaviors nodes used in these trees such as <code class="docutils literal notranslate"><span class="pre">ReactiveSequence</span></code>, <code class="docutils literal notranslate"><span class="pre">SequenceStar</span></code> and <code class="docutils literal notranslate"><span class="pre">RetryUntilSucessfull</span></code>.</p>
<p>As a prerequisite, we encourage the users to go through the <a class="reference external" href="https://behaviortree.github.io/BehaviorTree.CPP/">Behavior Tree documentation</a>, which explains about different behaviors nodes used in these trees such as <code class="docutils literal notranslate"><span class="pre">ReactiveSequence</span></code>, <code class="docutils literal notranslate"><span class="pre">SequenceWithMemory</span></code> and <code class="docutils literal notranslate"><span class="pre">RetryUntilSuccessful</span></code>.</p>
</div>
<p>This behavior tree is a soft extension to the <a class="reference internal" href="nav_to_pose_recovery.html#behavior-tree-nav-to-pose"><span class="std std-ref">Navigate To Pose</span></a>.
Apart from the functionalities of <a class="reference internal" href="nav_to_pose_recovery.html#behavior-tree-nav-to-pose"><span class="std std-ref">Navigate To Pose</span></a>, this behavior tree allows the robot to efficiently handle an obstacle (e.g. forklift, person, or other temporary obstacles) close to the goal by pausing the robot’s navigation and wait for a user-specified time to check if the obstacle has cleared.
Expand All @@ -1189,9 +1189,9 @@ <h1>Navigate To Pose and Pause Near Goal-Obstacle<a class="headerlink" href="#na
If there is no significantly longer path, the monitor node goes into the <code class="docutils literal notranslate"><span class="pre">FollowPath</span></code> recovery node, which then generates the necessary control commands.</p>
<img alt="../../_images/patience_and_recovery.png" src="../../_images/patience_and_recovery.png" />
<p>Once there is a significantly longer path, the child node for the <code class="docutils literal notranslate"><span class="pre">PathLongerOnApproach</span></code> node ticks.
The child node is a <code class="docutils literal notranslate"><span class="pre">RetryUntilSuccesfull</span></code> decorator node, which inturns have a <code class="docutils literal notranslate"><span class="pre">SequenceStar</span></code> node as its child.
Firstly, the <code class="docutils literal notranslate"><span class="pre">SequenceStar</span></code> node cancels the controller server by ticking the <code class="docutils literal notranslate"><span class="pre">CancelControl</span></code> node. The cancellation of the controller server halts the further navigation of the robot.
Next, the <code class="docutils literal notranslate"><span class="pre">SequenceStar</span></code> node ticks the <code class="docutils literal notranslate"><span class="pre">Wait</span></code> node, which enables the robot to wait for the given user-specified time.
The child node is a <code class="docutils literal notranslate"><span class="pre">RetryUntilSuccesful</span></code> decorator node, which inturns have a <code class="docutils literal notranslate"><span class="pre">SequenceWithMemory</span></code> node as its child.
Firstly, the <code class="docutils literal notranslate"><span class="pre">SequenceWithMemory</span></code> node cancels the controller server by ticking the <code class="docutils literal notranslate"><span class="pre">CancelControl</span></code> node. The cancellation of the controller server halts the further navigation of the robot.
Next, the <code class="docutils literal notranslate"><span class="pre">SequenceWithMemory</span></code> node ticks the <code class="docutils literal notranslate"><span class="pre">Wait</span></code> node, which enables the robot to wait for the given user-specified time.
Here we need to note that, the <code class="docutils literal notranslate"><span class="pre">MonitorAndFollowPath</span></code> is a <code class="docutils literal notranslate"><span class="pre">ReactiveSequence</span></code> node, therefore the <code class="docutils literal notranslate"><span class="pre">PathLongerOnApproach</span></code> node needs to return SUCCESS, before the <code class="docutils literal notranslate"><span class="pre">FollowPath</span></code> node can be ticked once again.</p>
<p>In the below GIF, it can be seen that the robot is approaching the goal location, but it found an obstacle in the goal proximity, because of which the global planner, plans a longer path around.
This is the point where the <code class="docutils literal notranslate"><span class="pre">PathLongerOnApproach</span></code> ticks and ticks its children, consequently cancelling the <code class="docutils literal notranslate"><span class="pre">controller_server</span></code> and waiting to see if the obstacle clears up.
Expand All @@ -1217,10 +1217,10 @@ <h1>Navigate To Pose and Pause Near Goal-Obstacle<a class="headerlink" href="#na
<span class="w"> </span><span class="nt">&lt;ReactiveSequence</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;MonitorAndFollowPath&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;PathLongerOnApproach</span><span class="w"> </span><span class="na">path=</span><span class="s">&quot;{path}&quot;</span><span class="w"> </span><span class="na">prox_len=</span><span class="s">&quot;3.0&quot;</span><span class="w"> </span><span class="na">length_factor=</span><span class="s">&quot;2.0&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;RetryUntilSuccessful</span><span class="w"> </span><span class="na">num_attempts=</span><span class="s">&quot;1&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;SequenceStar</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;CancelingControlAndWait&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;SequenceWithMemory</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;CancelingControlAndWait&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;CancelControl</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;ControlCancel&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;Wait</span><span class="w"> </span><span class="na">wait_duration=</span><span class="s">&quot;5.0&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;/SequenceStar&gt;</span>
<span class="w"> </span><span class="nt">&lt;/SequenceWithMemory&gt;</span>
<span class="w"> </span><span class="nt">&lt;/RetryUntilSuccessful&gt;</span>
<span class="w"> </span><span class="nt">&lt;/PathLongerOnApproach&gt;</span>
<span class="w"> </span><span class="nt">&lt;RecoveryNode</span><span class="w"> </span><span class="na">number_of_retries=</span><span class="s">&quot;1&quot;</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;FollowPath&quot;</span><span class="nt">&gt;</span>
Expand Down
4 changes: 2 additions & 2 deletions plugin_tutorials/docs/writing_new_bt_plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -1390,12 +1390,12 @@ <h3>4- Run Your Custom plugin<a class="headerlink" href="#run-your-custom-plugin
<span class="w"> </span><span class="nt">&lt;/PipelineSequence&gt;</span>
<span class="w"> </span><span class="nt">&lt;ReactiveFallback</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;RecoveryFallback&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;GoalUpdated/&gt;</span>
<span class="w"> </span><span class="nt">&lt;SequenceStar</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;RecoveryActions&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;SequenceWithMemory</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;RecoveryActions&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;ClearEntireCostmap</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;ClearLocalCostmap-Subtree&quot;</span><span class="w"> </span><span class="na">service_name=</span><span class="s">&quot;local_costmap/clear_entirely_local_costmap&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;ClearEntireCostmap</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;ClearGlobalCostmap-Subtree&quot;</span><span class="w"> </span><span class="na">service_name=</span><span class="s">&quot;global_costmap/clear_entirely_global_costmap&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;Spin</span><span class="w"> </span><span class="na">spin_dist=</span><span class="s">&quot;1.57&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;Wait</span><span class="w"> </span><span class="na">wait_duration=</span><span class="s">&quot;5&quot;</span><span class="nt">/&gt;</span>
<span class="w"> </span><span class="nt">&lt;/SequenceStar&gt;</span>
<span class="w"> </span><span class="nt">&lt;/SequenceWithMemory&gt;</span>
<span class="w"> </span><span class="nt">&lt;/ReactiveFallback&gt;</span>
<span class="w"> </span><span class="nt">&lt;/RecoveryNode&gt;</span>
<span class="w"> </span><span class="nt">&lt;/BehaviorTree&gt;</span>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 258d319

Please sign in to comment.