diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_through_poses_action.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_through_poses_action.hpp index 209a11b6ba..5234dedaec 100644 --- a/nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_through_poses_action.hpp +++ b/nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_through_poses_action.hpp @@ -56,6 +56,7 @@ class NavigateThroughPosesAction : public BtActionNode("goals", "Destinations to plan through"), + BT::InputPort("behavior_tree", "Behavior tree to run"), }); } }; diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_to_pose_action.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_to_pose_action.hpp index aa5f7a1e82..e8c37af738 100644 --- a/nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_to_pose_action.hpp +++ b/nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_to_pose_action.hpp @@ -56,6 +56,7 @@ class NavigateToPoseAction : public BtActionNode("goal", "Destination to plan to"), + BT::InputPort("behavior_tree", "Behavior tree to run"), }); } }; diff --git a/nav2_behavior_tree/nav2_tree_nodes.xml b/nav2_behavior_tree/nav2_tree_nodes.xml index 66e123beb4..3a22a90083 100644 --- a/nav2_behavior_tree/nav2_tree_nodes.xml +++ b/nav2_behavior_tree/nav2_tree_nodes.xml @@ -101,12 +101,14 @@ Goal Service name Server timeout + Behavior tree to run Goals Service name Server timeout + Behavior tree to run diff --git a/nav2_behavior_tree/plugins/action/navigate_through_poses_action.cpp b/nav2_behavior_tree/plugins/action/navigate_through_poses_action.cpp index 657b191491..693fbfa146 100644 --- a/nav2_behavior_tree/plugins/action/navigate_through_poses_action.cpp +++ b/nav2_behavior_tree/plugins/action/navigate_through_poses_action.cpp @@ -36,6 +36,7 @@ void NavigateThroughPosesAction::on_tick() "NavigateThroughPosesAction: goal not provided"); return; } + getInput("behavior_tree", goal_.behavior_tree); } } // namespace nav2_behavior_tree diff --git a/nav2_behavior_tree/plugins/action/navigate_to_pose_action.cpp b/nav2_behavior_tree/plugins/action/navigate_to_pose_action.cpp index c932bca257..82cdab44f8 100644 --- a/nav2_behavior_tree/plugins/action/navigate_to_pose_action.cpp +++ b/nav2_behavior_tree/plugins/action/navigate_to_pose_action.cpp @@ -36,6 +36,7 @@ void NavigateToPoseAction::on_tick() "NavigateToPoseAction: goal not provided"); return; } + getInput("behavior_tree", goal_.behavior_tree); } } // namespace nav2_behavior_tree