Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions configuration/packages/bt-plugins/actions/AssistedTeleop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.. _bt_assisted_teleop_action:

AssistedTeleop
==============

Invokes the AssistedTeleop ROS 2 action server, which filters teleop twist commands to prevent
collisions. This is used in nav2 Behavior Trees as a recovery behavior or a regular behavior.
The nav2_behaviors_ module implements the AssistedTeleop action server.

.. _nav2_behaviors: https://github.com/ros-planning/navigation2/tree/main/nav2_behaviors


Input Ports
***********

:is_recovery:

====== =======
Type Default
------ -------
double false
====== =======

Description
If true increment the recovery counter.

:time_allowance:

====== =======
Type Default
------ -------
double 10.0
====== =======

Description
Time to envoke behavior for, if exceeds considers it a stuck condition or failure case (seconds).

:server_name:

====== =======
Type Default
------ -------
string N/A
====== =======

Description
Action server name.

:server_timeout:

====== =======
Type Default
------ -------
double 10
====== =======

Description
Action server timeout (ms).

Example
-------

.. code-block:: xml

<AssistedTeleop is_recovery="false" server_name="assisted_teleop_server" server_timeout="10"/>
39 changes: 39 additions & 0 deletions configuration/packages/bt-plugins/actions/CancelAssistedTeleop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _bt_cancel_assisted_teleop:

CancelAssistedTeleop
====================

Used to cancel the AssistedTeleop action that is part of the behavior server. The server address can be remapped using the ``server_name`` input port.

Input Ports
-----------

:service_name:

====== =======
Type Default
------ -------
string N/A
====== =======

Description
Service name, if not using default of ``assisted_teleop`` due to remapping.


:server_timeout:

====== =======
Type Default
------ -------
double 10
====== =======

Description
Server timeout (ms).

Example
-------

.. code-block:: xml

<CancelAssistedTeleop server_name="assisted_teleop" server_timeout="10"/>
42 changes: 41 additions & 1 deletion configuration/packages/configuring-behavior-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,44 @@ DriveOnHeading distance, speed and time_allowance is given from the action reque
Description
Time to look ahead for collisions (s).

AssistedTeleop Behavior Parameters
**********************************

AssistedTeleop time_allowance is given in the action request

:projection_time:

============== =============================
Type Default
-------------- -----------------------------
double 1.0
============== =============================

Description
Time to look ahead for collisions (s).

:simulation_time_step:

============== =============================
Type Default
-------------- -----------------------------
double 0.1
============== =============================

Description
Time step for projections (s).

:cmd_vel_teleop:

============== =============================
Type Default
-------------- -----------------------------
string cmd_vel_teleop
============== =============================

Description
Topic to listen for teleop messages.

Example
*******
.. code-block:: yaml
Expand All @@ -220,7 +258,7 @@ Example
costmap_topic: local_costmap/costmap_raw
footprint_topic: local_costmap/published_footprint
cycle_frequency: 10.0
behavior_plugins: ["spin", "backup", "drive_on_heading", "wait"]
behavior_plugins: ["spin", "backup", "drive_on_heading", "wait", "assisted_teleop"]
spin:
plugin: "nav2_behaviors/Spin"
backup:
Expand All @@ -229,6 +267,8 @@ Example
plugin: "nav2_behaviors/DriveOnHeading"
wait:
plugin: "nav2_behaviors/Wait"
assisted_teleop:
plugin: "nav2_behaviors/AssistedTeleop"
global_frame: odom
robot_base_frame: base_link
transform_timeout: 0.1
Expand Down
2 changes: 2 additions & 0 deletions configuration/packages/configuring-bt-xml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Action Plugins
bt-plugins/actions/Spin.rst
bt-plugins/actions/BackUp.rst
bt-plugins/actions/DriveOnHeading.rst
bt-plugins/actions/AssistedTeleop.rst
bt-plugins/actions/ComputePathToPose.rst
bt-plugins/actions/FollowPath.rst
bt-plugins/actions/NavigateToPose.rst
Expand All @@ -43,6 +44,7 @@ Action Plugins
bt-plugins/actions/CancelSpin.rst
bt-plugins/actions/CancelWait.rst
bt-plugins/actions/CancelDriveOnHeading.rst
bt-plugins/actions/CancelAssistedTeleop.rst
bt-plugins/actions/Smooth.rst

Condition Plugins
Expand Down
4 changes: 4 additions & 0 deletions migration/Galactic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,7 @@ Goal Checker API Changed
************************
`PR 2965 <https://github.com/ros-planning/navigation2/pull/2965>`_ adds an extra argument in the initialize function of the `nav2_core::GoalChecker` class.
The extra argument is a costmap_ros pointer. This is used to check if the goal is in collision, so that we can avoid moving towards the goal and replanning can be initiates using some BT plugin.

Added Assisted Teleop
*********************
`PR 2965 <https://github.com/ros-planning/navigation2/pull/2904>`_ adds a new behavior for assisted teleop along with two new BT nodes AssistedTeleop and CancelAssistedTeleop.
13 changes: 12 additions & 1 deletion plugins/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,17 @@ Behaviors
| `Drive On Heading`_ | Joshua Wallace | Drive on heading behavior with |
| | | configurable distance to drive |
+----------------------+------------------------+----------------------------------+
| `Assisted Teleop`_ | Joshua Wallace | AssistedTeleop behavior that |
| | | scales teleop commands to |
| | | prevent collisions. |
+----------------------+------------------------+----------------------------------+

.. _Back Up: https://github.com/ros-planning/navigation2/tree/main/nav2_behaviors/plugins
.. _Spin: https://github.com/ros-planning/navigation2/tree/main/nav2_behaviors/plugins
.. _Wait: https://github.com/ros-planning/navigation2/tree/main/nav2_behaviors/plugins
.. _Drive On Heading: https://github.com/ros-planning/navigation2/tree/main/nav2_behaviors/plugins
.. _Clear Costmap: https://github.com/ros-planning/navigation2/blob/main/nav2_costmap_2d/src/clear_costmap_service.cpp
.. _Assisted Teleop: https://github.com/ros-planning/navigation2/tree/main/nav2_behaviors/plugins

Waypoint Task Executors
=======================
Expand Down Expand Up @@ -275,6 +280,8 @@ Behavior Tree Nodes
+--------------------------------------------+---------------------+------------------------------------------+
| `Drive On Heading Action`_ | Joshua Wallace | Calls drive on heading behavior action |
+--------------------------------------------+---------------------+------------------------------------------+
| `Assisted Teleop Action`_ | Joshua Wallace | Calls assisted teleop behavior action |
+--------------------------------------------+---------------------+------------------------------------------+
| `Clear Entire Costmap Service`_ | Carl Delsey | Calls clear entire costmap service |
+--------------------------------------------+---------------------+------------------------------------------+
| `Clear Costmap Except Region Service`_ | Guillaume Doisy | Calls clear costmap except region service|
Expand Down Expand Up @@ -333,11 +340,14 @@ Behavior Tree Nodes
+--------------------------------------------+---------------------+------------------------------------------+
| `Cancel Wait Action`_ |Pradheep Padmanabhan | Cancels wait behavior action |
+--------------------------------------------+---------------------+------------------------------------------+
| `Cancel Drive on Heading Action`_ |Jousha Wallace | Cancels drive on heading behavior action |
| `Cancel Drive on Heading Action`_ | Joshua Wallace | Cancels drive on heading behavior action |
+--------------------------------------------+---------------------+------------------------------------------+
| `Cancel Assisted Teleop Action`_ | Joshua Wallace | Cancels assisted teleop behavior action |
+--------------------------------------------+---------------------+------------------------------------------+

.. _Back Up Action: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/back_up_action.cpp
.. _Drive On Heading Action: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/drive_on_heading_action.cpp
.. _Assisted Teleop Action: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/assisted_teleop_action.cpp
.. _Clear Entire Costmap Service: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/clear_costmap_service.cpp
.. _Clear Costmap Except Region Service: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/clear_costmap_service.cpp
.. _Clear Costmap Around Robot Service: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/clear_costmap_service.cpp
Expand All @@ -361,6 +371,7 @@ Behavior Tree Nodes
.. _Cancel Spin Action: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/spin_cancel_node.cpp
.. _Cancel Wait Action: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/wait_cancel_node.cpp
.. _Cancel Drive on Heading Action: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/drive_on_heading_cancel_node.cpp
.. _Cancel Assisted Teleop Action: https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/plugins/action/assisted_teleop_cancel_node.cpp


+------------------------------------+--------------------+------------------------+
Expand Down