![]() |
Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
|
The abstract state class. All states inherit from this class. More...
#include <State.hpp>
Public Member Functions | |
State (States eState) | |
Construct a new State object. | |
virtual | ~State ()=default |
Destroy the State object. | |
virtual States | TriggerEvent (Event eEvent)=0 |
Trigger an event in the state machine. Returns the next state. | |
virtual void | Run ()=0 |
Run the state machine. Returns the next state. | |
States | GetState () const |
Accessor for the State private member. | |
virtual std::string | ToString () const |
Accessor for the State private member. Returns the state as a string. | |
virtual bool | operator== (const State &other) const |
Checks to see if the current state is equal to the passed state. | |
virtual bool | operator!= (const State &other) const |
Checks to see if the current state is not equal to the passed state. | |
Protected Member Functions | |
virtual void | Start () |
This method is called when the state is first started. It is used to initialize the state. | |
virtual void | Exit () |
This method is called when the state is exited. It is used to clean up the state. | |
Private Attributes | |
States | m_eState |
std::string | m_szStateName |
The abstract state class. All states inherit from this class.
|
inline |
Construct a new State object.
eState | - The state to start in. |
|
virtualdefault |
Destroy the State object.
|
inlineprotectedvirtual |
This method is called when the state is first started. It is used to initialize the state.
Reimplemented in statemachine::ApproachingMarkerState, statemachine::ApproachingObjectState, statemachine::AvoidanceState, statemachine::IdleState, statemachine::NavigatingState, statemachine::ReversingState, statemachine::SearchPatternState, statemachine::StuckState, statemachine::VerifyingMarkerState, statemachine::VerifyingObjectState, and statemachine::VerifyingPositionState.
|
inlineprotectedvirtual |
This method is called when the state is exited. It is used to clean up the state.
Reimplemented in statemachine::ApproachingMarkerState, statemachine::ApproachingObjectState, statemachine::AvoidanceState, statemachine::IdleState, statemachine::NavigatingState, statemachine::ReversingState, statemachine::SearchPatternState, statemachine::StuckState, statemachine::VerifyingMarkerState, statemachine::VerifyingObjectState, and statemachine::VerifyingPositionState.
Trigger an event in the state machine. Returns the next state.
eEvent | - The event to trigger. |
Implemented in statemachine::ApproachingMarkerState, statemachine::ApproachingObjectState, statemachine::AvoidanceState, statemachine::IdleState, statemachine::NavigatingState, statemachine::ReversingState, statemachine::SearchPatternState, statemachine::StuckState, statemachine::VerifyingMarkerState, statemachine::VerifyingObjectState, and statemachine::VerifyingPositionState.
|
pure virtual |
Run the state machine. Returns the next state.
Implemented in statemachine::ApproachingMarkerState, statemachine::ApproachingObjectState, statemachine::AvoidanceState, statemachine::IdleState, statemachine::NavigatingState, statemachine::ReversingState, statemachine::SearchPatternState, statemachine::StuckState, statemachine::VerifyingMarkerState, statemachine::VerifyingObjectState, and statemachine::VerifyingPositionState.
|
inline |
Accessor for the State private member.
|
inlinevirtual |
Accessor for the State private member. Returns the state as a string.
|
inlinevirtual |
Checks to see if the current state is equal to the passed state.
other | - The state to compare to. |
|
inlinevirtual |
Checks to see if the current state is not equal to the passed state.
other | - The state to compare to. |