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
AvoidanceState.h
Go to the documentation of this file.
1
11#ifndef AVOIDANCE_STATE_H
12#define AVOIDANCE_STATE_H
13
14#include "../algorithms/controllers/StanleyController.h"
15#include "../algorithms/planners/AStar.h"
16#include "../interfaces/State.hpp"
17#include "../util/GeospatialOperations.hpp"
18#include "../util/states/StuckDetection.hpp"
19
20
26namespace statemachine
27{
28
35 class AvoidanceState : public State
36 {
37 private:
39 pathplanners::AStar m_stPlanner;
40 controllers::StanleyController m_stController;
41 geoops::RoverPose m_stPose;
42 geoops::UTMCoordinate m_stStart;
43 geoops::UTMCoordinate m_stGoal;
44 geoops::Waypoint m_stGoalWaypoint;
45 std::vector<geoops::UTMCoordinate> m_vPlannedRoute;
46 States m_eTriggeringState;
47 bool m_bInitialized;
48
49 protected:
50 void Start() override;
51 void Exit() override;
52
53 public:
55 void Run() override;
56 States TriggerEvent(Event eEvent) override;
57 };
58} // namespace statemachine
59
60#endif // AVOIDANCESTATE_H
Provides an implementation of a lightweight lateral StanleyController. This algorithm is used to prec...
Definition StanleyController.h:50
Implements the A* (ASTAR) algorithm with the ability to plan paths around obstacles and provide path ...
Definition AStar.h:42
The AvoidanceState class implements the Avoidance state for the Autonomy State Machine.
Definition AvoidanceState.h:36
void Start() override
This method is called when the state is first started. It is used to initialize the state.
Definition AvoidanceState.cpp:31
AvoidanceState()
Construct a new State object.
Definition AvoidanceState.cpp:93
void Exit() override
This method is called when the state is exited. It is used to clean up the state.
Definition AvoidanceState.cpp:74
States TriggerEvent(Event eEvent) override
Trigger an event in the state machine. Returns the next state.
Definition AvoidanceState.cpp:173
void Run() override
Run the state machine. Returns the next state.
Definition AvoidanceState.cpp:116
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 to provide an easy way to store all pose data about the ro...
Definition GeospatialOperations.hpp:674
This struct stores/contains information about a UTM coordinate.
Definition GeospatialOperations.hpp:244
This struct is used by the WaypointHandler class to store location, size, and type information about ...
Definition GeospatialOperations.hpp:551