Explorar o código

添加识别子模块

LiuZe hai 1 ano
pai
achega
f0b72edb7c

+ 0 - 13
include/pahoc/main.cpp

@@ -1,13 +0,0 @@
-//
-// Created by zx on 2023/12/8.
-//
-
-#include "mqtt_communication.h"
-
-int main(int argc, char** argv) {
-    Tof3DMqttAsyncClient::iter()->init("mqtt.json");
-    while (1) {
-        usleep(1000 * 1000);
-    }
-    return 1;
-}

+ 0 - 35
include/pahoc/mqtt_communication.cpp

@@ -1,35 +0,0 @@
-#include "mqtt_communication.h"
-
-void Tof3DMqttAsyncClient::init(const std::string &file) {
-    m_message_arrived_callback_ = CloudDataArrived;
-
-    MqttAsyncClient::init_from_proto(file);
-
-//    condit = new Thread_condition();
-//
-//    t = new std::thread(&Tof3DMqttAsyncClient::run, this);
-//
-//    condit->notify_all(true);
-}
-
-// 识别结果数据包含识别结果、时间序号、具体识别信息
-int Tof3DMqttAsyncClient::CloudDataArrived(MqttAsyncClient *client, char *topicName, int topicLen,
-                                             MQTTAsync_message *message) {
-    // 1、查看识别结果
-
-    // 2、队列取数据
-//    cv::Mat merge_mat = cv::Mat::zeros(480 * 2, 640 * 2, CV_8UC1);
-//    memcpy(merge_mat.data, message->payload, message->payloadlen);
-//    cv::imshow("receive", merge_mat);
-    LOG(INFO) << topicName;
-
-    // 3、分离出四份点云
-
-    // 4、发送对应队列
-
-    return 1;
-}
-
-void Tof3DMqttAsyncClient::run() {
-
-}

+ 0 - 34
include/pahoc/mqtt_communication.h

@@ -1,34 +0,0 @@
-#pragma once
-
-#include <pcl/point_types.h>
-#include <pcl/point_cloud.h>
-
-#include "pahoc/mqtt_async.h"
-#include "tool/log.hpp"
-
-class Tof3DMqttAsyncClient : public MqttAsyncClient {
-public:
-    static Tof3DMqttAsyncClient *iter() {
-        static Tof3DMqttAsyncClient *instance = nullptr;
-        if (instance == nullptr) {
-            instance = new Tof3DMqttAsyncClient();
-        }
-        return instance;
-    }
-
-    void init(const std::string &file);
-
-protected:
-    Tof3DMqttAsyncClient() = default;
-
-private:
-    void run();
-
-    static int CloudDataArrived(MqttAsyncClient *client, char *topicName, int topicLen, MQTTAsync_message *message);
-
-public:
-
-private:
-    std::mutex m_cloud_mutex;
-
-};