private int GoToHumanLocation(int currentState, object o) { //this.cmdMan.ARMS_goto("standby", 8000); if (!cmdMan.MVN_PLN_getclose(currentOrder.x, currentOrder.y, 240000)) { if (!cmdMan.MVN_PLN_getclose(currentOrder.x, currentOrder.y, 240000)) { cmdMan.MVN_PLN_getclose(currentOrder.x, currentOrder.y, 240000); } } double x, y, angle; cmdMan.MVN_PLN_position(out x, out y, out angle, 2000); cmdMan.MVN_PLN_move(0.0, currentOrder.angle - angle, 60000); string foundHuman; if (currentOrder.wasAbleToRememberFace) { if (cmdMan.ST_PLN_findhuman(currentOrder.personName, "hdtilt hdpan", 7000, out foundHuman)) { brain.SayAsync("Here is your " + currentOrder.objectName + ", " + currentOrder.personName); } else { //cmdMan.HEAD_lookat(0.0, 0.0); brain.SayAsync(currentOrder.personName + ", please stand in front of me to take your " + currentOrder.objectName); } } else { if (cmdMan.ST_PLN_findhuman("human", "hdtilt hdpan", 7000, out foundHuman)) { brain.SayAsync("Here is your " + currentOrder.objectName); } else { //cmdMan.HEAD_lookat(0.0, 0.0); brain.SayAsync("Please stand in front of me to take your " + currentOrder.objectName); } } TextBoxStreamWriter.DefaultLog.WriteLine("Got back to " + currentOrder.personName + "'s position."); return((int)States.DeliverDrink); }