lifecycle_py.talker module

class lifecycle_py.talker.LifecycleTalker(*args: Any, **kwargs: Any)

Bases: Node

Our lifecycle talker node.

on_activate(state: rclpy.lifecycle.State) rclpy.lifecycle.TransitionCallbackReturn
on_cleanup(state: rclpy.lifecycle.State) rclpy.lifecycle.TransitionCallbackReturn

Cleanup the node, after a cleaning-up transition is requested.

on_cleanup callback is being called when the lifecycle node enters the “cleaning up” state.

Returns:

The state machine either invokes a transition to the “unconfigured” state or stays in “inactive” depending on the return value. TransitionCallbackReturn.SUCCESS transitions to “unconfigured”. TransitionCallbackReturn.FAILURE transitions to “inactive”. TransitionCallbackReturn.ERROR or any uncaught exceptions to “errorprocessing”

on_configure(state: rclpy.lifecycle.State) rclpy.lifecycle.TransitionCallbackReturn

Configure the node, after a configuring transition is requested.

on_configure callback is being called when the lifecycle node enters the “configuring” state.

Returns:

The state machine either invokes a transition to the “inactive” state or stays in “unconfigured” depending on the return value. TransitionCallbackReturn.SUCCESS transitions to “inactive”. TransitionCallbackReturn.FAILURE transitions to “unconfigured”. TransitionCallbackReturn.ERROR or any uncaught exceptions to “errorprocessing”

on_deactivate(state: rclpy.lifecycle.State) rclpy.lifecycle.TransitionCallbackReturn
on_shutdown(state: rclpy.lifecycle.State) rclpy.lifecycle.TransitionCallbackReturn

Shutdown the node, after a shutting-down transition is requested.

on_shutdown callback is being called when the lifecycle node enters the “shutting down” state.

Returns:

The state machine either invokes a transition to the “finalized” state or stays in the current state depending on the return value. TransitionCallbackReturn.SUCCESS transitions to “unconfigured”. TransitionCallbackReturn.FAILURE transitions to “inactive”. TransitionCallbackReturn.ERROR or any uncaught exceptions to “errorprocessing”

publish()

Publish a new message when enabled.

lifecycle_py.talker.main()