11 #include <std_msgs/String.h> 12 #include <rosserial_examples_msgs/Test.h> 16 using rosserial_examples::Test;
17 #define ROSSRVR_IP "192.168.15.122" 20 void svcCallback(
const Test::Request & req, Test::Response & res){
25 printf(
"Service request message: \"%s\" received, responding with: %s", res.output);
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
void svcCallback(const Test::Request &req, Test::Response &res)
ros::ServiceServer< Test::Request, Test::Response > server("test_srv",&svcCallback)