File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
behaviortree_ros2/include/behaviortree_ros2 Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,10 @@ template<class T> inline
352352 };
353353 // --------------------
354354
355+ // Check if server is ready
356+ if (!action_client_->action_server_is_ready ())
357+ return onFailure (SERVER_UNREACHABLE);
358+
355359 future_goal_handle_ = action_client_->async_send_goal ( goal, goal_options );
356360 time_goal_sent_ = node_->now ();
357361
Original file line number Diff line number Diff line change @@ -278,6 +278,10 @@ template<class T> inline
278278 return CheckStatus ( onFailure (INVALID_REQUEST) );
279279 }
280280
281+ // Check if server is ready
282+ if (!service_client_->service_is_ready ())
283+ return onFailure (SERVICE_UNREACHABLE);
284+
281285 future_response_ = service_client_->async_send_request (request).share ();
282286 time_request_sent_ = node_->now ();
283287
You can’t perform that action at this time.
0 commit comments