File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
nav2_behavior_tree/include/nav2_behavior_tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ class BtServiceNode : public BT::SyncActionNode
4545 getInput (" service_name" , service_name_);
4646 service_client_ = node_->create_client <ServiceT>(service_name_);
4747
48+ // Make a request for the service without parameter
49+ request_ = std::make_shared<typename ServiceT::Request>();
50+
4851 // Make sure the server is actually there before continuing
4952 RCLCPP_INFO (
5053 node_->get_logger (), " Waiting for \" %s\" service" ,
@@ -83,7 +86,6 @@ class BtServiceNode : public BT::SyncActionNode
8386 // The main override required by a BT service
8487 BT::NodeStatus tick () override
8588 {
86- request_ = std::make_shared<typename ServiceT::Request>();
8789 on_tick ();
8890 auto future_result = service_client_->async_send_request (request_);
8991 return check_future (future_result);
You can’t perform that action at this time.
0 commit comments