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
NavigatingState.h
Go to the documentation of this file.
1
11#ifndef NAVIGATING_STATE_H
12#define NAVIGATING_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
19
25namespace statemachine
26{
27
34 class NavigatingState : public State
35 {
36 private:
38 // Declare private member variables.
40 bool m_bFetchNewWaypoint;
41 geoops::Waypoint m_stGoalWaypoint;
42 int m_nMaxDataPoints;
43 std::vector<double> m_vRoverXPosition;
44 std::vector<double> m_vRoverYPosition;
45 std::array<double, 2> m_dStuckCheckLastPosition;
46 bool m_bInitialized;
47 std::vector<TagDetector*> m_vTagDetectors;
49
50 protected:
52 // Declare protected class methods.
54 void Start() override;
55 void Exit() override;
56
57 public:
59 // Declare public class methods.
62 void Run() override;
63 States TriggerEvent(Event eEvent) override;
64 };
65} // namespace statemachine
66
67#endif // NAVIGATINGSTATE_H
The NavigatingState class implements the Navigating state for the Autonomy State Machine.
Definition NavigatingState.h:35
void Exit() override
This method is called when the state is exited. It is used to clean up the state.
Definition NavigatingState.cpp:59
NavigatingState()
Construct a new State object.
Definition NavigatingState.cpp:72
void Run() override
Run the state machine. Returns the next state.
Definition NavigatingState.cpp:97
States TriggerEvent(Event eEvent) override
Trigger an event in the state machine. Returns the next state.
Definition NavigatingState.cpp:294
void Start() override
This method is called when the state is first started. It is used to initialize the state.
Definition NavigatingState.cpp:31
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