22 RCLCPP_INFO(
getLogger(),
"[CpLifecycleStateTracker] Component initialized");
30 getLogger(),
"[CpLifecycleStateTracker] State updated to: %s (id: %d)", state.label.c_str(),
std::optional< lifecycle_msgs::msg::State > currentState_
void onInitialize() override
Component initialization.
void updateState(const lifecycle_msgs::msg::State &state)
Update the current state.
std::optional< lifecycle_msgs::msg::State > getCurrentState() const
Get the current lifecycle state.
uint8_t getCurrentStateId() const
Get the current state ID.
std::optional< std::string > getCurrentStateLabel() const
Get the current state label as string.
rclcpp::Logger getLogger() const