commit 07e68eb7140ade3ddca37ff43f687ca7599d0bce
Author: sschulz <sschulz@techfak.uni-bielefeld.de>
Date:   Tue Feb 16 14:13:58 2016 +0100

    cleanup

diff --git a/examples/humotion_yarp_icub/CMakeLists.txt.user b/examples/humotion_yarp_icub/CMakeLists.txt.user
index 7d28466..b3db474 100644
--- a/examples/humotion_yarp_icub/CMakeLists.txt.user
+++ b/examples/humotion_yarp_icub/CMakeLists.txt.user
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 3.0.1, 2016-02-15T14:37:35. -->
+<!-- Written by QtCreator 3.0.1, 2016-02-16T13:25:29. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
diff --git a/examples/humotion_yarp_icub/src/icub_faceinterface.cpp b/examples/humotion_yarp_icub/src/icub_faceinterface.cpp
index 5feb7ba..3158a6b 100644
--- a/examples/humotion_yarp_icub/src/icub_faceinterface.cpp
+++ b/examples/humotion_yarp_icub/src/icub_faceinterface.cpp
@@ -28,6 +28,7 @@
 #include "humotion_yarp_icub/icub_faceinterface.h"
 
 #include <boost/format.hpp>
+#include <boost/lexical_cast.hpp>
 
 #include <algorithm>
 #include <string>
@@ -46,18 +47,26 @@ iCubFaceInterface::iCubFaceInterface(std::string _scope) {
     std::string emotion_scope = scope + "/face/raw/in";
     cout << "opening connection to '"<< emotion_scope << "'\n";
 
+    bool init_ok = true;
     for (int i = 0; i < 4; i++) {
         // strange, if we use one output port only the first command is executed?! flushing issues?
-        std::string emotion_port_out = "/emotionwriter" + std::to_string((unsigned long long)i);
+        std::string emotion_port_out = "/emotionwriter" + boost::lexical_cast<std::string>(i);
         if (!emotion_port[i].open(emotion_port_out.c_str())) {
             cerr << "ERROR: failed to open emotion port '" << emotion_port_out << "'\n";
-            exit(EXIT_FAILURE);
+            init_ok = false;
         }
         if (!Network::connect(emotion_port_out.c_str(), emotion_scope.c_str())) {
             cerr << "ERROR: failed to connect to emotion port '" << emotion_port_out << "'\n";
-            exit(EXIT_FAILURE);
+            init_ok = false;
         }
     }
+
+    if (!init_ok) {
+        cerr << "ERROR: failed to set up emotion component\n";
+        cerr << "       please make sure that the faceExpressions yarpdev is started\n";
+        cerr << "       (e.g.  yarpdev --name /icub/face/raw --device serial ... is running)\n";
+        exit(EXIT_FAILURE);
+    }
 }
 
 //! destructor
@@ -138,9 +147,9 @@ void iCubFaceInterface::set_eyebrow_angle(int id, float *target_angle) {
 
         std::string cmd_s;
         if (id == iCubJointInterface::ICUB_ID_EYES_LEFT_BROW) {
-            cmd_s = "L0" + std::to_string((unsigned long long)icub_val);
+            cmd_s = "L0" + boost::lexical_cast<std::string>(icub_val);
         } else {
-            cmd_s = "R0" + std::to_string((unsigned long long)icub_val);
+            cmd_s = "R0" + boost::lexical_cast<std::string>(icub_val);
         }
 
         cout << "SETTING EYEBROW " << id << " (" << angle << " -> " << cmd_s << ")\n";
diff --git a/examples/humotion_yarp_icub/src/icub_jointinterface.cpp b/examples/humotion_yarp_icub/src/icub_jointinterface.cpp
index 72e548d..7ebdc4e 100644
--- a/examples/humotion_yarp_icub/src/icub_jointinterface.cpp
+++ b/examples/humotion_yarp_icub/src/icub_jointinterface.cpp
@@ -131,7 +131,7 @@ void iCubJointInterface::init_pv_mix_pid() {
     enum_id_bimap_t::const_iterator it;
     for (it = enum_id_bimap.begin(); it != enum_id_bimap.end(); ++it) {
         int id = it->left;
-        pv_mix_pid_p_[id] = 15.5;
+        pv_mix_pid_p_[id] = 5.5;
         pv_mix_pid_d_[id] = 0.3;
         pv_mix_last_error_[id] = 0.0;
     }
@@ -172,8 +172,8 @@ void iCubJointInterface::publish_target(int humotion_id, float position, float v
         float target_position_pan      = (target_position_right + target_position_left) / 2;
         float target_position_vergence = (target_position_right - target_position_left);
 
-        cout << "LR " << target_position_left << " " << target_position_right <<
-                " PAN " << target_position_pan << " VERGENCE " << target_position_vergence << "\n";
+        /*cout << "LR " << target_position_left << " " << target_position_right <<
+                " PAN " << target_position_pan << " VERGENCE " << target_position_vergence << "\n";*/
 
         // calculate target velocities
         // for now just use the same velocity for pan and vergence
@@ -197,7 +197,7 @@ void iCubJointInterface::publish_target(int humotion_id, float position, float v
 //! \param id of joint
 //! \param float value of position
 void iCubJointInterface::store_icub_joint_target(int icub_id, float position, float velocity) {
-    cout << "store_icub_joint_target(" << icub_id << ", " << position << ", ..)\n";
+    //cout << "store_icub_joint_target(" << icub_id << ", " << position << ", ..)\n";
 
     if ((icub_id == ICUB_ID_NECK_PAN) || (icub_id == ICUB_ID_EYES_VERGENCE)) {
         // icub uses an inverted neck pan specification
diff --git a/src/server/eye_motion_generator.cpp b/src/server/eye_motion_generator.cpp
index d89a716..4d26f29 100644
--- a/src/server/eye_motion_generator.cpp
+++ b/src/server/eye_motion_generator.cpp
@@ -133,8 +133,6 @@ void EyeMotionGenerator::calculate_targets(){
     joint_interface->set_target(JointInterface::ID_EYES_BOTH_UD,
                                 reflexxes_position_output->NewPositionVector->VecData[2],
                                 reflexxes_position_output->NewVelocityVector->VecData[2]);
-
-    cout << reflexxes_position_output->NewPositionVector->VecData[2] << " " << reflexxes_position_output->NewVelocityVector->VecData[2] ;
 }
 
 
