17 #include <std_msgs/String.h> 24 QNode(argc,argv,
"qadd_client")
37 qt_tutorials::TwoInts srv;
38 srv.request.a = count;
39 srv.request.b = last_sum;
40 std::stringstream logging_msg;
43 last_sum = srv.response.sum;
44 logging_msg <<
"[ INFO] [" <<
ros::Time::now() <<
"]: " << srv.request.a <<
" + " << srv.request.b <<
" = " << srv.response.sum;
48 logging_msg <<
"[ INFO] [" <<
ros::Time::now() <<
"]: failed to contact the server";
51 QVariant new_row(QString(logging_msg.str().c_str()));
56 std::cout <<
"Ros shutdown, proceeding to close the gui." << std::endl;
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
bool call(MReq &req, MRes &res)
#define ROS_INFO_STREAM(args)
QAdd(int argc, char **argv)
ros::ServiceClient add_client
ROSCPP_DECL void spinOnce()