Go to the documentation of this file.00001
00012 #include <ros/ros.h>
00013 #include <std_srvs/Empty.h>
00014
00015 using namespace std;
00016
00024 int main(int argc, char **argv)
00025 {
00026
00027 ros::init(argc, argv, "continuous_segmenter");
00028
00029 ros::NodeHandle node;
00030 ros::NodeHandle pnh("~");
00031 ros::ServiceClient segmentClient;
00032 segmentClient = node.serviceClient<std_srvs::Empty>("rail_segmentation/segment");
00033 std_srvs::Empty srv;
00034 double rate;
00035 pnh.param("segmentation_rate", rate, 0.5);
00036
00037 ros::Rate loop_rate(rate);
00038 while (ros::ok())
00039 {
00040 segmentClient.call(srv);
00041 ros::spinOnce();
00042 loop_rate.sleep();
00043 }
00044
00045 return EXIT_SUCCESS;
00046 }