Skip to content

Commit 378dbc4

Browse files
committed
Merge remote-tracking branch 'nav2/master'
2 parents dd7f418 + 53fe46a commit 378dbc4

25 files changed

Lines changed: 879 additions & 34 deletions

.codespell_words

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ implementors
44
retuned
55
segway
66
lightening
7+
statics

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ pip3 install -r requirements.txt
3333
### Build the Docs
3434
Build the docs locally with `make html` and you'll find the built docs entry point in `_build/html/index.html`.
3535

36+
To automate the build process, you can use a [sphinx-autobuild](https://github.com/sphinx-doc/sphinx-autobuild) package. \
37+
Run this command from the virtual environment to build the documentation and start a server:
38+
39+
```bash
40+
sphinx-autobuild . ./_build/html
41+
```
42+
For more options for the command, see the documentation linked above.
43+
44+
Now you can access the page using the local address: http://127.0.0.1:8000. \
45+
After saving any changes, the documentation will be automatically rebuilt and displayed.
46+
3647
Any images, diagrams, or videos are subject to their own copyrights, trademarks, and licenses.
3748

3849
Want a local PDF version? Follow the [instructions here](https://gist.github.com/alfredodeza/7fb5c667addb1c6963b9).

commander_api/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You may use this simple commander preempt commands of the same type (e.g. you ca
1414

1515
.. code-block:: python3
1616
17-
from nav2_simple_commander.robot_navigator import BasicNavigator
17+
from nav2_simple_commander.robot_navigator import BasicNavigator, TaskResult
1818
import rclpy
1919
2020
rclpy.init()

concepts/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ After, it is possible to activate the node by transitioning through the activati
5252

5353
This state will allow the node to process information and be fully setup to run.
5454
The configuration stage, triggering the ``on_configure()`` method, will setup all parameters, ROS networking interfaces, and for safety systems, all dynamically allocated memory.
55-
The activation stage, triggering the ``on_activate()`` method, will active the ROS networking interfaces and set any states in the program to start processing information.
55+
The activation stage, triggering the ``on_activate()`` method, will activate the ROS networking interfaces and set any states in the program to start processing information.
5656

5757
To shutdown, we transition into deactivating, cleaning up, shutting down and end in the finalized state.
5858
The networking interfaces are deactivated and stop processing, deallocate memory, exit cleanly, in those stages, respectively.

configuration/packages/bt-plugins/actions/FollowPath.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,22 @@ Output Ports
113113
Description
114114
Follow path error message. See ``FollowPath`` action for the enumerated set of error code definitions.
115115

116+
:tracking_feedback:
117+
118+
================================ =======
119+
Type Default
120+
-------------------------------- -------
121+
nav2_msgs::msg::TrackingFeedback N/A
122+
================================ =======
123+
124+
Description
125+
Tracking feedback message from the controller server, including cross track error, current path index, remaining path length, etc.
126+
127+
116128

117129
Example
118130
-------
119131

120132
.. code-block:: xml
121133
122-
<FollowPath path="{path}" controller_id="FollowPath" goal_checker_id="precise_goal_checker" path_handler_id="PathHandler" server_name="FollowPath" server_timeout="10" error_code_id="{follow_path_error_code}" error_msg="{follow_path_error_msg}"/>
134+
<FollowPath path="{path}" controller_id="FollowPath" goal_checker_id="precise_goal_checker" path_handler_id="PathHandler" server_name="FollowPath" server_timeout="10" error_code_id="{follow_path_error_code}" error_msg="{follow_path_error_msg}" tracking_feedback="{tracking_feedback}"/>
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
.. _bt_is_goal_nearby_condition:
2+
3+
IsGoalNearby
4+
============
5+
6+
Checks if the robot is near the goal by computing the remaining path length from the robot's current position to the goal. Returns SUCCESS when the remaining path length is less than the proximity threshold, otherwise returns FAILURE.
7+
8+
Parameter
9+
---------
10+
11+
:transform_tolerance:
12+
13+
Defined and declared in :ref:`configuring_bt_navigator`.
14+
15+
Example
16+
^^^^^^^
17+
.. code-block:: yaml
18+
19+
bt_navigator:
20+
ros__parameters:
21+
# other bt_navigator parameters
22+
transform_tolerance: 0.1
23+
24+
Input Ports
25+
-----------
26+
27+
:path:
28+
29+
==================================== =======
30+
Type Default
31+
------------------------------------ -------
32+
nav_msgs::msg::Path N/A
33+
==================================== =======
34+
35+
Description
36+
The planned path to evaluate.
37+
38+
:proximity_threshold:
39+
40+
====== =======
41+
Type Default
42+
------ -------
43+
double 1.0
44+
====== =======
45+
46+
Description
47+
The remaining path length (in meters) considered as "nearby". When the remaining distance along the path is less than this threshold, the condition returns SUCCESS.
48+
49+
:max_robot_pose_search_dist:
50+
51+
====== =======
52+
Type Default
53+
------ -------
54+
double -1.0
55+
====== =======
56+
57+
Description
58+
Maximum forward integrated distance along the path (starting from the last detected pose) to bound the search for the closest pose to the robot. When set to a negative value (default), the entire path is searched every time. Setting this to a positive value (e.g., 1.0-2.0 meters) can improve performance when this BT node is ticked frequently to address looping or crossed paths (when present).
59+
60+
:global_frame:
61+
62+
====== =======
63+
Type Default
64+
------ -------
65+
string "map"
66+
====== =======
67+
68+
Description
69+
The global reference frame.
70+
71+
:robot_base_frame:
72+
73+
====== =======
74+
Type Default
75+
------ -------
76+
string "base_link"
77+
====== =======
78+
79+
Description
80+
Robot base frame.
81+
82+
Example
83+
^^^^^^^
84+
85+
.. code-block:: xml
86+
87+
<IsGoalNearby path="{path}" proximity_threshold="1.0" />

configuration/packages/bt-plugins/conditions/IsPathValid.rst

Lines changed: 84 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
IsPathValid
44
===========
55

6-
Checks to see if the global path is valid. If there is a
6+
Checks to see if the global path is valid. If there is an
77
obstacle along the path, the condition returns FAILURE, otherwise
8-
it returns SUCCESS.
8+
it returns SUCCESS. Optionally checks specific costmap layers and
9+
can use a custom footprint for validation.
910

1011
Input Ports
1112
-----------
@@ -54,10 +55,90 @@ Input Ports
5455
Description
5556
Whether to consider unknown cost (255) as obstacle.
5657

58+
:layer_name:
59+
60+
====== =======
61+
Type Default
62+
------ -------
63+
string ""
64+
====== =======
65+
66+
Description
67+
Name of the specific costmap layer to check against.
68+
If empty, checks against the full costmap.
69+
70+
:footprint:
71+
72+
====== =======
73+
Type Default
74+
------ -------
75+
string ""
76+
====== =======
77+
78+
Description
79+
Custom footprint specification as a bracketed array of arrays,
80+
e.g., "[[x1,y1],[x2,y2],...]". If empty, uses the robot's
81+
configured footprint.
82+
83+
:check_full_path:
84+
85+
====== =======
86+
Type Default
87+
------ -------
88+
bool false
89+
====== =======
90+
91+
Description
92+
Whether to check all poses in the path (true) or stop at the
93+
first invalid pose (false). When true, all collision poses
94+
are reported.
95+
96+
Output Ports
97+
------------
98+
99+
:collision_poses:
100+
101+
============================================ =======
102+
Type Default
103+
-------------------------------------------- -------
104+
std::vector<geometry_msgs::msg::PoseStamped> N/A
105+
============================================ =======
106+
107+
Description
108+
Vector of poses in the path that are in collision or invalid.
109+
Empty if the path is valid.
110+
57111

58112
Example
59113
-------
60114

61115
.. code-block:: xml
62116
63-
<IsPathValid server_timeout="10" path="{path}" max_cost="100" consider_unknown_as_obstacle="false" />
117+
<IsPathValid
118+
server_timeout="10"
119+
path="{path}"
120+
max_cost="100"
121+
consider_unknown_as_obstacle="false"
122+
layer_name=""
123+
footprint=""
124+
check_full_path="false"
125+
collision_poses="{collision_poses}" />
126+
127+
With custom footprint:
128+
129+
.. code-block:: xml
130+
131+
<IsPathValid
132+
path="{path}"
133+
footprint="[[0.5,0.5],[0.5,-0.5],[-0.5,-0.5],[-0.5,0.5]]"
134+
collision_poses="{collision_poses}" />
135+
136+
Checking a specific costmap layer:
137+
138+
.. code-block:: xml
139+
140+
<IsPathValid
141+
path="{path}"
142+
layer_name="obstacle_layer"
143+
check_full_path="true"
144+
collision_poses="{collision_poses}" />

configuration/packages/configuring-amcl.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,20 @@ Parameters
276276
Description
277277
Particle filter population density. 2.33 is the 99% percentile.
278278

279+
:random_seed:
280+
281+
============== =============================
282+
Type Default
283+
-------------- -----------------------------
284+
int -1
285+
============== =============================
286+
287+
Description
288+
Seed for the particle filter RNG.
289+
290+
- ``random_seed >= 0``: seed the RNG with the provided value (repeatable runs).
291+
- ``random_seed < 0`` (default): seed the RNG from time (preserves historical behavior).
292+
279293
:recovery_alpha_fast:
280294

281295
============== =============================
@@ -540,6 +554,7 @@ Example
540554
odom_frame_id: "odom"
541555
pf_err: 0.05
542556
pf_z: 0.99
557+
random_seed: -1
543558
recovery_alpha_fast: 0.0
544559
recovery_alpha_slow: 0.0
545560
resample_interval: 1

configuration/packages/configuring-bt-navigator.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@ Parameters
113113
Default timeout value (in milliseconds) while a BT action node is waiting for acknowledgement from an action server.
114114
This value will be overwritten for a BT node if the input port "server_timeout" is provided.
115115

116+
:default_cancel_timeout:
117+
118+
==== =======
119+
Type Default
120+
---- -------
121+
int 50
122+
==== =======
123+
124+
Description
125+
Default timeout (in seconds) for BT action node cancellation requests during node halt.
126+
This value will be overwritten for a BT node if the input port "cancel_timeout" is provided.
127+
116128
:wait_for_service_timeout:
117129

118130
==== =======
@@ -272,6 +284,17 @@ NavigateToPose Parameters
272284
Description
273285
Blackboard variable to get the path from the behavior tree for ``NavigateToPose`` feedback. Should match port names of BT XML file.
274286

287+
:``<navigate_to_pose_name>``.tracking_feedback_blackboard_id:
288+
289+
====== ===================
290+
Type Default
291+
------ -------------------
292+
string "tracking_feedback"
293+
====== ===================
294+
295+
Description
296+
Blackboard variable to get the tracking feedback from the behavior tree for ``NavigateToPose`` feedback. Should match port names of BT XML file.
297+
275298
:``<navigate_to_pose_name>``.enable_groot_monitoring:
276299

277300
============== =======
@@ -294,6 +317,17 @@ NavigateToPose Parameters
294317
Description
295318
The port number for the Groot2 server. Note: In Groot2, you only need to specify the server port value, not the publisher port, as it is always the server port +1. Therefore, in this case, to use another navigator, the next available port would be 1669.
296319

320+
:``<navigate_to_pose_name>``.search_window:
321+
322+
============== =============================
323+
Type Default
324+
-------------- -----------------------------
325+
double 2.0
326+
============== =============================
327+
328+
Description
329+
How far (in meters) along the path the searching algorithm will look for the closest point.
330+
297331
NavigateThroughPoses Parameters
298332
*******************************
299333

@@ -319,6 +353,17 @@ NavigateThroughPoses Parameters
319353
Description
320354
Blackboard variable to get the path from the behavior tree for ``NavigateThroughPoses`` feedback. Should match port names of BT XML file.
321355

356+
:``<navigate_through_poses>``.tracking_feedback_blackboard_id:
357+
358+
====== ===================
359+
Type Default
360+
------ -------------------
361+
string "tracking_feedback"
362+
====== ===================
363+
364+
Description
365+
Blackboard variable to get the tracking feedback from the behavior tree for ``NavigateThroughPoses`` feedback. Should match port names of BT XML file.
366+
322367
:``<navigate_through_poses>``.waypoint_statuses_blackboard_id:
323368

324369
====== ===================
@@ -352,6 +397,17 @@ NavigateThroughPoses Parameters
352397
Description
353398
The port number for the Groot2 server. Note: In Groot2, you only need to specify the server port value, not the publisher port, as it is always the server port +1. Therefore, in this case, to use another navigator, the next available port would be 1671.
354399

400+
:``<navigate_through_poses>``.search_window:
401+
402+
============== =============================
403+
Type Default
404+
-------------- -----------------------------
405+
double 2.0
406+
============== =============================
407+
408+
Description
409+
How far (in meters) along the path the searching algorithm will look for the closest point.
410+
355411
Example
356412
*******
357413
.. code-block:: yaml
@@ -362,6 +418,8 @@ Example
362418
robot_base_frame: base_link
363419
transform_tolerance: 0.1
364420
filter_duration: 0.3
421+
default_server_timeout: 20
422+
default_cancel_timeout: 50
365423
introspection_mode: "disabled"
366424
default_nav_to_pose_bt_xml: replace/with/path/to/bt.xml # or $(find-pkg-share my_package)/behavior_tree/my_nav_to_pose_bt.xml
367425
default_nav_through_poses_bt_xml: replace/with/path/to/bt.xml # or $(find-pkg-share my_package)/behavior_tree/my_nav_through_poses_bt.xml
@@ -377,10 +435,12 @@ Example
377435
plugin: "nav2_bt_navigator::NavigateToPoseNavigator" # In Iron and older versions, "/" was used instead of "::"
378436
enable_groot_monitoring: false
379437
groot_server_port: 1667
438+
search_window: 2.0
380439
navigate_through_poses:
381440
plugin: "nav2_bt_navigator::NavigateThroughPosesNavigator" # In Iron and older versions, "/" was used instead of "::"
382441
enable_groot_monitoring: false
383442
groot_server_port: 1669
443+
search_window: 2.0
384444
plugin_lib_names:
385445
- nav2_compute_path_to_pose_action_bt_node
386446
- nav2_follow_path_action_bt_node

0 commit comments

Comments
 (0)