diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cde50992d..7232dd7f5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,7 +159,6 @@ set (GRASPIT_EGPLANNER_HEADERS ${GSRC}/include/EGPlanner/simAnn.h ${GSRC}/include/EGPlanner/searchState.h ${GSRC}/include/EGPlanner/searchStateImpl.h - ${GSRC}/include/EGPlanner/energy/searchEnergy.h ${GSRC}/include/EGPlanner/onLinePlanner.h ${GSRC}/include/EGPlanner/egPlanner.h ${GSRC}/include/EGPlanner/simAnnPlanner.h @@ -169,6 +168,11 @@ set (GRASPIT_EGPLANNER_HEADERS ${GSRC}/include/EGPlanner/graspTesterThread.h ${GSRC}/include/EGPlanner/onLineGraspInterface.h ${GSRC}/include/EGPlanner/listPlanner.h + +) + +set (GRASPIT_EGPLANNER_ENERGY_HEADERS + ${GSRC}/include/EGPlanner/energy/searchEnergy.h ${GSRC}/include/EGPlanner/energy/autograspQualityEnergy.h ${GSRC}/include/EGPlanner/energy/closureSearchEnergy.h ${GSRC}/include/EGPlanner/energy/compliantEnergy.h @@ -177,10 +181,9 @@ set (GRASPIT_EGPLANNER_HEADERS ${GSRC}/include/EGPlanner/energy/guidedAutoGraspEnergy.h ${GSRC}/include/EGPlanner/energy/guidedPotentialQualityEnergy.h ${GSRC}/include/EGPlanner/energy/potentialQualityEnergy.h - ${GSRC}/include/EGPlanner/energy/strictAutoGraspEnergy.h + ${GSRC}/include/EGPlanner/energy/strictAutoGraspEnergy.h ) - # all headers which are in the cmdline # directory and should be included # in the installation should be listed in the @@ -826,6 +829,13 @@ install(FILES DESTINATION ${INCLUDE_DESTINATION}/EGPlanner ) +install(FILES + ${GRASPIT_EGPLANNER_ENERGY_HEADERS} + DESTINATION ${INCLUDE_DESTINATION}/EGPlanner/energy +) + + + if (PQP_COLLISION) install(FILES ${GRASPIT_INCLUDEDIR_HEADERS} diff --git a/cmake/graspitConfig.cmake b/cmake/graspitConfig.cmake index 2b5f53b8b5..a6870b18a4 100644 --- a/cmake/graspitConfig.cmake +++ b/cmake/graspitConfig.cmake @@ -84,7 +84,7 @@ endif (graspit_LIBRARY_RELEASE) if (NOT CATKIN_DEVEL_PREFIX) # We also need to include the graspit targets file if not using catkin get_filename_component(LIB_SUFFIX ${graspit_LIBRARY_RELEASE} EXT) - message("Graspit library suffix: ${LIB_SUFFIX}, shared lib suffix: ${CMAKE_SHARED_LIBRARY_SUFFIX}") + # message("Graspit library suffix: ${LIB_SUFFIX}, shared lib suffix: ${CMAKE_SHARED_LIBRARY_SUFFIX}") if (LIB_SUFFIX STREQUAL CMAKE_SHARED_LIBRARY_SUFFIX) message(STATUS "Using graspit SHARED lib") include(${SELF_DIR}/../graspit-targets.cmake) diff --git a/include/EGPlanner/energy/searchEnergy.h b/include/EGPlanner/energy/searchEnergy.h index 7f5afaf9e1..630ceaa440 100644 --- a/include/EGPlanner/energy/searchEnergy.h +++ b/include/EGPlanner/energy/searchEnergy.h @@ -31,7 +31,7 @@ #include #include "search.h" -#include "include/matvec3D.h" +#include "matvec3D.h" class Hand; class Body; diff --git a/include/EGPlanner/searchState.h b/include/EGPlanner/searchState.h index 3595fd8cff..bd8ea9bdd4 100644 --- a/include/EGPlanner/searchState.h +++ b/include/EGPlanner/searchState.h @@ -31,7 +31,7 @@ #include #include "search.h" -#include "include/matvec3D.h" +#include "matvec3D.h" class Hand; class Body; diff --git a/include/EGPlanner/simAnn.h b/include/EGPlanner/simAnn.h index 89e9ff4345..b0956d7e48 100644 --- a/include/EGPlanner/simAnn.h +++ b/include/EGPlanner/simAnn.h @@ -35,7 +35,7 @@ class Body; class SoSensor; #include -#include "include/matvec3D.h" +#include "matvec3D.h" #include /*! This class performs simulated annealing on a collection of variables diff --git a/include/graspitCore.h b/include/graspitCore.h index 8b5c061328..7a4aee5a6f 100644 --- a/include/graspitCore.h +++ b/include/graspitCore.h @@ -133,7 +133,8 @@ class GraspitCore void startMainLoop(); void exitMainLoop(); - void emptyWorld(); + /*! Deletes the existing world and creates a new (empty) one */ + void emptyWorld(const char* name="MainWorld"); //! Get the main database manager, when CGDB support is enabled db_planner::DatabaseManager* getDBMgr(){return mDBMgr;} diff --git a/src/graspitCore.cpp b/src/graspitCore.cpp index cd239b8b6c..992e1ca8df 100644 --- a/src/graspitCore.cpp +++ b/src/graspitCore.cpp @@ -104,30 +104,38 @@ GraspitCore::GraspitCore(int argc, char **argv): bool headless = args->exist("headless"); if(headless){ - SoQt::init(argc, argv, "SOQT"); + if (argc < 1) + { + DBGA("At least 1 command line argument required"); + initResult=FAILURE; + return; + } + // need to initialize with this init() instead of passing argc, argv + // or it segfaults + SoQt::init(argv[0], "SOQT"); } else{ mainWindow = new MainWindow; SoQt::init(mainWindow->mWindow); } - //Initialize the world. It has no parent, - world = new World(NULL, //QObject parent - "mainWorld"); // World Name + //Initialize the world. It has no parent, + world = new World(NULL, //QObject parent + "mainWorld"); // World Name - // initialize Inventor additions - SoComplexShape::initClass(); - SoArrow::initClass(); - SoTorquePointer::initClass(); + // initialize Inventor additions + SoComplexShape::initClass(); + SoArrow::initClass(); + SoTorquePointer::initClass(); - //Do not initialize the IVmgr if we are running headless. ivmgr will stay NULL - if(!headless){ - ivmgr = new IVmgr(world, (QWidget *)mainWindow->mUI->viewerHolder,"myivmgr"); - ivmgr->getViewer()->getWidget()->setFocusPolicy(Qt::StrongFocus); - } + //Do not initialize the IVmgr if we are running headless. ivmgr will stay NULL + if(!headless){ + ivmgr = new IVmgr(world, (QWidget *)mainWindow->mUI->viewerHolder,"myivmgr"); + ivmgr->getViewer()->getWidget()->setFocusPolicy(Qt::StrongFocus); + } - graspitCore = this; - mExitCode = 0; + graspitCore = this; + mExitCode = 0; int errorFlag=0; @@ -283,14 +291,15 @@ GraspitCore::exitMainLoop() SoQt::exitMainLoop(); } + /*! Deletes the world, and creates a new one. */ void -GraspitCore::emptyWorld() +GraspitCore::emptyWorld(const char * name) { delete world; - world = new World(NULL, "MainWorld"); + world = new World(NULL, name); if(ivmgr) { ivmgr->setWorld(world);