Conversational Gaze Aversion for Humanlike Robots

https://github.com/Wisc-HCI/robot-gaze-aversion

Gaze Model Pseudocode

bool AdvanceGazeShift(float dt) { //repeatedly called every frame throughout the gaze shift
   Recalulate_Velocities();
   Recalculate_Effective_OMR();
   bool Head_Target_Reached = Apply_Head_Rotation(dt * Current_Head_Velocity);
   bool Left_Eye_Target_Reached = Apply_Eye_Rotation(Left_Eye, dt * Current_Eye_Velocity);
   bool Right_Eye_Target_Reached = Apply_Eye_Rotation(Right_Eye, dt * Current_Eye_Velocity);
   return (Head_Target_Reached && Left_Eye_Target_Reached && Right_Eye_Target_Reached);
}

bool Apply_Head_Rotation(float Distance_To_Rotate) {
   if (Final_Alignment_Reached())
      return true;
   else {
      rotate the head towards the target by Distance_To_Rotate
      return false;
   }
}

bool Apply_Eye_Rotation(Joint Eye, float Distance_To_Rotate) {
   if (Eye.TargetAcquired()) {
      If necessary, simulate VOR by rotating eyes back to offset head rotation and maintain eye contact with the target;
      return true;
   }
   if (Eye.Reached_OMR())
      return false;
   else {
      rotate Eye towards the target by Distance_To_Rotate;
      return false;
   }
}


Recalculate_Velocites() simply calculates the current head and eye velocities based on the precomputed velocity profile and the current progress of the gaze shift.

Recalculate_Effective_OMR() uses the equations given in the report below.


Materials:

Video 1 (Affiliative Gaze) | Video 2 (Referential Gaze)