RosInterface.hpp 826 Bytes
Newer Older
oscar's avatar
oscar committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#ifndef _JFX_BOSCH_ROS_INTERFACE_H_
#define _JFX_BOSCH_ROS_INTERFACE_H_

#include <ros/ros.h>

#include "InterfaceDefine.hpp"
#include "MapInterface.hpp"
#include "bs_map_msgs/MapDataMsgs.h"
#include "gnss_wheel_msgs/adma_data_msgs.h"

namespace jf {
class RosInterface {
   public:
    RosInterface(const std::string& prj_dir, const std::string& cfg_dir, int tgt_len);
    ~RosInterface();

   public:
    void ReceiveAdma(const gnss_wheel_msgs::adma_data_msgs::ConstPtr& msg);

    // 发布地图匹配结果
    void PublishMapData(const MapData& data);

   private:
    void TestProgram(const bs_map_msgs::MapDataMsgs& msg);

   private:
    ros::NodeHandle m_nhdNodeHandle;
    ros::Subscriber m_subAdama;
    ros::Publisher m_pubMapData;

    MapInterface m_miLib;
};
}  // namespace jf
#endif  // _JFX_ROS_INTERFACE_H_