ROS 2 - Lifecycle Nodes

Introduction

Concept

In contrast to regular nodes (inactive -> active), lifecycle nodes transition through 4 primary states:

Note

The node lifecycles is handled by a lifecycle-manager node.

Use-Case

Nav2 navigation stack uses lifecycle nodes to manage transitions and ensure that the stack can successfully execute without missing any nodes.

It configures and activates nodes in a particular sequence to start up the stack, then goes in reverse order to bring it back down into a finalised state.

Whenever a single node fails to transition to configured state, other nodes are also blocked from becoming active. It also transitions down all nodes if any connected planning servers are non-responsive or have crashed.