You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/docs/navigation2_dynamic_point_following.rst
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,19 @@
3
3
Dynamic Object Following
4
4
************************
5
5
6
-
Using Following server
6
+
Nav2 provides two different approaches for dynamic object following tasks:
7
+
8
+
1. **Following Server**: A specialized server that handles dynamic object following with built-in recovery mechanisms and smooth control.
9
+
2. **ComputePathToPose and FollowPath**: A behavior tree-based approach using traditional navigation components for custom following behaviors.
10
+
11
+
Using Following Server
7
12
======================
8
13
9
14
- `Following Server Overview`_
10
15
- `Following Server Tutorial Steps`_
11
16
12
17
Following Server Overview
13
-
=========================
18
+
-------------------------
14
19
15
20
The Following server is a specialized server in Nav2 designed to handle dynamic object following tasks. It dynamically follows an object while maintaining a defined distance specified by the ``desired_distance`` parameter. The server abstracts away the complexities of tracking and following moving objects, allowing users to focus on higher-level navigation goals.
16
21
@@ -25,12 +30,12 @@ The Following server uses the same controller as the Docking server, leveraging
25
30
26
31
27
32
Following Server Tutorial Steps
28
-
===============================
33
+
-------------------------------
29
34
30
35
To use the Following server, you need to configure it in your behavior tree. This involves setting up the necessary action nodes and parameters to ensure smooth following behavior. The ``FollowObject`` action node provides two different approaches for object tracking.
31
36
32
37
Method 1: Using pose_topic
33
-
--------------------------
38
+
``````````````````````````
34
39
35
40
The simplest behavior tree for following a dynamic object using a pose topic is as follows:
36
41
@@ -48,7 +53,7 @@ In this configuration:
48
53
- ``max_duration``: Duration to run the action (0.0 means indefinitely)
49
54
50
55
Method 2: Using tracked_frame
51
-
-----------------------------
56
+
`````````````````````````````
52
57
53
58
Alternatively, you can follow a specific TF frame directly:
54
59
@@ -89,6 +94,7 @@ The following video demonstrates the Following Server functionality in a real-wo
89
94
</div>
90
95
</h1>
91
96
97
+
----
92
98
93
99
Using ComputePathToPose and FollowPath
94
100
======================================
@@ -105,7 +111,7 @@ Using ComputePathToPose and FollowPath
105
111
</h1>
106
112
107
113
ComputePathToPose Overview
108
-
==========================
114
+
--------------------------
109
115
110
116
This tutorial shows how to use Nav2 for a different task other than going from point A to point B. In this case, we will use Nav2 to follow a moving object at a distance indefinitely.
111
117
@@ -136,10 +142,10 @@ send the initial pose to the ``NavigateToPose`` action, and update it on a topic
136
142
:width:48%
137
143
138
144
ComputePathToPose Tutorial Steps
139
-
================================
145
+
--------------------------------
140
146
141
147
0- Create the Behavior Tree
142
-
---------------------------
148
+
````````````````````````````
143
149
144
150
Let's start from this simple behavior tree. This behavior tree replans a new path at 1 hz and passes that path to the controller to follow:
145
151
@@ -219,7 +225,7 @@ Now, you may save this behavior tree and use it in our navigation task.
219
225
For reference, this exact behavior tree is `made available <https://github.com/ros-navigation/navigation2/blob/main/nav2_bt_navigator/behavior_trees/follow_point.xml>`_ to you batteries included in the ``nav2_bt_navigator`` package.
220
226
221
227
1- Setup Rviz clicked point
222
-
---------------------------
228
+
```````````````````````````
223
229
224
230
We are going to use RViz instead of a full application so you can test at home without finding a detector to get started. We will use the "clicked point" button on the toolbar to substitute object detections to provide goal updates to Nav2. This button allows you to
225
231
publish coordinates in the topic ``/clicked_point``. This point needs to be sent to the behavior tree, using the program ``clicked_point_to_pose``, from `this repo <https://github.com/fmrico/nav2_test_utils>`_. Clone
@@ -230,7 +236,7 @@ this repo in your workspace, build, and type in a terminal.
230
236
Optionally, you can remap this topic in your rviz configuration file to ``goal_updates``.
231
237
232
238
2- Run Dynamic Object Following in Nav2 Simulation
0 commit comments