From 2c64f82c9ea19a39cee081643c358f492f581f41 Mon Sep 17 00:00:00 2001 From: xinyang Date: Sun, 18 Aug 2019 11:59:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- armor/include/armor_finder/armor_finder.h | 12 ++++++------ others/include/additions.h | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/armor/include/armor_finder/armor_finder.h b/armor/include/armor_finder/armor_finder.h index 39c00e1..9dc6a8a 100644 --- a/armor/include/armor_finder/armor_finder.h +++ b/armor/include/armor_finder/armor_finder.h @@ -79,13 +79,13 @@ public: explicit ArmorBox(const cv::Rect &pos=cv::Rect2d(), const LightBlobs &blobs=LightBlobs(), uint8_t color=0, int i=0); - cv::Point2f getCenter() const; - double getBlobsDistance() const; - double lengthDistanceRatio() const; - double getBoxDistance() const; - BoxOrientation getOrientation() const; + cv::Point2f getCenter() const; // 获取装甲板中心 + double getBlobsDistance() const; // 获取两个灯条中心间距 + double lengthDistanceRatio() const; // 获取灯条中心距和灯条长度的比值 + double getBoxDistance() const; // 获取装甲板到摄像头的距离 + BoxOrientation getOrientation() const; // 获取装甲板朝向(误差较大,已弃用) - bool operator<(const ArmorBox &box) const; + bool operator<(const ArmorBox &box) const; // 装甲板优先级比较 }; typedef std::vector ArmorBoxes; diff --git a/others/include/additions.h b/others/include/additions.h index 1cbaa7a..71c7a89 100644 --- a/others/include/additions.h +++ b/others/include/additions.h @@ -11,14 +11,14 @@ #include // 单片机端回传数据结构体 struct McuData { - float curr_yaw; - float curr_pitch; - uint8_t state; - uint8_t mark; - uint8_t anti_top; - uint8_t enemy_color; - int delta_x; - int delta_y; + float curr_yaw; // 当前云台yaw角度 + float curr_pitch; // 当前云台pitch角 + uint8_t state; // 当前状态,自瞄-大符-小符 + uint8_t mark; // 云台角度标记位 + uint8_t anti_top; // 是否为反陀螺模式 + uint8_t enemy_color; // 敌方颜色 + int delta_x; // 能量机关x轴补偿量 + int delta_y; // 能量机关y轴补偿量 }; extern McuData mcu_data;