2 #include "xbot_talker/play.h" 3 #include "xbot_talker/chat.h" 4 #include "xbot_face/FaceResult.h" 18 void faceCB(xbot_face::FaceResult msg){
24 if(msg.face_exist ==
false)
30 if((msg.name ==
kehu)&&(msg.confidence>0.6))
43 xbot_talker::play srv;
45 srv.request.tts_text =
wenhou;
47 if (playclient.
call(srv))
56 xbot_talker::chat srv1;
57 srv1.request.start_chat =
true;
59 if(chatclient.
call(srv1))
61 ROS_INFO(
"Result: %b", srv1.response.chat_success);
74 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())
ros::ServiceClient chatclient
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
bool call(MReq &req, MRes &res)
ROSCPP_DECL void spin(Spinner &spinner)
int main(int argc, char **argv)
ros::ServiceClient playclient
void faceCB(xbot_face::FaceResult msg)