commit a5cc61d4488f1afccd0efe83d227a3e9a7f3ac24
Author: sschulz <sschulz@techfak.uni-bielefeld.de>
Date:   Mon Feb 15 17:02:19 2016 +0100

    cleaning up

diff --git a/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_data_receiver.h b/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_data_receiver.h
index b108ffc..30d226c 100644
--- a/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_data_receiver.h
+++ b/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_data_receiver.h
@@ -25,8 +25,8 @@
 * Excellence Initiative.
 */
 
-#ifndef EXAMPLES_YARP_ICUB_INCLUDE_ICUB_DATA_RECEIVER_H_
-#define EXAMPLES_YARP_ICUB_INCLUDE_ICUB_DATA_RECEIVER_H_
+#ifndef EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_DATA_RECEIVER_H_
+#define EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_DATA_RECEIVER_H_
 
 #include <humotion/server/joint_interface.h>
 #include <humotion/server/server.h>
@@ -41,18 +41,19 @@
 #include <yarp/os/Time.h>
 #include <yarp/sig/Vector.h>
 
-#include "icub_humotion/icub_jointinterface.h"
+#include "humotion_yarp_icub/icub_jointinterface.h"
 
 // forward declaration to solve loop
 class iCubJointInterface;
 
 class iCubDataReceiver : public yarp::os::RateThread{
-public:
+ public:
     iCubDataReceiver(int period, iCubJointInterface *icub_jointinterface);
     bool threadInit();
     void threadRelease();
     void run();
-private:
+
+ private:
     void store_incoming_position(int icub_id, double value, double timestamp);
     void store_incoming_velocity(int icub_id, double velocity, double timestamp);
     yarp::sig::Vector calculate_velocities(yarp::sig::Vector positions,
@@ -78,4 +79,4 @@ private:
     yarp::dev::IEncodersTimed *iencs_;
 };
 
-#endif  // EXAMPLES_YARP_ICUB_INCLUDE_ICUB_DATA_RECEIVER_H_
+#endif  // EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_DATA_RECEIVER_H_
diff --git a/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_faceinterface.h b/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_faceinterface.h
index 419aa09..c522bc8 100644
--- a/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_faceinterface.h
+++ b/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_faceinterface.h
@@ -24,24 +24,19 @@
 * Forschungsgemeinschaft (DFG) in the context of the German
 * Excellence Initiative.
 */
-#pragma once
+#ifndef EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_FACEINTERFACE_H_
+#define EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_FACEINTERFACE_H_
+
+#include "humotion_yarp_icub/icub_jointinterface.h"
+
 #include <yarp/dev/ControlBoardInterfaces.h>
 #include <yarp/os/Network.h>
-#include "icub_jointinterface.h"
-/*
- * #include <humotion/server/server.h>
-#include <yarp/os/RateThread.h>
-#include <yarp/os/Time.h>
-#include <yarp/os/Property.h>
-#include <yarp/os/Port.h>
-#include <yarp/dev/ControlBoardInterfaces.h>
-#include "icub_data_receiver.h"
-*/
 
+#include <string>
 
 class iCubFaceInterface {
-public:
-    iCubFaceInterface(std::string scope);
+ public:
+    explicit iCubFaceInterface(std::string scope);
     ~iCubFaceInterface();
 
 
@@ -49,12 +44,13 @@ public:
     void set_eyebrow_angle(int id, float *target_angle);
     void set_mouth(float *target_angle);
 
-private:
+ private:
     double lid_angle;
     int lid_opening_previous;
     int previous_mouth_state;
     double target_angle_previous[iCubJointInterface::ICUB_JOINT_ID_ENUM_SIZE];
     std::string scope;
     yarp::os::BufferedPort<yarp::os::Bottle> emotion_port[4];
-
 };
+
+#endif  // EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_FACEINTERFACE_H_
diff --git a/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_jointinterface.h b/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_jointinterface.h
index 2541b56..fb49799 100644
--- a/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_jointinterface.h
+++ b/examples/humotion_yarp_icub/include/humotion_yarp_icub/icub_jointinterface.h
@@ -25,35 +25,37 @@
 * Excellence Initiative.
 */
 
-#pragma once
+#ifndef EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_JOINTINTERFACE_H_
+#define EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_JOINTINTERFACE_H_
+
+#include "humotion_yarp_icub/icub_data_receiver.h"
+
 #include <humotion/server/joint_interface.h>
+#include <humotion/server/server.h>
+
 #include <boost/bimap.hpp>
-#include <yarp/dev/PolyDriver.h>
-#include <yarp/dev/IControlMode.h>
-#include <yarp/dev/IControlLimits2.h>
 #include <yarp/dev/ControlBoardInterfaces.h>
-#include <yarp/os/Time.h>
-#include <yarp/sig/Vector.h>
-#include "icub_jointinterface.h"
-#include <humotion/server/server.h>
+#include <yarp/dev/IControlLimits2.h>
+#include <yarp/dev/IControlMode.h>
+#include <yarp/dev/PolyDriver.h>
 #include <yarp/os/Network.h>
+#include <yarp/os/Port.h>
+#include <yarp/os/Property.h>
 #include <yarp/os/RateThread.h>
 #include <yarp/os/Time.h>
-#include <yarp/os/Property.h>
-#include <yarp/os/Port.h>
-#include <yarp/dev/ControlBoardInterfaces.h>
-#include "icub_data_receiver.h"
+#include <yarp/sig/Vector.h>
+
+#include <string>
+#include <vector>
 
 class iCubDataReceiver;
 class iCubFaceInterface;
 
 class iCubJointInterface : public humotion::server::JointInterface{
-public:
-    iCubJointInterface(std::string scope);
+ public:
+    explicit iCubJointInterface(std::string scope);
     ~iCubJointInterface();
 
-    //void store_incoming_position(int humotion_id, double position, double timestamp);
-    //void store_incoming_velocity(int humotion_id, double position, double timestamp);
     void run();
 
     int convert_icub_jointid_to_humotion(int id);
@@ -85,13 +87,13 @@ public:
 
     static const int MAIN_LOOP_FREQUENCY = 50;
 
-protected:
+ protected:
     void disable_joint(int e);
     void publish_target(int e, float position, float velocity);
     void enable_joint(int e);
     void execute_motion();
 
-private:
+ private:
     yarp::dev::PolyDriver yarp_polydriver_;
 
     std::vector<double> pv_mix_last_error_;
@@ -100,9 +102,6 @@ private:
 
     // yarp views
     yarp::dev::IVelocityControl *yarp_ivel_;
-    //yarp::dev::IPositionControl *yarp_ipos_;
-
-    //yarp::dev::IEncodersTimed *yarp_iencs_;
     yarp::dev::IControlLimits *yarp_ilimits_;
     yarp::dev::IAmplifierControl *yarp_amp_;
     yarp::dev::IPidControl *yarp_pid_;
@@ -122,38 +121,23 @@ private:
 
     void store_icub_joint_target(int icub_id, float position, float velocity);
 
-    //*******************************************
-
 
     void set_joint_enable_state(int e, bool enabled);
-    //double target_angle[ICUB_JOINT_ID_ENUM_SIZE];
-    //double target_angle_previous[ICUB_JOINT_ID_ENUM_SIZE];
 
     iCubDataReceiver *icub_data_receiver;
     void init_joints();
 
     std::string scope;
-    //yarp::sig::Vector positions;
-    //yarp::sig::Vector velocities;
-
 
     void store_min_max(yarp::dev::IControlLimits *ilimits, int icub_id);
 
-   //float last_pos_eye_vergence;
-    //float last_pos_eye_pan;
-   // float last_vel_eye_vergence;
-    //float last_vel_eye_pan;
-
-    //void store_joint(int id, float value);
     void set_target_in_velocitymode(int id);
 
-
-    //int convert_enum_to_motorid(int e);
-    //int convert_motorid_to_enum(int id);
-
     iCubFaceInterface *face_interface_;
 
     typedef boost::bimap<int, int > enum_id_bimap_t;
     typedef enum_id_bimap_t::value_type enum_id_bimap_entry_t;
     enum_id_bimap_t enum_id_bimap;
 };
+
+#endif  // EXAMPLES_HUMOTION_YARP_ICUB_INCLUDE_HUMOTION_YARP_ICUB_ICUB_JOINTINTERFACE_H_
diff --git a/examples/humotion_yarp_icub/src/icub_data_receiver.cpp b/examples/humotion_yarp_icub/src/icub_data_receiver.cpp
index b1f73bc..ba83b0a 100644
--- a/examples/humotion_yarp_icub/src/icub_data_receiver.cpp
+++ b/examples/humotion_yarp_icub/src/icub_data_receiver.cpp
@@ -29,6 +29,8 @@
 #include <humotion/server/joint_interface.h>
 #include <yarp/os/Property.h>
 
+#include <string>
+
 #include "humotion_yarp_icub/icub_data_receiver.h"
 
 using std::cout;
@@ -143,7 +145,7 @@ void iCubDataReceiver::run() {
 //! \param position
 //! \param timestamp
 void iCubDataReceiver::store_incoming_position(int icub_id, double position, double timestamp) {
-    //cout << "store_incoming_position(icub=" << icub_id << ", " << position << ")\n";
+    // cout << "store_incoming_position(icub=" << icub_id << ", " << position << ")\n";
 
     // store joint position in humotion backend
     if ((icub_id == iCubJointInterface::ICUB_ID_EYES_PAN) ||
@@ -166,7 +168,7 @@ void iCubDataReceiver::store_incoming_position(int icub_id, double position, dou
                                                      right, timestamp);
     } else if (icub_id == 100) {
         //HACK
-        //icub_jointinterface->store_incoming_position(ID_EYES_RIGHT_LID_UPPER,
+        // icub_jointinterface->store_incoming_position(ID_EYES_RIGHT_LID_UPPER,
         //                                             lid_angle, timestamp);
     } else {
         if (icub_id == iCubJointInterface::ID_NECK_PAN) {
@@ -185,7 +187,7 @@ void iCubDataReceiver::store_incoming_position(int icub_id, double position, dou
 //! \param velocity
 //! \param timestamp
 void iCubDataReceiver::store_incoming_velocity(int icub_id, double velocity, double timestamp) {
-    //cout << "store_incoming_velocity(icub=" << icub_id << ", " << velocity << ")\n";
+    // cout << "store_incoming_velocity(icub=" << icub_id << ", " << velocity << ")\n";
 
     // store joint position in humotion backend
     if ((icub_id == iCubJointInterface::ICUB_ID_EYES_PAN) ||
@@ -208,7 +210,7 @@ void iCubDataReceiver::store_incoming_velocity(int icub_id, double velocity, dou
                                                      right, timestamp);
     } else if (icub_id == 100) {
         //HACK
-        //icub_jointinterface->store_incoming_position(ID_EYES_RIGHT_LID_UPPER,
+        // icub_jointinterface->store_incoming_position(ID_EYES_RIGHT_LID_UPPER,
         //                                             lid_angle, timestamp);
     } else {
         if (icub_id == iCubJointInterface::ID_NECK_PAN) {
@@ -229,10 +231,10 @@ void iCubDataReceiver::dump_incoming_data() {
     // @gnuplot: plot "log" using 0:1 w l t "p neck tilt", "log" using 0:2 w l t "v neck tilt", \
     //                "log" using 0:5 w l t "p neck pan", "log" using 0:6 w l t "v neck pan", \
     //                "log" using 0:7 w l t "p eyes ud", "log" using 0:8 w l t "v eyes ud", \
-    //                "log" using 0:9 w l t "p eyes vergence", "log" using 0:10 w l t "v eyes vergence"
+    //                "log" using 0:9 w l t "p eyes vergence", "log" using 0:10 w l t "v eyes verg"
     cout << "\n";
             // publish data to humotion
-    for(int i=0; i<positions_.size(); i++){
+    for (int i = 0; i < positions_.size(); i++) {
         cout << positions_[i] << " ";
         cout << velocities_[i] << " ";
     }
diff --git a/examples/humotion_yarp_icub/src/icub_faceinterface.cpp b/examples/humotion_yarp_icub/src/icub_faceinterface.cpp
index 0f7959c..5feb7ba 100644
--- a/examples/humotion_yarp_icub/src/icub_faceinterface.cpp
+++ b/examples/humotion_yarp_icub/src/icub_faceinterface.cpp
@@ -27,9 +27,10 @@
 
 #include "humotion_yarp_icub/icub_faceinterface.h"
 
+#include <boost/format.hpp>
+
 #include <algorithm>
 #include <string>
-#include <boost/format.hpp>
 
 using yarp::os::Network;
 using yarp::os::Bottle;
diff --git a/examples/humotion_yarp_icub/src/main.cpp b/examples/humotion_yarp_icub/src/main.cpp
index 5c0d876..c636f66 100644
--- a/examples/humotion_yarp_icub/src/main.cpp
+++ b/examples/humotion_yarp_icub/src/main.cpp
@@ -42,6 +42,8 @@
 #include "humotion_yarp_icub/icub_jointinterface.h"
 
 using std::cerr;
+using yarp::os::Network;
+using yarp::os::Property;
 
 // using namespace yarp::dev;
 // using namespace yarp::sig;
@@ -66,8 +68,8 @@ int main(int argc, char *argv[]) {
         return EXIT_FAILURE;
     }
 
-    string robotName = params.find("robot").asString().c_str();
-    string scope = "/" + robotName;
+    std::string robotName = params.find("robot").asString().c_str();
+    std::string scope = "/" + robotName;
 
 
     // create humotion interface
