Function nav2_util::startup_lifecycle_nodes(const std::vector<std::string>&, const std::chrono::seconds, const int)

Function Documentation

void nav2_util::startup_lifecycle_nodes(const std::vector<std::string> &node_names, const std::chrono::seconds service_call_timeout = std::chrono::seconds::max(), const int retries = 3)

Transition the given lifecycle nodes to the ACTIVATED state in order.

At this time, service calls frequently hang for unknown reasons. The only way to combat that is to timeout the service call and retry it. To use this function, estimate how long your nodes should take to at each transition and set your timeout accordingly.

Parameters:
  • node_names[in] A vector of the fully qualified node names to startup.

  • service_call_timeout[in] The maximum amount of time to wait for a service call.

  • retries[in] The number of times to try a state transition service call