Skip to content

Commit f5513d8

Browse files
committed
Check action before calling
1 parent e52663a commit f5513d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

behaviortree_ros2/include/behaviortree_ros2/bt_action_node.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)