[Jderobot-admin] jderobot-r907 - in trunk/src/components/recorder: . build-independent

frivas en jderobot.org frivas en jderobot.org
Mie Mayo 1 23:27:00 CEST 2013


Author: frivas
Date: 2013-05-01 23:26:00 +0200 (Wed, 01 May 2013)
New Revision: 907

Added:
   trunk/src/components/recorder/recordergui.cpp
   trunk/src/components/recorder/recordergui.glade
   trunk/src/components/recorder/recordergui.h
Modified:
   trunk/src/components/recorder/CMakeLists.txt
   trunk/src/components/recorder/build-independent/CMakeLists.txt
   trunk/src/components/recorder/recorder.cfg
   trunk/src/components/recorder/recorder.cpp
Log:
A?\195?\177adido gui para recorder


Modified: trunk/src/components/recorder/CMakeLists.txt
===================================================================
--- trunk/src/components/recorder/CMakeLists.txt	2013-04-30 11:26:42 UTC (rev 906)
+++ trunk/src/components/recorder/CMakeLists.txt	2013-05-01 21:26:00 UTC (rev 907)
@@ -1,6 +1,6 @@
 IF(with_pcl)
 
-    SET( SOURCE_FILES  recorder.cpp)
+    SET( SOURCE_FILES  recorder.cpp recordergui.cpp)
 
       set( CMAKE_CXX_FLAGS "-Wno-deprecated -lGL -lGLU -lglut -lm -lusb-1.0 " ) # Opciones para el compilador-lgsl -lgslcblas -lGL -lGLU -lglut -lgazebo
 
@@ -23,12 +23,12 @@
 
     TARGET_LINK_LIBRARIES(recorder 
 	  ${opencv_LIBRARIES}
-#	  ${gtkmm_LIBRARIES}
-#	  ${libglademm_LIBRARIES}
+	  ${gtkmm_LIBRARIES}
+	  ${libglademm_LIBRARIES}
 #	  ${gthread_LIBRARIES}
 #	  ${libgnomecanvas_LIBRARIES}
 #	  ${libgnomecanvasmm_LIBRARIES}
-#	  ${gtkglextmm_LIBRARIES}
+	  ${gtkglextmm_LIBRARIES}
 	  ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
 	  ${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
 	  ${LIBS_DIR}/jderobotice/libjderobotice.so

Modified: trunk/src/components/recorder/build-independent/CMakeLists.txt
===================================================================
--- trunk/src/components/recorder/build-independent/CMakeLists.txt	2013-04-30 11:26:42 UTC (rev 906)
+++ trunk/src/components/recorder/build-independent/CMakeLists.txt	2013-05-01 21:26:00 UTC (rev 907)
@@ -1,5 +1,5 @@
- cmake_minimum_required(VERSION 2.8)
-SET( SOURCE_FILES ../recorder.cpp)
+cmake_minimum_required(VERSION 2.8)
+SET( SOURCE_FILES ../recorder.cpp ../recordergui.cpp)
 SET( LIBS_DIR /usr/local/lib/jderobot/)
 
 
@@ -16,8 +16,21 @@
 include_directories(${opencv_INCLUDE_DIRS})
 link_directories(${opencv_LIBRARY_DIRS})
 
+#automated gtk
+PKG_CHECK_MODULES(gtkmm REQUIRED gtkmm-2.4)
+include_directories(${gtkmm_INCLUDE_DIRS})
+link_directories(${gtkmm_LIBRARY_DIRS})
+#automated gtkmm
+PKG_CHECK_MODULES(libglademm REQUIRED libglademm-2.4)
+include_directories(${libglademm_INCLUDE_DIRS})
+link_directories(${libglademm_LIBRARY_DIRS})
+#automated gtkglextmm
+PKG_CHECK_MODULES(gtkglextmm REQUIRED gtkglextmm-x11-1.2)
+include_directories(${gtkglextmm_INCLUDE_DIRS})
+link_directories(${gtkglextmm_LIBRARY_DIRS})
 
 
+
 #manual ICE
 FIND_PATH( Ice_INCLUDE_DIR NAMES Ice/Ice.h  PATHS ENV C++LIB ENV)
  
@@ -46,6 +59,9 @@
 TARGET_LINK_LIBRARIES(recorder
   ${opencv_LIBRARIES}
   ${Ice_LIBRARIES}
+  ${gtkglextmm_LIBRARIES}
+  ${libglademm_LIBRARIES}
+  ${gtkmm_LIBRARIES}
   ${LIBS_DIR}/libcolorspacesmm.so
   ${LIBS_DIR}/libJderobotInterfaces.so
   ${LIBS_DIR}/libjderobotice.so

Modified: trunk/src/components/recorder/recorder.cfg
===================================================================
--- trunk/src/components/recorder/recorder.cfg	2013-04-30 11:26:42 UTC (rev 906)
+++ trunk/src/components/recorder/recorder.cfg	2013-05-01 21:26:00 UTC (rev 907)
@@ -19,6 +19,7 @@
 Recorder.Pose3DEncoders2.bool=0
 Recorder.DepthSensor1.Proxy=pointcloud1:tcp -h localhost -p 9998
 Recorder.DepthSensor2.Proxy=pointcloud1:tcp -h localhost -p 9997
+Recorder.GUI=0
 
 Recorder.Hostname=localhost
 Recorder.Port=9998

Modified: trunk/src/components/recorder/recorder.cpp
===================================================================
--- trunk/src/components/recorder/recorder.cpp	2013-04-30 11:26:42 UTC (rev 906)
+++ trunk/src/components/recorder/recorder.cpp	2013-05-01 21:26:00 UTC (rev 907)
@@ -25,6 +25,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <string.h>
+#include "recordergui.h"
 
 int main(int argc, char** argv){
 
@@ -271,116 +272,155 @@
       long timeInicio = 0;
       gettimeofday(&inicio,NULL);   
       timeInicio = inicio.tv_sec*1000000+inicio.tv_usec;
+	  int guiActive=prop->getPropertyAsIntWithDefault("Recorder.GUI",0); 
+	  bool active=true;
+	 bool recording=true;
+	recorder::recordergui *gui;
+
+		if (guiActive){
+	      gui = new recorder::recordergui();
+		}
+      long long int iteration=0;
+		
             
-      while(true){
-         gettimeofday(&a,NULL);
-         totala=a.tv_sec*1000000+a.tv_usec;
-      
+      while(active){
 
-		/*cameras*/
-		for (int i=0; i<nCameras ; i++){
-			imageData = cprx[i]->getImageData();
-			colorspaces::Image::FormatPtr fmt = colorspaces::Image::Format::searchFormat(imageData->description->format);
-			cv::Mat image;
-            	image.create(cv::Size(imageData->description->width, imageData->description->height), CV_8UC3);
+		if (guiActive){
+    	 gui->set_iteration(iteration);
+    	 gui->update();
+		 active=gui->get_active();
+		recording=gui->get_recording();
+		}
 
-            	memcpy((unsigned char *) image.data ,&(imageData->pixelData[0]), image.cols*image.rows * 3);
-            
-            	char buff[30]; // enough to hold all numbers up to 64-bits
 
-            	sprintf(buff, "images/camera%d_%ld.%s", i+1, timeRelative,imageFormat.c_str());
-            	cv::imwrite(buff, image,compression_params);
-            	outfile << timeRelative << "\t"+robotName +":"+robotPort + ":Camera" << i+1 << ":\t" << buff  << std::endl;
-		} 
-         /* Encoders */ 
-         if(avEncoders){
-            ed = eprx->getEncodersData(); // cogemos informacion de los encoders
-		      //std::cout << timeRelative << " " << "x: " << ed->robotx << " y: " <<ed->roboty << " z: " << ed->robottheta << std::endl;
-            outfile << timeRelative << "\t"+robotName +":"+robotPort + ":Encoders:\t" << ed->robotx << "\t" <<ed->roboty << "\t" << ed->robottheta << std::endl;
-         }
-         
-         /* Laser */
-         if(avLaser){
-            ld = lprx->getLaserData();
-            outfile << timeRelative <<" "+robotName +":"+robotPort + ":Laser: ";
-            for(int i = 0; i < muestrasLaser; i++){
-               outfile <<ld->distanceData[i] << "\t";
-            }
-               outfile << std::endl;
-            //std::cout << ld->distanceData[80] << std::endl;
-         }
-         
-         /* PTencoders A */
-         if(avPose3DEncoders1){
-            pose3DEncodersData1 = pose3DEncoders1->getPose3DEncodersData();
-            outfile << timeRelative <<" "<<robotName <<":"<<robotPort <<":Pose3DEncoders1: "<< pose3DEncodersData1->x << " " << pose3DEncodersData1->y << " " << pose3DEncodersData1->z << " "<< pose3DEncodersData1->pan << " " <<  pose3DEncodersData1->tilt << " " << pose3DEncodersData1->roll <<std::endl;
-            //std::cout << timeRelative << " pan: " << pose3DEncodersData1->pan << " tilt:" <<  pose3DEncodersData1->tilt << std::endl;
-         }
-         
-         /* PTencoders B */
-         if(avPose3DEncoders2){
-            pose3DEncodersData2 = pose3DEncoders2->getPose3DEncodersData();
-            outfile << timeRelative <<" "<<robotName <<":"<<robotPort <<":Pose3DEncoders2: "<< pose3DEncodersData2->x << " " << pose3DEncodersData2->y << " " << pose3DEncodersData2->z << " "<< pose3DEncodersData2->pan << " " <<  pose3DEncodersData2->tilt<< " " << pose3DEncodersData2->roll << std::endl;
-            
-            //std::cout << timeRelative << " pan: " << pose3DEncodersData2->pan << " tilt:" <<  pose3DEncodersData2->tilt << std::endl;
-         }
-         
-         /* PTencoders A deprecated?? */
-         if(ptencoders){
-            PTencodersData1 = pteprx1->getPTEncodersData();
-            outfile << timeRelative << "\t"+robotName +":"+robotPort + ":PTEncoders1:\t";
-            outfile << PTencodersData1->panAngle <<"\t" << PTencodersData1->tiltAngle << std::endl; 
-         }
-         
-      /* PTencoders B deprecated?? */
-        if(ptencoders2){
-            PTencodersData2 = pteprx2->getPTEncodersData();
-            outfile << timeRelative << "\t"+robotName +":"+robotPort + ":PTEncoders2:\t";
-            outfile << PTencodersData2->panAngle <<"\t" << PTencodersData2->tiltAngle << std::endl; 
-         }
-         
 
-		/* DepthSensors */
-		for (int j=0; j< nDepthSensors ; j++){
-            kinectData = prx[j]->getCloudData();
-            outfile << timeRelative << "\t"+robotName +":"+robotPort + ":KinectData" << j+1 << ":\t"<< kinectData->p.size() << "\t";
-            for(int i = 0; i < kinectData->p.size(); i++){
-               float x,y,z;
-               float r,g,b;
-			   float id;
-               x = kinectData->p[i].x;
-               y = kinectData->p[i].y;
-               z = kinectData->p[i].z;
-               r = kinectData->p[i].r;
-               g = kinectData->p[i].g;
-               b = kinectData->p[i].b;
-			   id = (float)kinectData->p[i].id;
-               outfile << x << "\t" << y << "\t" << z << "\t" << r << "\t" << g << "\t" << b << "\t" << id <<"\t" ;
-            }
-            outfile << std::endl;
-		} 
-     
-         gettimeofday(&b,NULL);
-         totalb=b.tv_sec*1000000+b.tv_usec;
-         std::cout << "Recorder takes " << (totalb-totala)/1000 << " ms" << std::endl;
-          
-         diff = (totalb-totala)/1000;
-         if(diff < 0 || diff > cycle)
-            diff = cycle;
-         else
-            diff = cycle-diff;
-         
-         //Sleep Algorithm
-         usleep(diff*1000);
-         if(diff < 10)
-            usleep(10*1000);
-            
-        // std::cout << cycle <<" ->" << diff  << " ->" << timeRelative<< std::endl;
-         timeRelative+= diff + (totalb-totala)/1000;
-        // std::cout << "->" << diff  << " ->" << timeRelative<< std::endl;
+		if (recording){
+			iteration++;
+			gettimeofday(&b,NULL);
+			    	 totalb=b.tv_sec*1000000+b.tv_usec;
 
-				std::cout << "rgb: " <<  1000000/(totalb-totala) << std::endl;
 
+
+
+			         float myfps=1000000./((float)totalb-(float)totala);
+					if (guiActive){
+			         gui->set_fps((int)myfps);
+					}
+
+
+
+
+					gettimeofday(&a,NULL);
+					totala=a.tv_sec*1000000+a.tv_usec;
+
+			/*cameras*/
+			for (int i=0; i<nCameras ; i++){
+				imageData = cprx[i]->getImageData();
+				colorspaces::Image::FormatPtr fmt = colorspaces::Image::Format::searchFormat(imageData->description->format);
+				cv::Mat image;
+					image.create(cv::Size(imageData->description->width, imageData->description->height), CV_8UC3);
+
+					memcpy((unsigned char *) image.data ,&(imageData->pixelData[0]), image.cols*image.rows * 3);
+
+					char buff[30]; // enough to hold all numbers up to 64-bits
+
+					sprintf(buff, "images/camera%d_%ld.%s", i+1, timeRelative,imageFormat.c_str());
+					cv::imwrite(buff, image,compression_params);
+					outfile << timeRelative << "\t"+robotName +":"+robotPort + ":Camera" << i+1 << ":\t" << buff  << std::endl;
+			}
+			 /* Encoders */
+			 if(avEncoders){
+				ed = eprx->getEncodersData(); // cogemos informacion de los encoders
+				  //std::cout << timeRelative << " " << "x: " << ed->robotx << " y: " <<ed->roboty << " z: " << ed->robottheta << std::endl;
+				outfile << timeRelative << "\t"+robotName +":"+robotPort + ":Encoders:\t" << ed->robotx << "\t" <<ed->roboty << "\t" << ed->robottheta << std::endl;
+			 }
+
+			 /* Laser */
+			 if(avLaser){
+				ld = lprx->getLaserData();
+				outfile << timeRelative <<" "+robotName +":"+robotPort + ":Laser: ";
+				for(int i = 0; i < muestrasLaser; i++){
+				   outfile <<ld->distanceData[i] << "\t";
+				}
+				   outfile << std::endl;
+				//std::cout << ld->distanceData[80] << std::endl;
+			 }
+
+			 /* PTencoders A */
+			 if(avPose3DEncoders1){
+				pose3DEncodersData1 = pose3DEncoders1->getPose3DEncodersData();
+				outfile << timeRelative <<" "<<robotName <<":"<<robotPort <<":Pose3DEncoders1: "<< pose3DEncodersData1->x << " " << pose3DEncodersData1->y << " " << pose3DEncodersData1->z << " "<< pose3DEncodersData1->pan << " " <<  pose3DEncodersData1->tilt << " " << pose3DEncodersData1->roll <<std::endl;
+				//std::cout << timeRelative << " pan: " << pose3DEncodersData1->pan << " tilt:" <<  pose3DEncodersData1->tilt << std::endl;
+			 }
+
+			 /* PTencoders B */
+			 if(avPose3DEncoders2){
+				pose3DEncodersData2 = pose3DEncoders2->getPose3DEncodersData();
+				outfile << timeRelative <<" "<<robotName <<":"<<robotPort <<":Pose3DEncoders2: "<< pose3DEncodersData2->x << " " << pose3DEncodersData2->y << " " << pose3DEncodersData2->z << " "<< pose3DEncodersData2->pan << " " <<  pose3DEncodersData2->tilt<< " " << pose3DEncodersData2->roll << std::endl;
+
+				//std::cout << timeRelative << " pan: " << pose3DEncodersData2->pan << " tilt:" <<  pose3DEncodersData2->tilt << std::endl;
+			 }
+
+			 /* PTencoders A deprecated?? */
+			 if(ptencoders){
+				PTencodersData1 = pteprx1->getPTEncodersData();
+				outfile << timeRelative << "\t"+robotName +":"+robotPort + ":PTEncoders1:\t";
+				outfile << PTencodersData1->panAngle <<"\t" << PTencodersData1->tiltAngle << std::endl;
+			 }
+
+		  /* PTencoders B deprecated?? */
+			if(ptencoders2){
+				PTencodersData2 = pteprx2->getPTEncodersData();
+				outfile << timeRelative << "\t"+robotName +":"+robotPort + ":PTEncoders2:\t";
+				outfile << PTencodersData2->panAngle <<"\t" << PTencodersData2->tiltAngle << std::endl;
+			 }
+
+
+			/* DepthSensors */
+			for (int j=0; j< nDepthSensors ; j++){
+				kinectData = prx[j]->getCloudData();
+				outfile << timeRelative << "\t"+robotName +":"+robotPort + ":KinectData" << j+1 << ":\t"<< kinectData->p.size() << "\t";
+				for(int i = 0; i < kinectData->p.size(); i++){
+				   float x,y,z;
+				   float r,g,b;
+				   float id;
+				   x = kinectData->p[i].x;
+				   y = kinectData->p[i].y;
+				   z = kinectData->p[i].z;
+				   r = kinectData->p[i].r;
+				   g = kinectData->p[i].g;
+				   b = kinectData->p[i].b;
+				   id = (float)kinectData->p[i].id;
+				   outfile << x << "\t" << y << "\t" << z << "\t" << r << "\t" << g << "\t" << b << "\t" << id <<"\t" ;
+				}
+				outfile << std::endl;
+			}
+
+			 gettimeofday(&b,NULL);
+			 totalb=b.tv_sec*1000000+b.tv_usec;
+			 std::cout << "Recorder takes " << (totalb-totala)/1000 << " ms" << std::endl;
+
+			 diff = (totalb-totala)/1000;
+			 if(diff < 0 || diff > cycle)
+				diff = cycle;
+			 else
+				diff = cycle-diff;
+
+			 //Sleep Algorithm
+			 usleep(diff*1000);
+			 if(diff < 10)
+				usleep(10*1000);
+
+			// std::cout << cycle <<" ->" << diff  << " ->" << timeRelative<< std::endl;
+			 timeRelative+= diff + (totalb-totala)/1000;
+			// std::cout << "->" << diff  << " ->" << timeRelative<< std::endl;
+
+					std::cout << "rgb: " <<  1000000/(totalb-totala) << std::endl;
+		}
+		else{
+			usleep(10*1000);
+		}
+
       }
       
       outfile.close();

Added: trunk/src/components/recorder/recordergui.cpp
===================================================================
--- trunk/src/components/recorder/recordergui.cpp	                        (rev 0)
+++ trunk/src/components/recorder/recordergui.cpp	2013-05-01 21:26:00 UTC (rev 907)
@@ -0,0 +1,126 @@
+/*
+*  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, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *   Authors : Francisco Miguel Rivas Montero <franciscomiguel.rivas en urjc.es>,
+ *             Jose María Cañas Plaza <jmplaza en gsyc.es>
+ *
+ */
+
+#include "recordergui.h"
+
+namespace recorder {
+
+	recordergui::recordergui(): gtkmain(0,0) {
+		recording=false;
+		exit=false;
+
+
+		std::cout << "Loading glade\n";
+	refXml = Gnome::Glade::Xml::create("./recordergui.glade");
+
+		/*Get widgets*/
+    refXml->get_widget("window1",mainwindow);
+    refXml->get_widget("entry2",this->w_entry_fps);
+    refXml->get_widget("entry1",this->w_entry_iteration);
+    refXml->get_widget("button1",this->w_record);
+    refXml->get_widget("button2",this->w_stop);
+    refXml->get_widget("button3",this->w_exit);
+
+	this->w_record->signal_clicked().connect(sigc::mem_fun(this,&recordergui::button_record_clicked));
+	this->w_stop->signal_clicked().connect(sigc::mem_fun(this,&recordergui::button_stop_clicked));
+	this->w_exit->signal_clicked().connect(sigc::mem_fun(this,&recordergui::button_exit_clicked));
+
+	this->w_stop->hide();
+
+    mainwindow->show();
+
+        
+		/*Set default config*/
+		/*vscale_pos_x->set_value((double)this->controller->getPos()->X);
+		vscale_pos_y->set_value((double)this->controller->getPos()->Y);
+		vscale_pos_z->set_value((double)this->controller->getPos()->Z);
+		vscale_foa_x->set_value((double)this->controller->getFoa()->X);
+		vscale_foa_y->set_value((double)this->controller->getFoa()->Y);
+		vscale_foa_z->set_value((double)this->controller->getFoa()->Z);		
+		vscale_fx->set_value((double)this->controller->getFdistX());
+		vscale_fy->set_value((double)this->controller->getFdistY());
+		vscale_u0->set_value((double)this->controller->getU0());
+		vscale_v0->set_value((double)this->controller->getV0());
+		vscale_roll->set_value((double)this->controller->getRoll());
+		
+
+		vscale_pos_x->signal_value_changed().connect(sigc::mem_fun(this,&View::pos_x_changed));
+		vscale_pos_y->signal_value_changed().connect(sigc::mem_fun(this,&View::pos_y_changed));
+		vscale_pos_z->signal_value_changed().connect(sigc::mem_fun(this,&View::pos_z_changed));
+		vscale_foa_x->signal_value_changed().connect(sigc::mem_fun(this,&View::foa_x_changed));
+		vscale_foa_y->signal_value_changed().connect(sigc::mem_fun(this,&View::foa_y_changed));
+		vscale_foa_z->signal_value_changed().connect(sigc::mem_fun(this,&View::foa_z_changed));
+		vscale_fx->signal_value_changed().connect(sigc::mem_fun(this,&View::fx_changed));
+		vscale_fy->signal_value_changed().connect(sigc::mem_fun(this,&View::fy_changed));
+		vscale_u0->signal_value_changed().connect(sigc::mem_fun(this,&View::u0_changed));
+		vscale_v0->signal_value_changed().connect(sigc::mem_fun(this,&View::v0_changed));
+		vscale_roll->signal_value_changed().connect(sigc::mem_fun(this,&View::roll_changed));
+		button_center->signal_clicked().connect(sigc::mem_fun(this,&View::button_center_clicked));*/
+	}
+
+	recordergui::~recordergui() {
+
+	}
+
+	void recordergui::update(){
+		while (gtkmain.events_pending())
+			gtkmain.iteration();
+	}	
+
+	void recordergui::set_iteration(int value){
+		std::stringstream v;//create a stringstream
+		v << value;//add number to the stream
+		this->w_entry_iteration->set_text(v.str().c_str());
+	}
+
+	void recordergui::set_fps(int value){
+		std::stringstream v;//create a stringstream
+				v << value;//add number to the stream
+			this->w_entry_fps->set_text(v.str().c_str());
+		}
+
+	void recordergui::button_record_clicked(){
+		this->recording=true;
+		this->w_record->hide();
+		this->w_stop->show();
+	}
+
+	void recordergui::button_stop_clicked(){
+		this->w_stop->hide();
+		this->recording=false;
+		}
+
+	void recordergui::button_exit_clicked(){
+		this->recording=false;
+		this->exit=true;
+		}
+
+	bool recordergui::get_active(){
+		return !this->exit;
+	}
+
+	bool recordergui::get_recording(){
+		return this->recording;
+	}
+
+  
+}//namespace

Added: trunk/src/components/recorder/recordergui.glade
===================================================================
--- trunk/src/components/recorder/recordergui.glade	                        (rev 0)
+++ trunk/src/components/recorder/recordergui.glade	2013-05-01 21:26:00 UTC (rev 907)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.2 on Tue Apr 16 17:31:03 2013 -->
+<glade-interface>
+  <widget class="GtkWindow" id="window1">
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
+        <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
+        <child>
+          <widget class="GtkMenuBar" id="menubar1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Archivo</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu1">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-new</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem2">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-open</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem3">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-save</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem4">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-save-as</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem5">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-quit</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem2">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Editar</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu2">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem6">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-cut</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem7">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-copy</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem8">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-paste</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem9">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-delete</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem3">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Ver</property>
+                <property name="use_underline">True</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem4">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Ay_uda</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu3">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem10">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-about</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHSeparator" id="hseparator1">
+            <property name="visible">True</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">Record</property>
+                <property name="response_id">0</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">Stop</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <widget class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Iteration</property>
+                  </widget>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">fps</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="entry1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">●</property>
+                    <property name="progress_pulse_step">0.20999999344348907</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="entry2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="editing_canceled">True</property>
+                    <property name="invisible_char">●</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="button3">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">Exit</property>
+                <property name="response_id">0</property>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>

Added: trunk/src/components/recorder/recordergui.h
===================================================================
--- trunk/src/components/recorder/recordergui.h	                        (rev 0)
+++ trunk/src/components/recorder/recordergui.h	2013-05-01 21:26:00 UTC (rev 907)
@@ -0,0 +1,86 @@
+/*
+*  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, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *   Authors : Francisco Miguel Rivas Montero <franciscomiguel.rivas en urjc.es>,
+ *             Jose María Cañas Plaza <jmplaza en gsyc.es>
+ *
+ */
+
+#ifndef RECORDER_GUI_H
+#define RECORDER_GUI_H
+
+#include <string>
+#include <iostream>
+#include <gtkmm.h>
+#include <libglademm.h>
+#include <IceUtil/Thread.h>
+#include <IceUtil/Time.h>
+#include <colorspaces/colorspacesmm.h>
+
+namespace recorder {
+  class recordergui {
+  public:
+
+    recordergui();
+    virtual ~recordergui();
+	void update();
+	void set_iteration(int value);
+	void set_fps(int value);
+	bool get_recording();
+	bool get_active();
+
+
+
+  private:
+		void button_record_clicked();
+		void button_stop_clicked();
+		void button_exit_clicked();
+
+		bool recording;
+		bool exit;
+
+
+
+
+		Glib::RefPtr<Gnome::Glade::Xml> refXml;
+		Gtk::Main gtkmain;
+		Gtk::Window* mainwindow;
+
+		Gtk::Entry *w_entry_iteration;
+		Gtk::Entry *w_entry_fps;
+		Gtk::Button *w_record;
+		Gtk::Button *w_stop;
+		Gtk::Button *w_exit;
+ 		/*Gtk::VScale *vscale_pos_x;
+ 		Gtk::VScale *vscale_pos_y;
+ 		Gtk::VScale *vscale_pos_z;
+ 		Gtk::VScale *vscale_foa_x;
+ 		Gtk::VScale *vscale_foa_y;
+ 		Gtk::VScale *vscale_foa_z;
+ 		Gtk::VScale *vscale_fx;
+ 		Gtk::VScale *vscale_fy;
+ 		Gtk::VScale *vscale_u0;
+ 		Gtk::VScale *vscale_v0;
+ 		Gtk::VScale *vscale_roll;
+		Gtk::Image *gtk_image;
+		Gtk::Button* button_center;
+   
+		Controller * controller;*/
+  };
+}//namespace
+
+#endif /*RECORDER_GUI_H*/



More information about the Jderobot-admin mailing list