欢迎来到牛牛题库网 牛牛题库官网
logo

单项选择题

创建一个Publisher,发布的topic为"mytopic", msg类型为std_msgs/Int32
以下创建方法正确的是:

A.ros::NodeHandle nh; ros::Publisher pub = nh.advertise("mytopic", std_msgs::Int32,10);
B.ros::Publisher  pub("mytopic", std_msgs::Int32,10);
C.ros::Publisher pub("mytopic", 10);
D.ros::NodeHandle nh; ros::Publisher pub = nh.advertise("mytopic", 10);
点击查看答案&解析
微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题