14#include "../interfaces/State.hpp"
15#include "../util/GeospatialOperations.hpp"
44 enum class AttemptType
46 eReverseCurrentHeading,
57 AttemptType m_eAttemptType;
59 double m_dOriginalHeading;
60 bool m_bIsCurrentlyAligning;
61 std::chrono::system_clock::time_point m_tmStuckStartTime;
62 std::chrono::system_clock::time_point m_tmAlignStartTime;
76 void Start()
override;
The abstract state class. All states inherit from this class.
Definition State.hpp:110
The StuckState class implements the Stuck state for the Autonomy State Machine.
Definition StuckState.h:38
void SplicePath(std::vector< geoops::Waypoint > &vPath, const geoops::UTMCoordinate &stObstaclePosition)
Removes all points within stuck area in path and re-path plans all deleted paths segments.
Definition StuckState.cpp:550
void Run() override
Run the state machine. Returns the next state.
Definition StuckState.cpp:100
StuckState()
Construct a new State object.
Definition StuckState.cpp:81
void Exit() override
This method is called when the state is exited. It is used to clean up the state.
Definition StuckState.cpp:68
bool SamePosition(const geoops::GPSCoordinate &stOriginalPosition, const geoops::GPSCoordinate &stCurrPosition)
Checks if the rover is approximately in the same position.
Definition StuckState.cpp:370
void DeclareObstacle()
Adds the area in front of the rover as an obstacle by modifying the area's trav-score in LiDAR data.
Definition StuckState.cpp:385
void Start() override
This method is called when the state is first started. It is used to initialize the state.
Definition StuckState.cpp:33
States TriggerEvent(Event eEvent) override
Trigger an event in the state machine. Returns the next state.
Definition StuckState.cpp:290
void ModifyPath()
Modify stored path to reflect new obstacle and store it for use in returning state.
Definition StuckState.cpp:416
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:52
States
The states that the state machine can be in.
Definition State.hpp:31
This struct stores/contains information about a GPS data.
Definition GeospatialOperations.hpp:100
This struct stores/contains information about a UTM coordinate.
Definition GeospatialOperations.hpp:211