Function rclcpp::ok

Function Documentation

bool rclcpp::ok(rclcpp::Context::SharedPtr context = nullptr)

Check rclcpp’s status.

This may return false for a context which has been shutdown, or for a context that was shutdown due to SIGINT being received by the rclcpp signal handler.

If nullptr is given for the context, then the global context is used, i.e. the context initialized by rclcpp::init().

Parameters:

context[in] Optional check for shutdown of this Context.

Returns:

true if shutdown has been called, false otherwise