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
statemachine::ApproachingMarkerState Class Reference

The ApproachingMarkerState class implements the Approaching Marker state for the Autonomy State Machine. More...

#include <ApproachingMarkerState.h>

Inheritance diagram for statemachine::ApproachingMarkerState:
Collaboration diagram for statemachine::ApproachingMarkerState:

Public Member Functions

 ApproachingMarkerState ()
 Accessor for the State private member. Returns the state as a string.
 
void Run () override
 Run the state machine. Returns the next state.
 
States TriggerEvent (Event eEvent) override
 Trigger an event in the state machine. Returns the next state.
 
- Public Member Functions inherited from statemachine::State
 State (States eState)
 Construct a new State object.
 
virtual ~State ()=default
 Destroy the State object.
 
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.
 

Private Member Functions

void Start () override
 This method is called when the state is first started. It is used to initialize the state.
 
void Exit () override
 This method is called when the state is exited. It is used to clean up the state.
 

Private Attributes

std::vector< std::shared_ptr< TagDetector > > m_vTagDetectors
 
statemachine::TimeIntervalBasedStuckDetector m_StuckDetector
 
States m_eTriggeringState
 
bool m_bInitialized
 
geoops::Waypoint m_stGoalWaypoint
 
std::unique_ptr< logging::graphing::PathTracerm_pRoverPathPlot
 

Additional Inherited Members

Detailed Description

The ApproachingMarkerState class implements the Approaching Marker state for the Autonomy State Machine.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2024-01-17

Constructor & Destructor Documentation

◆ ApproachingMarkerState()

statemachine::ApproachingMarkerState::ApproachingMarkerState ( )

Accessor for the State private member. Returns the state as a string.

Returns
std::string - The current state as a string.
Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2024-01-17
75 : State(States::eApproachingMarker)
76 {
77 LOG_INFO(logging::g_qConsoleLogger, "Entering State: {}", ToString());
78
79 m_bInitialized = false;
80
81 m_StuckDetector = statemachine::TimeIntervalBasedStuckDetector(constants::STUCK_CHECK_ATTEMPTS,
82 constants::STUCK_CHECK_INTERVAL,
83 constants::STUCK_CHECK_VEL_THRESH,
84 constants::STUCK_CHECK_ROT_THRESH);
85 m_pRoverPathPlot = std::make_unique<logging::graphing::PathTracer>("ApproachingMarkerRoverPath");
86
87 if (!m_bInitialized)
88 {
89 Start();
90 m_bInitialized = true;
91 }
92 }
void Start() override
This method is called when the state is first started. It is used to initialize the state.
Definition ApproachingMarkerState.cpp:33
virtual std::string ToString() const
Accessor for the State private member. Returns the state as a string.
Definition State.hpp:202
State(States eState)
Construct a new State object.
Definition State.hpp:145
This class should be instantiated within another state to be used for detection of if the rover is st...
Definition StuckDetection.hpp:43
Here is the call graph for this function:

Member Function Documentation

◆ Start()

void statemachine::ApproachingMarkerState::Start ( )
overrideprivatevirtual

This method is called when the state is first started. It is used to initialize the state.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2024-01-17

Reimplemented from statemachine::State.

34 {
35 // Schedule the next run of the state's logic
36 LOG_INFO(logging::g_qSharedLogger, "ApproachingMarkerState: Scheduling next run of state logic.");
37
38 // Initialize member variables.
39 m_stGoalWaypoint = globals::g_pWaypointHandler->PeekNextWaypoint();
40
41 // Store the state that got stuck and triggered a MarkerSeen event.
42 m_eTriggeringState = globals::g_pStateMachineHandler->GetPreviousState();
43
44 // Add the search and rover path layers to the plot.
45 m_pRoverPathPlot->CreateDotLayer("DetectedTags", "blue");
46 m_pRoverPathPlot->CreateDotLayer("FinalTag", "green");
47 m_pRoverPathPlot->CreatePathLayer("RoverPath", "-k");
48
49 // Get tag detectors.
50 m_vTagDetectors = {globals::g_pTagDetectionHandler->GetTagDetector(TagDetectionHandler::TagDetectors::eHeadMainCam)};
51 }
statemachine::States GetPreviousState() const
Accessor for the Previous State private member.
Definition StateMachineHandler.cpp:426
std::shared_ptr< TagDetector > GetTagDetector(TagDetectors eDetectorName)
Accessor for TagDetector detectors.
Definition TagDetectionHandler.cpp:132
const geoops::Waypoint PeekNextWaypoint()
Returns an immutable reference to the geoops::Waypoint struct at the front of the list without removi...
Definition WaypointHandler.cpp:540
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Exit()

void statemachine::ApproachingMarkerState::Exit ( )
overrideprivatevirtual

This method is called when the state is exited. It is used to clean up the state.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2024-01-17

Reimplemented from statemachine::State.

62 {
63 // Clean up the state before exiting
64 LOG_INFO(logging::g_qSharedLogger, "ApproachingMarkerState: Exiting state.");
65 }
Here is the caller graph for this function:

◆ Run()

void statemachine::ApproachingMarkerState::Run ( )
overridevirtual

Run the state machine. Returns the next state.

Author
sam_hajdukiewicz (saman.nosp@m.thah.nosp@m.ajduk.nosp@m.iewi.nosp@m.cz@gm.nosp@m.ail..nosp@m.com)
Date
2024-01-17

Implements statemachine::State.

101 {
102 // Submit logger message.
103 LOG_DEBUG(logging::g_qSharedLogger, "ApproachingMarkerState: Running state-specific behavior.");
104
105 // Get the current rover pose.
106 geoops::RoverPose stCurrentRoverPose = globals::g_pStateMachineHandler->SmartRetrieveRoverPose();
107
108 // Add the current rover pose to the path plot.
109 m_pRoverPathPlot->AddPathPoint(stCurrentRoverPose.GetUTMCoordinate(), "RoverPath");
110
111 // Check Rover radius from marker waypoint.
112 geoops::GeoMeasurement stCurrentMeasurement = geoops::CalculateGeoMeasurement(m_stGoalWaypoint.GetGPSCoordinate(), stCurrentRoverPose.GetGPSCoordinate());
113 if (stCurrentMeasurement.dDistanceMeters > m_stGoalWaypoint.dRadius)
114 {
115 // Submit logger message.
116 LOG_WARNING(logging::g_qSharedLogger,
117 "ApproachingMarkerState: Rover is too far from the original waypoint! Waypoint radius is {} meters, current distance is {} meters.",
118 m_stGoalWaypoint.dRadius,
119 stCurrentMeasurement.dDistanceMeters);
120 globals::g_pStateMachineHandler->HandleEvent(Event::eMarkerUnseen);
121 return;
122 }
123
124 // Identify target marker.
125 tagdetectutils::ArucoTag stBestArucoTag, stBestTorchTag;
126 statemachine::IdentifyTargetMarker(m_vTagDetectors, stBestArucoTag, stBestTorchTag, m_stGoalWaypoint.nID);
127
128 // Persistent variables to track target across frames
129 static double dHeadingSetPoint = 0.0;
130 static double dDistanceFromTag = 0.0;
131 static geoops::Waypoint stLastGeolocatedPosition;
132 static bool bHasLastGeolocatedPosition = false;
133 static std::chrono::system_clock::time_point tLastSeenTime = std::chrono::system_clock::now();
134 static bool bAlreadyPrintedLost = false;
135 static bool bAlreadyPrintedVisualLostFallback = false;
136
137 // Check for stale session data (if we re-entered this state after a long time).
138 if (std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now() - tLastSeenTime).count() >
139 constants::APPROACH_MARKER_LOST_GIVE_UP_TIME + 5.0)
140 {
141 bHasLastGeolocatedPosition = false;
142 }
143
144 // Check if both tag types are unseen.
145 if (stBestArucoTag.nID == -1 && stBestTorchTag.dConfidence == 0.0)
146 {
147 std::chrono::system_clock::time_point tmCurrentTime = std::chrono::system_clock::now();
148 if ((std::chrono::duration_cast<std::chrono::milliseconds>(tmCurrentTime - tLastSeenTime).count() / 1000.0) > constants::APPROACH_MARKER_LOST_GIVE_UP_TIME)
149 {
150 // Submit logger message.
151 globals::g_pStateMachineHandler->HandleEvent(Event::eMarkerUnseen);
152 return;
153 }
154 else
155 {
156 if (!bAlreadyPrintedLost)
157 {
158 bAlreadyPrintedLost = true;
159 // Submit logger message.
160 LOG_WARNING(logging::g_qSharedLogger, "ApproachingMarkerState: No tags detected.");
161 }
162
163 // If we have a valid last known geolocated position, keep driving to it.
164 if (bHasLastGeolocatedPosition)
165 {
166 // Calculate the geomeasurement to the last known position.
167 geoops::GeoMeasurement stLastMeasurement =
168 geoops::CalculateGeoMeasurement(stCurrentRoverPose.GetUTMCoordinate(), stLastGeolocatedPosition.GetUTMCoordinate());
169
170 // Update setpoints to track the last known location.
171 dHeadingSetPoint = stLastMeasurement.dStartRelativeBearing;
172 dDistanceFromTag = stLastMeasurement.dDistanceMeters;
173
174 if (!bAlreadyPrintedVisualLostFallback)
175 {
176 LOG_NOTICE(logging::g_qSharedLogger, "ApproachingMarkerState: Visual lost, driving to last known geolocated position.");
177 bAlreadyPrintedVisualLostFallback = true;
178 }
179 }
180 else
181 {
182 // No valid history to fallback on, stop the drive.
183 globals::g_pDriveBoard->SendStop();
184 return;
185 }
186 }
187 }
188 else // Tag Detected
189 {
190 // Submit logger message.
191 if (bAlreadyPrintedLost)
192 {
193 LOG_NOTICE(logging::g_qSharedLogger, "ApproachingMarkerState: Tags were detected again.");
194 }
195
196 // Reset the last seen time if a tag is detected.
197 tLastSeenTime = std::chrono::system_clock::now();
198 // Reset printed flags when tags are detected again
199 bAlreadyPrintedLost = false;
200 bAlreadyPrintedVisualLostFallback = false;
201
202 // Check if we got a good OpenCV tag.
203 if (stBestArucoTag.nID != -1)
204 {
205 dDistanceFromTag = stBestArucoTag.dStraightLineDistance;
206 // Check if the tag has an absolute coordinate populated.
207 if (stBestArucoTag.stGeolocatedPosition.eType != geoops::WaypointType::eUNKNOWN)
208 {
209 // Calculate the geomeasurement to the tag.
210 geoops::GeoMeasurement stTagMeasurement =
211 geoops::CalculateGeoMeasurement(stCurrentRoverPose.GetUTMCoordinate(), stBestArucoTag.stGeolocatedPosition.GetUTMCoordinate());
212 // Update static variables.
213 dHeadingSetPoint = stTagMeasurement.dStartRelativeBearing;
214
215 // Save geolocated position for fallback.
216 stLastGeolocatedPosition = stBestArucoTag.stGeolocatedPosition;
217 bHasLastGeolocatedPosition = true;
218
219 // Add the most recent geolocated tag to the plot.
220 m_pRoverPathPlot->AddDot(stBestArucoTag.stGeolocatedPosition.GetUTMCoordinate(), "DetectedTags");
221 }
222 else
223 {
224 // Fallback to relative tracking (Current Heading + Yaw Angle).
225 dHeadingSetPoint = numops::InputAngleModulus(stBestArucoTag.dYawAngle + stCurrentRoverPose.GetCompassHeading(), 0.0, 360.0);
226 }
227 }
228 // Check if we got a good Torch tag.
229 else if (stBestTorchTag.dConfidence != 0.0)
230 {
231 dDistanceFromTag = stBestTorchTag.dStraightLineDistance;
232 // Check if the tag has an absolute coordinate populated.
233 if (stBestTorchTag.stGeolocatedPosition.eType != geoops::WaypointType::eUNKNOWN)
234 {
235 // Calculate the geomeasurement to the tag.
236 geoops::GeoMeasurement stTagMeasurement =
237 geoops::CalculateGeoMeasurement(stCurrentRoverPose.GetUTMCoordinate(), stBestTorchTag.stGeolocatedPosition.GetUTMCoordinate());
238 // Update static variables.
239 dHeadingSetPoint = stTagMeasurement.dStartRelativeBearing;
240
241 // Save geolocated position for fallback.
242 stLastGeolocatedPosition = stBestTorchTag.stGeolocatedPosition;
243 bHasLastGeolocatedPosition = true;
244
245 // Add the most recent geolocated tag to the plot.
246 m_pRoverPathPlot->AddDot(stBestTorchTag.stGeolocatedPosition.GetUTMCoordinate(), "DetectedTags");
247 }
248 else
249 {
250 // Fallback to relative tracking (Current Heading + Yaw Angle).
251 dHeadingSetPoint = numops::InputAngleModulus(stBestTorchTag.dYawAngle + stCurrentRoverPose.GetCompassHeading(), 0.0, 360.0);
252 }
253 }
254 }
255
256 // Move the rover to the target's estimated position.
257 diffdrive::DrivePowers stDrivePowers = globals::g_pDriveBoard->CalculateMove(constants::APPROACH_MARKER_MOTOR_POWER,
258 dHeadingSetPoint,
259 stCurrentRoverPose.GetCompassHeading(),
260 diffdrive::DifferentialControlMethod::eArcadeDrive);
261 globals::g_pDriveBoard->SendDrive(stDrivePowers);
262
263 // Static variable to track last log time.
264 static std::chrono::system_clock::time_point tmLastLogTime = std::chrono::system_clock::now();
265 std::chrono::system_clock::time_point tmCurrentTime = std::chrono::system_clock::now();
266 // Only log once per second.
267 if (std::chrono::duration_cast<std::chrono::seconds>(tmCurrentTime - tmLastLogTime).count() >= 1)
268 {
269 // Update the last log time.
270 tmLastLogTime = tmCurrentTime;
271
272 if (stBestArucoTag.nID != -1)
273 {
274 LOG_NOTICE(logging::g_qSharedLogger,
275 "ApproachingMarkerState: OpenCV Tag ID: {}, Distance: {:.2f} m, Heading: {:.2f} deg",
276 stBestArucoTag.nID,
277 dDistanceFromTag,
278 dHeadingSetPoint);
279 }
280 else if (stBestTorchTag.dConfidence != 0.0)
281 {
282 LOG_NOTICE(logging::g_qSharedLogger,
283 "ApproachingMarkerState: Torch Tag Confidence: {:.2f}, Distance: {:.2f} m, Heading: {:.2f} deg",
284 stBestTorchTag.dConfidence,
285 dDistanceFromTag,
286 dHeadingSetPoint);
287 }
288 }
289
290 // Check if tag is reached.
291 if (dDistanceFromTag != 0.0 && dDistanceFromTag < constants::APPROACH_MARKER_PROXIMITY_THRESHOLD)
292 {
293 // Submit logger message.
294 LOG_NOTICE(logging::g_qSharedLogger, "ApproachingMarkerState: Rover has reached the target marker!");
295 // Check if the OpenCV tag has a good absolute position.
296 if (stBestArucoTag.nID != -1 && stBestArucoTag.stGeolocatedPosition.eType == geoops::WaypointType::eTagWaypoint)
297 {
298 // Add the tag to the path plot.
299 m_pRoverPathPlot->AddDot(stBestArucoTag.stGeolocatedPosition.GetUTMCoordinate(), "FinalTag", 7);
300 }
301 // Check if the torch tag has a good absolute position.
302 if (stBestTorchTag.dConfidence != 0.0 && stBestTorchTag.stGeolocatedPosition.eType == geoops::WaypointType::eTagWaypoint)
303 {
304 // Add the tag to the path plot.
305 m_pRoverPathPlot->AddDot(stBestTorchTag.stGeolocatedPosition.GetUTMCoordinate(), "FinalTag", 7);
306 }
307
308 // Reset the tag heading and distance.
309 dHeadingSetPoint = 0.0;
310 dDistanceFromTag = 0.0;
311 bHasLastGeolocatedPosition = false;
312
313 // Handle state transition and save the current search pattern state.
314 globals::g_pStateMachineHandler->HandleEvent(Event::eReachedMarker, true);
315 // Don't execute the rest of the state.
316 return;
317 }
318
320 // --- Check if the rover is stuck --- //
322
323 // Check if stuck.
324 if (constants::APPROACH_MARKER_ENABLE_STUCK_DETECT &&
325 m_StuckDetector.CheckIfStuck(globals::g_pStateMachineHandler->SmartRetrieveVelocity(), globals::g_pStateMachineHandler->SmartRetrieveAngularVelocity()))
326 {
327 // Submit logger message.
328 LOG_NOTICE(logging::g_qSharedLogger, "ApproachingMarkerState: Rover has become stuck!");
329 // Handle state transition and save the current search pattern state.
330 globals::g_pStateMachineHandler->HandleEvent(Event::eStuck, true);
331 // Don't execute the rest of the state.
332 return;
333 }
334
335 return;
336 }
void SendDrive(const diffdrive::DrivePowers &stDrivePowers, const bool bEnableVariableDriveEffort=true)
Sets the left and right drive powers of the drive board.
Definition DriveBoard.cpp:118
void SendStop()
Stop the drivetrain of the Rover.
Definition DriveBoard.cpp:195
diffdrive::DrivePowers CalculateMove(const double dGoalSpeed, const double dGoalHeading, const double dActualHeading, const diffdrive::DifferentialControlMethod eKinematicsMethod=diffdrive::DifferentialControlMethod::eArcadeDrive, const bool bAlwaysProgressForward=false)
This method determines drive powers to make the Rover drive towards a given heading at a given speed.
Definition DriveBoard.cpp:88
geoops::RoverPose SmartRetrieveRoverPose(bool bVIOHeading=true, bool bVIOTracking=false)
Retrieve the rover's current position and heading. Automatically picks between getting the position/h...
Definition StateMachineHandler.cpp:445
void HandleEvent(statemachine::Event eEvent, const bool bSaveCurrentState=false)
This method Handles Events that are passed to the State Machine Handler. It will check the current st...
Definition StateMachineHandler.cpp:353
bool CheckIfStuck(double dCurrentVelocity, double dCurrentAngularVelocity)
Checks if the rover meets stuck criteria based in the given parameters.
Definition StuckDetection.hpp:105
GeoMeasurement CalculateGeoMeasurement(const GPSCoordinate &stCoord1, const GPSCoordinate &stCoord2)
The shortest path between two points on an ellipsoid at (lat1, lon1) and (lat2, lon2) is called the g...
Definition GeospatialOperations.hpp:553
constexpr T InputAngleModulus(T tValue, T tMinValue, T tMaxValue)
Calculates the modulus of an input angle.
Definition NumberOperations.hpp:165
int IdentifyTargetMarker(const std::vector< std::shared_ptr< TagDetector > > &vTagDetectors, tagdetectutils::ArucoTag &stArucoTarget, tagdetectutils::ArucoTag &stTorchTarget, const int nTargetTagID=static_cast< int >(manifest::Autonomy::AUTONOMYWAYPOINTTYPES::ANY))
Identify a target marker in the rover's vision, using OpenCV detection.
Definition TagDetectionChecker.hpp:91
This struct is used to store the left and right drive powers for the robot. Storing these values in a...
Definition DifferentialDrive.hpp:73
This struct is used to store the distance, arc length, and relative bearing for a calculated geodesic...
Definition GeospatialOperations.hpp:83
This struct is used by the WaypointHandler to provide an easy way to store all pose data about the ro...
Definition GeospatialOperations.hpp:708
const geoops::GPSCoordinate & GetGPSCoordinate() const
Accessor for the geoops::GPSCoordinate member variable.
Definition GeospatialOperations.hpp:756
double GetCompassHeading() const
Accessor for the Compass Heading private member.
Definition GeospatialOperations.hpp:787
const geoops::UTMCoordinate & GetUTMCoordinate() const
Accessor for the geoops::UTMCoordinate member variable.
Definition GeospatialOperations.hpp:767
This struct is used by the WaypointHandler class to store location, size, and type information about ...
Definition GeospatialOperations.hpp:423
const geoops::GPSCoordinate & GetGPSCoordinate() const
Accessor for the geoops::GPSCoordinate member variable.
Definition GeospatialOperations.hpp:497
const geoops::UTMCoordinate & GetUTMCoordinate() const
Accessor for the geoops::UTMCoordinate member variable.
Definition GeospatialOperations.hpp:508
Represents a single ArUco tag. Combines attributes from TorchTag, TensorflowTag, and the original Aru...
Definition TagDetectionUtilty.hpp:59
Here is the call graph for this function:

◆ TriggerEvent()

States statemachine::ApproachingMarkerState::TriggerEvent ( Event  eEvent)
overridevirtual

Trigger an event in the state machine. Returns the next state.

Parameters
eEvent- The event to trigger.
Returns
std::shared_ptr<State> - The next state.
Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2024-01-17

Implements statemachine::State.

348 {
349 // Create instance variables.
350 States eNextState = States::eApproachingMarker;
351 bool bCompleteStateExit = true;
352
353 switch (eEvent)
354 {
355 case Event::eReachedMarker:
356 {
357 // Submit logger message.
358 LOG_INFO(logging::g_qSharedLogger, "ApproachingMarkerState: Handling ReachedMarker event.");
359
360 // Check if verifying marker state is enabled.
361 if (constants::APPROACH_MARKER_VERIFY_POSITION)
362 {
363 // Change states.
364 eNextState = States::eVerifyingMarker;
365 }
366 else
367 {
368 // Send multimedia command to update state display.
369 globals::g_pMultimediaBoard->SendLightingState(MultimediaBoard::MultimediaBoardLightingState::eReachedGoal);
370 // Pop old waypoint out of queue.
371 globals::g_pWaypointHandler->PopNextWaypoint();
372 // Clear saved search pattern state.
373 globals::g_pStateMachineHandler->ClearSavedStates();
374 // Submit logger message.
375 LOG_NOTICE(logging::g_qSharedLogger, "ApproachingMarkerState: Cleared old search pattern state and approaching marker state from saved states.");
376 // Change state.
377 eNextState = States::eIdle;
378 }
379 break;
380 }
381 case Event::eStart:
382 {
383 // Submit logger message.
384 LOG_INFO(logging::g_qSharedLogger, "ApproachingMarkerState: Handling Start event.");
385 // Send multimedia command to update state display.
386 globals::g_pMultimediaBoard->SendLightingState(MultimediaBoard::MultimediaBoardLightingState::eAutonomy);
387 break;
388 }
389 case Event::eMarkerUnseen:
390 {
391 // Submit logger message.
392 LOG_INFO(logging::g_qSharedLogger, "ApproachingMarkerState: Handling MarkerUnseen event.");
393 // Change states.
394 eNextState = m_eTriggeringState;
395 break;
396 }
397 case Event::eAbort:
398 {
399 // Submit logger message.
400 LOG_INFO(logging::g_qSharedLogger, "ApproachingMarkerState: Handling Abort event.");
401 // Send multimedia command to update state display.
402 globals::g_pMultimediaBoard->SendLightingState(MultimediaBoard::MultimediaBoardLightingState::eOff);
403 // Change state.
404 eNextState = States::eIdle;
405 break;
406 }
407 default:
408 {
409 LOG_WARNING(logging::g_qSharedLogger, "ApproachingMarkerState: Handling unknown event.");
410 eNextState = States::eIdle;
411 break;
412 }
413 }
414
415 if (eNextState != States::eApproachingMarker)
416 {
417 LOG_INFO(logging::g_qSharedLogger, "ApproachingMarkerState: Transitioning to {} State.", StateToString(eNextState));
418
419 // Exit the current state
420 if (bCompleteStateExit)
421 {
422 Exit();
423 }
424 }
425
426 return eNextState;
427 }
void SendLightingState(MultimediaBoardLightingState eState)
Sends a predetermined color pattern to board.
Definition MultimediaBoard.cpp:55
void ClearSavedStates()
Clear all saved states.
Definition StateMachineHandler.cpp:379
geoops::Waypoint PopNextWaypoint()
Removes and returns the next waypoint at the front of the list.
Definition WaypointHandler.cpp:500
void Exit() override
This method is called when the state is exited. It is used to clean up the state.
Definition ApproachingMarkerState.cpp:61
std::string StateToString(States eState)
Converts a state object to a string.
Definition State.hpp:85
States
The states that the state machine can be in.
Definition State.hpp:31
Here is the call graph for this function:

The documentation for this class was generated from the following files: