device_report_client.cpp
Go to the documentation of this file.
1 #include "ros/ros.h"
2 #include "std_srvs/Trigger.h"
3 #include <cstdlib>
4 
5 
6 int main(int argc, char **argv){
7 
8  ros::init(argc, argv, "device_report_client");
9 
11  ros::ServiceClient client = n.serviceClient<std_srvs::Trigger>("DeviceReport");
12  std_srvs::Trigger srv;
13 
14 
15  if (client.call(srv))
16  {
17  if (srv.response.success)
18  {
19  ROS_INFO("success");
20  }
21  }
22  else
23  {
24  ROS_INFO("Failed to call service");
25  }
26  return 0;
27 }
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
bool call(MReq &req, MRes &res)
int main(int argc, char **argv)
#define ROS_INFO(...)


microstrain_mips
Author(s): Brian Bingham
autogenerated on Sun Dec 22 2019 03:54:45