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)
272
272
273
273
auto & registry = getRegistry ();
274
274
auto it = registry.find (client_key);
275
- if (it == registry.end () || it->second .expired ()
275
+ if (it == registry.end () || it->second .expired ())
276
276
{
277
277
srv_instance_ = std::make_shared<ServiceClientInstance>(node_, service_name);
278
278
registry.insert ({ client_key, srv_instance_ });
@@ -282,12 +282,11 @@ inline bool RosServiceNode<T>::createClient(const std::string& service_name)
282
282
}
283
283
else
284
284
{
285
- auto prev_instance srv_instance_ = it->second .lock ();
285
+ srv_instance_ = it->second .lock ();
286
286
}
287
287
service_name_ = service_name;
288
288
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_);
291
290
if (!found)
292
291
{
293
292
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