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
RecordingHandler.h
Go to the documentation of this file.
1
10
11#ifndef RECORDING_HANDLER_H
12#define RECORDING_HANDLER_H
13
18
20#include <opencv2/opencv.hpp>
21#include <vector>
22
24
25
35class RecordingHandler : public AutonomyThread<void>
36{
37 public:
39 // Define public enumerators specific to this class.
41
42 // Enum used to select which mode the recorder should run in.
43 enum class RecordingMode
44 {
45 eCameraHandler, // Record video feeds from the CameraHandler.
46 eTagDetectionHandler, // Record video feeds from the TagDetectionHandler.
47 eObjectDetectionHandler // Record video feeds from the ObjectDetectionHandler.
48 };
49
51 // Declare public class methods and variables.
53
54 RecordingHandler(RecordingMode eRecordingMode);
56
58 // Mutators.
60
61 void SetRecordingFPS(const int nRecordingFPS);
62
64 // Accessors.
66
67 int GetRecordingFPS() const;
68
69 private:
71 // Declare private methods.
73
74 void ThreadedContinuousCode() override;
75 void PooledLinearCode() override;
82
84 // Declare private class member variables.
86
87 int m_nTotalVideoFeeds;
88 RecordingMode m_eRecordingMode;
89 std::vector<std::shared_ptr<ZEDCamera>> m_vZEDCameras;
90 std::vector<std::shared_ptr<BasicCamera>> m_vBasicCameras;
91 std::vector<std::shared_ptr<TagDetector>> m_vTagDetectors;
92 std::vector<std::shared_ptr<ObjectDetector>> m_vObjectDetectors;
93 std::vector<cv::VideoWriter> m_vCameraWriters;
94 std::vector<bool> m_vRecordingToggles;
95 std::vector<cv::Mat> m_vFrames;
96 std::vector<cv::cuda::GpuMat> m_vGPUFrames;
97 std::vector<std::future<bool>> m_vFrameFutures;
98};
99#endif
Defines and implements the BasicCamera interface class.
Implements the ObjectDetector class.
Provides aruco detection and pose estimation capabilities in a multithreaded fashion using both OpenC...
Defines the ZEDCam class.
AutonomyThread()
Definition AutonomyThread.hpp:77
void SetRecordingFPS(const int nRecordingFPS)
Mutator for the desired FPS for all camera recordings.
Definition RecordingHandler.cpp:687
RecordingHandler(RecordingMode eRecordingMode)
Construct a new Recording Handler:: Recording Handler object.
Definition RecordingHandler.cpp:29
void ThreadedContinuousCode() override
This code will run continuously in a separate thread. New frames from the cameras that have recording...
Definition RecordingHandler.cpp:113
void UpdateRecordableTagDetectors()
This method is used internally by the class to update the number of TagDetectors that have recording ...
Definition RecordingHandler.cpp:436
void UpdateRecordableObjectDetectors()
This method is used internally by the class to update the number of ObjectDetectors that have recordi...
Definition RecordingHandler.cpp:560
void RequestAndWriteTagDetectorFrames()
This method is used internally by the RecordingHandler to request and write frames to from the TagDet...
Definition RecordingHandler.cpp:510
int GetRecordingFPS() const
Accessor for the desired FPS for all camera recordings.
Definition RecordingHandler.cpp:701
void UpdateRecordableCameras()
This method is used internally by the class to update the number of cameras that have recording enabl...
Definition RecordingHandler.cpp:172
void RequestAndWriteObjectDetectorFrames()
This method is used internally by the RecordingHandler to request and write frames to from the Object...
Definition RecordingHandler.cpp:637
~RecordingHandler()
Destroy the Recording Handler:: Recording Handler object.
Definition RecordingHandler.cpp:90
void RequestAndWriteCameraFrames()
This method is used internally by the RecordingHandler to request and write frames to from the camera...
Definition RecordingHandler.cpp:313
void PooledLinearCode() override
This method holds the code that is ran in the thread pool started by the ThreadedLinearCode() method....
Definition RecordingHandler.cpp:162