Writing a simple publisher and subscriber (C++)ROS2发布者订阅者
#include#include#include#include#include"rclcpp/rclcpp.hpp"#include"std_msgs/msg/string.hpp"usingnamespacestd::chrono_literals;/*ThisexamplecreatesasubclassofNodeandusesstd::bind()toregistera*memberfu