pc_estop_node.cpp
Go to the documentation of this file.
00001 
00013 #include <ros/ros.h>
00014 #include <std_msgs/Empty.h>
00015 
00023 int main(int argc, char **argv)
00024 {
00025   // initialize the node
00026   ros::init(argc, argv, "pc_estop");
00027 
00028   // main node handle
00029   ros::NodeHandle node;
00030 
00031   // grab the parameters
00032   ros::NodeHandle private_nh("~");
00033   double send_frequency;
00034   private_nh.param<double>("send_frequency", send_frequency, 3.0);
00035 
00036   //setup the publisher
00037   ros::Publisher estop_pub = node.advertise<std_msgs::Empty>("carl_estop", 1);
00038   std_msgs::Empty msg;
00039 
00040   //main publish loop
00041   ros::Rate loop_rate(send_frequency);
00042   while (ros::ok())
00043   {
00044     estop_pub.publish(msg);
00045     loop_rate.sleep();
00046   }
00047 
00048   return EXIT_SUCCESS;
00049 }


carl_estop
Author(s): Chris Dunkers
autogenerated on Tue Mar 8 2016 00:59:25