17 #include <std_msgs/String.h> 24 QNode(argc,argv,
"qadd_server")
32 bool QAdd::add(qt_tutorials::TwoInts::Request &req, qt_tutorials::TwoInts::Response &res) {
33 res.sum = req.a + req.b;
37 std::stringstream logging_msg;
38 logging_msg <<
"[ INFO] [" <<
ros::Time::now() <<
"]: " << req.a <<
" + " << req.b <<
" = " << res.sum;
39 QVariant new_row(QString(logging_msg.str().c_str()));
47 std::cout <<
"Ros shutdown, proceeding to close the gui." << std::endl;
bool add(qt_tutorials::TwoInts::Request &req, qt_tutorials::TwoInts::Response &res)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
ros::ServiceServer add_server
#define ROS_INFO_STREAM(args)
QAdd(int argc, char **argv)
Ros communication central!