Skip to content

Commit

Permalink
Trim trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
aosmw committed Aug 31, 2024
1 parent 1a782c7 commit b13e200
Show file tree
Hide file tree
Showing 15 changed files with 100 additions and 100 deletions.
30 changes: 15 additions & 15 deletions behavior_trees/trees/nav_to_pose_and_pause_near_goal_obstacle.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
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``, ``SequenceStar`` and ``RetryUntilSucessfull``.

This behavior tree is a soft extension to the :ref:`behavior_tree_nav_to_pose`.
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.
If the obstacle has moved during the waiting time, the robot will continue to the goal taking the shorter path. If the obstacle has not moved during the waiting time or the waiting time expires, then the robot will use the longer path around to reach the final goal location.
Ultimately, for a given task, this behavior tree aids in solving the problem of long cycle time, which is caused because of the long path generated due to the temporary obstacles present close to the goal location.
Ultimately, for a given task, this behavior tree aids in solving the problem of long cycle time, which is caused because of the long path generated due to the temporary obstacles present close to the goal location.

The behavior tree is depicted in the image below.
From the image, it can be noted that there is an additional branch in the Navigation Subtree known as ``MonitorAndFollowPath``. This branch is created with the intention for the users to perform any kind of monitoring behavior that their robot should exhibit.
In this particular BT, the monitoring branch is exclusively utilized by ``PathLongerOnApproach`` BT node for checking if the global planner has decided to plan a significantly longer path for the robot on approaching the user-specified goal proximity.
If there is no significantly longer path, the monitor node goes into the ``FollowPath`` recovery node, which then generates the necessary control commands.
The behavior tree is depicted in the image below.
From the image, it can be noted that there is an additional branch in the Navigation Subtree known as ``MonitorAndFollowPath``. This branch is created with the intention for the users to perform any kind of monitoring behavior that their robot should exhibit.
In this particular BT, the monitoring branch is exclusively utilized by ``PathLongerOnApproach`` BT node for checking if the global planner has decided to plan a significantly longer path for the robot on approaching the user-specified goal proximity.
If there is no significantly longer path, the monitor node goes into the ``FollowPath`` recovery node, which then generates the necessary control commands.

.. 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 ``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.
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.
This is the point where the ``PathLongerOnApproach`` ticks and ticks its children, consequently cancelling the ``controller_server`` and waiting to see if the obstacle clears up.
In the below scenario, the obstacles do not clear, causing the robot to take the longer path.
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 ``PathLongerOnApproach`` ticks and ticks its children, consequently cancelling the ``controller_server`` and waiting to see if the obstacle clears up.
In the below scenario, the obstacles do not clear, causing the robot to take the longer path.

.. image:: ../../migration/images/nav2_patience_near_goal_and_go_around.gif

Alternatively, if the obstacles are cleared, then there is a shorter path generated by the global planner.
Alternatively, if the obstacles are cleared, then there is a shorter path generated by the global planner.
Now, the ``PathLongerOnApproach`` returns SUCCESS, that cause the ``FollowPath`` to continue with the robot navigation.

.. image:: ../../migration/images/nav2_patience_near_goal_and_clear_obstacle.gif

Apart from the above scenarios, we also need to note that, the robot will take the longer path to the goal location if the obstacle does not clear up in the given user-specific wait time.
Apart from the above scenarios, we also need to note that, the robot will take the longer path to the goal location if the obstacle does not clear up in the given user-specific wait time.

In conclusion, this particular BT would serve, both as an example and ready-to-use BT for an organizational specific application, that wishes to optimize its process cycle time.

Expand Down
26 changes: 13 additions & 13 deletions configuration/packages/bt-plugins/actions/ComputeCoveragePath.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ComputeCoveragePath
===================

Invokes the ComputeCoveragePath ROS 2 action server, which is implemented by the opennav_coverage_ server module.
Invokes the ComputeCoveragePath ROS 2 action server, which is implemented by the opennav_coverage_ server module.
The server address can be remapped using the ``server_name`` input port.
This server can take in both cartesian and GPS coordinates and is implemented using the ``Fields2Cover`` library.

Expand All @@ -16,18 +16,18 @@ Input Ports
===================================== =======
Type Default
------------------------------------- -------
bool true
bool true
===================================== =======

Description
Whether or not to generate a headland of the field or polygon to compute coverage of

:generate_route:

============================================= =======
Type Default
--------------------------------------------- -------
bool true
bool true
============================================= =======

Description
Expand All @@ -38,7 +38,7 @@ Input Ports
============== =======
Type Default
-------------- -------
bool true
bool true
============== =======

Description
Expand All @@ -49,7 +49,7 @@ Input Ports
============== =======
Type Default
-------------- -------
string N/A
string N/A
============== =======

Description
Expand All @@ -61,7 +61,7 @@ Input Ports
============== =======
Type Default
-------------- -------
int 0
int 0
============== =======

Description
Expand All @@ -72,7 +72,7 @@ Input Ports
=================================== =======
Type Default
----------------------------------- -------
vector<geometry_msgs::msg::Polygon> N/A
vector<geometry_msgs::msg::Polygon> N/A
=================================== =======

Description
Expand All @@ -83,12 +83,12 @@ Input Ports
=================================== =======
Type Default
----------------------------------- -------
string "map"
string "map"
=================================== =======

Description
The polygon's frame ID, since the GML file provides the frame ID for its format, this is the frame ID for user-defined input ``polygons``.

Output Ports
------------

Expand All @@ -97,7 +97,7 @@ Output Ports
========================== =======
Type Default
-------------------------- -------
nav_msgs::msg::Path N/A
nav_msgs::msg::Path N/A
========================== =======

Description
Expand All @@ -108,7 +108,7 @@ Output Ports
========================== =======
Type Default
-------------------------- -------
vector<PathComponents> N/A
vector<PathComponents> N/A
========================== =======

Description
Expand All @@ -119,7 +119,7 @@ Output Ports
============== =======
Type Default
-------------- -------
uint16 N/A
uint16 N/A
============== =======

Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ComputePathThroughPoses
=======================

Invokes the ComputePathThroughPoses ROS 2 action server, which is implemented by the nav2_planner_ module.
Invokes the ComputePathThroughPoses ROS 2 action server, which is implemented by the nav2_planner_ module.
The server address can be remapped using the ``server_name`` input port.

.. _nav2_planner: https://github.com/ros-planning/navigation2/tree/main/nav2_planner
Expand All @@ -15,18 +15,18 @@ Input Ports
===================================== =======
Type Default
------------------------------------- -------
geometry_msgs::msg::PoseStamped N/A
geometry_msgs::msg::PoseStamped N/A
===================================== =======

Description
Start pose. Optional. Only used if not left empty. Takes in a blackboard variable, e.g. "{start}".

:goals:

============================================= =======
Type Default
--------------------------------------------- -------
vector<geometry_msgs::msg::PoseStamped> N/A
vector<geometry_msgs::msg::PoseStamped> N/A
============================================= =======

Description
Expand All @@ -37,7 +37,7 @@ Input Ports
============== =======
Type Default
-------------- -------
string N/A
string N/A
============== =======

Description
Expand All @@ -48,7 +48,7 @@ Input Ports
============== =======
Type Default
-------------- -------
string N/A
string N/A
============== =======

Description
Expand All @@ -60,12 +60,12 @@ Input Ports
============== =======
Type Default
-------------- -------
double 10
double 10
============== =======

Description
Action server timeout (ms).

Output Ports
------------

Expand All @@ -74,7 +74,7 @@ Output Ports
========================== =======
Type Default
-------------------------- -------
nav_msgs::msg::Path N/A
nav_msgs::msg::Path N/A
========================== =======

Description
Expand All @@ -85,7 +85,7 @@ Output Ports
============== =======
Type Default
-------------- -------
uint16 N/A
uint16 N/A
============== =======

Description
Expand Down
20 changes: 10 additions & 10 deletions configuration/packages/bt-plugins/actions/ComputePathToPose.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ComputePathToPose
=================

Invokes the ComputePathToPose ROS 2 action server, which is implemented by the nav2_planner_ module.
Invokes the ComputePathToPose ROS 2 action server, which is implemented by the nav2_planner_ module.
The server address can be remapped using the ``server_name`` input port.

.. _nav2_planner: https://github.com/ros-planning/navigation2/tree/main/nav2_planner
Expand All @@ -15,18 +15,18 @@ Input Ports
===================================== =======
Type Default
------------------------------------- -------
geometry_msgs::msg::PoseStamped N/A
geometry_msgs::msg::PoseStamped N/A
===================================== =======

Description
Start pose. Optional. Only used if not left empty. Takes in a blackboard variable, e.g. "{start}".

:goal:

===================================== =======
Type Default
------------------------------------- -------
geometry_msgs::msg::PoseStamped N/A
geometry_msgs::msg::PoseStamped N/A
===================================== =======

Description
Expand All @@ -37,7 +37,7 @@ Input Ports
============== =======
Type Default
-------------- -------
string N/A
string N/A
============== =======

Description
Expand All @@ -48,7 +48,7 @@ Input Ports
============== =======
Type Default
-------------- -------
string N/A
string N/A
============== =======

Description
Expand All @@ -60,12 +60,12 @@ Input Ports
============== =======
Type Default
-------------- -------
double 10
double 10
============== =======

Description
Action server timeout (ms).

Output Ports
------------

Expand All @@ -74,7 +74,7 @@ Output Ports
========================== =======
Type Default
-------------------------- -------
nav_msgs::msg::Path N/A
nav_msgs::msg::Path N/A
========================== =======

Description
Expand All @@ -85,7 +85,7 @@ Output Ports
============== =======
Type Default
-------------- -------
uint16 N/A
uint16 N/A
============== =======

Description
Expand Down
2 changes: 1 addition & 1 deletion configuration/packages/bt-plugins/actions/DockRobot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Output Ports
============== =======
Type Default
-------------- -------
uint16 0
uint16 0
============== =======

Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Output Ports
============== =======
Type Default
-------------- -------
uint16 N/A
uint16 N/A
============== =======

Description
Expand Down
Loading

0 comments on commit b13e200

Please sign in to comment.