Skip to content

Commit 991bc08

Browse files
Fixed Docs for Behavior tree (#772)
* Fixed Docs for Behavior tree Signed-off-by: Jad El Hajj <jad.elhajj@inmind.ai> * Added section to the migartion guide for the new BT feature Signed-off-by: Jad El Hajj <jad.elhajj@inmind.ai> * Update migration/Iron.rst Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Update migration/Iron.rst Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Update migration/Iron.rst Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Update migration/Iron.rst Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Moved to Kilted Signed-off-by: Jad El Hajj <jad.elhajj@inmind.ai> --------- Signed-off-by: Jad El Hajj <jad.elhajj@inmind.ai> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
1 parent 5dba2f3 commit 991bc08

4 files changed

Lines changed: 23 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Input Ports
5252
====== =======
5353

5454
Description
55-
Behavior tree absolute path. If none is specified, NavigateThroughPoses action server uses a default behavior tree.
55+
Behavior tree absolute path or ID. If none is specified, NavigateThroughPoses action server uses a default behavior tree.
5656

5757
Output Ports
5858
------------

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Input Ports
5252
====== =======
5353

5454
Description
55-
Behavior tree absolute path. If none is specified, NavigateToPose action server uses a default behavior tree.
55+
Behavior tree absolute path or ID. If none is specified, NavigateToPose action server uses a default behavior tree.
5656

5757
Output Ports
5858
------------
@@ -86,4 +86,4 @@ Example
8686
8787
<NavigateToPose goal="{goal}" server_name="NavigateToPose" server_timeout="10"
8888
error_code_id="{navigate_to_pose_error_code}" error_msg="{navigate_to_pose_error_msg}"
89-
behavior_tree="<some-path>/behavior_trees/navigate_through_poses_w_replanning_and_recovery.xml"/>
89+
behavior_tree="NavigateThroughPosesWReplanningAndRecovery"/>

configuration/packages/configuring-bt-navigator.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,16 @@ Parameters
236236
Description
237237
Whether to allow QoS profiles to be overwritten with parameterized values.
238238

239+
:bt_search_directories:
240+
241+
============== =================================================
242+
Type Default
243+
-------------- -----------------------------
244+
vector<string> $(find-pkg-share nav2_bt_navigator)/behavior_trees
245+
============== =================================================
246+
247+
Description
248+
List of directories that hosts behavior trees XML files. It is needed to register all behavior trees as well as subtrees.
239249

240250
NavigateToPose Parameters
241251
*************************
@@ -361,6 +371,8 @@ Example
361371
path_blackboard_id: path
362372
waypoint_statuses_blackboard_id: waypoint_statuses
363373
navigators: ['navigate_to_pose', 'navigate_through_poses']
374+
bt_search_directories:
375+
- $(find-pkg-share nav2_bt_navigator)/behavior_trees
364376
navigate_to_pose:
365377
plugin: "nav2_bt_navigator::NavigateToPoseNavigator" # In Iron and older versions, "/" was used instead of "::"
366378
enable_groot_monitoring: false

migration/Kilted.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,14 @@ Example:
358358
359359
See also :ref:`configuring_bt_navigator`
360360

361+
Add BehaviorTree SubTrees Support
362+
---------------------------------
363+
364+
The BehaviorTree engine now supports SubTrees in different files within directory(s) set through ``bt_search_directories`` parameter. This allows you to modularize your behavior trees into smaller components that can be reused across different trees.
365+
The interface now supports passing the behavior tree file or ID as input to the `loadBehaviorTree` method of the BT action server.
366+
Each behavior tree is now strictly required to have its own unique ID, therefore the need to replace `MainTre` to a unique ID. For example, in `navigate_through_poses_w_replanning_and_recovery.xml
367+
` `MainTree` can be replaced with `NavigateThroughPosesWReplanningAndRecovery`.
368+
361369
Option to have custom window size and poly order in Savitsky-Golay Smoother
362370
---------------------------------------------------------------------------
363371

0 commit comments

Comments
 (0)