diff --git a/GraspPlanning/ExternalDependencies/qhull-2003.1/CMakeLists.txt.bak b/GraspPlanning/ExternalDependencies/qhull-2003.1/CMakeLists.txt.bak deleted file mode 100644 index 7274015d4de5a8f5753950b025b5df3e8b1ccb53..0000000000000000000000000000000000000000 --- a/GraspPlanning/ExternalDependencies/qhull-2003.1/CMakeLists.txt.bak +++ /dev/null @@ -1,35 +0,0 @@ -PROJECT(qhull) - -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0) -CMAKE_POLICY(VERSION 2.6) - -INCLUDE (${GRASPSTUDIO_DIR}/config.cmake) -SET (GRASPSTUDIO_VirtualRobotDir ${GRASPSTUDIO_SimoxDir}/VirtualRobot) -INCLUDE (${GRASPSTUDIO_VirtualRobotDir}/config.cmake) - -MESSAGE(STATUS "** qHull VirtualRobotDir: ${GRASPSTUDIO_VirtualRobotDir}") - - -# Specify sources and headers -FILE(GLOB SRCS ${PROJECT_SOURCE_DIR}/src/*.c) -FILE(GLOB INCS ${PROJECT_SOURCE_DIR}/src/*.h) - -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/src) -ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRCS} ${INCS}) - -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES FOLDER "3rd_Party") - -# .DLL path -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${GRASPSTUDIO_BIN_DIR}) -# .so path -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${GRASPSTUDIO_LIB_DIR}) -# .lib path (this is needed for setting the DLL-import library path on windows) -SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${GRASPSTUDIO_LIB_DIR}) - - -TARGET_LINK_LIBRARIES(${PROJECT_NAME}) -MESSAGE(" ** ${PROJECT_NAME} will be placed into " ${GRASPSTUDIO_LIB_DIR}) -MESSAGE(" ** ${PROJECT_NAME} will be installed into " ${GRASPSTUDIO_INSTALL_LIB_DIR}) - -INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${GRASPSTUDIO_INSTALL_LIB_DIR}) - diff --git a/MotionPlanning/examples/RrtGui/RrtGuiWindow.cpp b/MotionPlanning/examples/RrtGui/RrtGuiWindow.cpp index aab72b88e5dbe6bb90c65316ca0e148543282cfb..010c29d73588dba551f206e3bcb3c216f57be6bc 100644 --- a/MotionPlanning/examples/RrtGui/RrtGuiWindow.cpp +++ b/MotionPlanning/examples/RrtGui/RrtGuiWindow.cpp @@ -228,6 +228,7 @@ void RrtGuiWindow::loadSceneWindow() void RrtGuiWindow::loadScene() { + this->rns.reset(); robot.reset(); scene = SceneIO::loadScene(sceneFile); if (!scene) @@ -468,8 +469,8 @@ void RrtGuiWindow::buildRRTVisu() w->addCSpacePath(solution); if (UI.checkBoxShowSolutionOpti->isChecked() && solutionOptimized) w->addCSpacePath(solutionOptimized,Saba::CoinRrtWorkspaceVisualization::eGreen); - w->addConfiguration(startConfig,Saba::CoinRrtWorkspaceVisualization::eGreen,3.0f); - w->addConfiguration(goalConfig,Saba::CoinRrtWorkspaceVisualization::eRed,3.0f); + //w->addConfiguration(startConfig,Saba::CoinRrtWorkspaceVisualization::eGreen,3.0f); + //w->addConfiguration(goalConfig,Saba::CoinRrtWorkspaceVisualization::eRed,3.0f); SoSeparator *sol = w->getCoinVisualization(); rrtSep->addChild(sol); } diff --git a/VirtualRobot/RuntimeEnvironment.cpp b/VirtualRobot/RuntimeEnvironment.cpp index 97468a7119ef5e277be58217e15de20d3f591467..f1eb44698d14b2fefd18f41bd89a6a3a41dbf151 100644 --- a/VirtualRobot/RuntimeEnvironment.cpp +++ b/VirtualRobot/RuntimeEnvironment.cpp @@ -89,6 +89,7 @@ namespace VirtualRobot } } } + bool RuntimeEnvironment::getDataFileAbsolute( std::string &fileName ) { if (!pathInitialized) @@ -96,23 +97,45 @@ namespace VirtualRobot boost::filesystem::path fn(fileName); + try + { + // first check current path + if (boost::filesystem::exists(fn) && boost::filesystem::is_regular_file(fn)) + { + fileName = fn.string(); + return true; + } + } + catch (const boost::filesystem::filesystem_error& /*ex*/) + { + //cout << ex.what() << '\n'; + // silently skip this error (e.g. device not ready, permission denied etc) + } + for (size_t i=0;i<dataPaths.size();i++) { boost::filesystem::path p(dataPaths[i]); boost::filesystem::path fnComplete = boost::filesystem::operator/(p,fn); - if (boost::filesystem::exists(fnComplete)) + try { - fileName = fnComplete.string(); - return true; + if (boost::filesystem::exists(fnComplete) && boost::filesystem::is_regular_file(fnComplete)) + { + // check for permissions (todo) + //boost::filesystem::file_status s = boost::filesystem::status(fnComplete); + //printf("%o\n",s.permissions()); + + fileName = fnComplete.string(); + return true; + } + } + catch (const boost::filesystem::filesystem_error& /*ex*/) + { + //cout << ex.what() << '\n'; + // silently skip this error (e.g. device not ready, permission denied etc) } } - // last chance: check current path - if (boost::filesystem::exists(fn)) - { - fileName = fn.string(); - return true; - } + return false; }