/robot_face/reset_background
#
Caution
This documentation page has been auto-generated.
It may be missing some details.
/robot_face/reset_background
Quick Facts
- Category
- Message type
Clears the background of the robot’s face/eyes if any. See Background and overlays. Note that this service can not be used to clear an overlay set via the /robot_face/overlay action – in that case, simply cancel the on-going action.
Quick snippets#
$ rosservice call /robot_face/reset_background std_srvs/Trigger
# (tip: press Tab to complete the message prototype)
How to use in your code#
1#!/usr/bin/env python
2
3import rospy
4from std_srvs.srv import *
5
6if __name__ == "__main__":
7
8 rospy.wait_for_service("/robot_face/reset_background")
9
10 try:
11 proxy = rospy.ServiceProxy("/robot_face/reset_background", Trigger)
12 response = proxy(args...) # check the std_srvs/Trigger message type for the expected arguments
13 rospy.loginfo(response)
14
15 except rospy.ServiceException as e:
16 rospy.logerror("Service call failed: %s" % e)
1#include "ros/ros.h"
2#include <std_srvs/Trigger.h>
3#include <iostream>
4
5using namespace ros;
6
7int main(int argc, char **argv)
8{
9 ros::init(argc, argv, "robot_face/reset_background_client");
10
11 NodeHandle n;
12 ServiceClient client = n.serviceClient<std_srvs::Trigger>("/robot_face/reset_background");
13 std_srvs::Trigger srv;
14
15 // TODO: adapt to the service parameters
16 // srv.request.a = ...;
17 // srv.request.b = ...;
18
19 if (client.call(srv))
20 {
21 // TODO: do something with the result
22 // srv.response....;
23 }
24 else
25 {
26 ROS_ERROR("Failed to call service /robot_face/reset_background");
27 return 1;
28 }
29
30 return 0;
31}