#include <ros/ros.h>
#include<ros_fb/message.h>
int main(int argc, char *argv[])
{
ros::init(argc,argv,"ros_fb_node");
ros::NodeHandle nh;
ros_fb::message msg;
msg.trueorfalse=1;
ros::Publisher pub=nh.advertise<ros_fb::message>("message_info",1);
ros::Rate loop_rate(1.0);
while(ros::ok())
{
msg.trueorfalse=!msg.trueorfalse;
ROS_INFO("post info is %d",msg.trueorfalse) ;
pub.publish(msg);
loop_rate.sleep();
}
return 0;
}
ros_topic poster
猜你喜欢
转载自blog.csdn.net/weixin_38768831/article/details/103739541
今日推荐
周排行