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.
Loading...
Searching...
No Matches
SearchPatternState.h
Go to the documentation of this file.
1
11#ifndef SEARCH_PATTERN_STATE_H
12#define SEARCH_PATTERN_STATE_H
13
14#include "../interfaces/State.hpp"
15#include "../util/GeospatialOperations.hpp"
16#include "../util/states/StuckDetection.hpp"
17#include "../vision/aruco/TagDetector.h"
18
20
22
23
29namespace statemachine
30{
31
39 {
40 private:
42 // Declare private enums and structs that are specific to and used withing this class.
44
45 // Enum for storing which search pattern type we are using.
46 enum SearchPatternType
47 {
48 eSpiral,
49 eZigZag,
50 END
51 };
52
54 // Declare private member variables.
56 bool m_bInitialized;
57 geoops::Waypoint m_stSearchPatternCenter;
58 std::vector<TagDetector*> m_vTagDetectors;
59 std::vector<geoops::Waypoint> m_vSearchPath;
60 int m_nSearchPathIdx;
61 SearchPatternType m_eCurrentSearchPatternType;
63
64 protected:
66 // Declare protected class methods.
68 void Start() override;
69 void Exit() override;
70
71 public:
73 // Declare public class methods.
76 void Run() override;
77 States TriggerEvent(Event eEvent) override;
78 };
79} // namespace statemachine
80
81#endif // SEARCHPATTERNSTATE_H
The SearchPatternState class implements the Search Pattern state for the Autonomy State Machine.
Definition SearchPatternState.h:39
void Exit() override
This method is called when the state is exited. It is used to clean up the state.
Definition SearchPatternState.cpp:66
States TriggerEvent(Event eEvent) override
Trigger an event in the state machine. Returns the next state.
Definition SearchPatternState.cpp:250
void Start() override
This method is called when the state is first started. It is used to initialize the state.
Definition SearchPatternState.cpp:33
SearchPatternState()
Construct a new State object.
Definition SearchPatternState.cpp:82
void Run() override
Run the state machine. Returns the next state.
Definition SearchPatternState.cpp:107
The abstract state class. All states inherit from this class.
Definition State.hpp:115
This class should be instantiated within another state to be used for detection of if the rover is st...
Definition StuckDetection.hpp:43
Namespace containing all state machine related classes.
Definition State.hpp:23
Event
The events that can be triggered in the state machine.
Definition State.hpp:54
States
The states that the state machine can be in.
Definition State.hpp:31
This struct is used by the WaypointHandler class to store location, size, and type information about ...
Definition GeospatialOperations.hpp:551