nucManager.cpp
Go to the documentation of this file.
00001 #include "../include/nucManager.hpp"
00002 
00003 int main(int argc, char** argv) {
00004         
00005 
00006   //ros::Rate loop_rate(5);
00007   ROS_INFO("Node nucManager launched.");
00008   
00009   ros::init(argc, argv, "nucManager");
00010   
00011   
00012   nucManager NUC;
00013   
00014   
00015   ros::Rate loop_rate(5);
00016   
00017   while (ros::ok())
00018   {
00019     ros::spinOnce();
00020     
00021     NUC.setFlag();
00022     
00023     NUC.publish();
00024     
00025     loop_rate.sleep();
00026   }
00027   
00028   
00029   return 0;
00030  
00031 }
00032 
00033 
00034 void nucManager::setFlag()
00035 {
00036 
00037   if (quadBuffer.size() > 1)
00038   {
00039     //std::cout << "quadBuffer[0] = " << std::abs(quadBuffer[0] - quadBuffer[1]) << std::endl;
00040     //std::cout << "quadBuffer[1] = " << quadBuffer[1] << std::endl;
00041     
00042     if (std::abs( quadBuffer[0] - quadBuffer[1] ) > rotThreshold)
00043     {
00044       nuc_msg.data = 0;
00045     }
00046     else
00047     {
00048       nuc_msg.data = 1;
00049     }
00050   }
00051 };
00052 
00053 float nucManager::getStatus()
00054 {
00055   return (float)nuc_msg.data;
00056 }
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 


thermalvis
Author(s): Stephen Vidas
autogenerated on Sun Jan 5 2014 11:38:45