예제 #1
0
    def execute_cb(self, goal):
        r = rospy.Rate(1)
        rospy.loginfo("IdleServer: Executing idle state...")

        while True:
            # Check that preempt hasn't been requested by the client
            if self._as.is_preempt_requested():
                rospy.loginfo('%s: Preempted' % self._action_name)
                self._as.set_preempted()
                break

            # Sleep for a while
            r.sleep()

            # Increase "boredom" by lowering PAD values
            msg = EmotionalFeedback()
            val = -0.05
            msg.delta_pleasure = val
            msg.delta_arousal = val
            msg.delta_dominance = val

            self._publisher.publish(msg)
예제 #2
0
 def send_emotion(self, pleasure, arousal, dominance):
     msg = EmotionalFeedback()
     msg.delta_pleasure = pleasure
     msg.delta_arousal = arousal
     msg.delta_dominance = dominance
     self.publisher_emotional_feedback.publish(msg)