https://uk.mathworks.com/help/ros/ref/ros2actionclient.waitforserver.html
waitForServer - Wait for ROS 2 action server to be ready for sending goals - MATLAB
This MATLAB function waits until the action server is started up and available to send goals.