Go to the documentation of this file.00001
00007 #include <ros/ros.h>
00008 #include <ros/console.h>
00009
00010 #include <lj_laser/jockey.h>
00011
00012 int main(int argc, char **argv)
00013 {
00014 ros::init(argc, argv, "localizing_jockey");
00015 ros::NodeHandle nh("~");
00016
00017
00018 if(ros::console::set_logger_level(ROSCONSOLE_DEFAULT_NAME, ros::console::levels::Debug))
00019 {
00020 ros::console::notifyLoggerLevelsChanged();
00021 }
00022
00023 std::string localizing_jockey_server;
00024 std::string default_server_name = ros::this_node::getName();
00025 default_server_name += "_server";
00026 nh.param<std::string>("localizing_jockey_server_name", localizing_jockey_server, default_server_name);
00027
00028
00029 if (!nh.hasParam("frontier_width"))
00030 {
00031 ROS_ERROR("Parameter %s/frontier_width not set, exiting", nh.getNamespace().c_str());
00032 return 1;
00033 }
00034 double frontier_width;
00035 nh.param<double>("frontier_width", frontier_width, 0.0);
00036
00037 lj_laser::Jockey jockey(localizing_jockey_server, frontier_width);
00038
00039 ROS_INFO_STREAM(ros::this_node::getName() << " started (with action server " << jockey.getName() << ")");
00040 ros::spin();
00041 return 0;
00042 }
00043