void 
HeadGestures::gestureCallback(const std_msgs::String::ConstPtr& msg)
{
  string str = msg->data;
  boost::algorithm::to_lower(str);
  if (str == "shake")
  {
    startShake();
  }
  else if (str == "nod")
  {
    startNod();
  }
  else if (str == "start_tracking")
  {
    std_msgs::String msg;
    msg.data = "start";
    head_tracking_pub_.publish<std_msgs::String>(msg); 
  }
  else if (str == "stop_tracking")
  {
    std_msgs::String msg;
    msg.data = "stop";
    head_tracking_pub_.publish<std_msgs::String>(msg); 
  }    
}
Example #2
0
void ChatForm::receiveSuccess(QHostAddress senderIp, quint16 senderPort, ChatMessage message){
    qDebug() << message.getSenderUuid() << receiver->getUuid();
    if(message.getSenderUuid() == receiver->getUuid()) {
        if(message.getContent() == ":/shake") {
            startShake();
        }
        ChatRecord *record = new ChatRecord(message);
        mChatRecords.append(record);
        updateChatRecordView();
    }
}