diff --git a/utils/utils.h b/utils/utils.h index 716e74b..ffad7ac 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -1,20 +1,7 @@ #pragma once -#include -#include -#include #include -namespace utils { - void waitForUserInput() - { - std::cout << "Press Enter to continue..."; - std::cin.ignore(std::numeric_limits::max(), '\n'); - - } -} - - namespace Type { struct Angle @@ -27,37 +14,6 @@ namespace Type struct RobotPose { cv::Point3f position; - Angle angle; - }; - - struct ArucoTag - { - int id; - std::string name; - float length; + float theta; // rotation around the y axis }; } - -namespace ArucoTagData -{ - inline Type::ArucoTag whiteFlower = { 36, "whiteFlower", 0.02f }; - inline Type::ArucoTag purpleFlower = { 13, "purpleFlower", 0.02f }; - inline Type::ArucoTag solarPanel = { 47, "solarPanel", 0.1f }; -} - -namespace draw -{ - // Function to draw a line from the center of an ArUco marker to a point with depth - void drawCenterPoints(cv::Mat& frame, const std::vector>& markerCorners, double depth) { - for (const auto& corners : markerCorners) { - cv::Point2f center(0, 0); - for (const auto& corner : corners) { - center += corner; - } - center *= (1.0 / corners.size()); // Average to find the center - - // Draw a line from the center of the marker to the point with depth - cv::line(frame, center, cv::Point(center.x, center.y + depth), cv::Scalar(0, 255, 0), 2); // Draw a green line - } - } -} \ No newline at end of file