diff --git a/cmake/cpack_metainfo/tools.cmake b/cmake/cpack_metainfo/tools.cmake index 39b9aa5d0..bd26c010c 100644 --- a/cmake/cpack_metainfo/tools.cmake +++ b/cmake/cpack_metainfo/tools.cmake @@ -1,9 +1,3 @@ -SET(CPACK_DEBIAN_3DVIEWER_PACKAGE_DEPENDS "jderobot-easyice, jderobot-viewer, jderobot-util, jderobot-interfaces, jderobot-logger, jderobot-ns, jderobot-colorspaces") -SET(CPACK_COMPONENT_3DVIEWER_DESCRIPTION -"Generic openGL based 3D viewer for cameras. - Manual Page http://jderobot.org/index.php/Tools#3DViewer - Home page https://jderobot.org") - SET(CPACK_DEBIAN_BASIC-COMPONENT_PACKAGE_DEPENDS "jderobot-config, jderobot-comm") SET(CPACK_COMPONENT_BASIC-COMPONENT_DESCRIPTION "Example of tool C++ diff --git a/scripts/metapackages/jderobot-tools.info.in b/scripts/metapackages/jderobot-tools.info.in index 5ec5d28b2..babae4a3c 100644 --- a/scripts/metapackages/jderobot-tools.info.in +++ b/scripts/metapackages/jderobot-tools.info.in @@ -8,7 +8,7 @@ Section: net Priority: extra Size: 0 Installed-Size: 0 -Depends: jderobot-3dviewer, jderobot-cameracalibrator, jderobot-cameraview, jderobot-cameraview-python, jderobot-colortuner-python, jderobot-giraffeclient, jderobot-kobukiviewer, jderobot-namingservice, jderobot-navigatorcamera, jderobot-pantiltteleop-python, jderobot-recorder2, jderobot-replaycontroller, jderobot-replayer2, jderobot-rgbdcalibrator, jderobot-rgbdmanualcalibrator, jderobot-rgbdviewer, jderobot-uav-viewer, jderobot-uav-viewer-python, jderobot-scratch2jderobot, jderobot-visualstates-python, jderobot-webtools +Depends: jderobot-cameracalibrator, jderobot-cameraview, jderobot-cameraview-python, jderobot-colortuner-python, jderobot-giraffeclient, jderobot-kobukiviewer, jderobot-namingservice, jderobot-navigatorcamera, jderobot-pantiltteleop-python, jderobot-recorder2, jderobot-replaycontroller, jderobot-replayer2, jderobot-rgbdcalibrator, jderobot-rgbdmanualcalibrator, jderobot-rgbdviewer, jderobot-uav-viewer, jderobot-uav-viewer-python, jderobot-scratch2jderobot, jderobot-visualstates-python, jderobot-webtools Maintainer: Francisco Perez Homepage: http://jderobot.org Description: Metapackage that gathers all the tools of JdeRobot framework. diff --git a/src/tools/3DViewer/3DViewer.cfg b/src/tools/3DViewer/3DViewer.cfg deleted file mode 100644 index 042321567..000000000 --- a/src/tools/3DViewer/3DViewer.cfg +++ /dev/null @@ -1,7 +0,0 @@ - -#Visualization Config -3DViewer.Endpoints=default -h 0.0.0.0 -p 9957 -3DViewer.Name=viewer - -3DViewer.Enabled=0 -3DViewer.Proxy=NamingServiceJdeRobot:default -h 0.0.0.0 -p 10000 diff --git a/src/tools/3DViewer/CMakeLists.txt b/src/tools/3DViewer/CMakeLists.txt deleted file mode 100644 index ed8d05834..000000000 --- a/src/tools/3DViewer/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ - -IF (with_pcl) - SET( SOURCE_FILES main.cpp) - - add_definitions(-DGLADE_DIR="${gladedir}") - - include_directories( - ${INTERFACES_CPP_DIR} - ${LIBS_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${easyiceconfig_INCLUDE_DIRS} - ) - - link_directories( - ${easyiceconfig_LIBRARY_DIRS} - ) - - add_executable (3DViewer ${SOURCE_FILES}) - - TARGET_LINK_LIBRARIES(3DViewer - jderobotutil - ${OpenCV_LIBRARIES} - ${OpenCVGUI_LIBRARIES} - colorspacesmm - JderobotInterfaces - ${easyiceconfig_LIBRARIES} - ${ZeroCIce_LIBRARIES} - ${ZLIB_LIBRARIES} - logger - crypto - ns - jderobotViewer - ${PCL_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} - ${GLOG_LIBRARIES} - ) - - install(TARGETS 3DViewer - DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ - COMPONENT 3dviewer - ) - - INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/3DViewer.cfg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/jderobot/conf COMPONENT 3dviewer) -ENDIF() - - - - - diff --git a/src/tools/3DViewer/main.cpp b/src/tools/3DViewer/main.cpp deleted file mode 100644 index 4f457131d..000000000 --- a/src/tools/3DViewer/main.cpp +++ /dev/null @@ -1,177 +0,0 @@ -// -// Created by frivas on 10/03/16. -// - -/* - * - * Copyright (C) 1997-2009 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 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/. - * - * Authors : Francisco Miguel Rivas Montero - * - */ - - -#include -#include -#include -#include -#include -#include -#include -#include - - - -//Opencv -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "easyiceconfig/EasyIce.h" - -bool flag=false; /** boolean to keep a check on signal */ - -namespace visualization{ - - class VisualizationI: public jderobot::Visualization { - public: - VisualizationI(std::string propertyPrefix, Ice::CommunicatorPtr ic){ - jViewer=boost::shared_ptr (new jderobot::JderobotViewer("3D viewer",1,true)); - this->jViewer->setShapeRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 8,"trace"); - cloud = pcl::PointCloud::Ptr( new pcl::PointCloud()); - linesID=0; - pointsID=0; - } - - ~VisualizationI(){ - jViewer.reset(); - } - - - virtual void drawSegment(const jderobot::Segment& segment,const jderobot::Color& color, const Ice::Current&){ - pcl::PointXYZ from,to; - from.x=segment.fromPoint.x; - from.y=segment.fromPoint.y; - from.z=segment.fromPoint.z; - to.x=segment.toPoint.x; - to.y=segment.toPoint.y; - to.z=segment.toPoint.z; - this->jViewer->addLine(from,to,color.r,color.g,color.b,boost::lexical_cast(this->linesID)); - linesID++; - - } - - virtual void drawPoint(const jderobot::Point& point,const jderobot::Color& color, const Ice::Current&){ - pcl::PointXYZRGB pointPcl; - pointPcl.x = point.x; - pointPcl.y = point.y; - pointPcl.z = point.z; - pointPcl.r = color.r; - pointPcl.g = color.g; - pointPcl.b = color.b; - - cloud->push_back(pointPcl); - this->jViewer->addPointCloud(this->cloud,boost::lexical_cast(this->pointsID)); - pointsID++; - } - virtual void clearAll(const Ice::Current&){ - pointsID=0; - linesID=0; - this->jViewer->removeAllShapes(); - } - - - private: - boost::shared_ptr jViewer; - pcl::PointCloud::Ptr cloud; - int linesID; - long int pointsID; - }; - -} //namespace - - -jderobot::ns* namingService = NULL; - - -void signalHandler(int signum){ /*** signal handler to handle SIGINT signal */ - flag=true; -} - -int main(int argc, char** argv) -{ - Ice::ObjectPtr viewerPtr; - //signal(SIGINT,signalHandler); - Ice::CommunicatorPtr ic; - try{ - ic = EasyIce::initialize(argc, argv); - - Ice::PropertiesPtr prop = ic->getProperties(); - std::string Endpoints = prop->getProperty("3DViewer.Endpoints"); - - // Naming Service - int nsActive = prop->getPropertyAsIntWithDefault("NamingService.Enabled", 0); - - if (nsActive) - { - std::string ns_proxy = prop->getProperty("NamingService.Proxy"); - try - { - namingService = new jderobot::ns(ic, ns_proxy); - } - catch (Ice::ConnectionRefusedException& ex) - { - LOG(ERROR) << "Impossible to connect with NameService!"; - exit(-1); - } - } - - Ice::ObjectAdapterPtr adapter =ic->createObjectAdapterWithEndpoints("3DViewer", Endpoints); - std::string objPrefix("3DViewer."); - std::string viewerName = prop->getProperty(objPrefix + "Name"); - Ice::ObjectPtr object = new visualization::VisualizationI(objPrefix, ic); - - adapter->add(object, ic->stringToIdentity(viewerName)); - - if (namingService) - namingService->bind(viewerName, Endpoints, object->ice_staticId()); - - - adapter->activate(); - ic->waitForShutdown(); - - }catch (const Ice::Exception& ex) { - std::cerr << ex<<" 1 " << std::endl; - exit(-1); - } catch (const char* msg) { - std::cerr << msg<< " 2 " << std::endl; - exit(-1); - } - -}