函数形式 Subscriber ros::NodeHandle::subscribe ( const std::string & topic, uint32_t queue_size, void(*)(M) fp, const TransportHints &transport_hints = TransportHints() ) 参数介绍 topic 为订阅的节点名,字符串类型。queue_size 为待处理信息队列大小。fp 当消息传入时,可以调用的函数指针,即回调函数。