src
stop_transmission.cpp
Go to the documentation of this file.
1
#include "
ros/ros.h
"
2
#include "muse_v2_driver/StopTransmission.h"
3
4
int
main
(
int
argc,
char
** argv)
5
{
6
ros::init
(argc, argv,
"stop_transmission"
);
7
8
ros::NodeHandle
n;
9
10
ros::ServiceClient
client = n.
serviceClient
<muse_v2_driver::StopTransmission>(
"stop_transmission"
);
11
12
muse_v2_driver::StopTransmission srv;
13
14
srv.request.stop_transmission =
true
;
15
16
if
(client.
call
(srv))
17
{
18
ROS_INFO
(
"Stop Transmission: %s"
, srv.response.transmission_stopped ?
"true"
:
"false"
);
19
}
20
else
21
{
22
ROS_ERROR
(
"Failed to stop transmission."
);
23
return
1;
24
}
25
26
return
0;
27
}
ros::init
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
ros.h
ros::NodeHandle::serviceClient
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
ros::ServiceClient
main
int main(int argc, char **argv)
Definition:
stop_transmission.cpp:4
ROS_ERROR
#define ROS_ERROR(...)
ros::ServiceClient::call
bool call(const MReq &req, MRes &resp, const std::string &service_md5sum)
ROS_INFO
#define ROS_INFO(...)
ros::NodeHandle
muse_v2_driver
Author(s): Elisa Tosello
, Roberto Bortoletto
autogenerated on Thu Jan 20 2022 03:24:53