
#ifndef SRC_ROSMAPINFO_H
#define SRC_ROSMAPINFO_H

#include <ros/callback_queue.h>
#include <ros/ros.h>

#include "CoordSys.h"
#include "Gaussian.h"
#include "MapInfo.hpp"
#include "Thread.h"
#include "adu_msgs/AduToMMInfo.h"
#include "hu_msgs/DisplayObj.h"
#include "localization_msgs/Localization.h"

namespace jf {
class RosMapInfo : public Thread {
   public:
    RosMapInfo();
    bool Start();
    bool Stop();
    U32 run();

    void CallBack_ReceiveLocalization(const localization_msgs::Localization& localizaitionMsg);
    void CallBack_ReceiveAduToMM(const adu_msgs::AduToMMInfo& aduToMMInfoMsg);

    void HUInfoHandle();
    void EdgeInfoExport(HdLinkId& hdLinkId, HdLaneId& hdLaneId, Point& pointIn, hu_msgs::DisplayObj& displayObj);
    void TargetsInfoExport(const std::vector<double>& dev, hu_msgs::DisplayObj& displayObj);
    bool coordinateTranslation(const std::vector<double>& obj, const std::vector<double>& dev, jf::Point& result);
    void PathSelectInfoExport(const std::vector<double>& dev, hu_msgs::DisplayObj& displayObj);

   private:
    MapInfo mapInfo;
    ros::CallbackQueue my_queue;

    ros::NodeHandle node;
    ros::Subscriber sub1;
    ros::Subscriber sub2;
    ros::Publisher publisher_hu;

    adu_msgs::AduToMMInfo aduToMmInfo;
    localization_msgs::Localization localization;
};

}  // namespace jf
#endif  // SRC_ROSMAPINFO_H
