![]() |
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.
|
Example file that demonstrates opening and using multiple different features of the basic camera. More...
#include "../../../src/AutonomyGlobals.h"#include "../../../src/AutonomyLogging.h"#include "../../../src/util/ExampleChecker.h"#include "../../../src/vision/cameras/BasicCam.h"
Go to the source code of this file.
Functions | |
| void | RunExample () |
| This example demonstrates the proper way to interact with the CameraHandler. A pointer to a BasicCam is retrieved and then a couple of local cv::Mat are created for storing frames. Then, the frames are passed to the RequestFrameCopy function of the camera and a future is IMMEDIATELY returned. The method call doesn't wait for frame to be retrieved/copied before returning. This allows you to request multiple frames/data from the camera non-sequentially. | |
Example file that demonstrates opening and using multiple different features of the basic camera.
| void RunExample | ( | ) |
This example demonstrates the proper way to interact with the CameraHandler. A pointer to a BasicCam is retrieved and then a couple of local cv::Mat are created for storing frames. Then, the frames are passed to the RequestFrameCopy function of the camera and a future is IMMEDIATELY returned. The method call doesn't wait for frame to be retrieved/copied before returning. This allows you to request multiple frames/data from the camera non-sequentially.
Inside the camera thread, the cv::Mat pointer that points to the cv::Mat within THIS class is written to and an std::promise is set to TRUE. The future that was return now contains this TRUE value. When the get() method is called on the returned future, the code will block until the promise is fulfilled (set to TRUE). Once the get() method returns, the cv::Mat within this class now contains a complete frame and can be display or used in other computer vision things.
