File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
behaviortree_ros2/include/behaviortree_ros2 Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ inline bool RosServiceNode<T>::createClient(const std::string& service_name)
272272
273273 auto & registry = getRegistry ();
274274 auto it = registry.find (client_key);
275- if (it == registry.end () || it->second .expired ()
275+ if (it == registry.end () || it->second .expired ())
276276 {
277277 srv_instance_ = std::make_shared<ServiceClientInstance>(node_, service_name);
278278 registry.insert ({ client_key, srv_instance_ });
@@ -282,12 +282,11 @@ inline bool RosServiceNode<T>::createClient(const std::string& service_name)
282282 }
283283 else
284284 {
285- auto prev_instance srv_instance_ = it->second .lock ();
285+ srv_instance_ = it->second .lock ();
286286 }
287287 service_name_ = service_name;
288288
289- bool found =
290- srv_instance_->service_client ->wait_for_service (wait_for_service_timeout_);
289+ bool found = srv_instance_->service_client ->wait_for_service (wait_for_service_timeout_);
291290 if (!found)
292291 {
293292 RCLCPP_ERROR (node_->get_logger (), " %s: Service with name '%s' is not reachable." ,
You can’t perform that action at this time.
0 commit comments