File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
nav2_behavior_tree/include/nav2_behavior_tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,11 @@ bool BtActionServer<ActionT>::loadBehaviorTree(const std::string & bt_xml_filena
231231 // Create the Behavior Tree from the XML input
232232 try {
233233 tree_ = bt_->createTreeFromFile (filename, blackboard_);
234+ for (auto & blackboard : tree_.blackboard_stack ) {
235+ blackboard->set <rclcpp::Node::SharedPtr>(" node" , client_node_);
236+ blackboard->set <std::chrono::milliseconds>(" server_timeout" , default_server_timeout_);
237+ blackboard->set <std::chrono::milliseconds>(" bt_loop_duration" , bt_loop_duration_);
238+ }
234239 } catch (const std::exception & e) {
235240 RCLCPP_ERROR (logger_, " Exception when loading BT: %s" , e.what ());
236241 return false ;
You can’t perform that action at this time.
0 commit comments