[Jderobot-admin] jderobot-r912 - in trunk/src/components/gazeboserver: . build-independent

ahcorde en jderobot.org ahcorde en jderobot.org
Jue Mayo 9 09:21:01 CEST 2013


Author: ahcorde
Date: 2013-05-09 09:20:01 +0200 (Thu, 09 May 2013)
New Revision: 912

Modified:
   trunk/src/components/gazeboserver/CMakeLists.txt
   trunk/src/components/gazeboserver/build-independent/CMakeLists.txt
   trunk/src/components/gazeboserver/camera_dump.cc
Log:
[ahcorde] Eliminado dependencia de gearbox en gazeboserver
	actualizados cmakelists


Modified: trunk/src/components/gazeboserver/CMakeLists.txt
===================================================================
--- trunk/src/components/gazeboserver/CMakeLists.txt	2013-05-06 06:41:15 UTC (rev 911)
+++ trunk/src/components/gazeboserver/CMakeLists.txt	2013-05-09 07:20:01 UTC (rev 912)
@@ -10,8 +10,7 @@
 target_link_libraries(motors 
 	${GAZEBO_libraries} 
 	${ZeroCIce_LIBRARIES} 
-    ${LIBS_DIR}/jderobotice/libjderobotice.so
-    ${LIBS_DIR}/jderobotutil/libjderobotutil.so
+
     ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
     ${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so) 
     
@@ -20,8 +19,6 @@
 	${GAZEBO_libraries} 
 
 	${ZeroCIce_LIBRARIES} 
-    ${LIBS_DIR}/jderobotice/libjderobotice.so
-    ${LIBS_DIR}/jderobotutil/libjderobotutil.so
     ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
     ${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so)    
 
@@ -31,8 +28,6 @@
 	${GAZEBO_libraries} 
 
 	${ZeroCIce_LIBRARIES} 
-    ${LIBS_DIR}/jderobotice/libjderobotice.so
-    ${LIBS_DIR}/jderobotutil/libjderobotutil.so
     ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
     ${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so) 
 
@@ -42,8 +37,6 @@
 	${GAZEBO_libraries} 
 
 	${ZeroCIce_LIBRARIES} 
-    ${LIBS_DIR}/jderobotice/libjderobotice.so
-    ${LIBS_DIR}/jderobotutil/libjderobotutil.so
     ${LIBS_DIR}/colorspaces/libcolorspacesmm.so
     ${INTERFACES_CPP_DIR}/jderobot/libJderobotInterfaces.so)
     
@@ -52,7 +45,5 @@
 	${GAZEBO_libraries} 
 
 	${ZeroCIce_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/gazeboserver/build-independent/CMakeLists.txt
===================================================================
--- trunk/src/components/gazeboserver/build-independent/CMakeLists.txt	2013-05-06 06:41:15 UTC (rev 911)
+++ trunk/src/components/gazeboserver/build-independent/CMakeLists.txt	2013-05-09 07:20:01 UTC (rev 912)
@@ -47,7 +47,7 @@
   pkg_check_modules(GAZEBO gazebo)
   message(${GAZEBO_INCLUDE_DIRS})
 endif()
-include_directories(${GAZEBO_INCLUDE_DIRS} /usr/local/include/jderobot /usr/local/include/gearbox )
+include_directories(${GAZEBO_INCLUDE_DIRS} /usr/local/include/jderobot )
 
 link_directories(${GAZEBO_LIBRARY_DIRS}  /usr/local/lib/jderobot)
 set( CMAKE_CXX_FLAGS "-lIce -lIceUtil" ) # Opciones para el compilador
@@ -57,8 +57,6 @@
 	${GAZEBO_libraries} 
     ${opencv_LIBRARIES}	
 	${ZeroCIce_LIBRARIES} 
-    libjderobotice.so
-    libjderobotutil.so
     libcolorspacesmm.so
     libJderobotInterfaces.so) 
     
@@ -67,8 +65,6 @@
 	${GAZEBO_libraries} 
     ${opencv_LIBRARIES}	
 	${ZeroCIce_LIBRARIES} 
-    libjderobotice.so
-    libjderobotutil.so
     libcolorspacesmm.so
     libJderobotInterfaces.so)    
 
@@ -78,8 +74,7 @@
 	${GAZEBO_libraries} 
     ${opencv_LIBRARIES}	
 	${ZeroCIce_LIBRARIES} 
-    libjderobotice.so
-    libjderobotutil.so
+
     libcolorspacesmm.so
     libJderobotInterfaces.so) 
 
@@ -89,8 +84,6 @@
 	${GAZEBO_libraries} 
     ${opencv_LIBRARIES}	
 	${ZeroCIce_LIBRARIES} 
-    libjderobotice.so
-    libjderobotutil.so
     libcolorspacesmm.so
     libJderobotInterfaces.so)
     
@@ -100,7 +93,5 @@
 	${GAZEBO_libraries} 
     ${opencv_LIBRARIES}	
 	${ZeroCIce_LIBRARIES} 
-    libjderobotice.so
-    libjderobotutil.so
     libcolorspacesmm.so
     libJderobotInterfaces.so)

Modified: trunk/src/components/gazeboserver/camera_dump.cc
===================================================================
--- trunk/src/components/gazeboserver/camera_dump.cc	2013-05-06 06:41:15 UTC (rev 911)
+++ trunk/src/components/gazeboserver/camera_dump.cc	2013-05-09 07:20:01 UTC (rev 912)
@@ -10,14 +10,7 @@
 // ICE utils includes
 #include <Ice/Ice.h>
 #include <IceUtil/IceUtil.h>
-#include <gbxsickacfr/gbxiceutilacfr/safethread.h>
 
-// JDErobot general ice component includes
-#include <jderobotice/component.h>
-#include <jderobotice/application.h>
-#include <jderobotice/exceptions.h>
-#include <jderobotice/context.h>
-
 #include <jderobot/camera.h>
 
 #include <colorspaces/colorspacesmm.h>
@@ -58,13 +51,8 @@
   			boost::split(tokens, nameCamera, boost::is_any_of("::"));
   			boost::split(tokens, tokens[2], boost::is_any_of("("));
 			nameGlobal = tokens[0];
-			
-			std::string nameParent = this->parentSensor->GetParentName();
-			std::vector<std::string> strs;
-			boost::split(strs, nameParent, boost::is_any_of("::"));
-			
 			// El nombre del fichero de configuracion tiene que coincidir con el de la cámara en el .world y el .cfg 
-			nameCamera = std::string("--Ice.Config=" + strs[0] + "_" + tokens[0] + ".cfg"); 
+			nameCamera = std::string("--Ice.Config=" + tokens[0] + ".cfg"); 
 			
 			if (count == 0){
 				pthread_t thr_gui;
@@ -98,8 +86,8 @@
 
 class CameraI: virtual public jderobot::Camera {
 	public:
-		CameraI(std::string propertyPrefix, const jderobotice::Context& context, gazebo::CameraDump* camera)
-			   : prefix(propertyPrefix),context(context), cameraI(camera) {
+		CameraI(std::string propertyPrefix, gazebo::CameraDump* camera)
+			   : prefix(propertyPrefix), cameraI(camera) {
 		
 			std::cout << "Constructor CameraI" << std::endl;
 
@@ -115,12 +103,12 @@
 		}
 
 		std::string getRobotName () {
-			return ((context.properties())->getProperty(context.tag()+".RobotName"));
+			return "RobotName";
 		}
 
 		virtual ~CameraI() {
-			context.tracer().info("Stopping and joining thread for camera: " + cameraDescription->name);
-			gbxiceutilacfr::stopAndJoin(replyTask);
+
+
 		}
 
 		virtual jderobot::ImageDescriptionPtr getImageDescription(const Ice::Current& c){
@@ -140,18 +128,19 @@
 		}
 
 		virtual std::string startCameraStreaming(const Ice::Current&){
-			context.tracer().info("Should be made anything to start camera streaming: " + cameraDescription->name);
+
 		}
 
 		virtual void stopCameraStreaming(const Ice::Current&) {
-			context.tracer().info("Should be made anything to stop camera streaming: " + cameraDescription->name);
+
 		}
 
 	private:
-		class ReplyTask: public gbxiceutilacfr::SafeThread {
+		class ReplyTask: public IceUtil::Thread {
 			public:
-				ReplyTask(CameraI* camera)
-				: gbxiceutilacfr::SafeThread(camera->context.tracer()), mycamera(camera) {
+				ReplyTask(CameraI* camera){
+                    mycamera = camera;
+
 				   	std::cout << "safeThread" << std::endl;
 				}
 
@@ -160,7 +149,7 @@
 					requests.push_back(cb);
 				}
 
-				virtual void walk(){
+				virtual void run(){
 					jderobot::ImageDataPtr reply(new jderobot::ImageData);
 					struct timeval a, b;
 					int cycle = 48;
@@ -169,7 +158,7 @@
 					
 					int count =0 ;
 
-					while(!isStopping()){
+					while(1){
 						
 						if(!mycamera->cameraI->image.data){
 							usleep(100);
@@ -237,7 +226,7 @@
 
 		typedef IceUtil::Handle<ReplyTask> ReplyTaskPtr;
 		std::string prefix;
-		jderobotice::Context context;
+
 		colorspaces::Image::FormatPtr imageFmt;
 		jderobot::ImageDescriptionPtr imageDescription;
 		jderobot::CameraDescriptionPtr cameraDescription;
@@ -269,11 +258,9 @@
         std::cout << "CameraGazebo "<< camera->nameGlobal <<" Endpoints > "  << Endpoints << std::endl;
         
         Ice::ObjectAdapterPtr adapter =
-            ic->createObjectAdapterWithEndpoints("CameraGazebo", Endpoints);
-            
-		jderobotice::Context context;
+        ic->createObjectAdapterWithEndpoints("CameraGazebo", Endpoints);
 		
-        Ice::ObjectPtr object = new CameraI(std::string("CameraGazebo"), context, camera);
+        Ice::ObjectPtr object = new CameraI(std::string("CameraGazebo"),  camera);
         adapter->add(object, ic->stringToIdentity(camera->nameGlobal));
         adapter->activate();
         ic->waitForShutdown();



More information about the Jderobot-admin mailing list