def conversational_saccade(self): # Switch to conversational (micro) saccade parameters msg = SaccadeCycle() msg.mean = 0.42 # saccade_micro_interval_mean msg.variation = 0.10 # saccade_micro_interval_var msg.paint_scale = 0.40 # saccade_micro_paint_scale # msg.eye_size = 16.0 # saccade_study_face_eye_size msg.eye_distance = 27.0 # saccade_study_face_eye_distance msg.mouth_width = 7.0 # saccade_study_face_mouth_width msg.mouth_height = 18.0 # saccade_study_face_mouth_height msg.weight_eyes = 0.4 # saccade_study_face_weight_eyes msg.weight_mouth = 0.6 # saccade_study_face_weight_mouth self.saccade_pub.publish(msg)
def listening_saccade(self): if not self.control_mode & self.C_SACCADE: return # Switch to conversational (micro) saccade parameters msg = SaccadeCycle() msg.mean = 1 # saccade_micro_interval_mean msg.variation = 0.6 # saccade_micro_interval_var msg.paint_scale = 0.3 # saccade_micro_paint_scale # msg.eye_size = 11 # saccade_study_face_eye_size msg.eye_distance = 80 # saccade_study_face_eye_distance msg.mouth_width = 50 # saccade_study_face_mouth_width msg.mouth_height = 13.0 # saccade_study_face_mouth_height msg.weight_eyes = 0.8 # saccade_study_face_weight_eyes msg.weight_mouth = 0.2 # saccade_study_face_weight_mouth self.saccade_pub.publish(msg)
def explore_saccade(self): # Switch to conversational (micro) saccade parameters msg = SaccadeCycle() msg.mean = 1.6 # saccade_explore_interval_mean msg.variation = 0.11 # saccade_explore_interval_var msg.paint_scale = 0.70 # saccade_explore_paint_scale # From study face, maybe better default should be defined for # explore msg.eye_size = 16.0 # saccade_study_face_eye_size msg.eye_distance = 27.0 # saccade_study_face_eye_distance msg.mouth_width = 7.0 # saccade_study_face_mouth_width msg.mouth_height = 18.0 # saccade_study_face_mouth_height msg.weight_eyes = 0.4 # saccade_study_face_weight_eyes msg.weight_mouth = 0.6 # saccade_study_face_weight_mouth self.saccade_pub.publish(msg)
def explore_saccade(self): if not self.control_mode & self.C_SACCADE: return # Switch to conversational (micro) saccade parameters msg = SaccadeCycle() msg.mean = 0.8 # saccade_explore_interval_mean msg.variation = 0.3 # saccade_explore_interval_var msg.paint_scale = 0.3 # saccade_explore_paint_scale # From study face, maybe better default should be defined for # explore msg.eye_size = 15 # saccade_study_face_eye_size msg.eye_distance = 100 # saccade_study_face_eye_distance msg.mouth_width = 90 # saccade_study_face_mouth_width msg.mouth_height = 27 # saccade_study_face_mouth_height msg.weight_eyes = 0.8 # saccade_study_face_weight_eyes msg.weight_mouth = 0.2 # saccade_study_face_weight_mouth self.saccade_pub.publish(msg)
def saccade(self, mean, variation, paint_scale, eye_size, eye_distance, mouth_width, mouth_height, weight_eyes, weight_mouth): """ Set the robot's eye saccade cycle, i.e. how the eye's twitch and move around automatically. :param float mean: :param float variation: :param float paint_scale: :param float eye_size: :param float eye_distance: :param float mouth_width: :param float mouth_height: :param float weight_eyes: :param float weight_mouth: :return: None Examples: ctrl = ActionCtrl() ctrl.saccade(0.8, 0.3, 1.0, 15.0, 100.0, 90.0, 27.0, 0.8, 0.2) # Explore-the-room when not conversing ctrl.saccade(0.8, 0.5, 0.3, 11.5, 100.0, 90.0, 5.0, 0.8, 0.2) # Variation 1: study face being looked at # during conversation ctrl.saccade(1.0, 0.6, 0.3, 11.0, 80.0, 50.0, 13.0, 0.8, 0.2) # Variation 2: study face being looked at #during conversation """ msg = SaccadeCycle() msg.mean = mean msg.variation = variation msg.paint_scale = paint_scale msg.eye_size = eye_size msg.eye_distance = eye_distance msg.mouth_width = mouth_width msg.mouth_height = mouth_height msg.weight_eyes = weight_eyes msg.weight_mouth = weight_mouth self.saccade_pub.publish(msg) rospy.logdebug( "published saccade(mean={}, variation={}, paint_scale={}, " "eye_size={}, eye_distance={}, mouth_width={}, mouth_height={}, " "weight_eyes={}, weight_mouth={})".format( mean, variation, paint_scale, eye_size, eye_distance, mouth_width, mouth_height, weight_eyes, weight_mouth))