Class defining the state transition table behavior for the LocalizationManager.
void signal(LocalizationSignal signal)
Trigger signal for the transition table.
void setAndLogState(LocalizationState new_state, LocalizationSignal source_signal)
Function to change the current state and log the details of the transition.
void signalWhenDEGRADED_NO_LIDAR_FIX(LocalizationSignal signal)
void signalWhenAWAIT_MANUAL_INITIALIZATION(LocalizationSignal signal)
void signalWhenINITIALIZING(LocalizationSignal signal)
LocalizationState state_
Current state. This state should only ever be set using the setAndLogState() function.
void logDebugSignal(LocalizationSignal signal) const
Helper function for logging the provide signal.
void signalWhenUNINITIALIZED(LocalizationSignal signal)
TransitionCallback transition_callback_
void signalWhenDEGRADED(LocalizationSignal signal)
void signalWhenOPERATIONAL(LocalizationSignal signal)
std::function< void(LocalizationState prev_state, LocalizationState new_state, LocalizationSignal signal)> TransitionCallback
LocalizationTransitionTable(LocalizerMode mode)
Constructor.
LocalizationState getState() const
Returns the current state.
void setTransitionCallback(TransitionCallback cb)
Callback setting function. The provided callback will be triggered any time the current state changes...
LocalizationState
Enum describing the possible states of the localization system.
LocalizerMode
Enum describing the possible operational modes of the LocalizationManager.
LocalizationSignal
Enum describing the possible signals to change the current LocalizationState.