Class LifecycleNodeInterface

Inheritance Relationships

Derived Type

Class Documentation

class LifecycleNodeInterface

Interface class for a managed node.

Virtual functions as defined in http://design.ros2.org/articles/node_lifecycle.html

If the callback function returns successfully, the specified transition is completed. If the callback function fails or throws an uncaught exception, the on_error function is called. By default, all functions remain optional to overwrite and return true. Except the on_error function, which returns false and thus goes to shutdown/finalize state.

Subclassed by rclcpp_lifecycle::LifecycleNode

Public Types

enum class CallbackReturn : uint8_t

Values:

enumerator SUCCESS
enumerator FAILURE
enumerator ERROR

Public Functions

virtual CallbackReturn on_configure(const State &previous_state)

Callback function for configure transition.

virtual CallbackReturn on_cleanup(const State &previous_state)

Callback function for cleanup transition.

virtual CallbackReturn on_shutdown(const State &previous_state)

Callback function for shutdown transition.

virtual CallbackReturn on_activate(const State &previous_state)

Callback function for activate transition.

virtual CallbackReturn on_deactivate(const State &previous_state)

Callback function for deactivate transition.

virtual CallbackReturn on_error(const State &previous_state)

Callback function for errorneous transition.

inline virtual ~LifecycleNodeInterface()

Protected Functions

inline LifecycleNodeInterface()