19#include <lifecycle_msgs/msg/state.hpp>
43 void updateState(
const lifecycle_msgs::msg::State & state);
Component that tracks the current lifecycle state.
std::optional< lifecycle_msgs::msg::State > currentState_
void onInitialize() override
Component initialization.
virtual ~CpLifecycleStateTracker()=default
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.
CpLifecycleStateTracker()=default
std::optional< std::string > getCurrentStateLabel() const
Get the current state label as string.