graph_decoder系列(2)
承接上文 我们接着来看decoder_node.cpp的代码部分
void GraphDecoder::Init() {
/* initialize subscriber and publisher */
//graph_sub_ 订阅节点/robot_vgraph 其类型是visibility_graph_msg/Graph的消息
graph_sub_ = nh.subscribe("/robot_vgraph", 5, &GraphDecoder::GraphCallBack, this);
graph_pub_ = nh.advertise<visibility_graph_msg::Graph>("decoded_vgraph", 5);
graph_viz_pub_ = nh.advertise<MarkerArray>("/graph_decoder_viz",5);
this->LoadParmas();
save_graph_sub_ = nh.subscribe("/save_file_dir", 5, &GraphDecoder::SaveGraphCallBack, this);
read_graph_sub_ = nh.subscribe("