[Jderobot-admin] jderobot-r937 - in trunk/src: components/basic_component components/basic_component/build-independent components/calibrator components/calibratorKinect components/calibratorKinect/build-independent components/cameraserver components/cameraview components/colortuner components/introrob components/kinectViewer components/naooperator components/opencvdemo components/recorder components/replayController components/wiimoteClient libs/jderobotice libs/visionlib
frivas en jderobot.org
frivas en jderobot.org
Mar Jul 9 12:06:24 CEST 2013
Author: frivas
Date: 2013-07-09 12:05:24 +0200 (Tue, 09 Jul 2013)
New Revision: 937
Removed:
trunk/src/libs/jderobotice/cameraClient.cpp
trunk/src/libs/jderobotice/cameraClient.h
trunk/src/libs/jderobotice/pointcloudClient.cpp
trunk/src/libs/jderobotice/pointcloudClient.h
Modified:
trunk/src/components/basic_component/CMakeLists.txt
trunk/src/components/basic_component/build-independent/CMakeLists.txt
trunk/src/components/calibrator/CMakeLists.txt
trunk/src/components/calibratorKinect/CMakeLists.txt
trunk/src/components/calibratorKinect/build-independent/CMakeLists.txt
trunk/src/components/calibratorKinect/common.h
trunk/src/components/cameraserver/CMakeLists.txt
trunk/src/components/cameraview/cameraview.cfg
trunk/src/components/colortuner/CMakeLists.txt
trunk/src/components/introrob/CMakeLists.txt
trunk/src/components/kinectViewer/CMakeLists.txt
trunk/src/components/kinectViewer/kinectViewer.cpp
trunk/src/components/naooperator/CMakeLists.txt
trunk/src/components/opencvdemo/CMakeLists.txt
trunk/src/components/recorder/CMakeLists.txt
trunk/src/components/replayController/CMakeLists.txt
trunk/src/components/wiimoteClient/CMakeLists.txt
trunk/src/libs/jderobotice/CMakeLists.txt
trunk/src/libs/visionlib/CMakeLists.txt
Log:
aislado jderobotice -> primera version sin gearbox
Modified: trunk/src/components/basic_component/CMakeLists.txt
===================================================================
--- trunk/src/components/basic_component/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/basic_component/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -12,7 +12,6 @@
TARGET_LINK_LIBRARIES(basic_component
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${libglademm_LIBRARIES}
Modified: trunk/src/components/basic_component/build-independent/CMakeLists.txt
===================================================================
--- trunk/src/components/basic_component/build-independent/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/basic_component/build-independent/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -30,7 +30,6 @@
TARGET_LINK_LIBRARIES(basic_component
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${INTERFACES_CPP_DIR}/jderobot/libjderobotice.so
${INTERFACES_CPP_DIR}/jderobot/libjderobotutil.so
${INTERFACES_CPP_DIR}/jderobot/libcolorspacesmm.so
${libglademm_LIBRARIES}
Modified: trunk/src/components/calibrator/CMakeLists.txt
===================================================================
--- trunk/src/components/calibrator/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/calibrator/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -17,7 +17,6 @@
${ZeroCIce_LIBRARIES}
${OpenCV_LIBRARIES}
${gsl_LIBRARIES}
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
Modified: trunk/src/components/calibratorKinect/CMakeLists.txt
===================================================================
--- trunk/src/components/calibratorKinect/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/calibratorKinect/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -23,11 +23,10 @@
${ZeroCIce_LIBRARIES}
${OpenCV_LIBRARIES}
${gsl_LIBRARIES}
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
${LIBS_DIR}/progeo/libprogeo.so
- ${LIBS_DIR}/jderobotice/libparallelIce.so
+ ${LIBS_DIR}/parallelIce/libparallelIce.so
#-lxerces-c
)
Modified: trunk/src/components/calibratorKinect/build-independent/CMakeLists.txt
===================================================================
--- trunk/src/components/calibratorKinect/build-independent/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/calibratorKinect/build-independent/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -74,8 +74,7 @@
${GLUT_LIBRARIES}
${LIBS_DIR}/libcolorspacesmm.so
${LIBS_DIR}/libJderobotInterfaces.so
- ${LIBS_DIR}/libjderobotice.so
${LIBS_DIR}/libjderobotutil.so
${LIBS_DIR}/libprogeo.so
- ${LIBS_DIR}/libparallelIce.so
+ ${LIBS_DIR}/libparallelIce.so
)
Modified: trunk/src/components/calibratorKinect/common.h
===================================================================
--- trunk/src/components/calibratorKinect/common.h 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/calibratorKinect/common.h 2013-07-09 10:05:24 UTC (rev 937)
@@ -19,7 +19,7 @@
* Jose María Cañas Plaza <jmplaza en gsyc.es>
*
*/
-#include <jderobotice/cameraClient.h>
+#include <parallelIce/cameraClient.h>
#ifndef calibrator_COMMON_H
#define calibrator_COMMON_H
Modified: trunk/src/components/cameraserver/CMakeLists.txt
===================================================================
--- trunk/src/components/cameraserver/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/cameraserver/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -13,7 +13,6 @@
TARGET_LINK_LIBRARIES(cameraserver
${OpenCV_LIBRARIES}
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
${ZeroCIce_LIBRARIES}
Modified: trunk/src/components/cameraview/cameraview.cfg
===================================================================
--- trunk/src/components/cameraview/cameraview.cfg 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/cameraview/cameraview.cfg 2013-07-09 10:05:24 UTC (rev 937)
@@ -1 +1 @@
-Cameraview.Camera.Proxy=cameraA:default -h localhost -p 9991
+Cameraview.Camera.Proxy=cameraB:default -h localhost -p 9999
Modified: trunk/src/components/colortuner/CMakeLists.txt
===================================================================
--- trunk/src/components/colortuner/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/colortuner/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -14,18 +14,10 @@
${opencv_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
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/colorspaces/libcolorspaces.so
-# ${LIBS_DIR}/progeo/libprogeo.so
-# ${gsl_LIBRARIES}
${Gearbox_LIBRARIES}
${ZeroCIce_LIBRARIES}
Modified: trunk/src/components/introrob/CMakeLists.txt
===================================================================
--- trunk/src/components/introrob/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/introrob/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -25,7 +25,6 @@
${OpenCV_LIBRARIES}
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/progeo/libprogeo.so
${LIBS_DIR}/pioneer/libpioneer.so
Modified: trunk/src/components/kinectViewer/CMakeLists.txt
===================================================================
--- trunk/src/components/kinectViewer/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/kinectViewer/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -22,10 +22,9 @@
${gtkglextmm_LIBRARIES}
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/progeo/libprogeo.so
${LIBS_DIR}/pioneer/libpioneer.so
- ${LIBS_DIR}/jderobotice/libparallelIce.so
+ ${LIBS_DIR}/parallelIce/libparallelIce.so
${ZeroCIce_LIBRARIES}
)
Modified: trunk/src/components/kinectViewer/kinectViewer.cpp
===================================================================
--- trunk/src/components/kinectViewer/kinectViewer.cpp 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/kinectViewer/kinectViewer.cpp 2013-07-09 10:05:24 UTC (rev 937)
@@ -29,8 +29,8 @@
#include <jderobot/pointcloud.h>
#include "kinectViewergui.h"
#include "pthread.h"
-#include "jderobotice/cameraClient.h"
-#include "jderobotice/pointcloudClient.h"
+#include "parallelIce/cameraClient.h"
+#include "parallelIce/pointcloudClient.h"
Modified: trunk/src/components/naooperator/CMakeLists.txt
===================================================================
--- trunk/src/components/naooperator/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/naooperator/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -24,7 +24,6 @@
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${LIBS_DIR}/colorspaces/libcolorspaces.so
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${LIBS_DIR}/jderobotice/libjderobotice.so
# ${LIBS_DIR}/jderobotutil/libjderobotutil.so
${Gearbox_LIBRARIES}
${ZeroCIce_LIBRARIES}
Modified: trunk/src/components/opencvdemo/CMakeLists.txt
===================================================================
--- trunk/src/components/opencvdemo/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/opencvdemo/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -22,7 +22,6 @@
${OpenCV_LIBRARIES}
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${Gearbox_LIBRARIES}
${ZeroCIce_LIBRARIES}
Modified: trunk/src/components/recorder/CMakeLists.txt
===================================================================
--- trunk/src/components/recorder/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/recorder/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -8,8 +8,6 @@
${INTERFACES_CPP_DIR}
${LIBS_DIR}/
${CMAKE_CURRENT_SOURCE_DIR}
-# ${pcl_INCLUDE_DIR}/
-# /usr/include/openni
/usr/include/libusb-1.0
/usr/include/cminpack-1
/usr/include/eigen3
@@ -25,20 +23,15 @@
${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
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/progeo/libprogeo.so
${LIBS_DIR}/pioneer/libpioneer.so
${ZeroCIce_LIBRARIES}
-# ${pcl_LIBRARIES}
${gsl_LIBRARIES}
-# ${OpenNi_LIBRARY}
)
Modified: trunk/src/components/replayController/CMakeLists.txt
===================================================================
--- trunk/src/components/replayController/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/replayController/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -25,7 +25,6 @@
${gtkglextmm_LIBRARIES}
${LIBS_DIR}/colorspaces/libcolorspacesmm.so
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/progeo/libprogeo.so
${LIBS_DIR}/pioneer/libpioneer.so
Modified: trunk/src/components/wiimoteClient/CMakeLists.txt
===================================================================
--- trunk/src/components/wiimoteClient/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/components/wiimoteClient/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -22,7 +22,6 @@
${OpenCV_LIBRARIES}
${gtkglextmm_LIBRARIES}
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
)
Modified: trunk/src/libs/jderobotice/CMakeLists.txt
===================================================================
--- trunk/src/libs/jderobotice/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/libs/jderobotice/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -15,27 +15,5 @@
set_target_properties(jderoboticeshare PROPERTIES OUTPUT_NAME jderobotice)
-include_directories(
- ${INTERFACES_CPP_DIR}
- ${LIBS_DIR}/
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/cameras
-)
-add_library (parallelIce STATIC cameraClient.cpp cameraClient.h pointcloudClient.cpp pointcloudClient.h)
-TARGET_LINK_LIBRARIES(parallelIce
- ${OpenCV_LIBRARIES}
- ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
- ${ZeroCIce_LIBRARIES}
-)
-add_library (parallelIceshare SHARED cameraClient.cpp cameraClient.h pointcloudClient.cpp pointcloudClient.h)
-TARGET_LINK_LIBRARIES(parallelIceshare
- ${OpenCV_LIBRARIES}
- ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
- ${ZeroCIce_LIBRARIES}
-)
-
-
-set_target_properties(parallelIceshare PROPERTIES OUTPUT_NAME parallelIce)
-
Deleted: trunk/src/libs/jderobotice/cameraClient.cpp
===================================================================
--- trunk/src/libs/jderobotice/cameraClient.cpp 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/libs/jderobotice/cameraClient.cpp 2013-07-09 10:05:24 UTC (rev 937)
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 1997-2013 JDE Developers TeamkinectViewer.camRGB
- *
- * 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 3 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 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/.
- *
- * Author : Jose María Cañas <jmplaza en gsyc.es>
- Francisco Miguel Rivas Montero <franciscomiguel.rivas en urjc.es>
-
- */
-
-#include "cameraClient.h"
-
-
-namespace jderobot {
-
-cameraClient::cameraClient(Ice::CommunicatorPtr ic, std::string prefix, bool debug) {
- // TODO Auto-generated constructor stubcameraClient* client = new cameraClient;
- this->prefix=prefix;
- this->debug=debug;
- Ice::PropertiesPtr prop;
- prop = ic->getProperties();
- Ice::ObjectPrx baseCamera;
-
-
- int fps=prop->getPropertyAsIntWithDefault(prefix+"Fps",10);
- this->cycle=(float)(1/(float)fps)*1000000;
- try{
- baseCamera = ic->propertyToProxy(prefix+"Proxy");
- if (0==baseCamera){
- throw prefix + "Could not create proxy with Camera";
- }
- else {
- this->prx= jderobot::CameraPrx::checkedCast(baseCamera);
- if (0==this->prx)
- throw "Invalid " + prefix + ".Proxy";
- }
- }catch (const Ice::Exception& ex) {
- std::cerr << ex << std::endl;
- }
- catch (const char* msg) {
- std::cerr << msg << std::endl;
- std::cout << prefix + " Not camera provided" << std::endl;
- }
-}
-
-cameraClient::~cameraClient() {
- // TODO Auto-generated destructor stub
-}
-
-void
-cameraClient::run(){
- jderobot::ImageDataPtr dataPtr;
- colorspaces::Image::FormatPtr fmt;
- struct timeval post;
- long long int totalpre=0;
- long long int totalpost=0;
- while (this->isAlive()){
- gettimeofday(&post,NULL);
- totalpost=post.tv_sec*1000000+post.tv_usec;
-
- dataPtr = this->prx->getImageData();
- fmt = colorspaces::Image::Format::searchFormat(dataPtr->description->format);
- if (!fmt)
- throw "Format not supported";
- colorspaces::Image imageRGB(dataPtr->description->width,dataPtr->description->height,fmt,&(dataPtr->pixelData[0]));
- colorspaces::ImageRGB8 img_rgb888(imageRGB);//conversion will happen if needed
- cv::Mat localDataPtr = cv::Mat(cvSize(img_rgb888.width,img_rgb888.height), CV_8UC3, img_rgb888.data);
- cv::Mat localData;
- localDataPtr.copyTo(localData);
- this->controlMutex.lock();
- this->data.release();
- localData.copyTo(this->data);
- this->controlMutex.unlock();
-
- if (totalpre !=0){
- if ((totalpost - totalpre) > this->cycle ){
- if (this->debug)
- std::cout<<"--------" << prefix << " adquisition timeout-" << std::endl;
- }
- else{
- usleep(this->cycle - (totalpost - totalpre));
- }
- }
- totalpre=totalpost;
- }
-}
-
-cv::Mat cameraClient::getImage(){
- cv::Mat local;
- this->controlMutex.lock();
- this->data.copyTo(local);
- this->controlMutex.unlock();
- return local;
-
-}
-
-} /* namespace jderobot */
Deleted: trunk/src/libs/jderobotice/cameraClient.h
===================================================================
--- trunk/src/libs/jderobotice/cameraClient.h 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/libs/jderobotice/cameraClient.h 2013-07-09 10:05:24 UTC (rev 937)
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 1997-2013 JDE Developers TeamkinectViewer.camRGB
- *
- * 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 3 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 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/.
- *
- * Author : Jose María Cañas <jmplaza en gsyc.es>
- Francisco Miguel Rivas Montero <franciscomiguel.rivas en urjc.es>
-
- */
-
-#ifndef CAMERACLIENT_H_
-#define CAMERACLIENT_H_
-
-#include <IceUtil/IceUtil.h>
-#include <iostream>
-#include <Ice/Ice.h>
-#include <colorspaces/colorspacesmm.h>
-#include <jderobot/camera.h>
-#include <cv.h>
-#include <sstream>
-#include <fstream>
-
-
-namespace jderobot {
-
-class cameraClient: public IceUtil::Thread {
-public:
- cameraClient(Ice::CommunicatorPtr ic, std::string prefix, bool debug);
- virtual ~cameraClient();
- virtual void run();
-
- //callbacks
- cv::Mat getImage();
-private:
- cv::Mat data;
- jderobot::CameraPrx prx;
- long long int cycle;
- //int type; //0 color 1 depth
- IceUtil::Mutex controlMutex;
- std::string prefix;
- bool debug;
-
-};
-
-} /* namespace jderobot */
-#endif /* CAMERACLIENT_H_ */
Deleted: trunk/src/libs/jderobotice/pointcloudClient.cpp
===================================================================
--- trunk/src/libs/jderobotice/pointcloudClient.cpp 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/libs/jderobotice/pointcloudClient.cpp 2013-07-09 10:05:24 UTC (rev 937)
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 1997-2013 JDE Developers TeamkinectViewer.camRGB
- *
- * 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 3 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 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/.
- *
- * Author : Jose María Cañas <jmplaza en gsyc.es>
- Francisco Miguel Rivas Montero <franciscomiguel.rivas en urjc.es>
-
- */
-#include "pointcloudClient.h"
-
-namespace jderobot {
-
-pointcloudClient::pointcloudClient(Ice::CommunicatorPtr ic, std::string prefix, bool debug) {
- // TODO Auto-generated constructor stub
- this->prefix=prefix;
- this->debug= debug;
- Ice::PropertiesPtr prop;
- prop = ic->getProperties();
-
- int fps=prop->getPropertyAsIntWithDefault(prefix+"Fps",10);
- this->cycle=(float)(1/(float)fps)*1000000;
- try{
- Ice::ObjectPrx basePointCloud = ic->propertyToProxy(prefix+"Proxy");
- if (0==basePointCloud){
- throw prefix + " Could not create proxy";
- }
- else {
- this->prx = jderobot::pointCloudPrx::checkedCast(basePointCloud);
- if (0==this->prx)
- throw "Invalid proxy" + prefix;
-
- }
- }catch (const Ice::Exception& ex) {
- std::cerr << ex << std::endl;
- }
- catch (const char* msg) {
- std::cerr << msg << std::endl;
- std::cout << prefix + " Not camera provided" << std::endl;
- }
-
-}
-
-pointcloudClient::~pointcloudClient() {
- // TODO Auto-generated destructor stub
-}
-
-void pointcloudClient::run(){
-
- struct timeval post;
- long long int totalpre=0;
- long long int totalpost=0;
- while (1){
- gettimeofday(&post,NULL);
- totalpost=post.tv_sec*1000000+post.tv_usec;
-
- jderobot::pointCloudDataPtr localCloud=this->prx->getCloudData();
-
- this->controlMutex.lock();
- this->data.resize(localCloud->p.size());
- std::copy( localCloud->p.begin(), localCloud->p.end(), this->data.begin() );
-
- this->controlMutex.unlock();
- if (totalpre !=0){
- if ((totalpost - totalpre) > this->cycle ){
- if (this->debug)
- std::cout<< prefix << ": pointCloud adquisition timeout-" << std::endl;
- }
- else{
- usleep(this->cycle - (totalpost - totalpre));
- }
- }
- totalpre=totalpost;
- }
-}
-
-std::vector<jderobot::RGBPoint> pointcloudClient::getData(){
- std::vector<jderobot::RGBPoint> cloud;
- this->controlMutex.lock();
- cloud.resize(this->data.size());
- std::copy( this->data.begin(), this->data.end(), cloud.begin() );
- this->controlMutex.unlock();
- return cloud;
-}
-
-} /* namespace jderobot */
Deleted: trunk/src/libs/jderobotice/pointcloudClient.h
===================================================================
--- trunk/src/libs/jderobotice/pointcloudClient.h 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/libs/jderobotice/pointcloudClient.h 2013-07-09 10:05:24 UTC (rev 937)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 1997-2013 JDE Developers TeamkinectViewer.camRGB
- *
- * 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 3 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 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/.
- *
- * Author : Jose María Cañas <jmplaza en gsyc.es>
- Francisco Miguel Rivas Montero <franciscomiguel.rivas en urjc.es>
-
- */
-
-
-#ifndef POINTCLOUDCLIENT_H_
-#define POINTCLOUDCLIENT_H_
-
-#include <IceUtil/IceUtil.h>
-#include <iostream>
-#include <Ice/Ice.h>
-#include <jderobot/pointcloud.h>
-#include <cv.h>
-#include <sstream>
-#include <fstream>
-
-namespace jderobot {
-
-class pointcloudClient: public IceUtil::Thread {
-public:
- pointcloudClient(Ice::CommunicatorPtr ic, std::string prefix, bool debug);
- virtual ~pointcloudClient();
- virtual void run();
-
- std::vector<jderobot::RGBPoint> getData();
-
-
-private:
- std::string prefix;
- std::vector<jderobot::RGBPoint> data;
- jderobot::pointCloudPrx prx;
- long long int cycle;
- IceUtil::Mutex controlMutex;
- bool debug;
-
-};
-
-} /* namespace jderobot */
-#endif /* POINTCLOUDCLIENT_H_ */
Modified: trunk/src/libs/visionlib/CMakeLists.txt
===================================================================
--- trunk/src/libs/visionlib/CMakeLists.txt 2013-06-30 16:39:49 UTC (rev 936)
+++ trunk/src/libs/visionlib/CMakeLists.txt 2013-07-09 10:05:24 UTC (rev 937)
@@ -21,7 +21,6 @@
${libgnomecanvasmm_LIBRARIES}
${gtkglextmm_LIBRARIES}
${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so
- ${LIBS_DIR}/jderobotice/libjderobotice.so
${LIBS_DIR}/jderobotutil/libjderobotutil.so
${LIBS_DIR}/progeo/libprogeo.so
)
More information about the Jderobot-admin
mailing list