[Jderobot-admin] jderobot-r1057 - in trunk: Deps/gtk3 src/stable/components src/stable/components/naoviewer src/stable/components/visualHFSM

bmenendez en jderobot.org bmenendez en jderobot.org
Mar Oct 15 15:20:41 CEST 2013


Author: bmenendez
Date: 2013-10-15 15:20:41 +0200 (Tue, 15 Oct 2013)
New Revision: 1057

Added:
   trunk/src/stable/components/naoviewer/
   trunk/src/stable/components/naoviewer/CMakeLists.txt
   trunk/src/stable/components/naoviewer/build/
   trunk/src/stable/components/naoviewer/common.h
   trunk/src/stable/components/naoviewer/control.cpp
   trunk/src/stable/components/naoviewer/control.h
   trunk/src/stable/components/naoviewer/displayer.cpp
   trunk/src/stable/components/naoviewer/displayer.h
   trunk/src/stable/components/naoviewer/main.cpp
   trunk/src/stable/components/naoviewer/main_gui.glade
   trunk/src/stable/components/naoviewer/naooperator.cfg
   trunk/src/stable/components/naoviewer/naooperator.cfg.2
   trunk/src/stable/components/naoviewer/naooperator.cfg.curro
   trunk/src/stable/components/naoviewer/naooperator.cfg.fraile
   trunk/src/stable/components/naoviewer/naooperator.cpp
   trunk/src/stable/components/naoviewer/naooperator.h
   trunk/src/stable/components/naoviewer/sensors.cpp
   trunk/src/stable/components/naoviewer/sensors.h
Modified:
   trunk/Deps/gtk3/CMakeLists.txt
   trunk/src/stable/components/visualHFSM/CMakeLists.txt
Log:
#75 Naoviewer added. It is a teleoperator for the Nao robot.


Modified: trunk/Deps/gtk3/CMakeLists.txt
===================================================================
--- trunk/Deps/gtk3/CMakeLists.txt	2013-10-15 12:29:25 UTC (rev 1056)
+++ trunk/Deps/gtk3/CMakeLists.txt	2013-10-15 13:20:41 UTC (rev 1057)
@@ -8,9 +8,3 @@
 ELSE()
     MESSAGE("*** Goocanvasmm LIBRARIES NOT FOUND")
 ENDIF()
-
-IF (goocanvasmm_INCLUDE_DIRS)
-    SET (VISUALHFSM_COMPILE TRUE)
-ELSE()
-    SET (VISUALHFSM_COMPILE FALSE)
-ENDIF()

Added: trunk/src/stable/components/naoviewer/CMakeLists.txt
===================================================================
--- trunk/src/stable/components/naoviewer/CMakeLists.txt	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/CMakeLists.txt	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,29 @@
+IF (goocanvasmm_INCLUDE_DIRS)
+
+SET( SOURCE_FILES_NAOOPERATOR sensors.cpp control.cpp naooperator.cpp displayer.cpp main.cpp )
+
+SET( CMAKE_CXX_FLAGS "-lpthread -lIce" ) # Opciones para el compilador
+
+include_directories (
+    ${INTERFACES_CPP_DIR}
+    ${LIBS_DIR}
+    ${CMAKE_CURRENT_SOURCE_DIR}
+    ${gtkmm3_INCLUDE_DIRS}
+    ${gtk3_INCLUDE_DIRS}
+    ${goocanvasmm_INCLUDE_DIRS}
+    ${OpenCV_INCLUDE_DIRS}
+)
+
+add_executable (naooperator ${SOURCE_FILES_NAOOPERATOR})
+
+TARGET_LINK_LIBRARIES ( naooperator 
+    JderobotInterfaces
+    jderobotutil
+    ${gtkmm3_LIBRARIES}
+    ${gtk3_LIBRARIES}
+    ${goocanvasmm_LIBRARIES}
+    ${ZeroCIce_LIBRARIES}
+    ${OpenCV_LIBRARIES}
+)
+
+ENDIF()

Added: trunk/src/stable/components/naoviewer/common.h
===================================================================
--- trunk/src/stable/components/naoviewer/common.h	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/common.h	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,76 @@
+/*
+ *  Copyright (C) 1997-2013 JDERobot Developers Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Authors : Borja Menéndez <borjamonserrano en gmail.com>
+ *
+ */
+
+#ifndef NAOOPERATOR_COMMON_H
+#define NAOOPERATOR_COMMON_H
+
+typedef enum Hinge {
+    PITCH_LEFT_SHOULDER,
+    ROLL_LEFT_SHOULDER,
+    YAWPITCH_LEFT_HIP,
+    PITCH_LEFT_HIP,
+    ROLL_LEFT_HIP,
+    YAWPITCH_RIGHT_HIP,
+    PITCH_RIGHT_HIP,
+    ROLL_RIGHT_HIP,
+    PITCH_RIGHT_SHOULDER,
+    ROLL_RIGHT_SHOULDER,
+    YAW_LEFT_ELBOW,
+    ROLL_LEFT_ELBOW,
+    PITCH_LEFT_KNEE,
+    PITCH_RIGHT_KNEE,
+    YAW_RIGHT_ELBOW,
+    ROLL_RIGHT_ELBOW,
+    PITCH_LEFT_ANKLE,
+    ROLL_LEFT_ANKLE,
+    PITCH_RIGHT_ANKLE,
+    ROLL_RIGHT_ANKLE,
+    HINGE_END
+} Hinge;
+
+typedef enum Motion {
+    HEADMOTORS,
+    HEADSPEED,
+    LEFTSHOULDERMOTORS,
+    RIGHTSHOULDERMOTORS,
+    LEFTELBOWMOTORS,
+    RIGHTELBOWMOTORS,
+    LEFTHIPMOTORS,
+    RIGHTHIPMOTORS,
+    LEFTKNEEMOTORS,
+    RIGHTKNEEMOTORS,
+    LEFTANKLEMOTORS,
+    RIGHTANKLEMOTORS,
+    MOTORS
+} Motion;
+
+typedef enum Action {
+    RIGHTKICK,
+    LEFTKICK,
+    STANDUP_BACK,
+    STANDUP_FRONT,
+    INTERCEPT,
+    CHANGECAMERA,
+    RESETNAOQI
+} Action;
+
+const float PI = 3.14159265;
+
+# endif // NAOOPERATOR_COMMON_H

Added: trunk/src/stable/components/naoviewer/control.cpp
===================================================================
--- trunk/src/stable/components/naoviewer/control.cpp	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/control.cpp	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,293 @@
+/*
+ *  Copyright (C) 1997-2013 JDERobot Developers Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Authors : Borja Menéndez <borjamonserrano en gmail.com>
+ *
+ */
+
+#include "control.h"
+
+/*************************************************************
+ * CONSTRUCTOR
+ *************************************************************/
+Control::Control () {}
+
+/*************************************************************
+ * DESTRUCTOR
+ *************************************************************/
+Control::~Control () {
+    if (ic)
+        ic->destroy();
+}
+
+/*************************************************************
+ * SETTERS
+ *************************************************************/
+void Control::setArgs ( int argc, char** argv) {
+    this->argc = argc;
+    this->argv = argv;
+}
+
+float Control::normalizeMe ( float number, float negBound, float posBound ) {
+    float n = number - 100.0;
+    if (n > 100.0)
+        n = 100.0;
+        
+    return (posBound * n / 100.0);
+}
+
+void Control::setMovement ( Motion m, float yaw_v, float pitch_w, float roll_l ) {
+    bool send = true;
+    if (m == MOTORS) {
+        if ( (yaw_v == 0.0) && (pitch_w == 0.0) && (roll_l == 0.0) ) {
+            this->motors_v = 0.0;
+            this->motors_w = 0.0;
+            this->motors_l = 0.0;
+        } else {
+            if (directMovement) {
+                this->motors_v = - this->normalizeMe(yaw_v, -1.0, 1.0);
+                this->motors_w = - this->normalizeMe(pitch_w, -1.0, 1.0);
+            } else if ((this->motors_v + yaw_v <= 1.0) || (this->motors_w + pitch_w <= 1.0)) {
+                this->motors_v += yaw_v;
+                this->motors_w += pitch_w;
+                this->motors_l += roll_l;
+            } else {
+                send = false;
+            }
+        }
+        if (send) {
+            this->walk->setV(this->motors_v);
+            this->walk->setW(this->motors_w);
+            this->walk->setL(this->motors_l);
+        }
+    } else if (m == HEADMOTORS) {
+        jderobot::Pose3DMotorsDataPtr pose(new jderobot::Pose3DMotorsData);
+        if ( (yaw_v == 0.0) && (pitch_w == 0.0) && (roll_l == 0.0) ) {
+            this->head_pan = 0.0;
+            this->head_tilt = 0.0;
+        } else {
+            if (directHead) {
+                this->head_pan = - this->normalizeMe(yaw_v, -2.0858, 2.0858);
+                this->head_tilt = this->normalizeMe(pitch_w, -0.6721, 0.515);
+            } else if (((this->head_pan + yaw_v < 2.0858 ) && (this->head_pan - yaw_v > -2.0858 )) ||
+                       ((this->head_tilt + pitch_w < 0.515) && (this->head_tilt - pitch_w > -0.6721))) {
+                this->head_pan += yaw_v;
+                this->head_tilt += pitch_w;
+            } else {
+                send = false;
+            }
+        }
+        if (send) {
+            pose->pan = this->head_pan;
+            pose->tilt = this->head_tilt;
+            pose->roll = 0.0;
+            this->mapMotors[m]->setPose3DMotorsData(pose);
+        }
+    } else if (m == HEADSPEED) {
+        jderobot::Pose3DMotorsDataPtr pose(new jderobot::Pose3DMotorsData);
+        pose->panSpeed = yaw_v;
+        pose->tiltSpeed = pitch_w;
+        this->mapMotors[m]->setPose3DMotorsData(pose);
+    } else {
+        jderobot::Pose3DMotorsDataPtr pose(new jderobot::Pose3DMotorsData);
+        pose->pan = yaw_v * PI / 180.0;
+        pose->tilt = pitch_w * PI / 180.0;
+        pose->roll = roll_l * PI / 180.0;
+        this->mapMotors[m]->setPose3DMotorsData(pose);
+    }
+}
+
+void Control::setAction ( Action a ) {
+    this->motions->setMotion((jderobot::MotionType) a);
+}
+
+void Control::setDirectMovement ( bool b ) {
+    this->directMovement = b;
+}
+
+void Control::setDirectHead ( bool b ) {
+    this->directHead = b;
+}
+
+/*************************************************************
+ * GETTERS
+ *************************************************************/
+int Control::getArgc () {
+    return this->argc;
+}
+
+char** Control::getArgv () {
+    return this->argv;
+}
+
+jderobot::ImageDataPtr Control::getImage () {
+    return this->cameraprx->getImageData();
+}
+
+int Control::connect () { 
+    try {
+        // ICE
+        char* name = (char*) "--Ice.Config=naooperator.cfg";
+        int argc = 1;
+        char* argv[] = {name};
+        std::cout << "Initializing..." << std::endl;
+        ic = Ice::initialize(argc, argv);
+//        ic = Ice::initialize(control->getArgc(), control->getArgv());
+        
+        // Contact to head motors
+        Ice::ObjectPrx headmotors = ic->propertyToProxy("naooperator.HeadMotors.Proxy");
+        if (headmotors == 0)
+            throw "Could not create proxy with head motors";
+        this->mapMotors[HEADMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(headmotors);
+        if (this->mapMotors[HEADMOTORS] == 0)
+            throw "Invalid proxy naooperator.HeadMotors.Proxy";
+        std::cout << "Head motors connected" << std::endl;
+        
+        // Contact to head motors (speed commands)
+        Ice::ObjectPrx headspeed = ic->propertyToProxy("naooperator.HeadSpeed.Proxy");
+        if (headspeed == 0)
+            throw "Could not create proxy with head speed";
+        this->mapMotors[HEADSPEED] = jderobot::Pose3DMotorsPrx::checkedCast(headspeed);
+        if (this->mapMotors[HEADSPEED] == 0)
+            throw "Invalid proxy naooperator.HeadSpeed.Proxy";
+        std::cout << "Head speed connected" << std::endl;
+            
+        // Contact to shoulder motors
+        Ice::ObjectPrx leftshouldermotors = ic->propertyToProxy("naooperator.LeftShoulderMotors.Proxy");
+        if (leftshouldermotors == 0)
+            throw "Could not create proxy with left shoulder motors";
+        this->mapMotors[LEFTSHOULDERMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(leftshouldermotors);
+        if (this->mapMotors[LEFTSHOULDERMOTORS] == 0)
+            throw "Invalid proxy naooperator.LeftShoulderMotors.Proxy";
+        std::cout << "Left shoulder motors connected" << std::endl;
+            
+        Ice::ObjectPrx rightshouldermotors = ic->propertyToProxy("naooperator.RightShoulderMotors.Proxy");
+        if (rightshouldermotors == 0)
+            throw "Could not create proxy with right shoulder motors";
+        this->mapMotors[RIGHTSHOULDERMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(rightshouldermotors);
+        if (this->mapMotors[RIGHTSHOULDERMOTORS] == 0)
+            throw "Invalid proxy naooperator.RightShoulderMotors.Proxy";
+        std::cout << "Right shoulder motors connected" << std::endl;
+            
+        // Contact to elbow motors
+        Ice::ObjectPrx leftelbowmotors = ic->propertyToProxy("naooperator.LeftElbowMotors.Proxy");
+        if (leftelbowmotors == 0)
+            throw "Could not create proxy with left elbow motors";
+        this->mapMotors[LEFTELBOWMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(leftelbowmotors);
+        if (this->mapMotors[LEFTELBOWMOTORS] == 0)
+            throw "Invalid proxy naooperator.LeftElbowMotors.Proxy";
+        std::cout << "Left elbow motors connected" << std::endl;
+            
+        Ice::ObjectPrx rightelbowmotors = ic->propertyToProxy("naooperator.RightElbowMotors.Proxy");
+        if (rightelbowmotors == 0)
+            throw "Could not create proxy with right elbow motors";
+        this->mapMotors[RIGHTELBOWMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(rightelbowmotors);
+        if (this->mapMotors[RIGHTELBOWMOTORS] == 0)
+            throw "Invalid proxy naooperator.RightElbowMotors.Proxy";
+        std::cout << "Right elbow motors connected" << std::endl;
+            
+        // Contact to hip motors
+        Ice::ObjectPrx lefthipmotors = ic->propertyToProxy("naooperator.LeftHipMotors.Proxy");
+        if (lefthipmotors == 0)
+            throw "Could not create proxy with left hip motors";
+        this->mapMotors[LEFTHIPMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(lefthipmotors);
+        if (this->mapMotors[LEFTHIPMOTORS] == 0)
+            throw "Invalid proxy naooperator.LeftHipMotors.Proxy";
+        std::cout << "Left hip motors connected" << std::endl;
+            
+        Ice::ObjectPrx righthipmotors = ic->propertyToProxy("naooperator.RightHipMotors.Proxy");
+        if (righthipmotors == 0)
+            throw "Could not create proxy with right hip motors";
+        this->mapMotors[RIGHTHIPMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(righthipmotors);
+        if (this->mapMotors[RIGHTHIPMOTORS] == 0)
+            throw "Invalid proxy naooperator.RightHipMotors.Proxy";
+        std::cout << "Right hip motors connected" << std::endl;
+            
+        // Contact to knee motors
+        Ice::ObjectPrx leftkneemotors = ic->propertyToProxy("naooperator.LeftKneeMotors.Proxy");
+        if (leftkneemotors == 0)
+            throw "Could not create proxy with left knee motors";
+        this->mapMotors[LEFTKNEEMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(leftkneemotors);
+        if (this->mapMotors[LEFTKNEEMOTORS] == 0)
+            throw "Invalid proxy naooperator.LeftKneeMotors.Proxy";
+        std::cout << "Left knee motors connected" << std::endl;
+            
+        Ice::ObjectPrx rightkneemotors = ic->propertyToProxy("naooperator.RightKneeMotors.Proxy");
+        if (rightkneemotors == 0)
+            throw "Could not create proxy with right knee motors";
+        this->mapMotors[RIGHTKNEEMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(rightkneemotors);
+        if (this->mapMotors[RIGHTKNEEMOTORS] == 0)
+            throw "Invalid proxy naooperator.RightKneeMotors.Proxy";
+        std::cout << "Right knee motors connected" << std::endl;
+            
+        // Contact to ankle motors
+        Ice::ObjectPrx leftanklemotors = ic->propertyToProxy("naooperator.LeftAnkleMotors.Proxy");
+        if (leftanklemotors == 0)
+            throw "Could not create proxy with left ankle motors";
+        this->mapMotors[LEFTANKLEMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(leftanklemotors);
+        if (this->mapMotors[LEFTANKLEMOTORS] == 0)
+            throw "Invalid proxy naooperator.LeftAnkleMotors.Proxy";
+        std::cout << "Left ankle motors connected" << std::endl;
+            
+        Ice::ObjectPrx rightanklemotors = ic->propertyToProxy("naooperator.RightAnkleMotors.Proxy");
+        if (rightanklemotors == 0)
+            throw "Could not create proxy with right ankle motors";
+        this->mapMotors[RIGHTANKLEMOTORS] = jderobot::Pose3DMotorsPrx::checkedCast(rightanklemotors);
+        if (this->mapMotors[RIGHTANKLEMOTORS] == 0)
+            throw "Invalid proxy naooperator.RightAnkleMotors.Proxy";
+        std::cout << "Right ankle motors connected" << std::endl;
+            
+        std::cout << "All hinge motors connected!" << std::endl;
+        
+        // Contact to camera
+/*        Ice::ObjectPrx camera = ic->propertyToProxy("naooperator.Camera.Proxy");
+        if (camera == 0)
+            throw "Could not create proxy with camera";
+        this->cameraprx = jderobot::CameraPrx::checkedCast(camera);
+        if (this->cameraprx == 0)
+            throw "Invalid proxy naooperator.Camera.Proxy";
+        std::cout << "Camera connected" << std::endl;
+*/
+        // Contact to motors (for walking)
+        Ice::ObjectPrx motors = ic->propertyToProxy("naooperator.Motors.Proxy");
+        if (motors == 0)
+            throw "Could not create proxy with motors";
+        this->walk = jderobot::MotorsPrx::checkedCast(motors);
+        if (this->walk == 0)
+            throw "Invalid proxy naooperator.Motors.Proxy";
+        std::cout << "Motors connected" << std::endl;
+        
+        // Contact to motors (for different actions)
+        Ice::ObjectPrx motionsPrx = ic->propertyToProxy("naooperator.Motions.Proxy");
+        if (motionsPrx == 0)
+            throw "Could not create proxy with motions";
+        this->motions = jderobot::NaoMotionsPrx::checkedCast(motionsPrx);
+        if (this->motions == 0)
+            throw "Invalid proxy naooperator.Motions.Proxy";
+        std::cout << "Motions connected" << std::endl;
+        
+        std::cout << "All ICE interfaces connected!" << std::endl;
+
+    } catch (const Ice::Exception& ex) {
+        std::cerr << ex << std::endl;
+        return -1;
+    } catch (const char* msg) {
+        std::cerr << msg << std::endl;
+        return -1;
+    }
+        
+    return 0;
+}

Added: trunk/src/stable/components/naoviewer/control.h
===================================================================
--- trunk/src/stable/components/naoviewer/control.h	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/control.h	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,79 @@
+/*
+ *  Copyright (C) 1997-2013 JDERobot Developers Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Authors : Borja Menéndez <borjamonserrano en gmail.com>
+ *
+ */
+
+#ifndef CONTROL_H
+#define CONTROL_H
+
+#include <iostream>
+#include <stdio.h>
+#include <Ice/Ice.h>
+#include <jderobot/motors.h>
+#include <jderobot/pose3dmotors.h>
+#include <jderobot/pose3dencoders.h>
+#include <jderobot/naomotions.h>
+#include <jderobot/camera.h>
+#include <math.h>
+
+#include "common.h"
+
+class Control {
+public:
+    // Constructor
+    Control ();
+    
+    // Destructor
+    virtual ~Control ();
+    
+    // Setters
+    void setArgs ( int argc, char** argv );
+    void setMovement ( Motion m, float yaw_v, float pitch_w, float roll_l );
+    void setAction ( Action a );
+    void setDirectMovement ( bool b );
+    void setDirectHead ( bool b );
+    
+    // Getters
+    int getArgc ();
+    char** getArgv ();
+    
+    jderobot::ImageDataPtr getImage ();
+    
+    // Another functions
+    int connect ();
+    
+private:
+    std::map<Motion, jderobot::Pose3DMotorsPrx> mapMotors;
+    jderobot::MotorsPrx walk;
+    jderobot::NaoMotionsPrx motions;
+    jderobot::CameraPrx cameraprx;
+    
+    Ice::CommunicatorPtr ic;
+    
+    float head_tilt, head_pan;
+    float motors_v, motors_w, motors_l;
+    
+    bool directMovement, directHead;
+    
+    int argc;
+    char** argv;
+    
+    float normalizeMe ( float number, float negBound, float posBound );
+}; // Class Control
+
+#endif // CONTROL_H

Added: trunk/src/stable/components/naoviewer/displayer.cpp
===================================================================
--- trunk/src/stable/components/naoviewer/displayer.cpp	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/displayer.cpp	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,105 @@
+/*
+ *  Copyright (C) 1997-2013 JDERobot Developers Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Authors : Borja Menéndez <borjamonserrano en gmail.com>
+ *
+ */
+
+#include "displayer.h"
+
+#define cycle_control 1000 //miliseconds
+
+/*************************************************************
+ * CONSTRUCTOR
+ *************************************************************/
+Displayer::Displayer ( Control* control, NaoOperator* naooperator) {
+    this->control = control;
+    this->naooperator = naooperator;
+}
+
+/*************************************************************
+ * DESTRUCTOR
+ *************************************************************/
+Displayer::~Displayer () {
+    delete this->control;
+    delete this->naooperator;
+}
+
+/*************************************************************
+ * ANOTHER FUNCTIONS
+ *************************************************************/
+void Displayer::init () {
+    pthread_t thread_d;
+    pthread_create(&thread_d, NULL, &thr_display, (void*) this);
+}
+
+void* thr_display ( void* obj ) {
+    Displayer* displayer = (Displayer*) obj;
+    
+    jderobot::ImageDataPtr data = displayer->control->getImage();
+    Sensors* sensors = new Sensors(data);
+    
+    struct timeval a, b;
+    long diff;
+    long totalb, totala;
+    
+    while (true) {
+        gettimeofday(&a, NULL);
+        totala = a.tv_sec * 1000000 + a.tv_usec;
+            
+        jderobot::ImageDataPtr data = displayer->control->getImage();
+        cv::Mat image1;
+        
+        if (displayer->naooperator->isFollowingBall()) {
+            sensors->update(data);
+            image1 = sensors->getImage();
+            
+            float panSpeed = sensors->getPanSpeed();
+            float tiltSpeed = sensors->getTiltSpeed();
+            
+            displayer->control->setMovement(HEADSPEED, panSpeed, tiltSpeed, 0.0);
+        }
+        
+        image1.create(cv::Size(data->description->width, data->description->height), CV_8UC3);
+
+        memcpy((unsigned char *) image1.data ,&(data->pixelData[0]), image1.cols*image1.rows * 3);
+/*        for(int x =0; x < image1.cols; x++){
+            for(int y =0; y < image1.rows; y++){
+                int indice = image1.step*y + x*image1.channels();
+                
+                image1.data[indice] = data->pixelData[indice];
+                image1.data[indice+1] = data->pixelData[indice];
+                image1.data[indice+2] = data->pixelData[indice];
+            }
+        }
+*/        
+        displayer->naooperator->display(image1);
+        
+        //Sleep Algorithm
+        gettimeofday(&b, NULL);
+        totalb = b.tv_sec * 1000000 + b.tv_usec;
+        diff = (totalb - totala) / 1000;
+        if (diff < 0 || diff > cycle_control)
+            diff = cycle_control;
+        else
+            diff = cycle_control - diff;
+
+        /*Sleep Algorithm*/
+        usleep(diff * 1000);
+        if (diff < 33)
+            usleep(33 * 1000);
+    }
+}

Added: trunk/src/stable/components/naoviewer/displayer.h
===================================================================
--- trunk/src/stable/components/naoviewer/displayer.h	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/displayer.h	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,51 @@
+/*
+ *  Copyright (C) 1997-2013 JDERobot Developers Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Authors : Borja Menéndez <borjamonserrano en gmail.com>
+ *
+ */
+
+#ifndef DISPLAYER_H
+#define DISPLAYER_H
+
+#include <iostream>
+//#include <colorspaces/colorspacesmm.h>
+
+#include "control.h"
+#include "naooperator.h"
+#include "sensors.h"
+
+void* thr_display ( void* obj );
+
+class Displayer {
+public:
+    // Constructor
+    Displayer ( Control* control, NaoOperator* naooperator );
+    
+    // Destructor
+    virtual ~Displayer ();
+    
+    // Another functions
+    void init ();
+    
+    Control* control;
+    NaoOperator* naooperator;
+    
+private:
+    
+}; // Class Displayer
+
+#endif

Added: trunk/src/stable/components/naoviewer/main.cpp
===================================================================
--- trunk/src/stable/components/naoviewer/main.cpp	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/main.cpp	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,45 @@
+/*
+ *  Copyright (C) 1997-2013 JDERobot Developers Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Authors : Borja Menéndez <borjamonserrano en gmail.com>
+ *
+ */
+
+#include "naooperator.h"
+#include "control.h"
+#include "displayer.h"
+
+int main ( int argc, char** argv ) {
+    Control* control = new Control();
+
+    if ( control->connect() != -1 ) {
+        Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "jderobot.naooperator");
+        
+        NaoOperator* naooperator = new NaoOperator(control);
+        
+//        Displayer* displayer = new Displayer(control, naooperator);
+//        displayer->init();
+        
+        int returned = app->run(*naooperator);
+        
+//        delete displayer;
+        delete naooperator;
+        
+        return returned;
+    }
+    
+    return -1;
+}

Added: trunk/src/stable/components/naoviewer/main_gui.glade
===================================================================
--- trunk/src/stable/components/naoviewer/main_gui.glade	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/main_gui.glade	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,2012 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">-119.5</property>
+    <property name="upper">119.5</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment10">
+    <property name="lower">-76</property>
+    <property name="upper">18</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment11">
+    <property name="lower">-119.5</property>
+    <property name="upper">119.5</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment12">
+    <property name="lower">-88.5</property>
+    <property name="upper">-2</property>
+    <property name="value">-2</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment13">
+    <property name="lower">-5.29</property>
+    <property name="upper">121.04000000000001</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment14">
+    <property name="lower">-5.29</property>
+    <property name="upper">121.04000000000001</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment15">
+    <property name="lower">-119.5</property>
+    <property name="upper">119.5</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment16">
+    <property name="lower">-2</property>
+    <property name="upper">88.5</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment17">
+    <property name="lower">-68.150000000000006</property>
+    <property name="upper">52.859999999999999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment18">
+    <property name="lower">-22.789999999999999</property>
+    <property name="upper">44.060000000000002</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment19">
+    <property name="lower">-68.150000000000006</property>
+    <property name="upper">52.859999999999999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">-18</property>
+    <property name="upper">76</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment20">
+    <property name="lower">-44.060000000000002</property>
+    <property name="upper">22.789999999999999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="lower">-65.620000000000005</property>
+    <property name="upper">42.439999999999998</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="lower">-101.63</property>
+    <property name="upper">27.73</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment5">
+    <property name="lower">-21.739999999999998</property>
+    <property name="upper">45.289999999999999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment6">
+    <property name="lower">-65.620000000000005</property>
+    <property name="upper">42.439999999999998</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment7">
+    <property name="lower">-101.63</property>
+    <property name="upper">27.73</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment8">
+    <property name="lower">-21.739999999999998</property>
+    <property name="upper">45.289999999999999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment9">
+    <property name="lower">-119.5</property>
+    <property name="upper">119.5</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkWindow" id="main_window">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkMenuBar" id="menubar1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkMenuItem" id="menuitem1">
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">_Archivo</property>
+                <property name="use_underline">True</property>
+                <child type="submenu">
+                  <object class="GtkMenu" id="menu1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem1">
+                        <property name="label">gtk-new</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem2">
+                        <property name="label">gtk-open</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem3">
+                        <property name="label">gtk-save</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem4">
+                        <property name="label">gtk-save-as</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem5">
+                        <property name="label">gtk-quit</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuItem" id="menuitem2">
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">_Editar</property>
+                <property name="use_underline">True</property>
+                <child type="submenu">
+                  <object class="GtkMenu" id="menu2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem6">
+                        <property name="label">gtk-cut</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem7">
+                        <property name="label">gtk-copy</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem8">
+                        <property name="label">gtk-paste</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem9">
+                        <property name="label">gtk-delete</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuItem" id="menuitem3">
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">_Ver</property>
+                <property name="use_underline">True</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuItem" id="menuitem4">
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Ay_uda</property>
+                <property name="use_underline">True</property>
+                <child type="submenu">
+                  <object class="GtkMenu" id="menu3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem10">
+                        <property name="label">gtk-about</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkBox" id="box3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkBox" id="box4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <object class="GtkFixed" id="fixed1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkButton" id="button_front">
+                            <property name="label" translatable="yes">Front</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="width_request">50</property>
+                            <property name="height_request">50</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                          </object>
+                          <packing>
+                            <property name="x">95</property>
+                            <property name="y">6</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_stop">
+                            <property name="label" translatable="yes">Stop</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="width_request">50</property>
+                            <property name="height_request">50</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                          </object>
+                          <packing>
+                            <property name="x">95</property>
+                            <property name="y">60</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_back">
+                            <property name="label" translatable="yes">Back</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="width_request">50</property>
+                            <property name="height_request">50</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="xalign">0.52999997138977051</property>
+                          </object>
+                          <packing>
+                            <property name="x">95</property>
+                            <property name="y">114</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_right">
+                            <property name="label">Right</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="width_request">50</property>
+                            <property name="height_request">50</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                          </object>
+                          <packing>
+                            <property name="x">148</property>
+                            <property name="y">60</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_left">
+                            <property name="label">Left</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="width_request">50</property>
+                            <property name="height_request">50</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
+                          </object>
+                          <packing>
+                            <property name="x">41</property>
+                            <property name="y">60</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_lat_right">
+                            <property name="label" translatable="yes">LatR</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="width_request">50</property>
+                            <property name="height_request">50</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="tooltip_markup" translatable="yes">	</property>
+                            <property name="use_action_appearance">False</property>
+                          </object>
+                          <packing>
+                            <property name="x">148</property>
+                            <property name="y">6</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button_lat_left">
+                            <property name="label" translatable="yes">LatL</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="width_request">50</property>
+                            <property name="height_request">50</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="has_tooltip">True</property>
+                            <property name="tooltip_markup" translatable="yes">	</property>
+                            <property name="tooltip_text" translatable="yes">	</property>
+                            <property name="use_action_appearance">False</property>
+                          </object>
+                          <packing>
+                            <property name="x">41</property>
+                            <property name="y">6</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkViewport" id="viewport_move">
+                        <property name="width_request">200</property>
+                        <property name="height_request">200</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="box27">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <object class="GtkImage" id="camera_image">
+                        <property name="width_request">160</property>
+                        <property name="height_request">120</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="stock">gtk-missing-image</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkAlignment" id="alignment14">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="left_padding">12</property>
+                                <child>
+                                  <object class="GtkGrid" id="grid1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <child>
+                                      <object class="GtkButton" id="button_reset_naoqi">
+                                        <property name="label" translatable="yes">Reset NaoQi</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="yalign">0.55000001192092896</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">6</property>
+                                        <property name="width">1</property>
+                                        <property name="height">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="button_right_kick">
+                                        <property name="label" translatable="yes">Righ kick</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="use_action_appearance">False</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">0</property>
+                                        <property name="width">1</property>
+                                        <property name="height">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="button_standup_back">
+                                        <property name="label" translatable="yes">Stand up back</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="use_action_appearance">False</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="width">1</property>
+                                        <property name="height">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="button_standup_front">
+                                        <property name="label" translatable="yes">Stand up front</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="use_action_appearance">False</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="width">1</property>
+                                        <property name="height">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="button_left_kick">
+                                        <property name="label" translatable="yes">Left kick</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="use_action_appearance">False</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="width">1</property>
+                                        <property name="height">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="button_intercept">
+                                        <property name="label" translatable="yes">Intercept</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="use_action_appearance">False</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">4</property>
+                                        <property name="width">1</property>
+                                        <property name="height">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="button_change_camera">
+                                        <property name="label" translatable="yes">Change camera</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="yalign">0.55000001192092896</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">0</property>
+                                        <property name="top_attach">5</property>
+                                        <property name="width">1</property>
+                                        <property name="height">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="checkbutton_followball">
+                                        <property name="label" translatable="yes">FollowBall</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="use_action_appearance">False</property>
+                                        <property name="xalign">0</property>
+                                        <property name="draw_indicator">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="top_attach">0</property>
+                                        <property name="width">1</property>
+                                        <property name="height">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_actions">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Actions:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">none</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkBox" id="box6">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="homogeneous">True</property>
+                            <child>
+                              <object class="GtkFixed" id="fixed2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <object class="GtkButton" id="button_up_head">
+                                    <property name="label">Up</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="width_request">50</property>
+                                    <property name="height_request">50</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="use_action_appearance">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="x">95</property>
+                                    <property name="y">6</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" id="button_stop_head">
+                                    <property name="label" translatable="yes">Stop</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="width_request">50</property>
+                                    <property name="height_request">50</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="use_action_appearance">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="x">95</property>
+                                    <property name="y">60</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" id="button_right_head">
+                                    <property name="label">Right</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="width_request">50</property>
+                                    <property name="height_request">50</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="use_action_appearance">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="x">148</property>
+                                    <property name="y">60</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" id="button_down_head">
+                                    <property name="label">Down</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="width_request">50</property>
+                                    <property name="height_request">50</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="use_action_appearance">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="x">95</property>
+                                    <property name="y">114</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" id="button_left_head">
+                                    <property name="label">Left</property>
+                                    <property name="use_action_appearance">False</property>
+                                    <property name="width_request">50</property>
+                                    <property name="height_request">50</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="use_action_appearance">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="x">41</property>
+                                    <property name="y">60</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkViewport" id="viewport_head">
+                                <property name="width_request">200</property>
+                                <property name="height_request">200</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label_head">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Head:&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                        <property name="width_chars">0</property>
+                        <property name="angle">0.019999999552965164</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box7">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="homogeneous">True</property>
+                <child>
+                  <object class="GtkBox" id="box8">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <object class="GtkFrame" id="frame4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment4">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box11">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkBox" id="box17">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_pitch_left_shoulder">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Pitch</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_pitch_left_shoulder">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment1</property>
+                                        <property name="inverted">True</property>
+                                        <property name="lower_stepper_sensitivity">on</property>
+                                        <property name="upper_stepper_sensitivity">on</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box18">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_roll_left_shoulder">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Roll</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_roll_left_shoulder">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment2</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_left_shoulder">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Left shoulder:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment5">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box12">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkBox" id="box19">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_yawpitch_left_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">YawPitch</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_yawpitch_left_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment3</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box20">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_pitch_left_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Pitch</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_pitch_left_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment4</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box21">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_roll_left_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Roll</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_roll_left_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment5</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_left_hip">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Left hip:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame6">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment6">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box13">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkBox" id="box22">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_yawpitch_right_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">YawPitch</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_yawpitch_right_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment6</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box23">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_pitch_right_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Pitch</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_pitch_right_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment7</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box24">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_roll_right_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Roll</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_roll_right_hip">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment8</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_right_hip">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Right hip:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame7">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment7">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box14">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkBox" id="box25">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_pitch_right_shoulder">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Pitch</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_pitch_right_shoulder">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment9</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box26">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_roll_right_shoulder">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Roll</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_roll_right_shoulder">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment10</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_right_shoulder">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Right shoulder:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="box9">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <object class="GtkFrame" id="frame8">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment8">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box15">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkBox" id="box28">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_yaw_left_elbow">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Yaw</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_yaw_left_elbow">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment11</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box29">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_roll_left_elbow">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Roll</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_roll_left_elbow">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment12</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_left_elbow">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Left elbow:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame9">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment9">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box30">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkLabel" id="label_pitch_left_knee">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Pitch</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkScale" id="scale_pitch_left_knee">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="orientation">vertical</property>
+                                    <property name="adjustment">adjustment13</property>
+                                    <property name="inverted">True</property>
+                                    <property name="round_digits">1</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_left_knee">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Left knee:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame10">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment10">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box31">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkLabel" id="label_pitch_right_knee">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Pitch</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkScale" id="scale_pitch_right_knee">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="orientation">vertical</property>
+                                    <property name="adjustment">adjustment14</property>
+                                    <property name="inverted">True</property>
+                                    <property name="round_digits">1</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_right_knee">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Right knee:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame11">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment11">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box16">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkBox" id="box34">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_yaw_right_elbow">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Yaw</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_yaw_right_elbow">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment15</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box35">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_roll_right_elbow">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Roll</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_roll_right_elbow">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment16</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_right_elbow">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Right elbow:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="box10">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="homogeneous">True</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame12">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment12">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box32">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkBox" id="box36">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_pitch_left_ankle">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Pitch</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_pitch_left_ankle">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment17</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box37">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_roll_left_ankle">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Roll</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_roll_left_ankle">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment18</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_left_ankle">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Left ankle:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame13">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment13">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="left_padding">12</property>
+                            <child>
+                              <object class="GtkBox" id="box33">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="homogeneous">True</property>
+                                <child>
+                                  <object class="GtkBox" id="box38">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_pitch_right_ankle">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Pitch</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_pitch_right_ankle">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment19</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkBox" id="box39">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label_roll_right_ankle">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Roll</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkScale" id="scale_roll_right_ankle">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <property name="adjustment">adjustment20</property>
+                                        <property name="inverted">True</property>
+                                        <property name="round_digits">1</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label_right_ankle">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">&lt;b&gt;Right ankle:&lt;/b&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>

Added: trunk/src/stable/components/naoviewer/naooperator.cfg
===================================================================
--- trunk/src/stable/components/naoviewer/naooperator.cfg	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/naooperator.cfg	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,16 @@
+#Curro
+naooperator.HeadMotors.Proxy=NeckMotors:default -h 192.168.14.113 -p 10000
+naooperator.HeadSpeed.Proxy=NeckSpeed:default -h 192.168.14.113 -p 10000
+naooperator.LeftShoulderMotors.Proxy=LeftShoulderMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightShoulderMotors.Proxy=RightShoulderMotors:default -h 192.168.14.113 -p 10000
+naooperator.LeftElbowMotors.Proxy=LeftElbowMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightElbowMotors.Proxy=RightElbowMotors:default -h 192.168.14.113 -p 10000
+naooperator.LeftHipMotors.Proxy=LeftHipMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightHipMotors.Proxy=RightHipMotors:default -h 192.168.14.113 -p 10000
+naooperator.LeftKneeMotors.Proxy=LeftKneeMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightKneeMotors.Proxy=RightKneeMotors:default -h 192.168.14.113 -p 10000
+naooperator.LeftAnkleMotors.Proxy=LeftAnkleMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightAnkleMotors.Proxy=RightAnkleMotors:default -h 192.168.14.113 -p 10000
+naooperator.Camera.Proxy=Camera:default -h 192.168.14.113 -p 10000
+naooperator.Motors.Proxy=Motors:default -h 192.168.14.113 -p 10000
+naooperator.Motions.Proxy=Motions:default -h 192.168.14.113 -p 10000

Added: trunk/src/stable/components/naoviewer/naooperator.cfg.2
===================================================================
--- trunk/src/stable/components/naoviewer/naooperator.cfg.2	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/naooperator.cfg.2	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,15 @@
+naooperator.HeadMotors.Proxy=NeckMotors:default -h 192.168.14.111 -p 10000
+naooperator.HeadSpeed.Proxy=NeckSpeed:default -h 192.168.14.111 -p 10000
+naooperator.LeftShoulderMotors.Proxy=LeftShoulderMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightShoulderMotors.Proxy=RightShoulderMotors:default -h 192.168.14.111 -p 10000
+naooperator.LeftElbowMotors.Proxy=LeftElbowMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightElbowMotors.Proxy=RightElbowMotors:default -h 192.168.14.111 -p 10000
+naooperator.LeftHipMotors.Proxy=LeftHipMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightHipMotors.Proxy=RightHipMotors:default -h 192.168.14.111 -p 10000
+naooperator.LeftKneeMotors.Proxy=LeftKneeMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightKneeMotors.Proxy=RightKneeMotors:default -h 192.168.14.111 -p 10000
+naooperator.LeftAnkleMotors.Proxy=LeftAnkleMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightAnkleMotors.Proxy=RightAnkleMotors:default -h 192.168.14.111 -p 10000
+#naooperator.Camera.Proxy=Camera:default -h 192.168.14.111 -p 10000
+naooperator.Motors.Proxy=Motors:default -h 192.168.14.111 -p 10000
+naooperator.Motions.Proxy=Motions:default -h 192.168.14.111 -p 10000

Added: trunk/src/stable/components/naoviewer/naooperator.cfg.curro
===================================================================
--- trunk/src/stable/components/naoviewer/naooperator.cfg.curro	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/naooperator.cfg.curro	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,16 @@
+#Curro
+naooperator.HeadMotors.Proxy=NeckMotors:default -h 192.168.14.113 -p 10000
+naooperator.HeadSpeed.Proxy=NeckSpeed:default -h 192.168.14.113 -p 10000
+naooperator.LeftShoulderMotors.Proxy=LeftShoulderMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightShoulderMotors.Proxy=RightShoulderMotors:default -h 192.168.14.113 -p 10000
+naooperator.LeftElbowMotors.Proxy=LeftElbowMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightElbowMotors.Proxy=RightElbowMotors:default -h 192.168.14.113 -p 10000
+naooperator.LeftHipMotors.Proxy=LeftHipMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightHipMotors.Proxy=RightHipMotors:default -h 192.168.14.113 -p 10000
+naooperator.LeftKneeMotors.Proxy=LeftKneeMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightKneeMotors.Proxy=RightKneeMotors:default -h 192.168.14.113 -p 10000
+naooperator.LeftAnkleMotors.Proxy=LeftAnkleMotors:default -h 192.168.14.113 -p 10000
+naooperator.RightAnkleMotors.Proxy=RightAnkleMotors:default -h 192.168.14.113 -p 10000
+naooperator.Camera.Proxy=Camera:default -h 192.168.14.113 -p 10000
+naooperator.Motors.Proxy=Motors:default -h 192.168.14.113 -p 10000
+naooperator.Motions.Proxy=Motions:default -h 192.168.14.113 -p 10000

Added: trunk/src/stable/components/naoviewer/naooperator.cfg.fraile
===================================================================
--- trunk/src/stable/components/naoviewer/naooperator.cfg.fraile	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/naooperator.cfg.fraile	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,16 @@
+#Fraile
+naooperator.HeadMotors.Proxy=NeckMotors:default -h 192.168.14.111 -p 10000
+naooperator.HeadSpeed.Proxy=NeckSpeed:default -h 192.168.14.111 -p 10000
+naooperator.LeftShoulderMotors.Proxy=LeftShoulderMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightShoulderMotors.Proxy=RightShoulderMotors:default -h 192.168.14.111 -p 10000
+naooperator.LeftElbowMotors.Proxy=LeftElbowMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightElbowMotors.Proxy=RightElbowMotors:default -h 192.168.14.111 -p 10000
+naooperator.LeftHipMotors.Proxy=LeftHipMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightHipMotors.Proxy=RightHipMotors:default -h 192.168.14.111 -p 10000
+naooperator.LeftKneeMotors.Proxy=LeftKneeMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightKneeMotors.Proxy=RightKneeMotors:default -h 192.168.14.111 -p 10000
+naooperator.LeftAnkleMotors.Proxy=LeftAnkleMotors:default -h 192.168.14.111 -p 10000
+naooperator.RightAnkleMotors.Proxy=RightAnkleMotors:default -h 192.168.14.111 -p 10000
+#naooperator.Camera.Proxy=Camera:default -h 192.168.14.111 -p 10000
+naooperator.Motors.Proxy=Motors:default -h 192.168.14.111 -p 10000
+naooperator.Motions.Proxy=Motions:default -h 192.168.14.111 -p 10000

Added: trunk/src/stable/components/naoviewer/naooperator.cpp
===================================================================
--- trunk/src/stable/components/naoviewer/naooperator.cpp	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/naooperator.cpp	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,653 @@
+/*
+ *  Copyright (C) 1997-2013 JDERobot Developers Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Authors : Borja Menéndez <borjamonserrano en gmail.com>
+ *
+ */
+
+#include "naooperator.h"
+
+/*************************************************************
+ * CONSTRUCTOR
+ *************************************************************/
+NaoOperator::NaoOperator ( Control* control ) {
+    for ( int i = 0; i < HINGE_END - 1; i++ ) {
+        Hinge h = (Hinge) i;
+        
+        Gtk::Scale* newScale = NULL;
+        this->mapScales[h] = newScale;
+    }
+    
+    if (this->getAllWidgets() != -1) {
+        this->assignSignals();
+        this->control = control;
+        
+        this->root_head = Goocanvas::GroupModel::create();
+        this->canvas_head->set_root_item_model(this->root_head);
+        this->canvas_head->set_visible(true);
+        this->viewport_head->add(*(this->canvas_head));
+        
+        this->root_move = Goocanvas::GroupModel::create();
+        this->canvas_move->set_root_item_model(this->root_move);
+        this->canvas_move->set_visible(true);
+        this->viewport_move->add(*(this->canvas_move));
+        
+        this->create_lines_head();
+        this->create_lines_move();
+    }
+}
+
+/*************************************************************
+ * DESTRUCTOR
+ *************************************************************/
+NaoOperator::~NaoOperator () {
+    delete this->control;
+}
+
+/*************************************************************
+ * ANOTHER FUNCTIONS
+ *************************************************************/
+void NaoOperator::display ( cv::Mat& image ) {
+    Glib::RefPtr<Gdk::Pixbuf> imgBuff = 
+            Gdk::Pixbuf::create_from_data((const guint8*)image.data,
+				                          Gdk::COLORSPACE_RGB,
+				                          false,
+				                          8,
+				                          image.cols,
+				                          image.rows,
+				                          image.step);       
+    
+    this->camera_image->clear();
+    this->camera_image->set(imgBuff);
+}
+
+void NaoOperator::create_lines_head () {
+    this->h_head = Goocanvas::PolylineModel::create(0.0, 100.0, 200.0, 100.0);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
+    this->h_head->property_line_width() = 1.0;
+    this->h_head->property_visibility() = Goocanvas::ITEM_VISIBLE;
+    #else
+    this->h_head->set_property("line_width", 1.0);
+    this->h_head->set_property("visibility", Goocanvas::ITEM_VISIBLE);
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    this->root_head->add_child(this->h_head);
+    
+    this->v_head = Goocanvas::PolylineModel::create(100.0, 0.0, 100.0, 200.0);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
+    this->v_head->property_line_width() = 1.0;
+    this->v_head->property_visibility() = Goocanvas::ITEM_VISIBLE;
+    #else
+    this->v_head->set_property("line_width", 1.0);
+    this->v_head->set_property("visibility", Goocanvas::ITEM_VISIBLE);
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    this->root_head->add_child(this->v_head);
+    
+    Glib::RefPtr<Goocanvas::PolylineModel> h_reference = Goocanvas::PolylineModel::create(0.0, 100.0, 200.0, 100.0);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
+    h_reference->property_line_width() = 1.0;
+    h_reference->property_visibility() = Goocanvas::ITEM_VISIBLE;
+    h_reference->property_stroke_color() = "red";
+    #else
+    h_reference->set_property("line_width", 1.0);
+    h_reference->set_property("visibility", Goocanvas::ITEM_VISIBLE);
+    h_reference->set_property("stroke_color", Glib::ustring("red"));
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    this->root_head->add_child(h_reference);
+    
+    Glib::RefPtr<Goocanvas::PolylineModel> v_reference = Goocanvas::PolylineModel::create(100.0, 0.0, 100.0, 200.0);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
+    v_reference->property_line_width() = 1.0;
+    v_reference->property_visibility() = Goocanvas::ITEM_VISIBLE;
+    v_reference->property_stroke_color() = "red";
+    #else
+    v_reference->set_property("line_width", 1.0);
+    v_reference->set_property("visibility", Goocanvas::ITEM_VISIBLE);
+    v_reference->set_property("stroke_color", Glib::ustring("red"));
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    this->root_head->add_child(v_reference);
+}
+
+void NaoOperator::create_lines_move () {
+    this->h_move = Goocanvas::PolylineModel::create(0.0, 100.0, 200.0, 100.0);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
+    this->h_move->property_line_width() = 1.0;
+    this->h_move->property_visibility() = Goocanvas::ITEM_VISIBLE;
+    #else
+    this->h_move->set_property("line_width", 1.0);
+    this->h_move->set_property("visibility", Goocanvas::ITEM_VISIBLE);
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    this->root_move->add_child(this->h_move);
+    
+    this->v_move = Goocanvas::PolylineModel::create(100.0, 0.0, 100.0, 200.0);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
+    this->v_move->property_line_width() = 1.0;
+    this->v_move->property_visibility() = Goocanvas::ITEM_VISIBLE;
+    #else
+    this->v_move->set_property("line_width", 1.0);
+    this->v_move->set_property("visibility", Goocanvas::ITEM_VISIBLE);
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    this->root_move->add_child(this->v_move);
+    
+    Glib::RefPtr<Goocanvas::PolylineModel> h_reference = Goocanvas::PolylineModel::create(0.0, 100.0, 200.0, 100.0);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
+    h_reference->property_line_width() = 1.0;
+    h_reference->property_visibility() = Goocanvas::ITEM_VISIBLE;
+    h_reference->property_stroke_color() = "red";
+    #else
+    h_reference->set_property("line_width", 1.0);
+    h_reference->set_property("visibility", Goocanvas::ITEM_VISIBLE);
+    h_reference->set_property("stroke_color", Glib::ustring("red"));
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    this->root_move->add_child(h_reference);
+    
+    Glib::RefPtr<Goocanvas::PolylineModel> v_reference = Goocanvas::PolylineModel::create(100.0, 0.0, 100.0, 200.0);
+    #ifdef GLIBMM_PROPERTIES_ENABLED
+    v_reference->property_line_width() = 1.0;
+    v_reference->property_visibility() = Goocanvas::ITEM_VISIBLE;
+    v_reference->property_stroke_color() = "red";
+    #else
+    v_reference->set_property("line_width", 1.0);
+    v_reference->set_property("visibility", Goocanvas::ITEM_VISIBLE);
+    v_reference->set_property("stroke_color", Glib::ustring("red"));
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    this->root_move->add_child(v_reference);
+}
+
+bool NaoOperator::isFollowingBall () {
+    return this->checkbutton_followball->get_active();
+}
+
+int NaoOperator::getAllWidgets () {
+    int returned = 0;
+    // Load the GtkBuilder file and instantiate its widgets:
+    Glib::RefPtr<Gtk::Builder> refBuilder = Gtk::Builder::create();
+    try {
+        refBuilder->add_from_file("main_gui.glade");
+    } catch (const Glib::FileError& ex) {
+        std::cerr << "FileError: " << ex.what() << std::endl;
+        returned = -1;
+    } catch(const Glib::MarkupError& ex) {
+        std::cerr << "MarkupError: " << ex.what() << std::endl;
+        returned = -1;
+    } catch(const Gtk::BuilderError& ex) {
+        std::cerr << "BuilderError: " << ex.what() << std::endl;
+        returned = -1;
+    }
+    
+    if (returned == 0) {
+        refBuilder->get_widget("main_window", mainwindow);
+        
+        refBuilder->get_widget("scale_pitch_left_shoulder", this->mapScales[PITCH_LEFT_SHOULDER]);
+        refBuilder->get_widget("scale_roll_left_shoulder", this->mapScales[ROLL_LEFT_SHOULDER]);
+        refBuilder->get_widget("scale_yawpitch_left_hip", this->mapScales[YAWPITCH_LEFT_HIP]);
+        refBuilder->get_widget("scale_pitch_left_hip", this->mapScales[PITCH_LEFT_HIP]);
+        refBuilder->get_widget("scale_roll_left_hip", this->mapScales[ROLL_LEFT_HIP]);
+        refBuilder->get_widget("scale_yawpitch_right_hip", this->mapScales[YAWPITCH_RIGHT_HIP]);
+        refBuilder->get_widget("scale_pitch_right_hip", this->mapScales[PITCH_RIGHT_HIP]);
+        refBuilder->get_widget("scale_roll_right_hip", this->mapScales[ROLL_RIGHT_HIP]);
+        refBuilder->get_widget("scale_pitch_right_shoulder", this->mapScales[PITCH_RIGHT_SHOULDER]);
+        refBuilder->get_widget("scale_roll_right_shoulder", this->mapScales[ROLL_RIGHT_SHOULDER]);
+        refBuilder->get_widget("scale_yaw_left_elbow", this->mapScales[YAW_LEFT_ELBOW]);
+        refBuilder->get_widget("scale_roll_left_elbow", this->mapScales[ROLL_LEFT_ELBOW]);
+        refBuilder->get_widget("scale_pitch_left_knee", this->mapScales[PITCH_LEFT_KNEE]);
+        refBuilder->get_widget("scale_pitch_right_knee", this->mapScales[PITCH_RIGHT_KNEE]);
+        refBuilder->get_widget("scale_yaw_right_elbow", this->mapScales[YAW_RIGHT_ELBOW]);
+        refBuilder->get_widget("scale_roll_right_elbow", this->mapScales[ROLL_RIGHT_ELBOW]);
+        refBuilder->get_widget("scale_pitch_left_ankle", this->mapScales[PITCH_LEFT_ANKLE]);
+        refBuilder->get_widget("scale_roll_left_ankle", this->mapScales[ROLL_LEFT_ANKLE]);
+        refBuilder->get_widget("scale_pitch_right_ankle", this->mapScales[PITCH_RIGHT_ANKLE]);
+        refBuilder->get_widget("scale_roll_right_ankle", this->mapScales[ROLL_RIGHT_ANKLE]);
+        
+        refBuilder->get_widget("viewport_move", this->viewport_move);
+        refBuilder->get_widget("viewport_head", this->viewport_head);
+        
+        refBuilder->get_widget("button_up_head", this->head_up);
+        refBuilder->get_widget("button_down_head", this->head_down);
+        refBuilder->get_widget("button_right_head", this->head_right);
+        refBuilder->get_widget("button_left_head", this->head_left);
+        refBuilder->get_widget("button_stop_head", this->head_stop);
+        
+        refBuilder->get_widget("button_front", this->move_front);
+        refBuilder->get_widget("button_back", this->move_back);
+        refBuilder->get_widget("button_right", this->move_right);
+        refBuilder->get_widget("button_left", this->move_left);
+        refBuilder->get_widget("button_stop", this->move_stop);
+        refBuilder->get_widget("button_lat_right", this->button_lat_right);
+        refBuilder->get_widget("button_lat_left", this->button_lat_left);
+        
+        refBuilder->get_widget("button_standup_back", this->standup_back);
+        refBuilder->get_widget("button_standup_front", this->standup_front);
+        refBuilder->get_widget("button_right_kick", this->right_kick);
+        refBuilder->get_widget("button_left_kick", this->left_kick);
+        refBuilder->get_widget("button_intercept", this->intercept);
+        refBuilder->get_widget("button_change_camera", this->change_camera);
+        refBuilder->get_widget("button_reset_naoqi", this->reset_naoqi);
+        
+        refBuilder->get_widget("checkbutton_followball", this->checkbutton_followball);
+        
+        refBuilder->get_widget("camera_image", this->camera_image);
+    }
+    
+    return returned;
+}
+
+void NaoOperator::assignSignals () {
+    this->mapScales[PITCH_LEFT_SHOULDER]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_pitch_left_shoulder));
+    
+    this->mapScales[ROLL_LEFT_SHOULDER]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_roll_left_shoulder));
+                                                            
+    this->mapScales[YAWPITCH_LEFT_HIP]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_yawpitch_left_hip));
+                                                            
+    this->mapScales[PITCH_LEFT_HIP]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_pitch_left_hip));
+                                                            
+    this->mapScales[ROLL_LEFT_HIP]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_roll_left_hip));
+                                                            
+    this->mapScales[YAWPITCH_RIGHT_HIP]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_yawpitch_right_hip));
+                                                            
+    this->mapScales[PITCH_RIGHT_HIP]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_pitch_right_hip));
+    
+    this->mapScales[ROLL_RIGHT_HIP]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_roll_right_hip));
+                                                            
+    this->mapScales[PITCH_RIGHT_SHOULDER]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_pitch_right_shoulder));
+                                                            
+    this->mapScales[ROLL_RIGHT_SHOULDER]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_roll_right_shoulder));
+                                                            
+    this->mapScales[YAW_LEFT_ELBOW]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_yaw_left_elbow));
+                                                            
+    this->mapScales[ROLL_LEFT_ELBOW]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_roll_left_elbow));
+    
+    this->mapScales[PITCH_LEFT_KNEE]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_pitch_left_knee));
+                                                            
+    this->mapScales[PITCH_RIGHT_KNEE]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_pitch_right_knee));
+                                                            
+    this->mapScales[YAW_RIGHT_ELBOW]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_yaw_right_elbow));
+                                                            
+    this->mapScales[ROLL_RIGHT_ELBOW]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_roll_right_elbow));
+                                                            
+    this->mapScales[PITCH_LEFT_ANKLE]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_pitch_left_ankle));
+                                                            
+    this->mapScales[ROLL_LEFT_ANKLE]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_roll_left_ankle));
+                                                            
+    this->mapScales[PITCH_RIGHT_ANKLE]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_pitch_right_ankle));
+                                                            
+    this->mapScales[ROLL_RIGHT_ANKLE]->signal_value_changed().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_scale_roll_right_ankle));
+                                                            
+    this->viewport_move->signal_event().connect(sigc::mem_fun(this, &NaoOperator::on_move_press));
+    this->viewport_head->signal_event().connect(sigc::mem_fun(this, &NaoOperator::on_head_press));
+    
+    this->canvas_head = Gtk::manage(new Goocanvas::Canvas());
+    this->canvas_head->signal_item_created().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_item_head_created));
+    this->canvas_move = Gtk::manage(new Goocanvas::Canvas());
+    this->canvas_move->signal_item_created().connect(sigc::mem_fun(this,
+                                                            &NaoOperator::on_item_move_created));
+                                                            
+    this->head_up->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_head_up));
+    this->head_down->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_head_down));
+    this->head_right->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_head_right));
+    this->head_left->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_head_left));
+    this->head_stop->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_head_stop));
+    
+    this->move_front->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_move_front));
+    this->move_back->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_move_back));
+    this->move_right->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_move_right));
+    this->move_left->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_move_left));
+    this->move_stop->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_move_stop));
+    this->button_lat_right->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_move_lat_right));
+    this->button_lat_left->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_move_lat_left));
+    
+    this->standup_back->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_standup_back));
+    this->standup_front->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_standup_front));
+    this->right_kick->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_right_kick));
+    this->left_kick->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_left_kick));
+    this->intercept->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_intercept));
+    this->change_camera->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_change_camera));
+    this->reset_naoqi->signal_clicked().connect(sigc::mem_fun(this, &NaoOperator::on_button_reset_naoqi));
+}
+
+void NaoOperator::on_scale_pitch_left_shoulder () {
+    this->control->setMovement(LEFTSHOULDERMOTORS, 0.0,
+                this->mapScales[PITCH_LEFT_SHOULDER]->get_value(), this->mapScales[ROLL_LEFT_SHOULDER]->get_value());
+}
+
+void NaoOperator::on_scale_roll_left_shoulder () {
+    this->control->setMovement(LEFTSHOULDERMOTORS, 0.0,
+                this->mapScales[PITCH_LEFT_SHOULDER]->get_value(), this->mapScales[ROLL_LEFT_SHOULDER]->get_value());
+}
+
+void NaoOperator::on_scale_yawpitch_left_hip () {
+    this->control->setMovement(LEFTHIPMOTORS, this->mapScales[YAWPITCH_LEFT_HIP]->get_value(),
+                this->mapScales[PITCH_LEFT_HIP]->get_value(), this->mapScales[ROLL_LEFT_HIP]->get_value());
+}
+
+void NaoOperator::on_scale_pitch_left_hip () {
+    this->control->setMovement(LEFTHIPMOTORS, this->mapScales[YAWPITCH_LEFT_HIP]->get_value(),
+                this->mapScales[PITCH_LEFT_HIP]->get_value(), this->mapScales[ROLL_LEFT_HIP]->get_value());
+}
+
+void NaoOperator::on_scale_roll_left_hip () {
+    this->control->setMovement(LEFTHIPMOTORS, this->mapScales[YAWPITCH_LEFT_HIP]->get_value(),
+                this->mapScales[PITCH_LEFT_HIP]->get_value(), this->mapScales[ROLL_LEFT_HIP]->get_value());
+}
+
+void NaoOperator::on_scale_yawpitch_right_hip () {
+    this->control->setMovement(RIGHTHIPMOTORS, this->mapScales[YAWPITCH_RIGHT_HIP]->get_value(),
+                this->mapScales[PITCH_RIGHT_HIP]->get_value(), this->mapScales[ROLL_RIGHT_HIP]->get_value());
+}
+
+void NaoOperator::on_scale_pitch_right_hip () {
+    this->control->setMovement(RIGHTHIPMOTORS, this->mapScales[YAWPITCH_RIGHT_HIP]->get_value(),
+                this->mapScales[PITCH_RIGHT_HIP]->get_value(), this->mapScales[ROLL_RIGHT_HIP]->get_value());
+}
+
+void NaoOperator::on_scale_roll_right_hip () {
+    this->control->setMovement(RIGHTHIPMOTORS, this->mapScales[YAWPITCH_RIGHT_HIP]->get_value(),
+                this->mapScales[PITCH_RIGHT_HIP]->get_value(), this->mapScales[ROLL_RIGHT_HIP]->get_value());
+}
+
+void NaoOperator::on_scale_pitch_right_shoulder () {
+    this->control->setMovement(RIGHTSHOULDERMOTORS, 0.0,
+                this->mapScales[PITCH_RIGHT_SHOULDER]->get_value(), this->mapScales[ROLL_RIGHT_SHOULDER]->get_value());
+}
+
+void NaoOperator::on_scale_roll_right_shoulder () {
+    this->control->setMovement(RIGHTSHOULDERMOTORS, 0.0,
+                this->mapScales[PITCH_RIGHT_SHOULDER]->get_value(), this->mapScales[ROLL_RIGHT_SHOULDER]->get_value());
+}
+
+void NaoOperator::on_scale_yaw_left_elbow () {
+    this->control->setMovement(LEFTELBOWMOTORS, this->mapScales[YAW_LEFT_ELBOW]->get_value(), 0.0,
+                this->mapScales[ROLL_LEFT_ELBOW]->get_value());
+}
+
+void NaoOperator::on_scale_roll_left_elbow () {
+    this->control->setMovement(LEFTELBOWMOTORS, this->mapScales[YAW_LEFT_ELBOW]->get_value(), 0.0,
+                this->mapScales[ROLL_LEFT_ELBOW]->get_value());
+}
+
+void NaoOperator::on_scale_pitch_left_knee () {
+    this->control->setMovement(LEFTKNEEMOTORS, this->mapScales[PITCH_LEFT_KNEE]->get_value(), 0.0, 0.0);
+}
+
+void NaoOperator::on_scale_pitch_right_knee () {
+    this->control->setMovement(LEFTKNEEMOTORS, this->mapScales[PITCH_RIGHT_KNEE]->get_value(), 0.0, 0.0);
+}
+
+void NaoOperator::on_scale_yaw_right_elbow () {
+    this->control->setMovement(RIGHTELBOWMOTORS, this->mapScales[YAW_RIGHT_ELBOW]->get_value(), 0.0,
+                this->mapScales[ROLL_RIGHT_ELBOW]->get_value());
+}
+
+void NaoOperator::on_scale_roll_right_elbow () {
+    this->control->setMovement(RIGHTELBOWMOTORS, this->mapScales[YAW_RIGHT_ELBOW]->get_value(), 0.0,
+                this->mapScales[ROLL_RIGHT_ELBOW]->get_value());
+}
+
+void NaoOperator::on_scale_pitch_left_ankle () {
+    this->control->setMovement(LEFTANKLEMOTORS, 0.0, this->mapScales[PITCH_LEFT_ANKLE]->get_value(),
+                this->mapScales[ROLL_LEFT_ANKLE]->get_value());
+}
+
+void NaoOperator::on_scale_roll_left_ankle () {
+    this->control->setMovement(LEFTANKLEMOTORS, 0.0, this->mapScales[PITCH_LEFT_ANKLE]->get_value(),
+                this->mapScales[ROLL_LEFT_ANKLE]->get_value());
+}
+
+void NaoOperator::on_scale_pitch_right_ankle () {
+    this->control->setMovement(RIGHTANKLEMOTORS, 0.0, this->mapScales[PITCH_RIGHT_ANKLE]->get_value(),
+                this->mapScales[ROLL_RIGHT_ANKLE]->get_value());
+}
+
+void NaoOperator::on_scale_roll_right_ankle () {
+    this->control->setMovement(RIGHTANKLEMOTORS, 0.0, this->mapScales[PITCH_RIGHT_ANKLE]->get_value(),
+                this->mapScales[ROLL_RIGHT_ANKLE]->get_value());
+}
+
+void NaoOperator::on_item_head_created ( const Glib::RefPtr<Goocanvas::Item>& item,
+                                         const Glib::RefPtr<Goocanvas::ItemModel>& /* model */) {
+    Glib::RefPtr<Goocanvas::Group> group = Glib::RefPtr<Goocanvas::Group>::cast_dynamic(item);
+    if (group)
+        return;
+}
+
+void NaoOperator::on_item_move_created ( const Glib::RefPtr<Goocanvas::Item>& item,
+                                         const Glib::RefPtr<Goocanvas::ItemModel>& /* model */) {
+    Glib::RefPtr<Goocanvas::Group> group = Glib::RefPtr<Goocanvas::Group>::cast_dynamic(item);
+    if (group)
+        return;
+}
+
+bool NaoOperator::on_move_press ( GdkEvent* event ) {
+    if (event->type == GDK_BUTTON_PRESS) {
+        this->drag = true;
+    } else if (event->type == GDK_BUTTON_RELEASE) {
+        this->drag = false;
+        this->redraw_horizontal_move(0, 0.0, event->button.y);
+        this->redraw_horizontal_move(1, 200.0, event->button.y);
+        this->redraw_vertical_move(0, event->button.x, 0.0);
+        this->redraw_vertical_move(1, event->button.x, 200.0);
+        this->control->setDirectMovement(true);
+        this->control->setMovement(MOTORS, (float) event->button.y, (float) event->button.x, 0.0);
+    } else if (event->type == GDK_MOTION_NOTIFY) {
+        if (drag) {
+            this->redraw_horizontal_move(0, 0.0, event->button.y);
+            this->redraw_horizontal_move(1, 200.0, event->button.y);
+            this->redraw_vertical_move(0, event->button.x, 0.0);
+            this->redraw_vertical_move(1, event->button.x, 200.0);
+        }
+    }
+
+    return false;
+}
+
+bool NaoOperator::on_head_press ( GdkEvent* event ) {
+    if (event->type == GDK_BUTTON_PRESS) {
+        this->drag = true;
+    } else if (event->type == GDK_BUTTON_RELEASE) {
+        this->drag = false;
+        this->redraw_horizontal_head(0, 0.0, event->button.y);
+        this->redraw_horizontal_head(1, 200.0, event->button.y);
+        this->redraw_vertical_head(0, event->button.x, 0.0);
+        this->redraw_vertical_head(1, event->button.x, 200.0);
+        this->control->setDirectHead(true);
+        this->control->setMovement(HEADMOTORS, (float) event->button.x, (float) event->button.y, 0.0);
+    } else if (event->type == GDK_MOTION_NOTIFY) {
+        if (drag) {
+            this->redraw_horizontal_head(0, 0.0, event->button.y);
+            this->redraw_horizontal_head(1, 200.0, event->button.y);
+            this->redraw_vertical_head(0, event->button.x, 0.0);
+            this->redraw_vertical_head(1, event->button.x, 200.0);
+        }
+    }
+    
+    return false;
+}
+
+void NaoOperator::on_button_head_up () {
+    this->control->setDirectHead(false);
+    this->control->setMovement(HEADMOTORS, 0.0, -0.1, 0.0);
+}
+
+void NaoOperator::on_button_head_down () {
+    this->control->setDirectHead(false);
+    this->control->setMovement(HEADMOTORS, 0.0, 0.1, 0.0);
+}
+
+void NaoOperator::on_button_head_right () {
+    this->control->setDirectHead(false);
+    this->control->setMovement(HEADMOTORS, -0.1, 0.0, 0.0);
+}
+
+void NaoOperator::on_button_head_left () {
+    this->control->setDirectHead(false);
+    this->control->setMovement(HEADMOTORS, 0.1, 0.0, 0.0);
+}
+
+void NaoOperator::on_button_head_stop () {
+    this->control->setDirectHead(false);
+    this->control->setMovement(HEADMOTORS, 0.0, 0.0, 0.0);
+}
+
+void NaoOperator::on_button_move_front () {
+    this->control->setDirectMovement(false);
+    this->control->setMovement(MOTORS, 0.1, 0.0, 0.0);
+}
+
+void NaoOperator::on_button_move_back () {
+    this->control->setDirectMovement(false);
+    this->control->setMovement(MOTORS, -0.1, 0.0, 0.0);
+}
+
+void NaoOperator::on_button_move_right () {
+    this->control->setDirectMovement(false);
+    this->control->setMovement(MOTORS, 0.0, -0.1, 0.0);
+}
+
+void NaoOperator::on_button_move_left () {
+    this->control->setDirectMovement(false);
+    this->control->setMovement(MOTORS, 0.0, 0.1, 0.0);
+}
+
+void NaoOperator::on_button_move_lat_right () {
+    this->control->setDirectMovement(false);
+    this->control->setMovement(MOTORS, 0.0, 0.0, -0.1);
+}
+
+void NaoOperator::on_button_move_lat_left () {
+    this->control->setDirectMovement(false);
+    this->control->setMovement(MOTORS, 0.0, 0.0, 0.1);
+}
+
+void NaoOperator::on_button_move_stop () {
+    this->control->setDirectMovement(false);
+    this->control->setMovement(MOTORS, 0.0, 0.0, 0.0);
+}
+
+void NaoOperator::on_button_standup_back () {
+    this->control->setAction(STANDUP_BACK);
+}
+
+void NaoOperator::on_button_standup_front () {
+    this->control->setAction(STANDUP_FRONT);
+}
+
+void NaoOperator::on_button_right_kick () {
+    this->control->setAction(RIGHTKICK);
+}
+
+void NaoOperator::on_button_left_kick () {
+    this->control->setAction(LEFTKICK);
+}
+
+void NaoOperator::on_button_intercept () {
+    this->control->setAction(INTERCEPT);
+}
+
+void NaoOperator::on_button_change_camera () {
+    this->control->setAction(CHANGECAMERA);
+}
+
+void NaoOperator::on_button_reset_naoqi () {
+    this->control->setAction(RESETNAOQI);
+}
+
+void NaoOperator::redraw_horizontal_head ( int index, double posx, double posy ) {
+    Goocanvas::Points points;
+	#ifdef GLIBMM_PROPERTIES_ENABLED
+    points = this->h_head->property_points();
+    #else
+    points = this->h_head->get_property("points");
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    
+	points.set_coordinate(index, posx, posy);
+	
+	#ifdef GLIBMM_PROPERTIES_ENABLED
+    this->h_head->property_points() = points;
+    #else
+    this->h_head->set_property("points", points);
+    #endif //GLIBMM_PROPERTIES_ENABLED
+}
+
+void NaoOperator::redraw_vertical_head ( int index, double posx, double posy ) {
+    Goocanvas::Points points;
+	#ifdef GLIBMM_PROPERTIES_ENABLED
+    points = this->v_head->property_points();
+    #else
+    points = this->v_head->get_property("points");
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    
+	points.set_coordinate(index, posx, posy);
+	
+	#ifdef GLIBMM_PROPERTIES_ENABLED
+    this->v_head->property_points() = points;
+    #else
+    this->v_head->set_property("points", points);
+    #endif //GLIBMM_PROPERTIES_ENABLED
+}
+    
+void NaoOperator::redraw_horizontal_move ( int index, double posx, double posy ) {
+    Goocanvas::Points points;
+	#ifdef GLIBMM_PROPERTIES_ENABLED
+    points = this->h_move->property_points();
+    #else
+    points = this->h_move->get_property("points");
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    
+	points.set_coordinate(index, posx, posy);
+	
+	#ifdef GLIBMM_PROPERTIES_ENABLED
+    this->h_move->property_points() = points;
+    #else
+    this->h_move->set_property("points", points);
+    #endif //GLIBMM_PROPERTIES_ENABLED
+}
+
+void NaoOperator::redraw_vertical_move ( int index, double posx, double posy ) {
+    Goocanvas::Points points;
+	#ifdef GLIBMM_PROPERTIES_ENABLED
+    points = this->v_move->property_points();
+    #else
+    points = this->v_move->get_property("points");
+    #endif //GLIBMM_PROPERTIES_ENABLED
+    
+	points.set_coordinate(index, posx, posy);
+	
+	#ifdef GLIBMM_PROPERTIES_ENABLED
+    this->v_move->property_points() = points;
+    #else
+    this->v_move->set_property("points", points);
+    #endif //GLIBMM_PROPERTIES_ENABLED
+}

Added: trunk/src/stable/components/naoviewer/naooperator.h
===================================================================
--- trunk/src/stable/components/naoviewer/naooperator.h	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/naooperator.h	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,134 @@
+/*
+ *  Copyright (C) 1997-2013 JDERobot Developers Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Authors : Borja Menéndez <borjamonserrano en gmail.com>
+ *
+ */
+
+#ifndef NAOOPERATOR_H
+#define NAOOPERATOR_H
+
+#include <map>
+#include <iostream>
+#include <stdio.h>
+#include <gtkmm.h>
+#include <gtkmm/stock.h>
+#include <goocanvasmm-2.0/goocanvasmm.h>
+#include <opencv2/core/core.hpp>
+
+#include "control.h"
+#include "common.h"
+
+class NaoOperator : public Gtk::Window {
+public:
+    // Constructor
+    NaoOperator ( Control* control );
+    
+    // Destructor
+    virtual ~NaoOperator ();
+    
+    // Another functions
+    void display ( cv::Mat& image );
+    bool isFollowingBall ();
+
+private:
+    Gtk::Window* mainwindow;
+    Gtk::Button *head_up, *head_down, *head_right, *head_left, *head_stop;
+    Gtk::Button *move_front, *move_back, *move_right, *move_left, *move_stop;
+    Gtk::Button *standup_back, *standup_front, *right_kick, *left_kick;
+    Gtk::Button *button_lat_left, *button_lat_right;
+    Gtk::Button *intercept, *change_camera, *reset_naoqi;
+    Gtk::Image* camera_image;
+    Gtk::Viewport *viewport_move, *viewport_head;
+    Gtk::CheckButton* checkbutton_followball;
+    
+    Goocanvas::Canvas *canvas_head, *canvas_move;
+    Glib::RefPtr<Goocanvas::ItemModel> root_head;
+    Glib::RefPtr<Goocanvas::ItemModel> root_move;
+    Glib::RefPtr<Goocanvas::PolylineModel> h_head, v_head, h_move, v_move;
+    bool drag;
+    
+    Control* control;
+    
+    std::map<Hinge, Gtk::Scale*> mapScales;
+    
+    int getAllWidgets ();
+    void assignSignals ();
+    
+    void create_lines_move ();
+    void create_lines_head ();
+    
+    void on_scale_pitch_left_shoulder ();
+    void on_scale_roll_left_shoulder ();
+    void on_scale_yawpitch_left_hip ();
+    void on_scale_pitch_left_hip ();
+    void on_scale_roll_left_hip ();
+    void on_scale_yawpitch_right_hip ();
+    void on_scale_pitch_right_hip ();
+    void on_scale_roll_right_hip ();
+    void on_scale_pitch_right_shoulder ();
+    void on_scale_roll_right_shoulder ();
+    void on_scale_yaw_left_elbow ();
+    void on_scale_roll_left_elbow ();
+    void on_scale_pitch_left_knee ();
+    void on_scale_pitch_right_knee ();
+    void on_scale_yaw_right_elbow ();
+    void on_scale_roll_right_elbow ();
+    void on_scale_pitch_left_ankle ();
+    void on_scale_roll_left_ankle ();
+    void on_scale_pitch_right_ankle ();
+    void on_scale_roll_right_ankle ();
+    
+    void on_item_head_created ( const Glib::RefPtr<Goocanvas::Item>& item,
+                                const Glib::RefPtr<Goocanvas::ItemModel>& model );
+    
+    void on_item_move_created ( const Glib::RefPtr<Goocanvas::Item>& item,
+                                const Glib::RefPtr<Goocanvas::ItemModel>& model );
+    
+    bool on_move_press ( GdkEvent* event );
+    bool on_head_press ( GdkEvent* event );
+    
+    void on_button_head_up ();
+    void on_button_head_down ();
+    void on_button_head_right ();
+    void on_button_head_left ();
+    void on_button_head_stop ();
+    
+    void on_button_move_front ();
+    void on_button_move_back ();
+    void on_button_move_right ();
+    void on_button_move_left ();
+    void on_button_move_stop ();
+    void on_button_move_lat_right ();
+    void on_button_move_lat_left ();
+    
+    void on_button_standup_back ();
+    void on_button_standup_front ();
+    void on_button_right_kick ();
+    void on_button_left_kick ();
+    void on_button_intercept ();
+    void on_button_change_camera ();
+    void on_button_reset_naoqi ();
+    
+    void redraw_horizontal_head ( int index, double posx, double posy );
+    void redraw_vertical_head ( int index, double posx, double posy );
+    
+    void redraw_horizontal_move ( int index, double posx, double posy );
+    void redraw_vertical_move ( int index, double posx, double posy );
+    
+}; // Class NaoOperator
+
+#endif // NAOOPERATOR_H

Added: trunk/src/stable/components/naoviewer/sensors.cpp
===================================================================
--- trunk/src/stable/components/naoviewer/sensors.cpp	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/sensors.cpp	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,121 @@
+#include "sensors.h"
+
+Sensors::Sensors(jderobot::ImageDataPtr data) {
+    image.create(data->description->height, data->description->width, CV_8UC3);
+    
+    this->panSpeed = 0.0;
+    this->tiltSpeed = 0.0;
+}
+
+void Sensors::update(jderobot::ImageDataPtr data)
+{
+    memcpy((unsigned char *) image.data ,&(data->pixelData[0]), image.cols*image.rows * 3);
+
+    cv::Mat gray;
+    cv::Mat resta;
+    cv::Mat imageBackGround;
+
+    imageBackGround = image.clone();
+
+    for(int x = 0; x < imageBackGround.cols; x++){
+        for(int y = 0; y < imageBackGround.rows; y++){
+
+            int indice = y*imageBackGround.step + x * imageBackGround.channels();
+
+            if((imageBackGround.data[indice+2] < 157)
+                && (imageBackGround.data[indice] > 250)){
+          //          && imageBackGround.data[indice+1] > 60 && imageBackGround.data[indice+1] < 133
+          //          && imageBackGround.data[indice+2] < 50){
+                imageBackGround.data[indice] = 255;
+                imageBackGround.data[indice+1] = 255;
+                imageBackGround.data[indice+2] = 255;
+
+            }else{
+                imageBackGround.data[indice] = 0;
+                imageBackGround.data[indice+1] = 0;
+                imageBackGround.data[indice+2] = 0;
+            }
+
+        }
+    }
+
+//    cv::imread("/home/ahcorde/tfm/trunk/visualizadoresImagenes/followBall/DATA/01.jpg");
+
+//    imageBackGround = cv::Scalar(0,0,0);
+
+    resta = imageBackGround.clone();
+
+    cv::cvtColor(resta, gray, CV_RGB2GRAY);
+
+    cv::Mat threshold_output;
+    int thresh = 50;
+    std::vector<std::vector<cv::Point> > contours;
+    std::vector<cv::Vec4i> hierarchy;
+
+    cv::threshold( gray, threshold_output, thresh, 255, cv::THRESH_BINARY );
+    cv::findContours( threshold_output, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point(0, 0) );
+
+    /// Approximate contours to polygons + get bounding rects and circles
+    std::vector<std::vector<cv::Point> > contours_poly( contours.size() );
+    std::vector<cv::Rect> boundRect;
+    std::vector<cv::Point2f>center( 1 );
+    std::vector<float>radius( 1 );
+
+    for( unsigned i = 0; i < contours.size(); i++ ){
+        cv::approxPolyDP( cv::Mat(contours[i]), contours_poly[i], 3, true );
+    }
+
+    int maximo = 0;
+    int indice_maximo = 0;
+    for(unsigned i= 0; i < contours_poly.size(); i++ ){
+        double area0 = cv::contourArea(contours_poly[i]);
+        if(area0>maximo){
+            maximo = area0;
+            indice_maximo = i;
+        }
+    }
+
+    if(contours_poly.size()>0){
+        boundRect.push_back(boundingRect( cv::Mat(contours_poly[indice_maximo]) ) );
+        cv::minEnclosingCircle( (cv::Mat)contours_poly[indice_maximo], center[0], radius[0] );
+    }
+
+    /// Draw polygonal contour + bonding rects + circles
+    for( unsigned i = 0; i< boundRect.size(); i++ ){
+           cv::Scalar color = cv::Scalar( 255, 0, 0 );
+           //cv::drawContours( drawing, contours_poly, i, color, 1, 8, std::vector<cv::Vec4i>(), 0, cv::Point() );
+           cv::rectangle( image, boundRect[i].tl(), boundRect[i].br(), color, 2, 8, 0 );
+           cv::circle( image, center[i], (int)radius[i], color, 2, 8, 0 );
+    }
+
+    if(boundRect.size()>0){
+        float error_X = 160/2 - center[0].x;
+        float error_Y = 120/2 - center[0].y;
+
+        std::cout << "error_X: "<< error_X/(160/2) << " error_Y: " << error_Y/(120/2) << std::endl;
+
+        this->panSpeed = -error_X/(160/2);
+        this->tiltSpeed = -error_Y/(120/2);
+    }
+
+    cv::line(image, cv::Point(160/2, 0), cv::Point(160/2, 120), cv::Scalar(0, 0, 255), 1);
+    cv::line(image, cv::Point(0, 120/2), cv::Point(160, 120/2), cv::Scalar(0, 0, 255), 1);
+
+
+//    resta.copyTo(image);
+
+}
+
+cv::Mat Sensors::getImage() {
+    cv::Mat result = image.clone();
+
+    return result;
+}
+
+float Sensors::getPanSpeed () {
+    return this->panSpeed;
+}
+
+float Sensors::getTiltSpeed () {
+    return this->tiltSpeed;
+}

Added: trunk/src/stable/components/naoviewer/sensors.h
===================================================================
--- trunk/src/stable/components/naoviewer/sensors.h	                        (rev 0)
+++ trunk/src/stable/components/naoviewer/sensors.h	2013-10-15 13:20:41 UTC (rev 1057)
@@ -0,0 +1,33 @@
+#ifndef SENSORS_H
+#define SENSORS_H
+
+//ICE
+#include <Ice/Ice.h>
+#include <IceUtil/IceUtil.h>
+
+//INTERFACES
+#include <jderobot/camera.h>
+#include <jderobot/pose3dmotors.h>
+
+//Opencv
+#include <opencv2/core/core.hpp>
+#include <opencv2/imgproc/imgproc.hpp>
+#include <opencv2/highgui/highgui.hpp>
+
+class Sensors {
+public:
+    Sensors(jderobot::ImageDataPtr data);
+
+    void update ( jderobot::ImageDataPtr data );
+    cv::Mat getImage ();
+    
+    float getPanSpeed ();
+    float getTiltSpeed ();
+
+private:
+    float panSpeed, tiltSpeed;
+    
+    cv::Mat image;
+};
+
+#endif // SENSORS_H

Modified: trunk/src/stable/components/visualHFSM/CMakeLists.txt
===================================================================
--- trunk/src/stable/components/visualHFSM/CMakeLists.txt	2013-10-15 12:29:25 UTC (rev 1056)
+++ trunk/src/stable/components/visualHFSM/CMakeLists.txt	2013-10-15 13:20:41 UTC (rev 1057)
@@ -1,4 +1,4 @@
-IF (VISUALHFSM_COMPILE)
+IF (goocanvasmm_INCLUDE_DIRS)
 
 SET( SOURCE_FILES_VISUALHFSM point.cpp node.cpp transition.cpp guinode.cpp subautomata.cpp guitransition.cpp guisubautomata.cpp generate.cpp popups/editnodedialog.cpp popups/edittransitiondialog.cpp popups/funvardialog.cpp popups/importdialog.cpp popups/loadfiledialog.cpp popups/renamedialog.cpp popups/renametransitiondialog.cpp popups/savefiledialog.cpp popups/timerdialog.cpp savefile.cpp xmlparser.cpp visualhfsm.cpp main.cpp )
 



More information about the Jderobot-admin mailing list