commit 465c7ad745933c7ce0ce22de1041bc38d2400ac8
Author: Florian Lier <flier@techfak.uni-bielefeld.de>
Date:   Thu Jun 2 14:26:33 2016 +0200

    python client: implemented lookat()

diff --git a/client/python/hlrc_client/RobotController.py b/client/python/hlrc_client/RobotController.py
index cc50a25..386978b 100644
--- a/client/python/hlrc_client/RobotController.py
+++ b/client/python/hlrc_client/RobotController.py
@@ -41,14 +41,13 @@ class RobotController:
         # create nice and actually usable formatter and add it to the handler
         self.config_logger(loglevel)
 
-        #store
+        # store
         self.scope = scope
         self.mw = mw_name
         self.loglevel = loglevel
 
         self.middleware = None
 
-
         if (self.mw.upper() == "RSB"):
             self.logger.info("creating new middleware connection via RSB")
             try:
@@ -57,7 +56,7 @@ class RobotController:
                 self.logger.error("failed to import RSB or the necessary data types: {}".format(e))
                 sys.exit(errno.EINVAL)
 
-            #import worked, safe to intantiate RSB mw now
+            # import worked, safe to intantiate RSB mw now
             self.middleware = MiddlewareRSB(self.scope, self.loglevel)
 
         elif (self.mw.upper() == "ROS"):
@@ -68,7 +67,7 @@ class RobotController:
                 self.logger.error("failed to import ROS or the necessary data types: {}".format(e))
                 sys.exit(errno.EINVAL)
 
-            #import worked, safe to intantiate RSB mw now
+            # import worked, safe to intantiate RSB mw now
             self.middleware = MiddlewareROS(self.scope, self.loglevel)
         else:
             self.logger.error("invalid middleware requested (%s). supported: {ROS, RSB}\n\n" % (self.mw))
@@ -88,12 +87,12 @@ class RobotController:
         """
         formatter = logging.Formatter('%(asctime)s %(name)-30s %(levelname)-8s > %(message)s')
         ch = logging.StreamHandler()
-        #ch.setLevel(level)
+        # ch.setLevel(level)
         ch.setFormatter(formatter)
         self.logger.setLevel(level)
         self.logger.addHandler(ch)
 
-    def set_current_emotion(self, robot_emotion, blocking = False):
+    def set_current_emotion(self, robot_emotion, blocking=False):
         """set the current emotion
         :param robot_emotion: a RobotEmotion object
         :param blocking: should this call block during execution?
@@ -101,7 +100,7 @@ class RobotController:
         self.logger.debug("set_current_emotion(%s) %s" % (robot_emotion, ("BLOCKING" if blocking else "NON_BLOCKING")))
         self.middleware.set_current_emotion(robot_emotion, blocking)
 
-    def set_default_emotion(self, robot_emotion, blocking = False):
+    def set_default_emotion(self, robot_emotion, blocking=False):
         """set the default emotion
         :param robot_emotion: a RobotEmotion object
         :param blocking: should this call block during execution?
@@ -109,7 +108,7 @@ class RobotController:
         self.logger.debug("set_default_emotion(%s) %s" % (robot_emotion, ("BLOCKING" if blocking else "NON_BLOCKING")))
         self.middleware.set_default_emotion(robot_emotion, blocking)
 
-    def set_gaze_target(self, robot_gaze, blocking = False):
+    def set_gaze_target(self, robot_gaze, blocking=False):
         """set a gaze target
         :param robot_gaze: a RobotGaze object
         :param blocking: should this call block during execution?
@@ -118,7 +117,16 @@ class RobotController:
         self.logger.debug("set_gaze_target(%s) %s" % (robot_gaze, ("BLOCKING" if blocking else "NON_BLOCKING")))
         self.middleware.set_gaze_target(robot_gaze, blocking)
 
-    def set_mouth_target(self, robot_mouth, blocking = False):
+    def set_lookat_target(self, x, y, z, blocking=False, frame_id='', roll=0.0):
+        """set a gaze at a Cartesian position
+        :param x,y,z: position to look at (in eyes frame or frame_id)
+        :param roll: side-ways motion of head
+        :param blocking: True if this call should block until execution finished on robot
+        """
+        self.logger.debug("set_lookat_target(%s) %s" % ((x,y,z), "BLOCKING" if blocking else "NON_BLOCKING"))
+        self.middleware.set_lookat_target(x, y, z, blocking, frame_id, roll)
+
+    def set_mouth_target(self, robot_mouth, blocking=False):
         """set a mouth target
         :param robot_mouth: a RobotMouth object
         :param blocking: should this call block during execution?
@@ -126,7 +134,7 @@ class RobotController:
         self.logger.debug("set_mouth_target(%s) %s" % (robot_mouth, ("BLOCKING" if blocking else "NON_BLOCKING")))
         self.middleware.set_mouth_target(robot_mouth, blocking)
 
-    def set_head_animation(self, robot_animation, blocking = False):
+    def set_head_animation(self, robot_animation, blocking=False):
         """set a head animation
         :param robot_animation: a RobotAnimation object
         :param blocking: should this call block during execution?
@@ -134,15 +142,10 @@ class RobotController:
         self.logger.debug("set_head_animation(%s) %s" % (robot_animation, ("BLOCKING" if blocking else "NON_BLOCKING")))
         self.middleware.set_head_animation(robot_animation, blocking)
 
-    def set_speak(self, text, blocking = False):
+    def set_speak(self, text, blocking=False):
         """request the robot to say something using tts
         :param text: text to synthesize
         :param blocking: should this call block during execution?
         """
         self.logger.debug("set_speak(%s) %s" % (text, ("BLOCKING" if blocking else "NON_BLOCKING")))
         self.middleware.set_speak(text, blocking)
-
-    #def get_gaze_target(self):
-    #       result = self.middleware.get_gaze_target()
-    #       self.logger.debug("get_gaze_target() returned %s" % (result))
-    #       return self.middleware.get_gaze_target()
