Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00061 #include <ros/ros.h>
00062 #include <list>
00063 #include <sstream>
00064 
00065 #include <std_msgs/String.h>
00066 
00067 
00068 #include <rawlog_play/SetRawlogFile.h>
00069 #include <rawlog_play/Play.h>
00070 #include <rawlog_play/Pause.h>
00071 #include <rawlog_play/Resume.h>
00072 
00073 
00074 #include <mrpt_bridge/laser_scan.h>
00075 
00076 #include <mrpt/utils/CFileGZInputStream.h>
00077 
00078 using namespace std;
00079 using namespace mrpt::utils;
00080 
00081 
00082 
00083 
00084 
00085 string              rawlog_fil;
00086 CFileGZInputStream  rawlog_fil_stream;
00087 
00088 
00089 
00090 
00091 bool srv_setrawlogfile(rawlog_play::SetRawlogFile::Request  &req,
00092          rawlog_play::SetRawlogFile::Response &res )
00093 {
00094 
00095   return true;
00096 }
00097 
00098 
00099 
00100 
00101 
00102 int main(int argc, char **argv)
00103 {
00104         
00105         ros::init(argc, argv, "rawlog_play");
00106 
00107         
00108         ros::NodeHandle private_nh_("~");
00109         if (!private_nh_.getParam(string("rawlog_file"),rawlog_fil))
00110         {
00111                 
00112         }
00113 
00114         
00115         ros::NodeHandle node;
00116 
00117         
00118         ros::ServiceServer srv1 = node.advertiseService("set_rawlog_file", srv_setrawlogfile);
00119 
00120 
00121         
00122         std::list<ros::Publisher> pub_topics;
00123         pub_topics.push_back( node.advertise<std_msgs::String>("chatter", 1000) );
00124 
00125         ros::Rate loop_rate(1000);  
00126 
00127         while (ros::ok())
00128         {
00129                 std_msgs::String msg;
00130 
00131                 std::stringstream ss;
00132                 ss << "hello world ";
00133                 msg.data = ss.str();
00134 
00135                 ROS_INFO("%s", msg.data.c_str());
00136 
00137                 pub_topics.begin()->publish(msg);
00138 
00139                 
00140                 ros::spinOnce();
00141                 loop_rate.sleep();
00142         }
00143 
00144 
00145         return 0; 
00146 }