icr_server_node.cpp
Go to the documentation of this file.
00001 
00006 #include <ros/ros.h>
00007 #include "../include/icr_server.h"
00008 
00009 
00011   //           MAIN              //
00013 
00014 
00015   //---------------------------------------------------------------------
00016   int main(int argc, char **argv)
00017   {
00018     ros::init(argc, argv, "icr_server");
00019 
00020     ICR::IcrServer icr_server;
00021     ROS_INFO("ICR server ready");
00022     while(ros::ok()) 
00023       {
00024         switch (icr_server.getComputationMode()) 
00025           {
00026           case MODE_CONTINUOUS : 
00027             icr_server.computeSearchZones();
00028             icr_server.computeIcr();
00029             icr_server.publish();
00030             break;
00031 
00032           case MODE_STEP_WISE : 
00033             icr_server.publish();
00034             break;
00035 
00036           default : 
00037             ROS_ERROR("%d is an invalid computation mode - ICR computation not possible",icr_server.getComputationMode());
00038           }
00039 
00040         ros::spinOnce();
00041       }
00042 
00043     return 0;
00044   }
00045   //---------------------------------------------------------------------
00046 


icr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:36:10