![]() |
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 ZED camera. More...
#include "../../../src/AutonomyConstants.h"#include "../../../src/AutonomyGlobals.h"#include "../../../src/AutonomyLogging.h"#include "../../../src/AutonomyNetworking.h"#include "../../../src/util/ExampleChecker.h"#include "../../../src/util/vision/ImageOperations.hpp"
Go to the source code of this file.
Functions | |
| std::string | PrintMatrix3f (const sl::Matrix3f &slMatrix) |
| Constructs a printable string out of a given Matrix3f data structure from the stereolabs library. | |
| void | RunExample () |
| This example demonstrates the proper way to interact with the CameraHandler. A pointer to a ZEDCam 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. | |
Variables | |
| const bool | ENABLE_SPATIAL_MAPPING = false |
Example file that demonstrates opening and using multiple different features of the ZED camera.
| std::string PrintMatrix3f | ( | const sl::Matrix3f & | slMatrix | ) |
Constructs a printable string out of a given Matrix3f data structure from the stereolabs library.
| slMatrix | - The matrix to print. |

| void RunExample | ( | ) |
This example demonstrates the proper way to interact with the CameraHandler. A pointer to a ZEDCam 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.
The same exact process happens for the positional tracking pose that is retrieved from the camera. Multiple other methods of the ZEDCam class work this way as it allows this thread and other threads to get multiple pieces of from the camera without slowing it down to an unusable speed.
