commit 064198fb8697f2900e0cbf555588059e2fc21cb8
Author: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
Date:   Fri Jun 26 00:18:22 2015 +0200

    moved includes to subdir humotion
    
    a catkin build expects include files to be found in subdir include/humotion

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ddaf745..aaec24b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,7 +119,7 @@ ENDIF (catkin_FOUND)
 ## Specify additional locations of header files
 ## Your package locations should be listed before other locations
 include_directories (BEFORE ${Boost_INCLUDE_DIRS} ${REFLEXXES_INCLUDE_DIRS})
-include_directories(include)
+include_directories(include/humotion)
 include_directories( ${catkin_INCLUDE_DIRS})
 link_directories (${Boost_LIBRARY_DIRS} ${REFLEXXES_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS})
 
diff --git a/include/client/client.h b/include/client/client.h
deleted file mode 100644
index 70febc4..0000000
--- a/include/client/client.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "middleware.h"
-#include <cstdio>
-#include <cstdint>
-#include <string>
-
-namespace humotion{
-namespace client{
-
-class Client{
-public:
-    Client(std::string name, std::string mw);
-	~Client();
-
-    bool ok();
-    void tick();
-
-    void update_mouth_target(MouthState s, bool send=false);
-    void update_gaze_target(GazeState s, bool send=false);
-
-    void send_all();
-
-
-private:
-    Middleware *middleware;
-};
-
-}
-}
diff --git a/include/client/middleware.h b/include/client/middleware.h
deleted file mode 100644
index 33b7167..0000000
--- a/include/client/middleware.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include <cstdio>
-#include <cstdint>
-#include <string>
-#include "../mouth_state.h"
-#include "../gaze_state.h"
-
-namespace humotion{
-namespace client{
-
-
-class Middleware{
-public:
-    Middleware(std::string name);
-    ~Middleware();
-
-    void update_mouth_target(MouthState s, bool send);
-    void update_gaze_target(GazeState s, bool send);
-    void send_all();
-
-    virtual void send_mouth_target() = 0;
-    virtual void send_gaze_target() = 0;
-    virtual bool ok() = 0;
-    virtual void tick() = 0;
-
-protected:
-	MouthState mouth_state;
-    GazeState gaze_state;
-    std::string base_scope;
-};
-
-}
-}
diff --git a/include/client/middleware_ros.h b/include/client/middleware_ros.h
deleted file mode 100644
index f294226..0000000
--- a/include/client/middleware_ros.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#pragma once
-#include "middleware.h"
-#ifdef ROS_SUPPORT
-    #include "ros/ros.h"
-#endif
-#include <boost/shared_ptr.hpp>
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-namespace humotion{
-namespace client{
-
-class MiddlewareROS : public Middleware{
-#ifndef ROS_SUPPORT
-public:
-    MiddlewareROS(std::string name) : Middleware(name){
-        printf("> ERROR: humotion was compiled without ROS middleware support. Please use MiddlewareRSB() instead!\n\n");
-        exit(EXIT_FAILURE);
-    }
-
-    ~MiddlewareROS(){}
-    void send_mouth_target(){};
-    void send_gaze_target(){};
-    bool ok(){ return false; }
-    void tick(){}
-
-#else
-public:
-    MiddlewareROS(std::string name);
-    ~MiddlewareROS();
-
-    void send_mouth_target();
-    void send_gaze_target();
-    bool ok();
-    void tick();
-
-
-private:
-    bool tick_necessary;
-    //boost::shared_ptr<ros::NodeHandle> node_handle;
-    ros::Publisher mouth_target_publisher;
-    ros::Publisher gaze_target_publisher;
-#endif
-};
-
-}
-}
diff --git a/include/client/middleware_rsb.h b/include/client/middleware_rsb.h
deleted file mode 100644
index 339c639..0000000
--- a/include/client/middleware_rsb.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "middleware.h"
-
-#ifdef RSB_SUPPORT
-    #define BOOST_SIGNALS_NO_DEPRECATION_WARNING 1
-    #include <rsb/Informer.h>
-    #include <rst/robot/HumotionGazeTarget.pb.h>
-    #include <rst/robot/MouthTarget.pb.h>
-#endif
-
-
-namespace humotion{
-namespace client{
-
-class MiddlewareRSB : public Middleware{
-
-#ifndef RSB_SUPPORT
-public:
-    MiddlewareRSB(std::string name) : Middleware(name){
-        printf("> ERROR: humotion was compiled without RSB middleware support. Please use MiddlewareROS() instead!\n\n");
-        exit(EXIT_FAILURE);
-    }
-
-    ~MiddlewareRSB(){}
-    bool ok(){ return false; }
-    void tick(){}
-    void send_mouth_target(){};
-    void send_gaze_target(){};
-
-#else
-public:
-    MiddlewareRSB(std::string name);
-    ~MiddlewareRSB();
-
-    void send_mouth_target();
-    void send_gaze_target();
-    bool ok();
-    void tick();
-
-
-private:
-    rsb::Informer<rst::robot::MouthTarget>::Ptr mouth_target_informer;
-    rsb::Informer<rst::robot::HumotionGazeTarget>::Ptr gaze_target_informer;
-#endif
-};
-
-}
-}
diff --git a/include/gaze_state.h b/include/gaze_state.h
deleted file mode 100644
index 0458ba1..0000000
--- a/include/gaze_state.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include <math.h>
-
-namespace humotion{
-class GazeState{
-public:
-        GazeState();
-        ~GazeState();
-
-        void dump();
-
-        //pan tilt roll
-        float pan;
-        float tilt;
-        float roll;
-
-        float pan_offset;
-        float tilt_offset;
-        float roll_offset;
-
-        //pan,tilt,roll can be relative or absolute
-        int type;
-
-        //when was this target requested?
-        double timestamp;
-
-        //is this relative or
-        enum GAZE_STATE_TYPE{
-            ABSOLUTE=0,
-            RELATIVE=1,
-            OVERRIDE=2
-        };
-
-        //
-        float vergence;
-
-        //eyelid opening angle
-        float eyelid_opening_upper;
-        float eyelid_opening_lower;
-
-        //eyebrow angles
-        float eyebrow_left;
-        float eyebrow_right;
-
-        //eyeblink request
-        int eyeblink_request_left;
-        int eyeblink_request_right;
-        static const int EYEBLINK_TIME_DEFAULT = 150; //ms
-
-        float distance_pt_abs(GazeState b){
-            float dist_pan = (b.pan + b.pan_offset) - (pan + pan_offset);
-            float dist_tilt = (b.tilt + b.tilt_offset) - (tilt + tilt_offset);
-            return sqrt(pow(dist_pan, 2.0) + pow(dist_tilt, 2.0));
-        }
-
-        float distance_tilt_abs(GazeState b){
-            float dist_tilt = (b.tilt + b.tilt_offset) - (tilt + tilt_offset);
-            return fabs(dist_tilt);
-        }
-
-        float distance_pan_abs(GazeState b){
-            float dist_pan = (b.pan + b.pan_offset) - (pan + pan_offset);
-            return fabs(dist_pan);
-        }
-};
-
-}
diff --git a/include/humotion/client/client.h b/include/humotion/client/client.h
new file mode 100644
index 0000000..70febc4
--- /dev/null
+++ b/include/humotion/client/client.h
@@ -0,0 +1,56 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "middleware.h"
+#include <cstdio>
+#include <cstdint>
+#include <string>
+
+namespace humotion{
+namespace client{
+
+class Client{
+public:
+    Client(std::string name, std::string mw);
+	~Client();
+
+    bool ok();
+    void tick();
+
+    void update_mouth_target(MouthState s, bool send=false);
+    void update_gaze_target(GazeState s, bool send=false);
+
+    void send_all();
+
+
+private:
+    Middleware *middleware;
+};
+
+}
+}
diff --git a/include/humotion/client/middleware.h b/include/humotion/client/middleware.h
new file mode 100644
index 0000000..33b7167
--- /dev/null
+++ b/include/humotion/client/middleware.h
@@ -0,0 +1,60 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include <cstdio>
+#include <cstdint>
+#include <string>
+#include "../mouth_state.h"
+#include "../gaze_state.h"
+
+namespace humotion{
+namespace client{
+
+
+class Middleware{
+public:
+    Middleware(std::string name);
+    ~Middleware();
+
+    void update_mouth_target(MouthState s, bool send);
+    void update_gaze_target(GazeState s, bool send);
+    void send_all();
+
+    virtual void send_mouth_target() = 0;
+    virtual void send_gaze_target() = 0;
+    virtual bool ok() = 0;
+    virtual void tick() = 0;
+
+protected:
+	MouthState mouth_state;
+    GazeState gaze_state;
+    std::string base_scope;
+};
+
+}
+}
diff --git a/include/humotion/client/middleware_ros.h b/include/humotion/client/middleware_ros.h
new file mode 100644
index 0000000..f294226
--- /dev/null
+++ b/include/humotion/client/middleware_ros.h
@@ -0,0 +1,71 @@
+#pragma once
+#include "middleware.h"
+#ifdef ROS_SUPPORT
+    #include "ros/ros.h"
+#endif
+#include <boost/shared_ptr.hpp>
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+namespace humotion{
+namespace client{
+
+class MiddlewareROS : public Middleware{
+#ifndef ROS_SUPPORT
+public:
+    MiddlewareROS(std::string name) : Middleware(name){
+        printf("> ERROR: humotion was compiled without ROS middleware support. Please use MiddlewareRSB() instead!\n\n");
+        exit(EXIT_FAILURE);
+    }
+
+    ~MiddlewareROS(){}
+    void send_mouth_target(){};
+    void send_gaze_target(){};
+    bool ok(){ return false; }
+    void tick(){}
+
+#else
+public:
+    MiddlewareROS(std::string name);
+    ~MiddlewareROS();
+
+    void send_mouth_target();
+    void send_gaze_target();
+    bool ok();
+    void tick();
+
+
+private:
+    bool tick_necessary;
+    //boost::shared_ptr<ros::NodeHandle> node_handle;
+    ros::Publisher mouth_target_publisher;
+    ros::Publisher gaze_target_publisher;
+#endif
+};
+
+}
+}
diff --git a/include/humotion/client/middleware_rsb.h b/include/humotion/client/middleware_rsb.h
new file mode 100644
index 0000000..339c639
--- /dev/null
+++ b/include/humotion/client/middleware_rsb.h
@@ -0,0 +1,75 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "middleware.h"
+
+#ifdef RSB_SUPPORT
+    #define BOOST_SIGNALS_NO_DEPRECATION_WARNING 1
+    #include <rsb/Informer.h>
+    #include <rst/robot/HumotionGazeTarget.pb.h>
+    #include <rst/robot/MouthTarget.pb.h>
+#endif
+
+
+namespace humotion{
+namespace client{
+
+class MiddlewareRSB : public Middleware{
+
+#ifndef RSB_SUPPORT
+public:
+    MiddlewareRSB(std::string name) : Middleware(name){
+        printf("> ERROR: humotion was compiled without RSB middleware support. Please use MiddlewareROS() instead!\n\n");
+        exit(EXIT_FAILURE);
+    }
+
+    ~MiddlewareRSB(){}
+    bool ok(){ return false; }
+    void tick(){}
+    void send_mouth_target(){};
+    void send_gaze_target(){};
+
+#else
+public:
+    MiddlewareRSB(std::string name);
+    ~MiddlewareRSB();
+
+    void send_mouth_target();
+    void send_gaze_target();
+    bool ok();
+    void tick();
+
+
+private:
+    rsb::Informer<rst::robot::MouthTarget>::Ptr mouth_target_informer;
+    rsb::Informer<rst::robot::HumotionGazeTarget>::Ptr gaze_target_informer;
+#endif
+};
+
+}
+}
diff --git a/include/humotion/gaze_state.h b/include/humotion/gaze_state.h
new file mode 100644
index 0000000..0458ba1
--- /dev/null
+++ b/include/humotion/gaze_state.h
@@ -0,0 +1,94 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include <math.h>
+
+namespace humotion{
+class GazeState{
+public:
+        GazeState();
+        ~GazeState();
+
+        void dump();
+
+        //pan tilt roll
+        float pan;
+        float tilt;
+        float roll;
+
+        float pan_offset;
+        float tilt_offset;
+        float roll_offset;
+
+        //pan,tilt,roll can be relative or absolute
+        int type;
+
+        //when was this target requested?
+        double timestamp;
+
+        //is this relative or
+        enum GAZE_STATE_TYPE{
+            ABSOLUTE=0,
+            RELATIVE=1,
+            OVERRIDE=2
+        };
+
+        //
+        float vergence;
+
+        //eyelid opening angle
+        float eyelid_opening_upper;
+        float eyelid_opening_lower;
+
+        //eyebrow angles
+        float eyebrow_left;
+        float eyebrow_right;
+
+        //eyeblink request
+        int eyeblink_request_left;
+        int eyeblink_request_right;
+        static const int EYEBLINK_TIME_DEFAULT = 150; //ms
+
+        float distance_pt_abs(GazeState b){
+            float dist_pan = (b.pan + b.pan_offset) - (pan + pan_offset);
+            float dist_tilt = (b.tilt + b.tilt_offset) - (tilt + tilt_offset);
+            return sqrt(pow(dist_pan, 2.0) + pow(dist_tilt, 2.0));
+        }
+
+        float distance_tilt_abs(GazeState b){
+            float dist_tilt = (b.tilt + b.tilt_offset) - (tilt + tilt_offset);
+            return fabs(dist_tilt);
+        }
+
+        float distance_pan_abs(GazeState b){
+            float dist_pan = (b.pan + b.pan_offset) - (pan + pan_offset);
+            return fabs(dist_pan);
+        }
+};
+
+}
diff --git a/include/humotion/mouth_state.h b/include/humotion/mouth_state.h
new file mode 100644
index 0000000..8c8d501
--- /dev/null
+++ b/include/humotion/mouth_state.h
@@ -0,0 +1,49 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include <string>
+
+namespace humotion{
+class MouthState{
+public:
+        MouthState();
+        ~MouthState();
+
+        void dump();
+
+        float opening_left;
+        float opening_center;
+        float opening_right;
+
+        float position_left;
+        float position_center;
+        float position_right;
+
+};
+
+}
diff --git a/include/humotion/server/controller.h b/include/humotion/server/controller.h
new file mode 100644
index 0000000..3846098
--- /dev/null
+++ b/include/humotion/server/controller.h
@@ -0,0 +1,61 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "../gaze_state.h"
+#include "../mouth_state.h"
+#include "motion_generator.h"
+#include "joint_interface.h"
+
+namespace humotion{
+namespace server{
+
+class Controller{
+public:
+    Controller(JointInterface *j);
+    ~Controller();
+
+    void init_motion_generators();
+    void calculate_targets();
+    void publish_targets();
+
+
+    void set_gaze_target(GazeState s);
+    void set_mouth_target(MouthState s);
+
+private:
+    void add_motion_generator(MotionGenerator *m);
+
+    typedef std::vector<MotionGenerator *> motion_generator_vector_t;
+    motion_generator_vector_t motion_generator_vector;
+    JointInterface *joint_interface;
+
+
+};
+
+}
+}
diff --git a/include/humotion/server/eye_motion_generator.h b/include/humotion/server/eye_motion_generator.h
new file mode 100644
index 0000000..7b38638
--- /dev/null
+++ b/include/humotion/server/eye_motion_generator.h
@@ -0,0 +1,55 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "gaze_motion_generator.h"
+#include "timestamped_list.h"
+
+namespace humotion{
+namespace server{
+
+class EyeMotionGenerator : public GazeMotionGenerator{
+public:
+    EyeMotionGenerator(JointInterface *j);
+    ~EyeMotionGenerator();
+
+    void calculate_targets();
+    void publish_targets();
+
+
+    static const float SACCADE_SPEED_THRESHOLD;
+private:
+    void setup_eyemotion(int dof, float target, float now);
+
+    TimestampedList tsl_gaze_target_pan;
+    TimestampedList tsl_gaze_target_tilt;
+    TimestampedList tsl_gaze_target_vergence;
+
+};
+
+}
+}
diff --git a/include/humotion/server/eyebrow_motion_generator.h b/include/humotion/server/eyebrow_motion_generator.h
new file mode 100644
index 0000000..5fff08c
--- /dev/null
+++ b/include/humotion/server/eyebrow_motion_generator.h
@@ -0,0 +1,45 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "motion_generator.h"
+
+namespace humotion{
+namespace server{
+
+class EyebrowMotionGenerator : public MotionGenerator{
+public:
+    EyebrowMotionGenerator(JointInterface *j);
+    ~EyebrowMotionGenerator();
+    void calculate_targets();
+    void publish_targets();
+private:
+
+};
+
+}
+}
diff --git a/include/humotion/server/eyelid_motion_generator.h b/include/humotion/server/eyelid_motion_generator.h
new file mode 100644
index 0000000..e3db8fa
--- /dev/null
+++ b/include/humotion/server/eyelid_motion_generator.h
@@ -0,0 +1,82 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "eye_motion_generator.h"
+#include "boost/date_time/posix_time/posix_time.hpp"
+#include <boost/thread/thread_time.hpp>
+
+namespace humotion{
+namespace server{
+
+class EyelidMotionGenerator : public EyeMotionGenerator{
+public:
+    EyelidMotionGenerator(JointInterface *j);
+    ~EyelidMotionGenerator();
+
+    void calculate_targets();
+    void publish_targets();
+
+
+
+private:
+    bool saccade_blink_active;
+    bool saccade_blink_requested;
+
+    enum SIDE_ID{
+        LEFT = 0,
+        RIGHT,
+        SIDE_ID_SIZE
+    };
+
+    bool eyeblink_active[SIDE_ID_SIZE];
+    bool eyelid_closed[SIDE_ID_SIZE];
+
+    void start_external_eyeblinks(int duration_left, int duration_right);
+    void process_saccadic_eyeblinks();
+    void process_periodic_eyeblinks();
+    void handle_eyeblink_timeout();
+    void override_lids_for_eyeblink();
+    void check_for_saccade();
+    void start_eyeblink(int side, int duration=EYEBLINK_DURATION_MS);
+
+    void close_eyelid(int joint_id);
+
+    static const float SACCADE_SPEED_THRESHOLD;
+    static const float EYEBLINK_DURATION_MS;
+    static const float EYEBLINK_EYERY_MS_MIN;
+    static const float EYEBLINK_EYERY_MS_MAX;
+    static const float EYEBLINK_BLOCKING_TIME;
+
+    boost::system_time periodic_blink_start_time;
+    boost::system_time eyeblink_timeout[SIDE_ID_SIZE];
+    boost::system_time eyeblink_blocked_timeout;
+
+};
+
+}
+}
diff --git a/include/humotion/server/gaze_motion_generator.h b/include/humotion/server/gaze_motion_generator.h
new file mode 100644
index 0000000..a2bf907
--- /dev/null
+++ b/include/humotion/server/gaze_motion_generator.h
@@ -0,0 +1,63 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "reflexxes_motion_generator.h"
+#include "timestamped_list.h"
+
+namespace humotion{
+namespace server{
+
+class GazeMotionGenerator : public ReflexxesMotionGenerator{
+public:
+    GazeMotionGenerator(JointInterface *j, int dof, float t);
+    ~GazeMotionGenerator();
+
+    void set_gaze_target(GazeState s);
+
+    static const float SACCADE_SPEED_THRESHOLD;
+    static const float SACCADE_LATENCY;
+
+protected:
+    GazeState get_current_gaze();
+
+    bool get_eye_saccade_active();
+    bool neck_saccade_requested;
+    bool neck_saccade_omr;
+
+private:
+
+    //constants
+    static const float NECK_SACCADE_THRESHOLD;
+    static const float EYE_SACCADE_SPEED_THRESHOLD;
+    static const float OMR_LIMIT_TRIGGERS_NECK_SACCADE;
+
+};
+
+}
+}
+
diff --git a/include/humotion/server/joint_interface.h b/include/humotion/server/joint_interface.h
new file mode 100644
index 0000000..b97ddcb
--- /dev/null
+++ b/include/humotion/server/joint_interface.h
@@ -0,0 +1,133 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include <cstdio>
+#include <cstdint>
+#include <string>
+#include <map>
+#include "../timestamped_list.h"
+#include "../mouth_state.h"
+#include "../gaze_state.h"
+#include "boost/date_time/posix_time/posix_time.hpp"
+#include <boost/thread/thread_time.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+
+namespace humotion{
+namespace server{
+
+//forward declaration to solve include loop
+class Controller;
+
+
+class JointInterface{
+public:
+    JointInterface();
+    ~JointInterface();
+
+    void set_target_position(int joint_id, float position);
+    float get_target_position(int joint_id);
+    virtual void publish_target_position(int joint_id) = 0;
+    virtual void execute_motion() = 0;
+
+    typedef std::map<int, TimestampedList> joint_tsl_map_t;
+
+    TimestampedList get_ts_position(int joint_id);
+    TimestampedList get_ts_speed(int joint_id);
+
+    void set_framerate(float f);
+
+    void enable_mouth_joints();
+    void disable_mouth_joints();
+    bool mouth_target_input_active();
+
+    void enable_gaze_joints();
+    void disable_gaze_joints();
+    bool gaze_target_input_active();
+
+    float get_joint_min(int joint_id);
+    float get_joint_max(int joint_id);
+
+    void dump_angles();
+
+    unsigned int get_and_clear_incoming_position_count();
+
+    enum JOINT_ID_ENUM{
+        ZERO = 0,
+        ID_LIP_LEFT_UPPER,
+        ID_LIP_LEFT_LOWER,
+        ID_LIP_CENTER_UPPER,
+        ID_LIP_CENTER_LOWER,
+        ID_LIP_RIGHT_UPPER,
+        ID_LIP_RIGHT_LOWER,
+        ID_NECK_PAN,
+        ID_NECK_TILT,
+        ID_NECK_ROLL,
+        ID_EYES_LEFT_LR,
+        ID_EYES_RIGHT_LR,
+        ID_EYES_BOTH_UD,
+        ID_EYES_LEFT_LID_LOWER,
+        ID_EYES_LEFT_LID_UPPER,
+        ID_EYES_RIGHT_LID_LOWER,
+        ID_EYES_RIGHT_LID_UPPER,
+        ID_EYES_LEFT_BROW,
+        ID_EYES_RIGHT_BROW,
+        JOINT_ID_ENUM_SIZE
+    };
+
+    bool get_joint_position_map_empty();
+
+protected:
+
+    void store_incoming_position(int joint_id, float position, double timestamp);
+    void store_incoming_speed(int joint_id, float speed, double timestamp);
+
+    virtual void enable_joint(int id) = 0;
+    virtual void disable_joint(int id) = 0;
+    float framerate;
+
+    float joint_min[JOINT_ID_ENUM_SIZE];
+    float joint_max[JOINT_ID_ENUM_SIZE];
+    float joint_target[JOINT_ID_ENUM_SIZE];
+
+
+
+private:
+    boost::mutex joint_ts_position_map_access_mutex;
+    boost::mutex joint_ts_speed_map_access_mutex;
+    joint_tsl_map_t joint_ts_position_map;
+    joint_tsl_map_t joint_ts_speed_map;
+
+    bool mouth_enabled;
+    bool gaze_enabled;
+    unsigned int incoming_position_count;
+
+};
+
+}
+}
diff --git a/include/humotion/server/middleware.h b/include/humotion/server/middleware.h
new file mode 100644
index 0000000..bfc05f9
--- /dev/null
+++ b/include/humotion/server/middleware.h
@@ -0,0 +1,55 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include <cstdio>
+#include <cstdint>
+#include <string>
+#include "../mouth_state.h"
+#include "../gaze_state.h"
+#include "controller.h"
+
+namespace humotion{
+namespace server{
+
+class Middleware{
+public:
+    Middleware(std::string name, Controller *c);
+    ~Middleware();
+
+    virtual bool ok() = 0;
+    virtual void tick() = 0;
+
+protected:
+    Controller *controller;
+    std::string base_scope;
+
+
+};
+
+}
+}
diff --git a/include/humotion/server/middleware_ros.h b/include/humotion/server/middleware_ros.h
new file mode 100644
index 0000000..fed80c8
--- /dev/null
+++ b/include/humotion/server/middleware_ros.h
@@ -0,0 +1,74 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "middleware.h"
+#include "humotion/mouth.h"
+#include "humotion/gaze.h"
+
+#ifdef ROS_SUPPORT
+#include "ros/ros.h"
+#endif
+
+#include <boost/shared_ptr.hpp>
+
+namespace humotion{
+namespace server{
+
+class MiddlewareROS : public Middleware{
+#ifndef ROS_SUPPORT
+public:
+    MiddlewareROS(std::string name, Controller *c) : Middleware(name, c){
+        printf("> ERROR: humotion was compiled without ROS middleware support. Please use MiddlewareRSB() instead!\n\n");
+        exit(EXIT_FAILURE);
+    }
+
+    ~MiddlewareROS(){}
+    bool ok(){ return false; }
+    void tick(){}
+
+#else
+public:
+    MiddlewareROS(std::string name, Controller *c);
+    ~MiddlewareROS();
+    bool ok();
+    void tick();
+
+private:
+    double convert_ros_to_timestamp_ms(ros::Time t);
+    bool tick_necessary;
+    void incoming_mouth_target(const humotion::mouth::ConstPtr& msg);
+    void incoming_gaze_target(const humotion::gaze::ConstPtr& msg);
+
+    ros::Subscriber mouth_target_subscriber;
+    ros::Subscriber gaze_target_subscriber;
+#endif
+};
+
+}
+}
+
diff --git a/include/humotion/server/middleware_rsb.h b/include/humotion/server/middleware_rsb.h
new file mode 100644
index 0000000..9be0567
--- /dev/null
+++ b/include/humotion/server/middleware_rsb.h
@@ -0,0 +1,77 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "middleware.h"
+#include "humotion/mouth.h"
+#include "humotion/gaze.h"
+
+#ifdef RSB_SUPPORT
+    #define BOOST_SIGNALS_NO_DEPRECATION_WARNING 1
+    #include <rsb/Listener.h>
+    #include <rst/robot/HumotionGazeTarget.pb.h>
+    #include <rst/robot/MouthTarget.pb.h>
+#endif
+
+namespace humotion{
+namespace server{
+
+class MiddlewareRSB : public Middleware{
+
+#ifndef RSB_SUPPORT
+public:
+    MiddlewareRSB(std::string name, Controller *c) : Middleware(name, c){
+        printf("> ERROR: humotion was compiled without RSB middleware support. Please use MiddlewareROS() instead!\n\n");
+        exit(EXIT_FAILURE);
+    }
+
+    ~MiddlewareRSB(){}
+    bool ok(){ return false; }
+    void tick(){}
+
+#else
+public:
+    MiddlewareRSB(std::string name, Controller *c);
+    ~MiddlewareRSB();
+
+    bool ok();
+    void tick();
+
+
+private:
+
+    void incoming_mouth_target(boost::shared_ptr<rst::robot::MouthTarget> event);
+    void incoming_gaze_target(rsb::EventPtr e);
+
+    rsb::ListenerPtr mouth_target_listener;
+    rsb::ListenerPtr gaze_target_listener;
+
+#endif
+};
+
+}
+}
diff --git a/include/humotion/server/motion_generator.h b/include/humotion/server/motion_generator.h
new file mode 100644
index 0000000..7c4f75a
--- /dev/null
+++ b/include/humotion/server/motion_generator.h
@@ -0,0 +1,66 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "joint_interface.h"
+#include "boost/date_time/posix_time/posix_time.hpp"
+#include <string>
+
+namespace humotion{
+namespace server{
+
+class MotionGenerator{
+public:
+    MotionGenerator(JointInterface *j);
+    ~MotionGenerator();
+
+    virtual void calculate_targets()=0;
+    virtual void publish_targets()=0;
+
+    virtual void set_gaze_target(GazeState s);
+    virtual void set_mouth_target(MouthState s);
+
+protected:
+    float get_current_position(int joint_id);
+    float limit_target(int joint_id, float val);
+
+    JointInterface *joint_interface;
+
+    //GAZE:
+    GazeState  requested_gaze_state;
+    boost::system_time last_gaze_target_update;
+    bool gaze_target_input_active();
+
+    //MOUTH
+    MouthState requested_mouth_target;
+    boost::system_time last_mouth_target_update;
+    bool mouth_target_input_active();
+
+};
+
+}
+}
diff --git a/include/humotion/server/mouth_motion_generator.h b/include/humotion/server/mouth_motion_generator.h
new file mode 100644
index 0000000..6461e02
--- /dev/null
+++ b/include/humotion/server/mouth_motion_generator.h
@@ -0,0 +1,52 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "motion_generator.h"
+
+namespace humotion{
+namespace server{
+
+class MouthMotionGenerator : public MotionGenerator{
+public:
+    MouthMotionGenerator(JointInterface *j);
+    ~MouthMotionGenerator();
+    void calculate_targets();
+    void publish_targets();
+
+private:
+    void calculate_mouth_target(int upper, int lower);
+    float mouthstate_to_opening(MouthState m, int e);
+    float mouthstate_to_position(MouthState m, int e);
+    void update_mouth_target(int upper_id, int lower_id);
+
+    //minimum mouth opening:
+    static const float MOUTH_MIN_OPENING;
+};
+
+}
+}
diff --git a/include/humotion/server/neck_motion_generator.h b/include/humotion/server/neck_motion_generator.h
new file mode 100644
index 0000000..c8078a2
--- /dev/null
+++ b/include/humotion/server/neck_motion_generator.h
@@ -0,0 +1,61 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "gaze_motion_generator.h"
+
+namespace humotion{
+namespace server{
+
+class NeckMotionGenerator : public GazeMotionGenerator {
+public:
+    NeckMotionGenerator(JointInterface *j);
+    ~NeckMotionGenerator();
+    void calculate_targets();
+    void publish_targets();
+    void setup_neckmotion(int dof, float target, float now);
+
+private:
+    float get_breath_offset();
+
+    GazeState previous_neck_target;
+    GazeState  requested_neck_state;
+    bool neck_saccade_reached_goal;
+    bool neck_saccade_active;
+
+    static const float CONST_GUITTON87_A;
+    static const float CONST_GUITTON87_B;
+
+    float breath_time;
+    static const float CONST_BREATH_PERIOD;
+    static const float CONST_BREATH_AMPLITUDE;
+
+
+};
+
+}
+}
diff --git a/include/humotion/server/reflexxes_motion_generator.h b/include/humotion/server/reflexxes_motion_generator.h
new file mode 100644
index 0000000..aa9883e
--- /dev/null
+++ b/include/humotion/server/reflexxes_motion_generator.h
@@ -0,0 +1,60 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "motion_generator.h"
+#include <ReflexxesAPI.h>
+#include <RMLPositionFlags.h>
+#include <RMLPositionInputParameters.h>
+#include <RMLPositionOutputParameters.h>
+
+namespace humotion{
+namespace server{
+
+class ReflexxesMotionGenerator : public MotionGenerator{
+public:
+    ReflexxesMotionGenerator(JointInterface *j, int dof, float t);
+    ~ReflexxesMotionGenerator();
+
+protected:
+    void reflexxes_set_input(int dof, float target, float max_speed, float max_accel);
+    void reflexxes_calculate_profile();
+
+    //*****************************************
+    ReflexxesAPI *reflexxes_api;
+    RMLPositionInputParameters *reflexxes_position_input;
+    RMLPositionOutputParameters *reflexxes_position_output;
+    RMLPositionFlags reflexxes_motion_flags;
+    //*****************************************
+    int dof_count;
+
+private:
+
+};
+
+}
+}
diff --git a/include/humotion/server/server.h b/include/humotion/server/server.h
new file mode 100644
index 0000000..07e92fd
--- /dev/null
+++ b/include/humotion/server/server.h
@@ -0,0 +1,59 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+
+#include "ros/ros.h"
+#include "middleware.h"
+#include "controller.h"
+#include <cstdio>
+#include <cstdint>
+#include <string>
+#include <boost/thread/thread.hpp>
+
+namespace humotion{
+namespace server{
+
+class Server{
+public:
+    Server(std::string name, std::string mw, JointInterface *_joint_interface);
+	~Server();
+    bool ok();
+    static const float MOTION_UPDATERATE;
+
+private:
+    void start_motion_generation_thread();
+    void motion_generation_thread();
+    boost::thread *motion_generation_thread_ptr;
+
+    Middleware *middleware;
+    Controller *controller;
+    JointInterface *joint_interface;
+};
+
+}
+}
diff --git a/include/humotion/timestamped_float.h b/include/humotion/timestamped_float.h
new file mode 100644
index 0000000..8016d81
--- /dev/null
+++ b/include/humotion/timestamped_float.h
@@ -0,0 +1,61 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string>
+
+namespace humotion{
+
+class TimestampedFloat{
+public:
+    TimestampedFloat(){
+		timestamp = 0.0;
+		value = 0.0;
+	}
+	
+    TimestampedFloat(double ts, float val){
+		timestamp = ts;
+		value = val;
+	}
+	
+	static double get_timestamp(){
+		//fetch time
+		struct timespec tp;
+		clock_gettime(CLOCK_REALTIME, &tp);
+		return tp.tv_sec+tp.tv_nsec/1000000000.0;
+	};
+	
+	double timestamp;
+    float value;
+	
+};
+
+
+}
diff --git a/include/humotion/timestamped_list.h b/include/humotion/timestamped_list.h
new file mode 100644
index 0000000..c67dbd5
--- /dev/null
+++ b/include/humotion/timestamped_list.h
@@ -0,0 +1,53 @@
+/*
+* This file is part of humotion
+*
+* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+* http://opensource.cit-ec.de/projects/humotion
+*
+* This file may be licensed under the terms of the
+* GNU Lesser General Public License Version 3 (the ``LGPL''),
+* or (at your option) any later version.
+*
+* Software distributed under the License is distributed
+* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+* express or implied. See the LGPL for the specific language
+* governing rights and limitations.
+*
+* You should have received a copy of the LGPL along with this
+* program. If not, go to http://www.gnu.org/licenses/lgpl.html
+* or write to the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* The development of this software was supported by the
+* Excellence Cluster EXC 277 Cognitive Interaction Technology.
+* The Excellence Cluster EXC 277 is a grant of the Deutsche
+* Forschungsgemeinschaft (DFG) in the context of the German
+* Excellence Initiative.
+*/
+
+#pragma once
+#include "timestamped_float.h"
+#include <boost/thread/mutex.hpp>
+#include <list>
+
+namespace humotion{
+class TimestampedList{
+public:
+    typedef std::list<TimestampedFloat> timestamped_float_list_t;
+
+    TimestampedList( TimestampedList const &l);
+	TimestampedList(unsigned int size=10);
+    void insert(double ts, float val);
+    float get_interpolated_value(double target_ts);
+    float get_newest_value();
+	static void run_tests();
+    void copy_tsf_list_to(timestamped_float_list_t *target);
+    double get_last_timestamp();
+
+private:
+    mutable boost::mutex access_mutex;
+    float interpolate(TimestampedFloat a, TimestampedFloat b, double timestamp);
+    timestamped_float_list_t tsf_list;
+};
+
+}
diff --git a/include/mouth_state.h b/include/mouth_state.h
deleted file mode 100644
index 8c8d501..0000000
--- a/include/mouth_state.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include <string>
-
-namespace humotion{
-class MouthState{
-public:
-        MouthState();
-        ~MouthState();
-
-        void dump();
-
-        float opening_left;
-        float opening_center;
-        float opening_right;
-
-        float position_left;
-        float position_center;
-        float position_right;
-
-};
-
-}
diff --git a/include/server/controller.h b/include/server/controller.h
deleted file mode 100644
index 3846098..0000000
--- a/include/server/controller.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "../gaze_state.h"
-#include "../mouth_state.h"
-#include "motion_generator.h"
-#include "joint_interface.h"
-
-namespace humotion{
-namespace server{
-
-class Controller{
-public:
-    Controller(JointInterface *j);
-    ~Controller();
-
-    void init_motion_generators();
-    void calculate_targets();
-    void publish_targets();
-
-
-    void set_gaze_target(GazeState s);
-    void set_mouth_target(MouthState s);
-
-private:
-    void add_motion_generator(MotionGenerator *m);
-
-    typedef std::vector<MotionGenerator *> motion_generator_vector_t;
-    motion_generator_vector_t motion_generator_vector;
-    JointInterface *joint_interface;
-
-
-};
-
-}
-}
diff --git a/include/server/eye_motion_generator.h b/include/server/eye_motion_generator.h
deleted file mode 100644
index 7b38638..0000000
--- a/include/server/eye_motion_generator.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "gaze_motion_generator.h"
-#include "timestamped_list.h"
-
-namespace humotion{
-namespace server{
-
-class EyeMotionGenerator : public GazeMotionGenerator{
-public:
-    EyeMotionGenerator(JointInterface *j);
-    ~EyeMotionGenerator();
-
-    void calculate_targets();
-    void publish_targets();
-
-
-    static const float SACCADE_SPEED_THRESHOLD;
-private:
-    void setup_eyemotion(int dof, float target, float now);
-
-    TimestampedList tsl_gaze_target_pan;
-    TimestampedList tsl_gaze_target_tilt;
-    TimestampedList tsl_gaze_target_vergence;
-
-};
-
-}
-}
diff --git a/include/server/eyebrow_motion_generator.h b/include/server/eyebrow_motion_generator.h
deleted file mode 100644
index 5fff08c..0000000
--- a/include/server/eyebrow_motion_generator.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "motion_generator.h"
-
-namespace humotion{
-namespace server{
-
-class EyebrowMotionGenerator : public MotionGenerator{
-public:
-    EyebrowMotionGenerator(JointInterface *j);
-    ~EyebrowMotionGenerator();
-    void calculate_targets();
-    void publish_targets();
-private:
-
-};
-
-}
-}
diff --git a/include/server/eyelid_motion_generator.h b/include/server/eyelid_motion_generator.h
deleted file mode 100644
index e3db8fa..0000000
--- a/include/server/eyelid_motion_generator.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "eye_motion_generator.h"
-#include "boost/date_time/posix_time/posix_time.hpp"
-#include <boost/thread/thread_time.hpp>
-
-namespace humotion{
-namespace server{
-
-class EyelidMotionGenerator : public EyeMotionGenerator{
-public:
-    EyelidMotionGenerator(JointInterface *j);
-    ~EyelidMotionGenerator();
-
-    void calculate_targets();
-    void publish_targets();
-
-
-
-private:
-    bool saccade_blink_active;
-    bool saccade_blink_requested;
-
-    enum SIDE_ID{
-        LEFT = 0,
-        RIGHT,
-        SIDE_ID_SIZE
-    };
-
-    bool eyeblink_active[SIDE_ID_SIZE];
-    bool eyelid_closed[SIDE_ID_SIZE];
-
-    void start_external_eyeblinks(int duration_left, int duration_right);
-    void process_saccadic_eyeblinks();
-    void process_periodic_eyeblinks();
-    void handle_eyeblink_timeout();
-    void override_lids_for_eyeblink();
-    void check_for_saccade();
-    void start_eyeblink(int side, int duration=EYEBLINK_DURATION_MS);
-
-    void close_eyelid(int joint_id);
-
-    static const float SACCADE_SPEED_THRESHOLD;
-    static const float EYEBLINK_DURATION_MS;
-    static const float EYEBLINK_EYERY_MS_MIN;
-    static const float EYEBLINK_EYERY_MS_MAX;
-    static const float EYEBLINK_BLOCKING_TIME;
-
-    boost::system_time periodic_blink_start_time;
-    boost::system_time eyeblink_timeout[SIDE_ID_SIZE];
-    boost::system_time eyeblink_blocked_timeout;
-
-};
-
-}
-}
diff --git a/include/server/gaze_motion_generator.h b/include/server/gaze_motion_generator.h
deleted file mode 100644
index a2bf907..0000000
--- a/include/server/gaze_motion_generator.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "reflexxes_motion_generator.h"
-#include "timestamped_list.h"
-
-namespace humotion{
-namespace server{
-
-class GazeMotionGenerator : public ReflexxesMotionGenerator{
-public:
-    GazeMotionGenerator(JointInterface *j, int dof, float t);
-    ~GazeMotionGenerator();
-
-    void set_gaze_target(GazeState s);
-
-    static const float SACCADE_SPEED_THRESHOLD;
-    static const float SACCADE_LATENCY;
-
-protected:
-    GazeState get_current_gaze();
-
-    bool get_eye_saccade_active();
-    bool neck_saccade_requested;
-    bool neck_saccade_omr;
-
-private:
-
-    //constants
-    static const float NECK_SACCADE_THRESHOLD;
-    static const float EYE_SACCADE_SPEED_THRESHOLD;
-    static const float OMR_LIMIT_TRIGGERS_NECK_SACCADE;
-
-};
-
-}
-}
-
diff --git a/include/server/joint_interface.h b/include/server/joint_interface.h
deleted file mode 100644
index b97ddcb..0000000
--- a/include/server/joint_interface.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include <cstdio>
-#include <cstdint>
-#include <string>
-#include <map>
-#include "../timestamped_list.h"
-#include "../mouth_state.h"
-#include "../gaze_state.h"
-#include "boost/date_time/posix_time/posix_time.hpp"
-#include <boost/thread/thread_time.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/mutex.hpp>
-
-namespace humotion{
-namespace server{
-
-//forward declaration to solve include loop
-class Controller;
-
-
-class JointInterface{
-public:
-    JointInterface();
-    ~JointInterface();
-
-    void set_target_position(int joint_id, float position);
-    float get_target_position(int joint_id);
-    virtual void publish_target_position(int joint_id) = 0;
-    virtual void execute_motion() = 0;
-
-    typedef std::map<int, TimestampedList> joint_tsl_map_t;
-
-    TimestampedList get_ts_position(int joint_id);
-    TimestampedList get_ts_speed(int joint_id);
-
-    void set_framerate(float f);
-
-    void enable_mouth_joints();
-    void disable_mouth_joints();
-    bool mouth_target_input_active();
-
-    void enable_gaze_joints();
-    void disable_gaze_joints();
-    bool gaze_target_input_active();
-
-    float get_joint_min(int joint_id);
-    float get_joint_max(int joint_id);
-
-    void dump_angles();
-
-    unsigned int get_and_clear_incoming_position_count();
-
-    enum JOINT_ID_ENUM{
-        ZERO = 0,
-        ID_LIP_LEFT_UPPER,
-        ID_LIP_LEFT_LOWER,
-        ID_LIP_CENTER_UPPER,
-        ID_LIP_CENTER_LOWER,
-        ID_LIP_RIGHT_UPPER,
-        ID_LIP_RIGHT_LOWER,
-        ID_NECK_PAN,
-        ID_NECK_TILT,
-        ID_NECK_ROLL,
-        ID_EYES_LEFT_LR,
-        ID_EYES_RIGHT_LR,
-        ID_EYES_BOTH_UD,
-        ID_EYES_LEFT_LID_LOWER,
-        ID_EYES_LEFT_LID_UPPER,
-        ID_EYES_RIGHT_LID_LOWER,
-        ID_EYES_RIGHT_LID_UPPER,
-        ID_EYES_LEFT_BROW,
-        ID_EYES_RIGHT_BROW,
-        JOINT_ID_ENUM_SIZE
-    };
-
-    bool get_joint_position_map_empty();
-
-protected:
-
-    void store_incoming_position(int joint_id, float position, double timestamp);
-    void store_incoming_speed(int joint_id, float speed, double timestamp);
-
-    virtual void enable_joint(int id) = 0;
-    virtual void disable_joint(int id) = 0;
-    float framerate;
-
-    float joint_min[JOINT_ID_ENUM_SIZE];
-    float joint_max[JOINT_ID_ENUM_SIZE];
-    float joint_target[JOINT_ID_ENUM_SIZE];
-
-
-
-private:
-    boost::mutex joint_ts_position_map_access_mutex;
-    boost::mutex joint_ts_speed_map_access_mutex;
-    joint_tsl_map_t joint_ts_position_map;
-    joint_tsl_map_t joint_ts_speed_map;
-
-    bool mouth_enabled;
-    bool gaze_enabled;
-    unsigned int incoming_position_count;
-
-};
-
-}
-}
diff --git a/include/server/middleware.h b/include/server/middleware.h
deleted file mode 100644
index bfc05f9..0000000
--- a/include/server/middleware.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include <cstdio>
-#include <cstdint>
-#include <string>
-#include "../mouth_state.h"
-#include "../gaze_state.h"
-#include "controller.h"
-
-namespace humotion{
-namespace server{
-
-class Middleware{
-public:
-    Middleware(std::string name, Controller *c);
-    ~Middleware();
-
-    virtual bool ok() = 0;
-    virtual void tick() = 0;
-
-protected:
-    Controller *controller;
-    std::string base_scope;
-
-
-};
-
-}
-}
diff --git a/include/server/middleware_ros.h b/include/server/middleware_ros.h
deleted file mode 100644
index fed80c8..0000000
--- a/include/server/middleware_ros.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "middleware.h"
-#include "humotion/mouth.h"
-#include "humotion/gaze.h"
-
-#ifdef ROS_SUPPORT
-#include "ros/ros.h"
-#endif
-
-#include <boost/shared_ptr.hpp>
-
-namespace humotion{
-namespace server{
-
-class MiddlewareROS : public Middleware{
-#ifndef ROS_SUPPORT
-public:
-    MiddlewareROS(std::string name, Controller *c) : Middleware(name, c){
-        printf("> ERROR: humotion was compiled without ROS middleware support. Please use MiddlewareRSB() instead!\n\n");
-        exit(EXIT_FAILURE);
-    }
-
-    ~MiddlewareROS(){}
-    bool ok(){ return false; }
-    void tick(){}
-
-#else
-public:
-    MiddlewareROS(std::string name, Controller *c);
-    ~MiddlewareROS();
-    bool ok();
-    void tick();
-
-private:
-    double convert_ros_to_timestamp_ms(ros::Time t);
-    bool tick_necessary;
-    void incoming_mouth_target(const humotion::mouth::ConstPtr& msg);
-    void incoming_gaze_target(const humotion::gaze::ConstPtr& msg);
-
-    ros::Subscriber mouth_target_subscriber;
-    ros::Subscriber gaze_target_subscriber;
-#endif
-};
-
-}
-}
-
diff --git a/include/server/middleware_rsb.h b/include/server/middleware_rsb.h
deleted file mode 100644
index 9be0567..0000000
--- a/include/server/middleware_rsb.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "middleware.h"
-#include "humotion/mouth.h"
-#include "humotion/gaze.h"
-
-#ifdef RSB_SUPPORT
-    #define BOOST_SIGNALS_NO_DEPRECATION_WARNING 1
-    #include <rsb/Listener.h>
-    #include <rst/robot/HumotionGazeTarget.pb.h>
-    #include <rst/robot/MouthTarget.pb.h>
-#endif
-
-namespace humotion{
-namespace server{
-
-class MiddlewareRSB : public Middleware{
-
-#ifndef RSB_SUPPORT
-public:
-    MiddlewareRSB(std::string name, Controller *c) : Middleware(name, c){
-        printf("> ERROR: humotion was compiled without RSB middleware support. Please use MiddlewareROS() instead!\n\n");
-        exit(EXIT_FAILURE);
-    }
-
-    ~MiddlewareRSB(){}
-    bool ok(){ return false; }
-    void tick(){}
-
-#else
-public:
-    MiddlewareRSB(std::string name, Controller *c);
-    ~MiddlewareRSB();
-
-    bool ok();
-    void tick();
-
-
-private:
-
-    void incoming_mouth_target(boost::shared_ptr<rst::robot::MouthTarget> event);
-    void incoming_gaze_target(rsb::EventPtr e);
-
-    rsb::ListenerPtr mouth_target_listener;
-    rsb::ListenerPtr gaze_target_listener;
-
-#endif
-};
-
-}
-}
diff --git a/include/server/motion_generator.h b/include/server/motion_generator.h
deleted file mode 100644
index 7c4f75a..0000000
--- a/include/server/motion_generator.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "joint_interface.h"
-#include "boost/date_time/posix_time/posix_time.hpp"
-#include <string>
-
-namespace humotion{
-namespace server{
-
-class MotionGenerator{
-public:
-    MotionGenerator(JointInterface *j);
-    ~MotionGenerator();
-
-    virtual void calculate_targets()=0;
-    virtual void publish_targets()=0;
-
-    virtual void set_gaze_target(GazeState s);
-    virtual void set_mouth_target(MouthState s);
-
-protected:
-    float get_current_position(int joint_id);
-    float limit_target(int joint_id, float val);
-
-    JointInterface *joint_interface;
-
-    //GAZE:
-    GazeState  requested_gaze_state;
-    boost::system_time last_gaze_target_update;
-    bool gaze_target_input_active();
-
-    //MOUTH
-    MouthState requested_mouth_target;
-    boost::system_time last_mouth_target_update;
-    bool mouth_target_input_active();
-
-};
-
-}
-}
diff --git a/include/server/mouth_motion_generator.h b/include/server/mouth_motion_generator.h
deleted file mode 100644
index 6461e02..0000000
--- a/include/server/mouth_motion_generator.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "motion_generator.h"
-
-namespace humotion{
-namespace server{
-
-class MouthMotionGenerator : public MotionGenerator{
-public:
-    MouthMotionGenerator(JointInterface *j);
-    ~MouthMotionGenerator();
-    void calculate_targets();
-    void publish_targets();
-
-private:
-    void calculate_mouth_target(int upper, int lower);
-    float mouthstate_to_opening(MouthState m, int e);
-    float mouthstate_to_position(MouthState m, int e);
-    void update_mouth_target(int upper_id, int lower_id);
-
-    //minimum mouth opening:
-    static const float MOUTH_MIN_OPENING;
-};
-
-}
-}
diff --git a/include/server/neck_motion_generator.h b/include/server/neck_motion_generator.h
deleted file mode 100644
index c8078a2..0000000
--- a/include/server/neck_motion_generator.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "gaze_motion_generator.h"
-
-namespace humotion{
-namespace server{
-
-class NeckMotionGenerator : public GazeMotionGenerator {
-public:
-    NeckMotionGenerator(JointInterface *j);
-    ~NeckMotionGenerator();
-    void calculate_targets();
-    void publish_targets();
-    void setup_neckmotion(int dof, float target, float now);
-
-private:
-    float get_breath_offset();
-
-    GazeState previous_neck_target;
-    GazeState  requested_neck_state;
-    bool neck_saccade_reached_goal;
-    bool neck_saccade_active;
-
-    static const float CONST_GUITTON87_A;
-    static const float CONST_GUITTON87_B;
-
-    float breath_time;
-    static const float CONST_BREATH_PERIOD;
-    static const float CONST_BREATH_AMPLITUDE;
-
-
-};
-
-}
-}
diff --git a/include/server/reflexxes_motion_generator.h b/include/server/reflexxes_motion_generator.h
deleted file mode 100644
index aa9883e..0000000
--- a/include/server/reflexxes_motion_generator.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "motion_generator.h"
-#include <ReflexxesAPI.h>
-#include <RMLPositionFlags.h>
-#include <RMLPositionInputParameters.h>
-#include <RMLPositionOutputParameters.h>
-
-namespace humotion{
-namespace server{
-
-class ReflexxesMotionGenerator : public MotionGenerator{
-public:
-    ReflexxesMotionGenerator(JointInterface *j, int dof, float t);
-    ~ReflexxesMotionGenerator();
-
-protected:
-    void reflexxes_set_input(int dof, float target, float max_speed, float max_accel);
-    void reflexxes_calculate_profile();
-
-    //*****************************************
-    ReflexxesAPI *reflexxes_api;
-    RMLPositionInputParameters *reflexxes_position_input;
-    RMLPositionOutputParameters *reflexxes_position_output;
-    RMLPositionFlags reflexxes_motion_flags;
-    //*****************************************
-    int dof_count;
-
-private:
-
-};
-
-}
-}
diff --git a/include/server/server.h b/include/server/server.h
deleted file mode 100644
index 07e92fd..0000000
--- a/include/server/server.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-
-#include "ros/ros.h"
-#include "middleware.h"
-#include "controller.h"
-#include <cstdio>
-#include <cstdint>
-#include <string>
-#include <boost/thread/thread.hpp>
-
-namespace humotion{
-namespace server{
-
-class Server{
-public:
-    Server(std::string name, std::string mw, JointInterface *_joint_interface);
-	~Server();
-    bool ok();
-    static const float MOTION_UPDATERATE;
-
-private:
-    void start_motion_generation_thread();
-    void motion_generation_thread();
-    boost::thread *motion_generation_thread_ptr;
-
-    Middleware *middleware;
-    Controller *controller;
-    JointInterface *joint_interface;
-};
-
-}
-}
diff --git a/include/timestamped_float.h b/include/timestamped_float.h
deleted file mode 100644
index 8016d81..0000000
--- a/include/timestamped_float.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string>
-
-namespace humotion{
-
-class TimestampedFloat{
-public:
-    TimestampedFloat(){
-		timestamp = 0.0;
-		value = 0.0;
-	}
-	
-    TimestampedFloat(double ts, float val){
-		timestamp = ts;
-		value = val;
-	}
-	
-	static double get_timestamp(){
-		//fetch time
-		struct timespec tp;
-		clock_gettime(CLOCK_REALTIME, &tp);
-		return tp.tv_sec+tp.tv_nsec/1000000000.0;
-	};
-	
-	double timestamp;
-    float value;
-	
-};
-
-
-}
diff --git a/include/timestamped_list.h b/include/timestamped_list.h
deleted file mode 100644
index c67dbd5..0000000
--- a/include/timestamped_list.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-* This file is part of humotion
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/humotion
-*
-* This file may be licensed under the terms of the
-* GNU Lesser General Public License Version 3 (the ``LGPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the LGPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the LGPL along with this
-* program. If not, go to http://www.gnu.org/licenses/lgpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*/
-
-#pragma once
-#include "timestamped_float.h"
-#include <boost/thread/mutex.hpp>
-#include <list>
-
-namespace humotion{
-class TimestampedList{
-public:
-    typedef std::list<TimestampedFloat> timestamped_float_list_t;
-
-    TimestampedList( TimestampedList const &l);
-	TimestampedList(unsigned int size=10);
-    void insert(double ts, float val);
-    float get_interpolated_value(double target_ts);
-    float get_newest_value();
-	static void run_tests();
-    void copy_tsf_list_to(timestamped_float_list_t *target);
-    double get_last_timestamp();
-
-private:
-    mutable boost::mutex access_mutex;
-    float interpolate(TimestampedFloat a, TimestampedFloat b, double timestamp);
-    timestamped_float_list_t tsf_list;
-};
-
-}
