You're reading the documentation for a development version. For the latest released version, please have a look at Kilted.
Lifecycle of a Hardware Component
Methods return values have type
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn with the following
meaning:
CallbackReturn::SUCCESSmethod execution was successful.CallbackReturn::FAILUREmethod execution has failed and the lifecycle transition is unsuccessful.CallbackReturn::ERRORcritical error has happened that should be managed inon_errormethod.
The hardware transitions to the following state after each method:
UNCONFIGURED (
on_init,on_cleanup):Hardware is only initialized, but communication is not started and no interfaces are imported into
ResourceManager.INACTIVE (
on_configure,on_deactivate):Communication with the hardware is established and hardware component is configured. States can be read, but command interfaces (System and Actuator only) are not available.
As of now, it is left to the hardware component implementation to continue using the command received from the
CommandInterfacesor to skip them completely.Note
We plan to implement safety-critical interfaces, see this PR in the roadmap. But currently, all command interfaces are available and will be written, see this issue describing the situation.
FINALIZED (
on_shutdown):Hardware interface is ready for unloading/destruction. Allocated memory is cleaned up.
ACTIVE (
on_activate):States can be read.
System and Actuator only:
Power circuits of hardware are active and hardware can be moved, e.g., brakes are disengaged. Command interfaces are available and the commands should be sent to the hardware