HeartbeatGenerator.cpp
Go to the documentation of this file.
00001 #include <ros/ros.h>
00002 #include <std_msgs/Bool.h>
00003 
00004 int main(int argc, char **argv) {
00005   ros::init(argc,argv,"heartbeat_generator");
00006   ros::NodeHandle n;
00007   ros::Publisher hp;
00008   hp = n.advertise<std_msgs::Bool>("youbot_network_estopper/heartbeat",1);
00009 
00010   ros::Rate rate(10); //Hz
00011 
00012   while (n.ok()) {
00013     std_msgs::Bool b;
00014     b.data=true;
00015     hp.publish(b);
00016     ROS_INFO("BA-THUMP");
00017 
00018     ros::spinOnce();
00019     rate.sleep();
00020   }
00021 }


youbot_oodl
Author(s): Sebastian Blumenthal
autogenerated on Mon Oct 6 2014 09:06:15