Skip to content

Commit

Permalink
Merge pull request #217 from MissouriMRDT/hotfix/cleanup-includes
Browse files Browse the repository at this point in the history
Cleanup Includes
  • Loading branch information
ClayJay3 authored Mar 23, 2024
2 parents 454089b + c43e828 commit abe093e
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 21 deletions.
3 changes: 3 additions & 0 deletions external/threadpool/BSThreadPool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* classes and definitions. No other files are needed in order to use the thread pool itself.
*/

/// \cond
#include <chrono> // std::chrono
#include <condition_variable> // std::condition_variable
#include <cstddef> // std::size_t
Expand All @@ -31,6 +32,8 @@
#include <utility> // std::forward, std::move
#include <vector> // std::vector

/// \endcond

/**
* @brief A namespace used by Barak Shoshany's projects.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/interfaces/TensorflowTPU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@

#include "../AutonomyLogging.h"

/// \cond
#include <edgetpu.h>
#include <tensorflow/lite/builtin_ops.h>
#include <tensorflow/lite/interpreter.h>
#include <tensorflow/lite/kernels/register.h>
#include <tensorflow/lite/model.h>
#include <vector>

/// \endcond

/******************************************************************************
* @brief This class is designed to enable quick, easy, and robust handling of .tflite
* models for deployment and inference on the Coral EdgeTPU Accelerator.
Expand Down
7 changes: 0 additions & 7 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
* @copyright Copyright Mars Rover Design Team 2023 - All Rights Reserved
******************************************************************************/

#include <csignal>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <thread>

#include "./AutonomyGlobals.h"
#include "./AutonomyLogging.h"
#include "./AutonomyNetworking.h"
Expand Down
3 changes: 3 additions & 0 deletions src/util/vision/ArucoSamplesUtility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ or tort (including negligence or otherwise) arising in any way out of
the use of this software, even if advised of the possibility of such damage.
*/

/// \cond
#include <ctime>
#include <opencv2/calib3d.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/objdetect/aruco_detector.hpp>

/// \endcond

namespace
{
inline static bool readCameraParameters(std::string filename, cv::Mat& camMatrix, cv::Mat& distCoeffs)
Expand Down
1 change: 0 additions & 1 deletion src/util/vision/FetchContainers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#define FETCH_CONTAINERS_HPP

/// \cond

#include <future>
#include <opencv2/opencv.hpp>
#include <sl/Camera.hpp>
Expand Down
3 changes: 3 additions & 0 deletions src/util/vision/YOLOModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
#include "../../AutonomyConstants.h"
#include "../../interfaces/TensorflowTPU.hpp"

/// \cond
#include <opencv2/opencv.hpp>

/// \endcond

/******************************************************************************
* @brief Namespace containing functions or objects/struct used to aid in easy use
* of YOLO models. Namespace can contain other namespace pertaining to the method
Expand Down
10 changes: 6 additions & 4 deletions src/vision/objects/DepthDetection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
#ifndef DEPTH_DETECTION_HPP
#define DEPTH_DETECTION_HPP

#include <vector>

#include <opencv2/opencv.hpp>

#include "../../AutonomyConstants.h"
#include "../../AutonomyLogging.h"
#include "../../util/GeospatialOperations.hpp"
#include "../../util/vision/ImageOperations.hpp"

/// \cond
#include <opencv2/opencv.hpp>
#include <vector>

/// \endcond

/******************************************************************************
* @brief Namespace containing functions related to object detection operations
* using depth measures and images.
Expand Down
11 changes: 7 additions & 4 deletions src/vision/objects/ObjectDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@
#ifndef OBJECT_DETECTOR_H
#define OBJECT_DETECTOR_H

#include <future>
#include <shared_mutex>
#include <vector>

#include "../../interfaces/AutonomyThread.hpp"
#include "../../vision/cameras/BasicCam.h"
#include "../../vision/cameras/ZEDCam.h"
#include "./DepthDetection.hpp"
#include "./TensorflowObjectDetection.hpp"

/// \cond
#include <future>
#include <shared_mutex>
#include <vector>

/// \endcond

/******************************************************************************
* @brief This class implements a modular and easy to use object detector for a single
* camera. Given a camera name, this class will detect objects using the depth measure
Expand Down
10 changes: 6 additions & 4 deletions src/vision/objects/TensorflowObjectDetection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
#ifndef TENSORFLOW_OBJECT_DETECTION_HPP
#define TENSORFLOW_OBJECT_DETECTION_HPP

#include <vector>

#include <opencv2/opencv.hpp>

#include "../../AutonomyConstants.h"
#include "../../AutonomyLogging.h"
#include "../../util/GeospatialOperations.hpp"

/// \cond
#include <opencv2/opencv.hpp>
#include <vector>

/// \endcond

/******************************************************************************
* @brief Namespace containing functions related to tensorflow object detection
* operations on images.
Expand Down
5 changes: 4 additions & 1 deletion tests/Unit/src/algorithms/controllers/PIDController.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
* @copyright Copyright MRDT 2023 - All Rights Reserved
******************************************************************************/

#include "../../../../../src/algorithms/controllers/PIDController.h"

/// \cond
#include <array>
#include <chrono>
#include <gtest/gtest.h>

#include "../../../../../src/algorithms/controllers/PIDController.h"
/// \endcond

/******************************************************************************
* @brief Check that PIDController doesn't leak any memory.
Expand Down

0 comments on commit abe093e

Please sign in to comment.