[Jderobot-admin] jderobot-r874 - in trunk: . Deps Deps/nite Deps/opengl Deps/openni Deps/pcl src/components/bgfglab src/components/calibrator src/components/calibratorKinect src/components/calibratorKinect/build-independent src/components/kinectViewer src/components/openniServer src/components/openniServer/build-independent src/components/recorder src/components/recorder/build-independent src/components/replayer src/components/replayer/build-independent src/components/wiimoteClient src/components/wiimoteServer

frivas en jderobot.org frivas en jderobot.org
Mar Mar 5 13:40:25 CET 2013


Author: frivas
Date: 2013-03-05 13:39:24 +0100 (Tue, 05 Mar 2013)
New Revision: 874

Added:
   trunk/Deps/opengl/
   trunk/Deps/opengl/CMakeLists.txt
   trunk/src/components/calibratorKinect/build-independent/
   trunk/src/components/calibratorKinect/build-independent/CMakeLists.txt
   trunk/src/components/openniServer/build-independent/
   trunk/src/components/openniServer/build-independent/CMakeLists.txt
   trunk/src/components/recorder/build-independent/
   trunk/src/components/recorder/build-independent/CMakeLists.txt
   trunk/src/components/replayer/build-independent/
   trunk/src/components/replayer/build-independent/CMakeLists.txt
Modified:
   trunk/CMakeLists.txt
   trunk/Deps/nite/CMakeLists.txt
   trunk/Deps/openni/CMakeLists.txt
   trunk/Deps/pcl/CMakeLists.txt
   trunk/src/components/bgfglab/CMakeLists.txt
   trunk/src/components/calibrator/CMakeLists.txt
   trunk/src/components/calibratorKinect/CMakeLists.txt
   trunk/src/components/kinectViewer/CMakeLists.txt
   trunk/src/components/openniServer/openniServer.cfg
   trunk/src/components/openniServer/openniServer.cpp
   trunk/src/components/recorder/recorder.cfg
   trunk/src/components/recorder/recorder.cpp
   trunk/src/components/wiimoteClient/CMakeLists.txt
   trunk/src/components/wiimoteServer/CMakeLists.txt
Log:
a?\195?\177adida dependencia de opengl, modificadas dependencias de openni y nite. Subida ultima version de openniServer, recorder con funcion de elegir formato y subidos algunos cmakes independientes


Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -97,6 +97,7 @@
 include(${DEPS_DIR}/ice/CMakeLists.txt)
 include(${DEPS_DIR}/cwiid/CMakeLists.txt)
 include(${DEPS_DIR}/opencv/CMakeLists.txt)
+include(${DEPS_DIR}/opengl/CMakeLists.txt)
 #include(${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/CMakeLists.txt)
 
 

Modified: trunk/Deps/nite/CMakeLists.txt
===================================================================
--- trunk/Deps/nite/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/Deps/nite/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -1,26 +1,18 @@
 # CHECK NITE
-FIND_PATH( ni_INCLUDE_DIR NAMES XnOS.h  PATHS ENV C++LIB ENV PATH PATH_SUFFIXES include/ni/)
 FIND_PATH( nite_INCLUDE_DIR NAMES XnVCircleDetector.h  PATHS ENV C++LIB ENV PATH PATH_SUFFIXES include/nite/)
-MESSAGE(NI: ${ni_INCLUDE_DIR})
-MESSAGE(NITE: ${nite_INCLUDE_DIR})
+ 
+IF( nite_INCLUDE_DIR )
+	FIND_LIBRARY(nite_LIBRARIES NAMES XnVNite_1_5_2 XnVCNITE_1_5_2 PATHS /usr/lib/ /usr/local/lib)
+    IF( nite_LIBRARIES)
+		MESSAGE ("-- Nite found at ${nite_LIBRARIES}")
+		include_directories(${nite_INCLUDE_DIR})
+		link_directories(${nite_LIBRARIES})
+    ENDIF( nite_LIBRARIES )
+ENDIF(nite_INCLUDE_DIR)
 
-
-FIND_LIBRARY(with_nite
-    NAMES XnVNite_1_5_2 XnVCNITE_1_5_2
-    PATHS /usr/lib/ /usr/local/lib)
-
-IF(NOT with_gearbox)
-    MESSAGE ( "*** Nite libraries: XnVNite or XnVCNITE not found")
+IF(NOT nite_LIBRARIES)
+		MESSAGE ("*** Nite not found")
 ENDIF()
-IF(with_nite)
-    MESSAGE ("*** Nite OK")
-    include_directories( /usr/include)
-include_directories(/usr/local/include)
-link_directories(/usr/local/lib )
-link_directories( /usr/lib )
 
-ENDIF()
 
 
-
-

Added: trunk/Deps/opengl/CMakeLists.txt
===================================================================
--- trunk/Deps/opengl/CMakeLists.txt	                        (rev 0)
+++ trunk/Deps/opengl/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -0,0 +1,11 @@
+include(FindPkgConfig)
+find_package(GLUT)
+include_directories(${GLUT_INCLUDE_DIRS})
+link_directories(${GLUT_LIBRARY_DIRS})
+
+IF (GLUT_LIBRARIES) 
+	MESSAGE("OpenGL libraries found at ${GLUT_LIBRARIES}")
+ELSE()
+	MESSAGE ("*** OpenGL not found")
+ENDIF()
+

Modified: trunk/Deps/openni/CMakeLists.txt
===================================================================
--- trunk/Deps/openni/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/Deps/openni/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -1,19 +1,17 @@
 # CHECK OPENNI
-FIND_LIBRARY(with_openni
-    NAMES OpenNI
-    PATHS /usr/lib /usr/local/lib)
+FIND_PATH( openni_INCLUDE_DIR NAMES XnOpenNI.h  PATHS ENV C++LIB ENV PATH PATH_SUFFIXES ni)
+ 
+IF( openni_INCLUDE_DIR )
+    FIND_LIBRARY( openni_LIBRARIES NAMES OpenNI PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    IF( openni_LIBRARIES)
+		MESSAGE ("-- OpenNi found at ${openni_LIBRARIES}")
+		include_directories(${openni_INCLUDE_DIR})
+		link_directories(${openni_LIBRARIES})
+    ENDIF( openni_LIBRARIES )
+ENDIF(openni_INCLUDE_DIR)
 
+IF(NOT openni_LIBRARIES)
+		MESSAGE ("*** OpenNi not found")
+ENDIF()
 
-IF(NOT with_openni)
-    MESSAGE ("*** OpenNi libraries not found. Are needed to openniServer component")
-endif()
-IF(with_openni)
-	FIND_LIBRARY( OpenNi_LIBRARY NAMES OpenNI PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
-    MESSAGE ("*** OpenNi OK")
-	#MESSAGE ( ${OpenNi_LIBRARY})
-endif()
 
-include_directories(/usr/include/openni)
-
-
-

Modified: trunk/Deps/pcl/CMakeLists.txt
===================================================================
--- trunk/Deps/pcl/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/Deps/pcl/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -20,6 +20,7 @@
 
 
 IF( pcl_INCLUDE_DIR )
+	include_directories (${pcl_INCLUDE_DIR})
     FIND_LIBRARY( pcl_LIBRARY1 NAMES pcl_surface PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
     FIND_LIBRARY( pcl_LIBRARY2 NAMES pcl_registration PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
     FIND_LIBRARY( pcl_LIBRARY3 NAMES pcl_segmentation PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
@@ -44,7 +45,3 @@
 IF(with_pcl)
     MESSAGE ("*** PCL OK")
 endif()
-
-
-include_directories(/usr/include)
-link_directories(/usr/lib)

Modified: trunk/src/components/bgfglab/CMakeLists.txt
===================================================================
--- trunk/src/components/bgfglab/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/bgfglab/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -2,7 +2,7 @@
 
 SET( SOURCE_FILES controller.cpp main.cpp mainthread.cpp model.cpp viewgtk.cpp viewtext.cpp )
 
-set( CMAKE_CXX_FLAGS "-lglut -lgsl -lgslcblas " ) # Opciones para el compilador-lgsl -lgslcblas -lGL -lGLU -lglut -lgazebo
+
 add_definitions(-DGLADE_DIR="${gladedir}")
 
 
@@ -17,10 +17,7 @@
     ${opencv_LIBRARIES}
     ${gtkmm_LIBRARIES}
     ${libglademm_LIBRARIES}
-#    ${gthread_LIBRARIES}
-#    ${libgnomecanvas_LIBRARIES}
-#    ${libgnomecanvasmm_LIBRARIES}
-#    ${gtkglextmm_LIBRARIES}
+	  ${GLUT_LIBRARIES}
     ${OpenCV_LIBRARIES}
     ${LIBS_DIR}/jderobotice/libjderobotice.so
     ${LIBS_DIR}/jderobotutil/libjderobotutil.so

Modified: trunk/src/components/calibrator/CMakeLists.txt
===================================================================
--- trunk/src/components/calibrator/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/calibrator/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -4,9 +4,6 @@
 include_directories(
     ${INTERFACES_CPP_DIR}
     ${LIBS_DIR}
-    ${gl_INCLUDE_DIRS}
-    ${glu_INCLUDE_DIRS}
-    ${glut_INCLUDE_DIRS}
     ${CMAKE_CURRENT_SOURCE_DIR})
 
 
@@ -15,7 +12,7 @@
 TARGET_LINK_LIBRARIES( calibrator
  ${gtkmm_LIBRARIES}
  ${libglademm_LIBRARIES}
-# ${gthread_LIBRARIES}
+  ${GLUT_LIBRARIES}
  ${gtkglextmm_LIBRARIES}
  ${ZeroCIce_LIBRARIES}
  ${OpenCV_LIBRARIES}
@@ -25,6 +22,4 @@
  ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
  ${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
  ${LIBS_DIR}/progeo/libprogeo.so
- ${Gearbox_LIBRARIES}
-   glut
 )

Modified: trunk/src/components/calibratorKinect/CMakeLists.txt
===================================================================
--- trunk/src/components/calibratorKinect/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/calibratorKinect/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -9,10 +9,10 @@
     ${glut_INCLUDE_DIRS}
     ${CMAKE_CURRENT_SOURCE_DIR})
 
-set( CMAKE_CXX_FLAGS "-lglut")
 add_executable (calibratorKinect ${SOURCE_FILES})
 
 TARGET_LINK_LIBRARIES( calibratorKinect
+ ${GLUT_LIBRARIES}
  ${opencv_LIBRARIES}
  ${gtkmm_LIBRARIES}
  ${libglademm_LIBRARIES}

Added: trunk/src/components/calibratorKinect/build-independent/CMakeLists.txt
===================================================================
--- trunk/src/components/calibratorKinect/build-independent/CMakeLists.txt	                        (rev 0)
+++ trunk/src/components/calibratorKinect/build-independent/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -0,0 +1,80 @@
+ cmake_minimum_required(VERSION 2.8)
+SET( SOURCE_FILES ../calibratorKinect.cpp  ../controller.cpp  ../view.cpp ../drawarea.cpp)
+SET( LIBS_DIR /usr/local/lib/jderobot/)
+
+
+include_directories(
+	  /usr/local/include/jderobot
+)
+
+add_executable (calibratorKinect  ${SOURCE_FILES})
+
+#automated opencv
+include(FindPkgConfig)
+PKG_CHECK_MODULES(opencv REQUIRED opencv)
+message("----opencv:  ${opencv_INCLUDE_DIRS}")
+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})
+#automated gsl
+PKG_CHECK_MODULES(gsl REQUIRED gsl)
+include_directories(${gsl_INCLUDE_DIRS})
+link_directories(${gsl_LIBRARY_DIRS})
+#glut
+find_package(GLUT)
+include_directories(${GLUT_INCLUDE_DIRS})
+link_directories(${GLUT_LIBRARY_DIRS})
+#gl
+PKG_CHECK_MODULES(gl REQUIRED gl)
+include_directories(${gl_INCLUDE_DIRS})
+link_directories(${gl_LIBRARY_DIRS})
+
+#manual ICE
+FIND_PATH( Ice_INCLUDE_DIR NAMES Ice/Ice.h  PATHS ENV C++LIB ENV)
+ 
+IF( Ice_INCLUDE_DIR )
+    FIND_LIBRARY( Ice_LIBRARY1 NAMES Ice PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64 )
+    FIND_LIBRARY( Ice_LIBRARY2 NAMES IceUtil PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    SET (Ice_LIBRARIES ${Ice_LIBRARY1} ${Ice_LIBRARY2})
+    IF( Ice_LIBRARIES )
+		MESSAGE ("-- Ice found at ${Ice_LIBRARIES}")
+		include_directories(${Ice_INCLUDE_DIR})
+		link_directories(${Ice_LIBRARIES})
+    ENDIF( Ice_LIBRARIES )
+ENDIF(Ice_INCLUDE_DIR)
+
+IF(NOT Ice_LIBRARIES)
+		MESSAGE ("*** Ice not found")
+ENDIF()
+ 
+
+
+set( CMAKE_CXX_FLAGS "-Wno-deprecated" ) # Opciones para el compilador
+
+
+TARGET_LINK_LIBRARIES(calibratorKinect
+  ${opencv_LIBRARIES}
+  ${gsl_LIBRARIES}
+  ${Ice_LIBRARIES}
+  ${gtkglextmm_LIBRARIES}
+  ${libglademm_LIBRARIES}
+  ${gtkmm_LIBRARIES}
+  ${gl_LIBRARIES}
+  ${GLUT_LIBRARIES}
+  ${LIBS_DIR}/libcolorspacesmm.so
+  ${LIBS_DIR}/libJderobotInterfaces.so
+  ${LIBS_DIR}/libjderobotice.so
+  ${LIBS_DIR}/libjderobotutil.so
+  ${LIBS_DIR}/libprogeo.so
+)

Modified: trunk/src/components/kinectViewer/CMakeLists.txt
===================================================================
--- trunk/src/components/kinectViewer/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/kinectViewer/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -2,7 +2,7 @@
 
 add_definitions(-DGLADE_DIR="${gladedir}")
 
-set( CMAKE_CXX_FLAGS "-Wno-deprecated -lgsl -lgslcblas -lGLU -lGL -lglut" ) # Opciones para el compilador-lgsl -lgslcblas -lGL -lGLU -lglut -lgazebo
+set( CMAKE_CXX_FLAGS "-Wno-deprecated" ) # Opciones para el compilador-lgsl -lgslcblas -lGL -lGLU -lglut -lgazebo
 
 include_directories(
     ${INTERFACES_CPP_DIR}
@@ -15,13 +15,10 @@
 
 
 TARGET_LINK_LIBRARIES(kinectViewer 
-   	${opencv_LIBRARIES}
+	${GLUT_LIBRARIES}
    	${OpenCV_LIBRARIES}
    	${gtkmm_LIBRARIES}
     ${libglademm_LIBRARIES}
-#    ${gthread_LIBRARIES}
-#    ${libgnomecanvas_LIBRARIES}
-#    ${libgnomecanvasmm_LIBRARIES}
     ${gtkglextmm_LIBRARIES}
     ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
     ${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so

Added: trunk/src/components/openniServer/build-independent/CMakeLists.txt
===================================================================
--- trunk/src/components/openniServer/build-independent/CMakeLists.txt	                        (rev 0)
+++ trunk/src/components/openniServer/build-independent/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -0,0 +1,126 @@
+ cmake_minimum_required(VERSION 2.8)
+SET( SOURCE_FILES ../openniServer.cpp ../myprogeo.cpp)
+SET( LIBS_DIR /usr/local/lib/jderobot/)
+
+
+
+include_directories(
+	  /usr/local/include/jderobot
+)
+
+add_executable (openniServer  ${SOURCE_FILES})
+
+#automated opencv
+include(FindPkgConfig)
+PKG_CHECK_MODULES(opencv REQUIRED opencv)
+include_directories(${opencv_INCLUDE_DIRS})
+link_directories(${opencv_LIBRARY_DIRS})
+#automated gsl
+PKG_CHECK_MODULES(gsl REQUIRED gsl)
+include_directories(${gsl_INCLUDE_DIRS})
+link_directories(${gsl_LIBRARY_DIRS})
+
+
+
+
+#manual openni libraries
+FIND_PATH( openni_INCLUDE_DIR NAMES XnOpenNI.h  PATHS ENV C++LIB ENV PATH PATH_SUFFIXES ni)
+
+ 
+IF( openni_INCLUDE_DIR )
+    FIND_LIBRARY( openni_LIBRARIES NAMES OpenNI PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    IF( openni_LIBRARIES)
+		MESSAGE ("-- OpenNi found at ${openni_LIBRARIES}")
+		include_directories(${openni_INCLUDE_DIR})
+		link_directories(${openni_LIBRARIES})
+    ENDIF( openni_LIBRARIES )
+ENDIF(openni_INCLUDE_DIR)
+
+IF(NOT openni_LIBRARIES)
+		MESSAGE ("*** OpenNi not found")
+ENDIF()
+
+
+#manual nite libraries
+FIND_PATH( nite_INCLUDE_DIR NAMES XnVCircleDetector.h  PATHS ENV C++LIB ENV PATH PATH_SUFFIXES include/nite/)
+ 
+IF( nite_INCLUDE_DIR )
+	FIND_LIBRARY(nite_LIBRARIES NAMES XnVNite_1_5_2 XnVCNITE_1_5_2 PATHS /usr/lib/ /usr/local/lib)
+    IF( nite_LIBRARIES)
+		MESSAGE ("-- Nite found at ${nite_LIBRARIES}")
+		include_directories(${nite_INCLUDE_DIR})
+		link_directories(${nite_LIBRARIES})
+    ENDIF( nite_LIBRARIES )
+ENDIF(nite_INCLUDE_DIR)
+
+IF(NOT nite_LIBRARIES)
+		MESSAGE ("*** Nite not found")
+ENDIF()
+
+
+
+
+
+#manual gearbox libraries
+FIND_PATH( Gearbox_INCLUDE_DIR NAMES gbxutilacfr/gbxutilacfr.h  PATHS ENV C++LIB ENV PATH PATH_SUFFIXES gearbox)
+ 
+IF( Gearbox_INCLUDE_DIR )
+    FIND_LIBRARY( Gearbox_LIBRARY1 NAMES GbxUtilAcfr PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib/gearbox lib64/gearbox )
+    FIND_LIBRARY( Gearbox_LIBRARY2 NAMES GbxIceUtilAcfr PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib/gearbox lib64/gearbox)
+    SET (Gearbox_LIBRARIES ${Gearbox_LIBRARY1} ${Gearbox_LIBRARY2})
+    IF( Gearbox_LIBRARIES )
+		MESSAGE ("-- Gearbox found at ${Gearbox_LIBRARIES}")
+		include_directories(${Gearbox_INCLUDE_DIR})
+		link_directories(${Gearbox_LIBRARIES})
+    ENDIF( Gearbox_LIBRARIES )
+ENDIF(Gearbox_INCLUDE_DIR)
+
+IF(NOT Gearbox_LIBRARIES)
+		MESSAGE ("*** Gearbox not found")
+ENDIF()
+
+
+#manual ICE
+FIND_PATH( Ice_INCLUDE_DIR NAMES Ice/Ice.h  PATHS ENV C++LIB ENV)
+ 
+IF( Ice_INCLUDE_DIR )
+    FIND_LIBRARY( Ice_LIBRARY1 NAMES Ice PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64 )
+    FIND_LIBRARY( Ice_LIBRARY2 NAMES IceUtil PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    SET (Ice_LIBRARIES ${Ice_LIBRARY1} ${Ice_LIBRARY2})
+    IF( Ice_LIBRARIES )
+		MESSAGE ("-- Ice found at ${Ice_LIBRARIES}")
+		include_directories(${Ice_INCLUDE_DIR})
+		link_directories(${Ice_LIBRARIES})
+    ENDIF( Ice_LIBRARIES )
+ENDIF(Ice_INCLUDE_DIR)
+
+IF(NOT Ice_LIBRARIES)
+		MESSAGE ("*** Ice not found")
+ENDIF()
+
+
+#PKG_CHECK_MODULES(gearbox gearbox)
+#include_directories(${gearbox_INCLUDE_DIRS})
+#link_directories(${gearbox_LIBRARY_DIRS})
+#message(STATUS "${gearbox_LIBRARY_DIRS}")
+#message(STATUS "${gearbox_INCLUDE_DIRS}")
+
+
+set( CMAKE_CXX_FLAGS "-Wno-deprecated -Wl,-rpath ./" ) # Opciones para el compilador
+
+
+TARGET_LINK_LIBRARIES(openniServer
+  ${opencv_LIBRARIES}
+  ${gsl_LIBRARIES}
+  ${Gearbox_LIBRARIES}
+  ${Ice_LIBRARIES} 
+  ${openni_LIBRARIES}
+  ${nite_LIBRARIES}
+  ${LIBS_DIR}/libcolorspacesmm.so
+  ${LIBS_DIR}/libJderobotInterfaces.so
+  ${LIBS_DIR}/libjderobotice.so
+  ${LIBS_DIR}/libjderobotutil.so
+  ${LIBS_DIR}/libprogeo.so
+ 
+ 
+)

Modified: trunk/src/components/openniServer/openniServer.cfg
===================================================================
--- trunk/src/components/openniServer/openniServer.cfg	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/openniServer/openniServer.cfg	2013-03-05 12:39:24 UTC (rev 874)
@@ -4,26 +4,26 @@
 #cameras configuration
 openniServer.NCameras=1
 openniServer.PlayerDetection=1
+openniServer.Width=320
+openniServer.Height=240
+openniServer.Fps=25
 
 #camera 1
 openniServer.deviceId=0
-openniServer.CameraRGB.Name=cameraRGB
-openniServer.CameraRGB.ImageWidth=640
-openniServer.CameraRGB.ImageHeight=480
+openniServer.CameraRGB.Name=cameraA
 openniServer.CameraRGB.Format=RGB8
-openniServer.CameraRGB.fp=10
+openniServer.CameraRGB.fps=10
 
 openniServer.calibration=./config/camRGB
-openniServer.CameraDEPTH.Name=cameraDEPTH
-openniServer.CameraDEPTH.ImageWidth=640
-openniServer.CameraDEPTH.ImageHeight=480
+openniServer.CameraDEPTH.Name=cameraB
 openniServer.CameraDEPTH.Format=RGB8
-openniServer.CameraDEPTH.fp=10
+openniServer.CameraDEPTH.fps=10
 
 
 #Other components
 openniServer.CameraRGB=1
 openniServer.CameraDEPTH=1
 openniServer.pointCloudActive=1
-openniServer.Pose3DMotorsActive=1
-openniServer.KinectLedsActive=1
+openniServer.pointCloud.Fps=10
+openniServer.Pose3DMotorsActive=0
+openniServer.KinectLedsActive=0

Modified: trunk/src/components/openniServer/openniServer.cpp
===================================================================
--- trunk/src/components/openniServer/openniServer.cpp	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/openniServer/openniServer.cpp	2013-03-05 12:39:24 UTC (rev 874)
@@ -29,7 +29,8 @@
 #include <jderobot/kinectleds.h>
 #include <jderobot/camera.h>
 #include <jderobot/pose3dmotors.h>
-#include <jderobot/pointcloud.h>
+#include <jderobot/remoteCloud.h>
+#include <jderobot/remoteConfig.h>
 #include <colorspaces/colorspacesmm.h>
 #include <jderobotice/component.h>
 #include <jderobotice/application.h>
@@ -54,6 +55,8 @@
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <libusb-1.0/libusb.h>
 #include "myprogeo.h"
+#include <iostream>
+#include <fstream>
 
 
 #define VID_MICROSOFT 0x45e
@@ -97,8 +100,13 @@
 IplImage* srcRGB=NULL;
 int colors[10][3];
 int userGeneratorActive=0;
+int width;
+int height;
+
+
 /*OJO solo funciona con imágenes de 640x480, no con imágenes redimensionadas, si valdría con tamaños fijados con configuración openni, pero no hemos conseguido que funcione variar la resolución por configuración*/
-int pixelsID[640*480];
+std::vector<int> pixelsID;
+//int pixelsID[640*480];
 
 
 struct KinectDevice
@@ -345,8 +353,8 @@
 	cameraDescription->shortDescription = prop->getProperty(prefix+"ShortDescription");
 
 	//fill imageDescription
-	imageDescription->width = prop->getPropertyAsIntWithDefault(prefix+"ImageWidth",640);
-	imageDescription->height = prop->getPropertyAsIntWithDefault(prefix+"ImageHeight",480);
+	imageDescription->width = width;
+	imageDescription->height = height;
 	int playerdetection = prop->getPropertyAsIntWithDefault(prefix+"PlayerDetection",0);
 	if (!(userGeneratorActive))
 		playerdetection=0;
@@ -418,8 +426,8 @@
 		jderobot::ImageDataPtr reply(new jderobot::ImageData);
 		reply->description = mycameravga->imageDescription;
 		reply->pixelData.resize(mycameravga->imageDescription->width*mycameravga->imageDescription->height*3);
-		rgb.resize(6480*480*3);
-		srcRGB = cvCreateImage(cvSize(640,480), IPL_DEPTH_8U, 3);
+		rgb.resize(width*height*3);
+		srcRGB = cvCreateImage(cvSize(width,height), IPL_DEPTH_8U, 3);
 		IplImage* dst_resize = cvCreateImage(cvSize(mycameravga->imageDescription->width,mycameravga->imageDescription->height), IPL_DEPTH_8U, 3);
 
 		g_nTexMapX = (((unsigned short)(sensors[SELCAM].imageMD.FullXRes()-1) / 512) + 1) * 512;
@@ -429,7 +437,8 @@
 
 		struct timeval a, b;
 		int cycle; // duración del ciclo
-		long totalb,totala;
+		long totala;
+		long totalpre=0;
 		long diff;
 
 		std::cout << "FPS: " << fps << std::endl;
@@ -508,14 +517,18 @@
 
 			}//critical region end
 			pthread_mutex_unlock(&mutex);
-			gettimeofday(&b,NULL);
-			totalb=b.tv_sec*1000000+b.tv_usec;
-			if ((totalb-totala) > cycle ){
-				std::cout<<"-------- openniServer: WARNING- RGB timeout-" << std::endl; 
+			if (totalpre !=0){
+				if ((totala - totalpre) > cycle ){
+					std::cout<<"-------- openniServer: WARNING- RGB timeout-" << std::endl; 
+				}
+				else{
+					usleep(cycle - (totala - totalpre));
+				}
 			}
-			else{
-				usleep(cycle - (totalb-totala));
-			}
+			/*if (totalpre !=0){
+				std::cout << "rgb: " <<  1000000/(totala-totalpre) << std::endl;
+			}*/
+			totalpre=totala;
 		}
 	}
 	
@@ -568,11 +581,11 @@
 	cameraDescription->shortDescription = prop->getProperty(prefix+"ShortDescription");
 
 	//fill imageDescription
-	imageDescription->width = prop->getPropertyAsIntWithDefault(prefix+"ImageWidth",640);
+	imageDescription->width = width;
 	int playerdetection = prop->getPropertyAsIntWithDefault(prefix+"PlayerDetection",0);
 	if (!(userGeneratorActive))
 		playerdetection=0;
-	imageDescription->height = prop->getPropertyAsIntWithDefault(prefix+"ImageHeight",480);
+	imageDescription->height = height;
 	int fps = prop->getPropertyAsIntWithDefault(prefix+"fps",5);
 	//we use formats acording to colorspaces
 	std::string fmtStr = prop->getPropertyWithDefault(prefix+"Format","YUY2");//default format YUY2
@@ -634,26 +647,23 @@
 	}
 
     virtual void walk(){
-		int h=sensors[SELCAM].depthMD.YRes();
-		int w=sensors[SELCAM].depthMD.XRes();
 		int test;
 		
 
 		jderobot::ImageDataPtr reply(new jderobot::ImageData);
 		reply->description = mycameradepth->imageDescription;
 		reply->pixelData.resize(mycameradepth->imageDescription->width*mycameradepth->imageDescription->height*3);
-		IplImage* src = cvCreateImage(cvSize(640,480), IPL_DEPTH_8U, 3);
+		IplImage* src = cvCreateImage(cvSize(width,height), IPL_DEPTH_8U, 3);
 		IplImage* dst_resize = cvCreateImage(cvSize(mycameradepth->imageDescription->width,mycameradepth->imageDescription->height), IPL_DEPTH_8U, 3);
 		g_nTexMapX = (((unsigned short)(sensors[SELCAM].depthMD.FullXRes()-1) / 512) + 1) * 512;
 		g_nTexMapY = (((unsigned short)(sensors[SELCAM].depthMD.FullYRes()-1) / 512) + 1) * 512;
 		g_pTexMap = (XnRGB24Pixel*)malloc(g_nTexMapX * g_nTexMapY * sizeof(XnRGB24Pixel));
-		w=640;
-		h=480;
-		distances.resize(w*h);
+		distances.resize(width*height);
 
 		struct timeval a, b;
 		int cycle; // duración del ciclo
-		long totalb,totala;
+		long totala;
+		long totalpre=0;
 		long diff;
 
 		//std::cout << "FPS depth: " << fps << std::endl;
@@ -759,14 +769,18 @@
 			}
 			}//critical region end
 			pthread_mutex_unlock(&mutex);
-			gettimeofday(&b,NULL);
-			totalb=b.tv_sec*1000000+b.tv_usec;
-			if ((totalb-totala) > cycle ){
-				std::cout<<"-------- openniServer: WARNING- RGB timeout-" << std::endl; 
+			if (totalpre !=0){
+				if ((totala - totalpre) > cycle ){
+					std::cout<<"-------- openniServer: WARNING- DEPTH timeout-" << std::endl; 
+				}
+				else{
+					usleep(cycle - (totala - totalpre));
+				}
 			}
-			else{
-				usleep(cycle - (totalb-totala));
-			}
+			/*if (totalpre !=0){
+				std::cout << "depth: " <<  1000000/(totala-totalpre) << std::endl;
+			}*/
+			totalpre=totala;
 		}
 	}
 	
@@ -800,16 +814,17 @@
 * \brief Class wich contains all the functions and variables to serve point cloud interface
 */
 
-	class pointCloudI: virtual public jderobot::pointCloud{
+	class pointCloudI: virtual public jderobot::remoteCloud{
 		public:
 			pointCloudI (std::string& propertyPrefix, const jderobotice::Context& context):
 				prefix(propertyPrefix),context(context),data(new jderobot::pointCloudData()) {
 					Ice::PropertiesPtr prop = context.properties();
 
 					int playerdetection = prop->getPropertyAsIntWithDefault("openniServer.PlayerDetection",0);
+					int fps =prop->getPropertyAsIntWithDefault("openniServer.pointCloud.Fps",10);
 					if (!(userGeneratorActive))
 						playerdetection=0;
-					   replyCloud = new ReplyCloud(this,prop->getProperty("openniServer.calibration"), playerdetection);
+					   replyCloud = new ReplyCloud(this,prop->getProperty("openniServer.calibration"), playerdetection, width, height,fps);
 					   replyCloud->start();
 				}
 		
@@ -818,25 +833,81 @@
 				data=replyCloud->getCloud();
 				return data;
 			};
+
+		virtual Ice::Int initConfiguration(const Ice::Current&){
+			
+			if (idLocal==0){
+	  			/* initialize random seed: */
+				srand ( time(NULL) );
+	
+				/* generate secret number: */
+				idLocal = rand() + 1;
+	
+				std::stringstream ss;//create a stringstream
+				ss << idLocal << ".xml";//add number to the stream
+				path=ss.str();
+	
+				f2.open(ss.str().c_str(), std::ofstream::out);
+				return idLocal;
+			}
+			else
+				return 0;
+			
+		};
+
+		virtual std::string read(Ice::Int id, const Ice::Current&){
+		};
+
+
+		virtual Ice::Int write(const std::string& data, Ice::Int id, const Ice::Current&){
+			if (id == idLocal){
+				f2 << data << std::endl;
+			}
+		};
+
+		virtual Ice::Int setConfiguration(Ice::Int id, const Ice::Current&){
+			if (id == idLocal){
+				replyCloud->setCalibrationFile(path);
+				id=0;
+				f2.close();
+			}
+
+			//guardar el xml nuevo encima del cargado por defecto (la siguiente vez empezará directamente con la nueva configuración
+		};
 		   
 		   private:
 			 class ReplyCloud :public gbxiceutilacfr::SafeThread{ 
 		       public: 
-		       	ReplyCloud (pointCloudI* pcloud, std::string filepath,  int playerDetection) : gbxiceutilacfr::SafeThread(pcloud->context.tracer()), data(new jderobot::pointCloudData()), data2(new jderobot::pointCloudData())
+		       	ReplyCloud (pointCloudI* pcloud, std::string filepath,  int playerDetection, int widthIn, int heightIn, int fpsIn) : gbxiceutilacfr::SafeThread(pcloud->context.tracer()), data(new jderobot::pointCloudData()), data2(new jderobot::pointCloudData())
 		        	{
 					path=filepath;
 					segmentation=playerDetection;
+					cWidth = widthIn;
+					cHeight = heightIn;
+					fps=fpsIn;
 				}
+
+				void setCalibrationFile(std::string path){
+					mypro->load_cam((char*)path.c_str(),0, cWidth, cHeight);
+				}
+
 		       
 		        void walk()
 		        {
 				mypro= new openniServer::myprogeo();
-				mypro->load_cam((char*)path.c_str(),0);
-				cWidth = 640;
-				cHeight = 480;
+				mypro->load_cam((char*)path.c_str(),0, cWidth, cHeight);
+				
+				struct timeval a, b;
+				int cycle; // duración del ciclo
+				long totala;
+				long totalpre=0;
 
+				cycle=(float)(1/(float)fps)*1000000;
+
 				while(!isStopping()){
 					float distance;
+					gettimeofday(&a,NULL);
+					totala=a.tv_sec*1000000+a.tv_usec;
 					pthread_mutex_lock(&mutex);
 					data2->p.clear();
 					for( unsigned int i = 0 ; (i < cWidth*cHeight)&&(distances.size()>0); i=i+9) {
@@ -888,12 +959,24 @@
 							//}
 						}
 					pthread_mutex_unlock(&mutex);
-					usleep(5000);
+					if (totalpre !=0){
+						if ((totala - totalpre) > cycle ){
+							std::cout<<"-------- openniServer: WARNING- POINTCLOUD timeout-" << std::endl; 
+						}
+						else{
+							usleep(cycle - (totala - totalpre));
+						}
+					}
+					/*if (totalpre !=0){
+						std::cout << "cloud: " <<  1000000/(totala-totalpre) << std::endl;
+					}*/
+					totalpre=totala;
 				}
 		        }
 		        myprogeo *mypro;
 				int cWidth;
 				int cHeight;
+				int fps;
 				jderobot::pointCloudDataPtr data, data2;
 				jderobot::RGBPoint auxP;
 				std::string path;
@@ -915,6 +998,9 @@
 			std::string prefix;
 			jderobotice::Context context;
 			jderobot::pointCloudDataPtr data;
+			std::ofstream f2;
+			int idLocal;
+			std::string path;
 			
 			
 		};
@@ -1006,7 +1092,72 @@
 		XN_USB_DEV_HANDLE* dev;
     };
 
+
+
 /**
+* \brief Class wich contains all the functions to remote configuration
+*/
+class RemoteConfigI: virtual public jderobot::remoteConfig {
+	public:
+		RemoteConfigI(Ice::ObjectPtr pointcloud1, std::string& propertyPrefix, const jderobotice::Context& context): prefix(propertyPrefix),context(context)
+		{
+			Ice::PropertiesPtr prop = context.properties();
+			
+     	}
+
+		virtual ~RemoteConfigI(){};
+
+		virtual Ice::Int initConfiguration(Ice::Int idConfig, const Ice::Current&){
+			
+			if (idLocal==0){
+	  			/* initialize random seed: */
+				srand ( time(NULL) );
+	
+				/* generate secret number: */
+				idLocal = rand() + 1;
+	
+				std::stringstream ss;//create a stringstream
+				ss << idLocal << ".txt";//add number to the stream
+	
+				f2.open(ss.str().c_str(), std::ofstream::out);
+				return idLocal;
+			}
+			else
+				return 0;
+			
+		};
+
+		virtual std::string read(Ice::Int id, const Ice::Current&){
+		};
+
+
+		virtual Ice::Int write(const std::string& data, Ice::Int id, const Ice::Current&){
+			if (id == idLocal){
+				f2 << data << std::endl;
+			}
+		};
+
+		virtual Ice::Int setConfiguration(Ice::Int id, const Ice::Current&){
+			if (id == idLocal){
+				id=0;
+				f2.close();
+			}
+
+			//guardar el xml nuevo encima del cargado por defecto (la siguiente vez empezará directamente con la nueva configuración
+		};
+
+
+	private:
+		
+		std::string prefix;
+		jderobotice::Context context;
+		std::ofstream f2;
+		int idLocal;
+    };
+
+
+
+/**
 * \brief Main Class of the component wich create the diferents devices activated using the Ice configuration file.
 */
 class Component: public jderobotice::Component{
@@ -1022,6 +1173,11 @@
 		int leds = prop->getPropertyAsIntWithDefault(context().tag() + ".KinectLedsActive",0);
 		int pointCloud = prop->getPropertyAsIntWithDefault(context().tag() + ".pointCloudActive",0);
 		int playerdetection = prop->getPropertyAsIntWithDefault(context().tag() + ".PlayerDetection",0);
+		width=prop->getPropertyAsIntWithDefault("openniServer.Width", 640);
+		height=prop->getPropertyAsIntWithDefault("openniServer.Height",480);
+		int fps=prop->getPropertyAsIntWithDefault("openniServer.Fps",30);
+		
+
 		SELCAM = prop->getPropertyAsIntWithDefault(context().tag() + ".deviceId",0);
 		std::cout << "Selected device: " << SELCAM << std::endl;
 		int nCameras=0;
@@ -1201,11 +1357,11 @@
 	
 	
 	
-	    			    /*XnMapOutputMode depth_mode; 
-					depth_mode.nXRes = 320;
-				    depth_mode.nYRes = 240;
+	    			    XnMapOutputMode depth_mode; 
+					depth_mode.nXRes = width;
+				    depth_mode.nYRes = height;
 				    depth_mode.nFPS = 30;
-				    sensors[i].depth.SetMapOutputMode(depth_mode);*/
+				    sensors[i].depth.SetMapOutputMode(depth_mode);
 	
 					CHECK_RC(rc, "Create Depth");
 					// now create a image generator over this device
@@ -1224,16 +1380,18 @@
 					rc = g_context.CreateAnyProductionTree(XN_NODE_TYPE_USER, &query, sensors[i].g_UserGenerator);
 					CHECK_RC(rc, "Find user generator");
 	
-					/*XnMapOutputMode rgb_mode;
-	            		rgb_mode.nXRes = 640;
-	            		rgb_mode.nYRes = 480;
-            			rgb_mode.nFPS = 30;
-	        			sensors[i].image.SetMapOutputMode(rgb_mode);*/
+					XnMapOutputMode rgb_mode;
+	            		rgb_mode.nXRes = width;
+	            		rgb_mode.nYRes = height;
+            			rgb_mode.nFPS = fps;
+	        			sensors[i].image.SetMapOutputMode(rgb_mode);
 		       		
 					sensors[i].depth.GetAlternativeViewPointCap().SetViewPoint(sensors[i].image);
 					
 					XnCallbackHandle hUserCallbacks, hCalibrationStart, hCalibrationComplete, hPoseDetected, hCalibrationInProgress, hPoseInProgress;
 					if (playerdetection){
+						/*init player id array*/
+						pixelsID.resize(width*height);
 						if (!sensors[i].g_UserGenerator.IsCapabilitySupported(XN_CAPABILITY_SKELETON))
 						{
 							printf("Supplied user generator doesn't support skeleton\n");

Added: trunk/src/components/recorder/build-independent/CMakeLists.txt
===================================================================
--- trunk/src/components/recorder/build-independent/CMakeLists.txt	                        (rev 0)
+++ trunk/src/components/recorder/build-independent/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -0,0 +1,53 @@
+ cmake_minimum_required(VERSION 2.8)
+SET( SOURCE_FILES ../recorder.cpp)
+SET( LIBS_DIR /usr/local/lib/jderobot/)
+
+
+
+include_directories(
+	  /usr/local/include/jderobot
+)
+
+add_executable (recorder  ${SOURCE_FILES})
+
+#automated opencv
+include(FindPkgConfig)
+PKG_CHECK_MODULES(opencv REQUIRED opencv)
+include_directories(${opencv_INCLUDE_DIRS})
+link_directories(${opencv_LIBRARY_DIRS})
+
+
+
+#manual ICE
+FIND_PATH( Ice_INCLUDE_DIR NAMES Ice/Ice.h  PATHS ENV C++LIB ENV)
+ 
+IF( Ice_INCLUDE_DIR )
+    FIND_LIBRARY( Ice_LIBRARY1 NAMES Ice PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64 )
+    FIND_LIBRARY( Ice_LIBRARY2 NAMES IceUtil PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    SET (Ice_LIBRARIES ${Ice_LIBRARY1} ${Ice_LIBRARY2})
+    IF( Ice_LIBRARIES )
+		MESSAGE ("-- Ice found at ${Ice_LIBRARIES}")
+		include_directories(${Ice_INCLUDE_DIR})
+		link_directories(${Ice_LIBRARIES})
+    ENDIF( Ice_LIBRARIES )
+ENDIF(Ice_INCLUDE_DIR)
+
+IF(NOT Ice_LIBRARIES)
+		MESSAGE ("*** Ice not found")
+ENDIF()
+
+
+
+
+set( CMAKE_CXX_FLAGS "-Wno-deprecated" ) # Opciones para el compilador
+
+
+
+TARGET_LINK_LIBRARIES(recorder
+  ${opencv_LIBRARIES}
+  ${Ice_LIBRARIES}
+  ${LIBS_DIR}/libcolorspacesmm.so
+  ${LIBS_DIR}/libJderobotInterfaces.so
+  ${LIBS_DIR}/libjderobotice.so
+  ${LIBS_DIR}/libjderobotutil.so
+)

Modified: trunk/src/components/recorder/recorder.cfg
===================================================================
--- trunk/src/components/recorder/recorder.cfg	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/recorder/recorder.cfg	2013-03-05 12:39:24 UTC (rev 874)
@@ -1,6 +1,6 @@
 Recorder.FileName=datos.jde
-Recorder.nCameras=4
-Recorder.nDethSensors=2
+Recorder.nCameras=2
+Recorder.nDethSensors=1
 Recorder.Encoders.Proxy=encoders1:tcp -h localhost -p 9998
 Recorder.Encoders.bool=0
 Recorder.Laser.Proxy=laser1:tcp -h localhost -p 9999
@@ -22,6 +22,10 @@
 
 Recorder.Hostname=localhost
 Recorder.Port=9998
-
+Recorder.Format=jpg
+Recorder.PngCompression=0
+#from 0 to 9. A higher value means a smaller size
+Recorder.JpgQuality=80
+# from 0 to 100 (the higher is the better)
 Recorder.Laser.Samples=180
-Recorder.Hz=10
+Recorder.Hz=100

Modified: trunk/src/components/recorder/recorder.cpp
===================================================================
--- trunk/src/components/recorder/recorder.cpp	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/recorder/recorder.cpp	2013-03-05 12:39:24 UTC (rev 874)
@@ -86,6 +86,10 @@
 
 	int nCameras=0;
 	int nDepthSensors=0;
+	int pngCompressRatio;
+	int jpgQuality;
+	std::string imageFormat;
+	std::vector<int> compression_params;
     
    
    //---------------- INPUT ARGUMENTS ---------------//
@@ -132,15 +136,30 @@
          if (0== lprx)
             throw "Invalid proxy Mycomponent.Laser.Proxy";
       }
-     nCameras = prop->getPropertyAsIntWithDefault("Recorder.nCameras",0);
-	if (nCameras > 0 ){
-					struct stat buf;
-					char dire[]="./images/";
-					if( stat( dire, &buf ) == -1 )
-					{
-						system("mkdir images");
-					}
-	}
+      nCameras = prop->getPropertyAsIntWithDefault("Recorder.nCameras",0);
+	  if (nCameras > 0 ){
+				struct stat buf;
+				char dire[]="./images/";
+				if( stat( dire, &buf ) == -1 )
+				{
+					system("mkdir images");
+				}
+				imageFormat=prop->getProperty("Recorder.Format");
+				if (imageFormat.compare(std::string("png"))==0){
+					pngCompressRatio=prop->getPropertyAsIntWithDefault("Recorder.PngCompression",3); 
+					compression_params.push_back(CV_IMWRITE_PNG_COMPRESSION);
+					compression_params.push_back(pngCompressRatio);
+					
+				}
+				else if (imageFormat.compare(std::string("jpg"))==0){
+					jpgQuality=prop->getPropertyAsIntWithDefault("Recorder.JpgQuality",95); 
+					compression_params.push_back(CV_IMWRITE_JPEG_QUALITY);
+					compression_params.push_back(jpgQuality);
+				}
+				else{
+					throw "Image format is not valid";
+				}
+		}
 	for (int i=0; i< nCameras; i++){
 		std::stringstream sProxy;
 	         // Get driver camera
@@ -268,8 +287,9 @@
             	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.jpg", i+1, timeRelative);
-            	cv::imwrite(buff, image);
+
+            	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 */ 
@@ -342,7 +362,7 @@
      
          gettimeofday(&b,NULL);
          totalb=b.tv_sec*1000000+b.tv_usec;
-         std::cout << "Introrob takes " << (totalb-totala)/1000 << " ms" << std::endl;
+         std::cout << "Recorder takes " << (totalb-totala)/1000 << " ms" << std::endl;
           
          diff = (totalb-totala)/1000;
          if(diff < 0 || diff > cycle)
@@ -358,6 +378,9 @@
         // 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;
+
       }
       
       outfile.close();

Added: trunk/src/components/replayer/build-independent/CMakeLists.txt
===================================================================
--- trunk/src/components/replayer/build-independent/CMakeLists.txt	                        (rev 0)
+++ trunk/src/components/replayer/build-independent/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -0,0 +1,131 @@
+ cmake_minimum_required(VERSION 2.8)
+SET( SOURCE_FILES ../replayer.cpp)
+SET( LIBS_DIR /usr/local/lib/jderobot/)
+
+
+
+include_directories(
+	  /usr/local/include/jderobot
+)
+
+add_executable (replayer  ${SOURCE_FILES})
+
+#automated opencv
+include(FindPkgConfig)
+PKG_CHECK_MODULES(opencv REQUIRED opencv)
+include_directories(${opencv_INCLUDE_DIRS})
+link_directories(${opencv_LIBRARY_DIRS})
+#automated gsl
+PKG_CHECK_MODULES(gsl REQUIRED gsl)
+include_directories(${gsl_INCLUDE_DIRS})
+link_directories(${gsl_LIBRARY_DIRS})
+#automated eigen
+PKG_CHECK_MODULES(eigen REQUIRED eigen3)
+include_directories(${eigen_INCLUDE_DIRS})
+link_directories(${eigen_LIBRARY_DIRS})
+
+
+#manual gearbox libraries
+FIND_PATH( Gearbox_INCLUDE_DIR NAMES gbxutilacfr/gbxutilacfr.h  PATHS ENV C++LIB ENV PATH PATH_SUFFIXES gearbox)
+ 
+IF( Gearbox_INCLUDE_DIR )
+    FIND_LIBRARY( Gearbox_LIBRARY1 NAMES GbxUtilAcfr PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib/gearbox lib64/gearbox )
+    FIND_LIBRARY( Gearbox_LIBRARY2 NAMES GbxIceUtilAcfr PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib/gearbox lib64/gearbox)
+    SET (Gearbox_LIBRARIES ${Gearbox_LIBRARY1} ${Gearbox_LIBRARY2})
+    IF( Gearbox_LIBRARIES )
+		MESSAGE ("-- Gearbox found at ${Gearbox_LIBRARIES}")
+		include_directories(${Gearbox_INCLUDE_DIR})
+		link_directories(${Gearbox_LIBRARIES})
+    ENDIF( Gearbox_LIBRARIES )
+ENDIF(Gearbox_INCLUDE_DIR)
+
+IF(NOT Gearbox_LIBRARIES)
+		MESSAGE ("*** Gearbox not found")
+ENDIF()
+
+
+#manual ICE
+FIND_PATH( Ice_INCLUDE_DIR NAMES Ice/Ice.h  PATHS ENV C++LIB ENV)
+ 
+IF( Ice_INCLUDE_DIR )
+    FIND_LIBRARY( Ice_LIBRARY1 NAMES Ice PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64 )
+    FIND_LIBRARY( Ice_LIBRARY2 NAMES IceUtil PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    SET (Ice_LIBRARIES ${Ice_LIBRARY1} ${Ice_LIBRARY2})
+    IF( Ice_LIBRARIES )
+		MESSAGE ("-- Ice found at ${Ice_LIBRARIES}")
+		include_directories(${Ice_INCLUDE_DIR})
+		link_directories(${Ice_LIBRARIES})
+    ENDIF( Ice_LIBRARIES )
+ENDIF(Ice_INCLUDE_DIR)
+
+IF(NOT Ice_LIBRARIES)
+		MESSAGE ("*** Ice not found")
+ENDIF()
+
+
+# CHECK PCL
+FIND_PATH( pcl_INCLUDE_DIR1 NAMES point_cloud.h PATHS ENV C++LIB ENV PATH PATH_SUFFIXES include/pcl-1.5/ )
+FIND_PATH( pcl_INCLUDE_DIR2 NAMES pcl PATHS ENV C++LIB ENV PATH PATH_SUFFIXES include/pcl-1.6/ )
+IF ((pcl_INCLUDE_DIR1) AND (pcl_INCLUDE_DIR2))
+	SET (pcl_INCLUDE_DIR ${pcl_INCLUDE_DIR1} ${pcl_INCLUDE_DIR2})
+ELSE ((pcl_INCLUDE_DIR1) AND (pcl_INCLUDE_DIR2))
+	IF (pcl_INCLUDE_DIR1)
+		SET (pcl_INCLUDE_DIR ${pcl_INCLUDE_DIR1})
+	ENDIF(pcl_INCLUDE_DIR1)
+
+	IF (pcl_INCLUDE_DIR2)
+		SET (pcl_INCLUDE_DIR ${pcl_INCLUDE_DIR2})
+	ENDIF(pcl_INCLUDE_DIR2)
+ENDIF ((pcl_INCLUDE_DIR1) AND (pcl_INCLUDE_DIR2))
+
+#MESSAGE("PCL LIBRARY FOUND IN ${pcl_INCLUDE_DIR}")
+FIND_LIBRARY(with_pcl
+    NAMES pcl_surface pcl_registration pcl_segmentation pcl_filters pcl_sample_consensus pcl_io pcl_octree pcl_features pcl_kdtree pcl_common
+    PATHS /usr/lib)
+
+
+IF( pcl_INCLUDE_DIR )
+	include_directories (${pcl_INCLUDE_DIR})
+    FIND_LIBRARY( pcl_LIBRARY1 NAMES pcl_surface PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY2 NAMES pcl_registration PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY3 NAMES pcl_segmentation PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY4 NAMES pcl_filters PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY5 NAMES pcl_sample_consensus PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY6 NAMES pcl_io PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY7 NAMES pcl_octree PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY8 NAMES pcl_features PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY9 NAMES pcl_kdtree PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    FIND_LIBRARY( pcl_LIBRARY11 NAMES pcl_common PATHS ENV C++LIB ENV PATH PATH_SUFFIXES lib lib64)
+    SET (pcl_LIBRARIES ${pcl_LIBRARY1} ${pcl_LIBRARY2} ${pcl_LIBRARY3} ${pcl_LIBRARY4} ${pcl_LIBRARY5} ${pcl_LIBRARY6} ${pcl_LIBRARY7} ${pcl_LIBRARY8} ${pcl_LIBRARY9} ${pcl_LIBRARY11})
+    IF( pcl_LIBRARIES )
+		#MESSAGE("PCL LIBRARY FOUND IN ${pcl_LIBRARIES}")
+    ENDIF( pcl_LIBRARIES )
+ENDIF(pcl_INCLUDE_DIR)
+
+
+
+IF(NOT with_pcl)
+    MESSAGE ("*** PCL libraries not found. Are needed to KinectServer component")
+endif()
+IF(with_pcl)
+    MESSAGE ("*** PCL OK")
+endif()
+
+
+
+set( CMAKE_CXX_FLAGS "-Wno-deprecated" ) # Opciones para el compilador
+
+
+
+TARGET_LINK_LIBRARIES(replayer
+  ${opencv_LIBRARIES}
+  ${gsl_LIBRARIES}
+  ${Gearbox_LIBRARIES}
+  ${Ice_LIBRARIES}
+  ${pcl_LIBRARIES}
+  ${eigen_LIBRARIES}
+  ${LIBS_DIR}/libcolorspacesmm.so
+  ${LIBS_DIR}/libJderobotInterfaces.so
+  ${LIBS_DIR}/libjderobotice.so
+  ${LIBS_DIR}/libjderobotutil.so
+)

Modified: trunk/src/components/wiimoteClient/CMakeLists.txt
===================================================================
--- trunk/src/components/wiimoteClient/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/wiimoteClient/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -7,11 +7,12 @@
     ${CMAKE_CURRENT_SOURCE_DIR}
 )
 
-set( CMAKE_CXX_FLAGS "-lglut -lgsl -lgslcblas -lIce -lIceUtil" ) # Opciones para el compilador
 
 add_executable (wiimoteClient ${SOURCE_FILES})
 
 TARGET_LINK_LIBRARIES(wiimoteClient
+	${GLUT_LIBRARIES}
+	${ZeroCIce_LIBRARIES}
     ${opencv_LIBRARIES}
     ${gtkmm_LIBRARIES}
     ${libglademm_LIBRARIES}

Modified: trunk/src/components/wiimoteServer/CMakeLists.txt
===================================================================
--- trunk/src/components/wiimoteServer/CMakeLists.txt	2013-03-04 09:53:27 UTC (rev 873)
+++ trunk/src/components/wiimoteServer/CMakeLists.txt	2013-03-05 12:39:24 UTC (rev 874)
@@ -10,8 +10,8 @@
         ${CMAKE_CURRENT_SOURCE_DIR}
     )
 
-    set( CMAKE_CXX_FLAGS "-lgsl -lgslcblas -lGL -lGLU -lglut  -lIce -lIceUtil" ) # Opciones para el compilador
 
+
     add_executable (wiimoteServer ${SOURCE_FILES})
 
     TARGET_LINK_LIBRARIES(wiimoteServer
@@ -19,6 +19,8 @@
         ${LIBS_DIR}/jderobotice/libjderobotice.so
         ${LIBS_DIR}/jderobotutil/libjderobotutil.so
         ${cwiid_LIBRARIES}
+		  ${GLUT_LIBRARIES}
+		${ZeroCIce_LIBRARIES}
     )
 
 ENDIF(with_cwiid)



More information about the Jderobot-admin mailing list