3 #include "xbot_face/FaceResult.h" 4 #include "xbot_talker/chat.h" 5 #include "xbot_talker/play.h" 22 if (msg.face_exist ==
false) {
27 if ((msg.name ==
kehu) && (msg.confidence > 0.6)) {
36 xbot_talker::play srv;
38 srv.request.tts_text =
wenhou;
40 if (playclient.
call(srv)) {
41 ROS_INFO(
"Result: %d", srv.response.success);
46 xbot_talker::chat srv1;
47 srv1.request.start_chat =
true;
49 if (chatclient.
call(srv1)) {
50 ROS_INFO(
"Result: %d", srv1.response.chat_success);
59 int main(
int argc,
char** argv) {
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
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)
ROSCPP_DECL void spin(Spinner &spinner)
ros::ServiceClient chatclient
void faceCB(xbot_face::FaceResult msg)
ros::ServiceClient playclient