From 26497a0f8a7643797891e39c83112198f61385fe Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Mon, 28 Mar 2016 22:18:20 -0400 Subject: [PATCH 01/26] Execute assimp symbol tests quietly without messages in cmake time --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20fc9e7f5f1c8..bf92381881613 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,7 @@ if(ASSIMP_FOUND) include(CheckCXXSourceCompiles) set(CMAKE_REQUIRED_INCLUDES ${ASSIMP_INCLUDE_DIRS}) set(CMAKE_REQUIRED_LIBRARIES ${ASSIMP_LIBRARIES}) + set(CMAKE_REQUIRED_QUIET TRUE) check_cxx_source_compiles( " @@ -211,6 +212,7 @@ if(ASSIMP_FOUND) unset(CMAKE_REQUIRED_INCLUDES) unset(CMAKE_REQUIRED_LIBRARIES) + unset(CMAKE_REQUIRED_QUIET) else() message(SEND_ERROR "Looking for ASSIMP - NOT found, please install libassimp-dev (>= 3.0.0)") From b259145e2701b7d369816fd9bdf19a9e9c978cb8 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Mon, 28 Mar 2016 23:59:19 -0400 Subject: [PATCH 02/26] Remove dart-core library and split dart library into multiple component libraries depending on dependency 3rd party library requirements --- .travis.yml | 10 +- CMakeLists.txt | 403 ++---------------- apps/addDeleteSkels/CMakeLists.txt | 2 +- apps/addDeleteSkels/MyWindow.h | 1 + apps/atlasSimbicon/CMakeLists.txt | 2 +- apps/atlasSimbicon/MyWindow.h | 1 + apps/bipedStand/CMakeLists.txt | 2 +- apps/bipedStand/MyWindow.h | 1 + apps/hardcodedDesign/CMakeLists.txt | 2 +- apps/hardcodedDesign/MyWindow.h | 1 + apps/hybridDynamics/CMakeLists.txt | 2 +- apps/hybridDynamics/MyWindow.h | 1 + apps/jointConstraints/CMakeLists.txt | 2 +- apps/jointConstraints/Main.cpp | 1 + apps/jointConstraints/MyWindow.h | 1 + apps/mixedChain/CMakeLists.txt | 2 +- apps/mixedChain/MyWindow.h | 1 + apps/operationalSpaceControl/CMakeLists.txt | 2 +- apps/operationalSpaceControl/MyWindow.h | 1 + apps/rigidChain/CMakeLists.txt | 2 +- apps/rigidChain/MyWindow.h | 1 + apps/rigidCubes/CMakeLists.txt | 2 +- apps/rigidCubes/MyWindow.h | 1 + apps/rigidLoop/CMakeLists.txt | 2 +- apps/rigidLoop/MyWindow.h | 1 + apps/rigidShapes/CMakeLists.txt | 2 +- apps/rigidShapes/MyWindow.h | 1 + apps/simpleFrames/CMakeLists.txt | 2 +- apps/simpleFrames/Main.cpp | 1 + apps/softBodies/CMakeLists.txt | 2 +- apps/softBodies/MyWindow.h | 1 + apps/speedTest/CMakeLists.txt | 2 +- apps/speedTest/Main.cpp | 1 + apps/vehicle/CMakeLists.txt | 2 +- apps/vehicle/MyWindow.h | 1 + appveyor.yml | 5 +- ci/before_install_linux.sh | 14 +- ci/before_install_osx.sh | 2 +- ci/script_linux.sh | 5 +- ci/script_osx.sh | 5 +- cmake/DARTCoreConfig.cmake.in | 39 -- cmake/DARTFindDependencies.cmake | 283 ++++++++++++ dart/CMakeLists.txt | 61 +-- dart/collision/CMakeLists.txt | 16 - dart/collision/bullet/CMakeLists.txt | 7 - dart/collision/dart/CMakeLists.txt | 7 - dart/collision/fcl/CMakeLists.txt | 7 - dart/common/CMakeLists.txt | 8 - dart/constraint/CMakeLists.txt | 12 - dart/dart-core.h | 46 -- dart/dart.h | 14 +- dart/dynamics/CMakeLists.txt | 12 - dart/gui/CMakeLists.txt | 18 +- dart/gui/gui.h.in | 1 + dart/gui/osg/CMakeLists.txt | 10 +- dart/gui/osg/examples/CMakeLists.txt | 2 +- dart/gui/osg/examples/osgAtlasPuppet.cpp | 6 +- dart/gui/osg/examples/osgDragAndDrop.cpp | 5 +- dart/gui/osg/examples/osgHuboPuppet.cpp | 2 + .../examples/osgOperationalSpaceControl.cpp | 6 +- dart/gui/osg/examples/osgSoftBodies.cpp | 8 +- dart/gui/osg/render/CMakeLists.txt | 4 +- dart/integration/CMakeLists.txt | 7 - dart/lcpsolver/CMakeLists.txt | 7 - dart/math/CMakeLists.txt | 7 - dart/optimizer/CMakeLists.txt | 20 - dart/optimizer/ipopt/CMakeLists.txt | 9 +- dart/optimizer/nlopt/CMakeLists.txt | 9 +- dart/planning/CMakeLists.txt | 9 +- dart/renderer/CMakeLists.txt | 6 - dart/simulation/CMakeLists.txt | 12 - dart/utils/CMakeLists.txt | 39 +- dart/utils/sdf/CMakeLists.txt | 8 +- dart/utils/urdf/CMakeLists.txt | 12 +- tutorials/CMakeLists.txt | 2 +- tutorials/tutorialBiped-Finished.cpp | 1 + tutorials/tutorialBiped.cpp | 1 + tutorials/tutorialCollisions-Finished.cpp | 2 + tutorials/tutorialCollisions.cpp | 2 + tutorials/tutorialDominoes-Finished.cpp | 1 + tutorials/tutorialDominoes.cpp | 1 + tutorials/tutorialMultiPendulum-Finished.cpp | 1 + tutorials/tutorialMultiPendulum.cpp | 1 + unittests/CMakeLists.txt | 4 +- 84 files changed, 473 insertions(+), 755 deletions(-) delete mode 100644 cmake/DARTCoreConfig.cmake.in create mode 100644 cmake/DARTFindDependencies.cmake delete mode 100644 dart/dart-core.h diff --git a/.travis.yml b/.travis.yml index e2c596eb4a53c..7ffe79a8c7ea4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,15 +8,13 @@ compiler: - gcc - clang env: - - BUILD_CORE_ONLY=OFF BUILD_TYPE=Debug COVERALLS=OFF - - BUILD_CORE_ONLY=OFF BUILD_TYPE=Release COVERALLS=OFF - - BUILD_CORE_ONLY=ON BUILD_TYPE=Debug COVERALLS=OFF - - BUILD_CORE_ONLY=ON BUILD_TYPE=Release COVERALLS=OFF + - BUILD_TYPE=Debug COVERALLS=OFF + - BUILD_TYPE=Release COVERALLS=OFF matrix: include: - os: linux compiler: gcc - env: BUILD_CORE_ONLY=OFF BUILD_TYPE=Debug COVERALLS=ON COVERALLS_REPO_TOKEN=FKh1HgwfV5uzNrYxIT6ZWjcFqybYZSUym + env: BUILD_TYPE=Debug COVERALLS=ON COVERALLS_REPO_TOKEN=FKh1HgwfV5uzNrYxIT6ZWjcFqybYZSUym exclude: - os: osx compiler: gcc @@ -26,7 +24,7 @@ before_install: install: - mkdir build - cd build - - cmake -DBUILD_CORE_ONLY=$BUILD_CORE_ONLY -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDART_COVERALLS=$COVERALLS .. + - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDART_COVERALLS=$COVERALLS .. script: - if [ "$TRAVIS_OS_NAME" = "linux" ]; then '../ci/script_linux.sh' ; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then '../ci/script_osx.sh' ; fi diff --git a/CMakeLists.txt b/CMakeLists.txt index bf92381881613..734d27a4fe5f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,6 @@ message(STATUS "============================================") # Build options #=============================================================================== option(ENABLE_OPENMP "Build with OpenMP parallaization enabled" ON) -option(BUILD_CORE_ONLY "Build only the core of DART" OFF) if(MSVC) set(DART_RUNTIME_LIBRARY "/MD" CACHE STRING "BaseName chosen by the user at CMake configure time") set_property(CACHE DART_RUNTIME_LIBRARY PROPERTY STRINGS /MD /MT) @@ -70,7 +69,6 @@ if(MSVC) else() option(BUILD_SHARED_LIBS "Build shared libraries" ON) endif() -option(DART_BUILD_OSGDART "Build osgDart library" ON) option(DART_BUILD_EXAMPLES "Build examples" ON) option(DART_BUILD_TUTORIALS "Build tutorials" ON) option(DART_BUILD_UNITTESTS "Build unit tests" ON) @@ -110,320 +108,7 @@ endif() #=============================================================================== # Find dependencies #=============================================================================== -# -# If you add a dependency, please add the corresponding rosdep key as a -# dependency in package.xml. - -#------------------------ -# Mandatory dependencies -#------------------------ -message(STATUS "") -message(STATUS "[ Mandatory dependencies ]") - -# Eigen -find_package(EIGEN3 3.0.5 QUIET) -if(EIGEN3_FOUND) - message(STATUS "Looking for EIGEN3 - ${EIGEN3_VERSION} found") -else() - message(SEND_ERROR "Looking for EIGEN3 - NOT found, please install libeigen3-dev (>= 3.0.5)") -endif() - -# CCD -find_package(CCD 1.4.0 QUIET) -if(CCD_FOUND) - message(STATUS "Looking for CCD - ${CCD_VERSION} found") -else() - message(SEND_ERROR "Looking for CCD - NOT found, please install libccd-dev (>= 1.4.0)") -endif() - -# FCL -# TODO: We need to increate the minimum required fcl version to 0.4.0 for DART -# 5.0 once fcl 0.4.0 is released. -find_package(FCL 0.2.9 QUIET) -if(FCL_FOUND) - message(STATUS "Looking for FCL - ${FCL_VERSION} found") - if(FCL_VERSION) - if("${FCL_VERSION}" VERSION_LESS "0.4.0") - message(WARNING - "Found FCL version ${FCL_VERSION}, which is older than 0.4.0. FCL" - " versions predating 0.4.0 return incorrect contacts for" - " primitive-primitive collsions. You should use FCLMeshCollisionDetector" - " instead of FCLCollisionDetector if you need accurate contacts." - ) - set(DART_USE_FCLMESHCOLLISIONDETECTOR TRUE) - else() - set(DART_USE_FCLMESHCOLLISIONDETECTOR FALSE) - endif() - endif() -else() - message(SEND_ERROR "Looking for FCL - NOT found, please install libfcl-dev (>= 0.2.9)") -endif() - -# ASSIMP -find_package(ASSIMP 3.0.0 QUIET) -if(ASSIMP_FOUND) - message(STATUS "Looking for ASSIMP - ${ASSIMP_VERSION} found") - - # Check for missing symbols in ASSIMP (see #451) - include(CheckCXXSourceCompiles) - set(CMAKE_REQUIRED_INCLUDES ${ASSIMP_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LIBRARIES ${ASSIMP_LIBRARIES}) - set(CMAKE_REQUIRED_QUIET TRUE) - - check_cxx_source_compiles( - " - #include - int main() - { - aiScene* scene = new aiScene; - delete scene; - return 1; - } - " - ASSIMP_AISCENE_CTOR_DTOR_DEFINED) - - if(NOT ASSIMP_AISCENE_CTOR_DTOR_DEFINED) - message(WARNING "The installed version of ASSIMP (${ASSIMP_VERSION}) is " - "missing symbols for the constructor and/or destructor of " - "aiScene. DART will use its own implementations of these " - "functions. We recommend using a version of ASSIMP that " - "does not have this issue, once one becomes available.") - endif(NOT ASSIMP_AISCENE_CTOR_DTOR_DEFINED) - - check_cxx_source_compiles( - " - #include - int main() - { - aiMaterial* material = new aiMaterial; - delete material; - return 1; - } - " - ASSIMP_AIMATERIAL_CTOR_DTOR_DEFINED) - - if(NOT ASSIMP_AIMATERIAL_CTOR_DTOR_DEFINED) - message(WARNING "The installed version of ASSIMP (${ASSIMP_VERSION}) is " - "missing symbols for the constructor and/or destructor of " - "aiMaterial. DART will use its own implementations of " - "these functions. We recommend using a version of ASSIMP " - "that does not have this issue, once one becomes available.") - endif(NOT ASSIMP_AIMATERIAL_CTOR_DTOR_DEFINED) - - unset(CMAKE_REQUIRED_INCLUDES) - unset(CMAKE_REQUIRED_LIBRARIES) - unset(CMAKE_REQUIRED_QUIET) - -else() - message(SEND_ERROR "Looking for ASSIMP - NOT found, please install libassimp-dev (>= 3.0.0)") -endif() - -# OpenGL -find_package(OpenGL QUIET) -if(OPENGL_FOUND) - message(STATUS "Looking for OpenGL - found") -else() - message(SEND_ERROR "Looking for OpenGL - NOT found, please install OpenGL") -endif() - -# Boost -set(DART_MIN_BOOST_VERSION 1.46.0 CACHE INTERNAL "Boost min version requirement" FORCE) -if(MSVC) - add_definitions(-DBOOST_ALL_NO_LIB) -endif() -add_definitions(-DBOOST_TEST_DYN_LINK) -set(Boost_USE_MULTITHREADED ON) -set(Boost_USE_STATIC_RUNTIME OFF) -find_package(Boost ${DART_MIN_BOOST_VERSION} COMPONENTS regex system QUIET) -if(Boost_FOUND) - message(STATUS "Looking for Boost - ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} found") -else() - message(SEND_ERROR "Please install system boost version ${DART_MIN_BOOST_VERSION} or higher.") -endif() - -if(NOT BUILD_CORE_ONLY) - - # GLUT - if(WIN32 AND NOT CYGWIN) - set(GLUT_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include") - set(GLUT_LIBRARIES glut32) - else() - find_package(GLUT QUIET) - if(GLUT_FOUND) - message(STATUS "Looking for GLUT - found") - set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY}) - else() - message(SEND_ERROR "Looking for GLUT - NOT found, Please install freeglut3-dev") - endif() - endif() - - # FLANN - find_package(FLANN 1.8.4 QUIET) - if(FLANN_FOUND) - message(STATUS "Looking for FLANN - ${FLANN_VERSION} found") - else() - message(SEND_ERROR "Looking for FLANN - NOT found, please install libflann-dev (>= 1.8.4)") - endif() - - # TINYXML - find_package(TINYXML 2.6.2 QUIET) - if(TINYXML_FOUND) - message(STATUS "Looking for TINYXML - ${TINYXML_VERSION} found") - else() - message(SEND_ERROR "Looking for TINYXML - NOT found, please install libtinyxml-dev (>= 2.6.2)") - endif() - - # TINYXML2 - find_package(TINYXML2 QUIET) - if(TINYXML2_FOUND) - message(STATUS "Looking for TINYXML2 - ${TINYXML2_VERSION} found") - else() - message(SEND_ERROR "Looking for TINYXML2 - NOT found, please install libtinyxml2-dev (>= 1.0.1)") - endif() - - # urdfdom - find_package(urdfdom QUIET) - if(urdfdom_FOUND) - message(STATUS "Looking for urdfdom - found") - else() - message(SEND_ERROR "Looking for urdfdom - NOT found, please install liburdfdom-dev") - endif() - if(MSVC) - set(urdfdom_LIBRARIES optimized urdfdom_sensor debug urdfdom_sensord - optimized urdfdom_model_state debug urdfdom_model_stated - optimized urdfdom_model debug urdfdom_modeld - optimized urdfdom_world debug urdfdom_worldd - optimized console_bridge debug console_bridged) - endif() - - # OpenSceneGraph - find_package(OpenSceneGraph 3.0 QUIET - COMPONENTS osg osgViewer osgManipulator osgGA osgDB) - if(OPENSCENEGRAPH_FOUND) - message(STATUS "Looking for OpenSceneGraph -- ${OPENSCENEGRAPH_VERSION} found") - set(HAVE_OPENSCENEGRAPH TRUE) - else(OPENSCENEGRAPH_FOUND) - # kido-gui-osg requires both OSG and OpenThreads. This section attempts to - # identify which of those are missing from the building machine and offer - # advice to the user for getting osgKido to build. - find_package(OpenThreads QUIET) - if(OPENTHREADS_FOUND) - set(warning_msg "Could NOT find OpenSceneGraph") - else(OPENTHREADS_FOUND) - if(OSG_LIBRARY) - set(warning_msg "Could NOT find OpenThreads") - else(OSG_LIBRARY) - set(warning_msg "Could NOT find OpenSceneGraph nor OpenThreads") - endif(OSG_LIBRARY) - endif(OPENTHREADS_FOUND) - message(WARNING "${warning_msg} -- we will skip kido-gui-osg\n" - "If you believe you do have both OSG and OpenThreads installed, try setting OSG_DIR") - set(HAVE_OPENSCENEGRAPH FALSE) - endif(OPENSCENEGRAPH_FOUND) - -endif() - -#----------------------- -# Optional dependencies -#----------------------- -message(STATUS "") -message(STATUS "[ Optional dependencies ]") - -# OpenMP -if(ENABLE_OPENMP) - find_package(OpenMP QUIET) - if(OPENMP_FOUND) - message(STATUS "Looking for OpenMP - found") - else() - message(STATUS "Looking for OpenMP - NOT found") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") -endif() - -# NLOPT -find_package(NLOPT 2.4.1 QUIET) -if(NLOPT_FOUND) - message(STATUS "Looking for NLOPT - ${NLOPT_VERSION} found") - set(HAVE_NLOPT TRUE) -else() - message(STATUS "Looking for NLOPT - NOT found, please install libnlopt-dev (>= 2.4.1)") - set(HAVE_NLOPT FALSE) -endif() - -# IPOPT -find_package(IPOPT 3.11.4 QUIET) -if(IPOPT_FOUND) - message(STATUS "Looking for IPOPT - ${IPOPT_VERSION} found") - set(HAVE_IPOPT TRUE) -else() - message(STATUS "Looking for IPOPT - NOT found, please install coinor-libipopt-dev (>= 3.11.4)") - set(HAVE_IPOPT FALSE) -endif() - -# Shark -find_package(SHARK QUIET) -if(SHARK_FOUND) - message(STATUS "Looking for SHARK - ${SHARK_VERSION} found") - set(HAVE_SHARK TRUE) -else() - message(STATUS "Looking for SHARK - NOT found, please install SHARK (http://image.diku.dk/shark)") - set(HAVE_SHARK FALSE) -endif() - -# BulletCollision -find_package(Bullet COMPONENTS BulletMath BulletCollision QUIET) - -if(BULLET_FOUND) - message(STATUS "Looking for BulletCollision - ${BULLET_VERSION} found") - set(HAVE_BULLET_COLLISION TRUE) - add_definitions(-DHAVE_BULLET_COLLISION) -else() - message(STATUS "Looking for BulletCollision - NOT found, please install libbullet-dev") - set(HAVE_BULLET_COLLISION FALSE) -endif() - -# Perl modules -find_package(PerlModules COMPONENTS Regexp::Common Getopt::ArgvFile Getopt::Long Term::ANSIColor QUIET) -if("${PERLMODULES_FOUND}" STREQUAL "TRUE") - message(STATUS "Looking for PerlModules - found") -else() - message(STATUS "Looking for PerlModules - NOT found, please install Regexp::Common Getopt::ArgvFile Getopt::Long Term::ANSIColor (http://www.cpan.org/modules/INSTALL.html)") -endif() - -# Doxygen -find_package(Doxygen QUIET) -if(DOXYGEN_FOUND) - message(STATUS "Looking for Doxygen - found") -else() - message(STATUS "Looking for Doxygen - NOT found, please install doxygen") -endif() - -#=============================================================================== -# DART dependency variable settings -#=============================================================================== -set(DART_CORE_DEPENDENCIES ${CCD_LIBRARIES} - ${FCL_LIBRARIES} - ${ASSIMP_LIBRARIES} - ${Boost_LIBRARIES} - ${OPENGL_LIBRARIES} - ${GLUT_LIBRARY} -) - -if(HAVE_BULLET_COLLISION) - set(DART_CORE_DEPENDENCIES ${DART_CORE_DEPENDENCIES} ${BULLET_LIBRARIES}) -endif() - -if(NOT BUILD_CORE_ONLY) - set(DART_DEPENDENCIES ${urdfdom_LIBRARIES} - ${TINYXML_LIBRARIES} - ${TINYXML2_LIBRARIES} - ) - - if(HAVE_BULLET_COLLISION) - set(DART_DEPENDENCIES ${DART_DEPENDENCIES} ${OPENSCENEGRAPH_LIBRARIES}) - endif() - -endif() +include(DARTFindDependencies) #=============================================================================== # Include directories @@ -440,23 +125,6 @@ if(HAVE_BULLET_COLLISION) include_directories(SYSTEM ${BULLET_INCLUDE_DIRS}) add_definitions(${BULLET_CFLAGS}) endif() - -if(NOT BUILD_CORE_ONLY) - include_directories(SYSTEM ${FLANN_INCLUDE_DIRS}) - include_directories(SYSTEM ${urdfdom_INCLUDE_DIRS}) - include_directories(SYSTEM ${TINYXML_INCLUDE_DIRS}) - include_directories(SYSTEM ${TINYXML2_INCLUDE_DIRS}) - if(HAVE_NLOPT) - include_directories(SYSTEM ${NLOPT_INCLUDE_DIRS}) - endif() - if(HAVE_IPOPT) - include_directories(SYSTEM ${IPOPT_INCLUDE_DIRS}) - endif() - if(HAVE_SHARK) - include_directories(SYSTEM ${SHARK_INCLUDE_DIRS}) - endif() -endif() - include_directories("${CMAKE_BINARY_DIR}") #=============================================================================== @@ -469,6 +137,20 @@ if(HAVE_BULLET_COLLISION) link_directories("${BULLET_LIBRARY_DIRS}") endif() +#=============================================================================== +# DART dependency variable settings +#=============================================================================== +set(DART_DEPENDENCIES ${CCD_LIBRARIES} + ${FCL_LIBRARIES} + ${ASSIMP_LIBRARIES} + ${Boost_LIBRARIES} + ${OPENGL_LIBRARIES} # TODO(JS): Should be removed once draw functions are removed from classes in dynamics namespace +) + +if(HAVE_BULLET_COLLISION) + set(DART_DEPENDENCIES ${DART_DEPENDENCIES} ${BULLET_LIBRARIES}) +endif() + #=============================================================================== # Check for non-case-sensitive filesystems #=============================================================================== @@ -540,7 +222,6 @@ message(STATUS "Compiler version : ${CXX_COMPILER_VERSION}") message(STATUS "Build type : ${CMAKE_BUILD_TYPE}") message(STATUS "BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}") message(STATUS "ENABLE_OPENMP : ${ENABLE_OPENMP}") -message(STATUS "Build core only : ${BUILD_CORE_ONLY}") message(STATUS "Build osgDart : ${DART_BUILD_OSGDART}") message(STATUS "Build examples : ${DART_BUILD_EXAMPLES}") message(STATUS "Build tutorials : ${DART_BUILD_TUTORIALS}") @@ -575,22 +256,13 @@ install(FILES ${DART_CONFIG_OUT} DESTINATION include/dart) # Generate the DART CMake Config and version files include(WriteBasicConfigVersionFile) -set(DART_CORE_CONFIG_IN ${CMAKE_SOURCE_DIR}/cmake/DARTCoreConfig.cmake.in) -set(DART_CORE_CONFIG_OUT ${CMAKE_BINARY_DIR}/cmake/DARTCoreConfig.cmake) -message(STATUS ${DART_CORE_CONFIG_OUT}) +set(DART_CONFIG_IN ${CMAKE_SOURCE_DIR}/cmake/DARTConfig.cmake.in) +set(DART_CONFIG_OUT ${CMAKE_BINARY_DIR}/cmake/DARTConfig.cmake) +message(STATUS ${DART_CONFIG_OUT}) message(STATUS ${CMAKE_BINARY_DIR}/cmake/DARTConfigVersion.cmake) -configure_file(${DART_CORE_CONFIG_IN} ${DART_CORE_CONFIG_OUT} @ONLY) -write_basic_config_version_file(cmake/DARTCoreConfigVersion.cmake VERSION ${DART_VERSION} COMPATIBILITY SameMajorVersion) -install(FILES ${DART_CORE_CONFIG_OUT} ${CMAKE_BINARY_DIR}/cmake/DARTCoreConfigVersion.cmake DESTINATION share/dartcore) -if(NOT BUILD_CORE_ONLY) - set(DART_CONFIG_IN ${CMAKE_SOURCE_DIR}/cmake/DARTConfig.cmake.in) - set(DART_CONFIG_OUT ${CMAKE_BINARY_DIR}/cmake/DARTConfig.cmake) - message(STATUS ${DART_CONFIG_OUT}) - message(STATUS ${CMAKE_BINARY_DIR}/cmake/DARTConfigVersion.cmake) - configure_file(${DART_CONFIG_IN} ${DART_CONFIG_OUT} @ONLY) - write_basic_config_version_file(cmake/DARTConfigVersion.cmake VERSION ${DART_VERSION} COMPATIBILITY SameMajorVersion) - install(FILES ${DART_CONFIG_OUT} ${CMAKE_BINARY_DIR}/cmake/DARTConfigVersion.cmake DESTINATION share/dart) -endif() +configure_file(${DART_CONFIG_IN} ${DART_CONFIG_OUT} @ONLY) +write_basic_config_version_file(cmake/DARTConfigVersion.cmake VERSION ${DART_VERSION} COMPATIBILITY SameMajorVersion) +install(FILES ${DART_CONFIG_OUT} ${CMAKE_BINARY_DIR}/cmake/DARTConfigVersion.cmake DESTINATION share/dart) # Generate the DART pkg-config set(PC_CONFIG_IN ${CMAKE_SOURCE_DIR}/cmake/dart.pc.in) @@ -607,32 +279,25 @@ install(FILES package.xml DESTINATION share/${PROJECT_NAME}) #=============================================================================== add_subdirectory(dart) -if(NOT BUILD_CORE_ONLY) - - # Unit tests - if(DART_BUILD_UNITTESTS) - enable_testing() - add_subdirectory(unittests) - endif(DART_BUILD_UNITTESTS) - - # Examples - if(DART_BUILD_EXAMPLES) - add_subdirectory(apps) - endif(DART_BUILD_EXAMPLES) +# Unit tests +if(DART_BUILD_UNITTESTS) + enable_testing() + add_subdirectory(unittests) +endif(DART_BUILD_UNITTESTS) - if(DART_BUILD_TUTORIALS) - add_subdirectory(tutorials) - endif() +# Examples +if(DART_BUILD_EXAMPLES) + add_subdirectory(apps) +endif(DART_BUILD_EXAMPLES) -endif(NOT BUILD_CORE_ONLY) +if(DART_BUILD_TUTORIALS) + add_subdirectory(tutorials) +endif() #=============================================================================== # Export targets #=============================================================================== -install(EXPORT DARTCoreTargets DESTINATION share/dartcore) -if(NOT BUILD_CORE_ONLY) - install(EXPORT DARTTargets DESTINATION share/dart) -endif() +install(EXPORT DARTTargets DESTINATION share/dart) # Add an "uninstall" target # Ref: http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F diff --git a/apps/addDeleteSkels/CMakeLists.txt b/apps/addDeleteSkels/CMakeLists.txt index 1b0376a4c5d90..283f4ed6064dc 100644 --- a/apps/addDeleteSkels/CMakeLists.txt +++ b/apps/addDeleteSkels/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB addDeleteSkels_srcs "*.cpp") file(GLOB addDeleteSkels_hdrs "*.h") add_executable(addDeleteSkels ${addDeleteSkels_srcs} ${addDeleteSkels_hdrs}) -target_link_libraries(addDeleteSkels dart) +target_link_libraries(addDeleteSkels dart dart-gui) set_target_properties(addDeleteSkels PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/addDeleteSkels/MyWindow.h b/apps/addDeleteSkels/MyWindow.h index 8cab84fa13180..41a2310374a68 100644 --- a/apps/addDeleteSkels/MyWindow.h +++ b/apps/addDeleteSkels/MyWindow.h @@ -39,6 +39,7 @@ #define APPS_ADDDELETESKELS_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" /// \brief class MyWindow : public dart::gui::SimWindow { diff --git a/apps/atlasSimbicon/CMakeLists.txt b/apps/atlasSimbicon/CMakeLists.txt index 9057d840e506b..129ea9a0316f0 100644 --- a/apps/atlasSimbicon/CMakeLists.txt +++ b/apps/atlasSimbicon/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB atlasSimbicon_srcs "*.cpp") file(GLOB atlasSimbicon_hdrs "*.h") add_executable(atlasSimbicon ${atlasSimbicon_srcs} ${atlasSimbicon_hdrs}) -target_link_libraries(atlasSimbicon dart) +target_link_libraries(atlasSimbicon dart dart-gui dart-utils-urdf) set_target_properties(atlasSimbicon PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/atlasSimbicon/MyWindow.h b/apps/atlasSimbicon/MyWindow.h index 2e8694837509d..5f5d7549684eb 100644 --- a/apps/atlasSimbicon/MyWindow.h +++ b/apps/atlasSimbicon/MyWindow.h @@ -39,6 +39,7 @@ #define APPS_ATLASROBOT_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" #include "apps/atlasSimbicon/Controller.h" diff --git a/apps/bipedStand/CMakeLists.txt b/apps/bipedStand/CMakeLists.txt index 69004dddd0960..d19b01cb72e8e 100644 --- a/apps/bipedStand/CMakeLists.txt +++ b/apps/bipedStand/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB bipedStand_srcs "*.cpp") file(GLOB bipedStand_hdrs "*.h") add_executable(bipedStand ${bipedStand_srcs} ${bipedStand_hdrs}) -target_link_libraries(bipedStand dart) +target_link_libraries(bipedStand dart dart-gui) set_target_properties(bipedStand PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/bipedStand/MyWindow.h b/apps/bipedStand/MyWindow.h index 7ead529d3c2b8..f53336f57993c 100644 --- a/apps/bipedStand/MyWindow.h +++ b/apps/bipedStand/MyWindow.h @@ -43,6 +43,7 @@ #include #include "dart/dart.h" +#include "dart/gui/gui.h" #include "apps/bipedStand/Controller.h" diff --git a/apps/hardcodedDesign/CMakeLists.txt b/apps/hardcodedDesign/CMakeLists.txt index 2e00dca56818f..1a76038462d1c 100644 --- a/apps/hardcodedDesign/CMakeLists.txt +++ b/apps/hardcodedDesign/CMakeLists.txt @@ -4,5 +4,5 @@ file(GLOB hardcodedDesign_srcs "*.cpp") file(GLOB hardcodedDesign_hdrs "*.h") add_executable(hardcodedDesign ${hardcodedDesign_srcs} ${hardcodedDesign_hdrs}) -target_link_libraries(hardcodedDesign dart) +target_link_libraries(hardcodedDesign dart dart-gui) set_target_properties(hardcodedDesign PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/hardcodedDesign/MyWindow.h b/apps/hardcodedDesign/MyWindow.h index a9ebad25506b6..1ec8812d2c028 100644 --- a/apps/hardcodedDesign/MyWindow.h +++ b/apps/hardcodedDesign/MyWindow.h @@ -48,6 +48,7 @@ #include #include "dart/dart.h" +#include "dart/gui/gui.h" class MyWindow : public dart::gui::Win3D { public: diff --git a/apps/hybridDynamics/CMakeLists.txt b/apps/hybridDynamics/CMakeLists.txt index ab4a26afaac8e..cb0b72e655732 100644 --- a/apps/hybridDynamics/CMakeLists.txt +++ b/apps/hybridDynamics/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB hybridDynamics_srcs "*.cpp") file(GLOB hybridDynamics_hdrs "*.h") add_executable(hybridDynamics ${hybridDynamics_srcs} ${hybridDynamics_hdrs}) -target_link_libraries(hybridDynamics dart) +target_link_libraries(hybridDynamics dart dart-gui) set_target_properties(hybridDynamics PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/hybridDynamics/MyWindow.h b/apps/hybridDynamics/MyWindow.h index 1876a2ff6e8f6..a1c7bf7716a38 100644 --- a/apps/hybridDynamics/MyWindow.h +++ b/apps/hybridDynamics/MyWindow.h @@ -38,6 +38,7 @@ #define APPS_HYBRIDDYNAMICS_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" /// \brief class MyWindow : public dart::gui::SimWindow diff --git a/apps/jointConstraints/CMakeLists.txt b/apps/jointConstraints/CMakeLists.txt index 98e457869abd0..76a2f2d6c2cfa 100644 --- a/apps/jointConstraints/CMakeLists.txt +++ b/apps/jointConstraints/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB jointConstraints_srcs "*.cpp") file(GLOB jointConstraints_hdrs "*.h") add_executable(jointConstraints ${jointConstraints_srcs} ${jointConstraints_hdrs}) -target_link_libraries(jointConstraints dart) +target_link_libraries(jointConstraints dart dart-gui) set_target_properties(jointConstraints PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/jointConstraints/Main.cpp b/apps/jointConstraints/Main.cpp index 67cdc3d5b0ec9..866916cab7159 100644 --- a/apps/jointConstraints/Main.cpp +++ b/apps/jointConstraints/Main.cpp @@ -39,6 +39,7 @@ #include #include "dart/dart.h" +#include "dart/gui/gui.h" using namespace dart; using namespace dynamics; diff --git a/apps/jointConstraints/MyWindow.h b/apps/jointConstraints/MyWindow.h index b75000e684224..98c25d07a0e37 100644 --- a/apps/jointConstraints/MyWindow.h +++ b/apps/jointConstraints/MyWindow.h @@ -43,6 +43,7 @@ #include "apps/jointConstraints/Controller.h" #include "dart/dart.h" +#include "dart/gui/gui.h" class MyWindow : public dart::gui::SimWindow { diff --git a/apps/mixedChain/CMakeLists.txt b/apps/mixedChain/CMakeLists.txt index f9a4767f987fd..97c2d83bf88db 100644 --- a/apps/mixedChain/CMakeLists.txt +++ b/apps/mixedChain/CMakeLists.txt @@ -4,5 +4,5 @@ set(APP_NAME mixedChain) file(GLOB ${APP_NAME}_srcs "*.cpp") file(GLOB ${APP_NAME}_hdrs "*.h") add_executable(${APP_NAME} ${${APP_NAME}_srcs} ${${APP_NAME}_hdrs}) -target_link_libraries(${APP_NAME} dart) +target_link_libraries(${APP_NAME} dart dart-gui) set_target_properties(${APP_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/mixedChain/MyWindow.h b/apps/mixedChain/MyWindow.h index 4f678a568172f..028d2e7fc919f 100644 --- a/apps/mixedChain/MyWindow.h +++ b/apps/mixedChain/MyWindow.h @@ -44,6 +44,7 @@ #define APPS_TESTDROP_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" /// \brief class MyWindow : public dart::gui::SoftSimWindow diff --git a/apps/operationalSpaceControl/CMakeLists.txt b/apps/operationalSpaceControl/CMakeLists.txt index 5bb78453a0016..d7faed39593f2 100644 --- a/apps/operationalSpaceControl/CMakeLists.txt +++ b/apps/operationalSpaceControl/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB operationalSpaceControl_srcs "*.cpp") file(GLOB operationalSpaceControl_hdrs "*.h") add_executable(operationalSpaceControl ${operationalSpaceControl_srcs} ${operationalSpaceControl_hdrs}) -target_link_libraries(operationalSpaceControl dart) +target_link_libraries(operationalSpaceControl dart dart-gui dart-utils-urdf) set_target_properties(operationalSpaceControl PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/operationalSpaceControl/MyWindow.h b/apps/operationalSpaceControl/MyWindow.h index 0b95668c44a6e..38462c291409a 100644 --- a/apps/operationalSpaceControl/MyWindow.h +++ b/apps/operationalSpaceControl/MyWindow.h @@ -38,6 +38,7 @@ #define APPS_OPERATIONALSPACECONTROL_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" #include "Controller.h" diff --git a/apps/rigidChain/CMakeLists.txt b/apps/rigidChain/CMakeLists.txt index c46ac37d24996..94393a6d58c55 100644 --- a/apps/rigidChain/CMakeLists.txt +++ b/apps/rigidChain/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB rigidChain_srcs "*.cpp") file(GLOB rigidChain_hdrs "*.h") add_executable(rigidChain ${rigidChain_srcs} ${rigidChain_hdrs}) -target_link_libraries(rigidChain dart) +target_link_libraries(rigidChain dart dart-gui) set_target_properties(rigidChain PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/rigidChain/MyWindow.h b/apps/rigidChain/MyWindow.h index 9591a0f9bfb1b..9eaebabbd73d7 100644 --- a/apps/rigidChain/MyWindow.h +++ b/apps/rigidChain/MyWindow.h @@ -39,6 +39,7 @@ #define APPS_FORWARDSIM_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" class MyWindow : public dart::gui::SimWindow { public: diff --git a/apps/rigidCubes/CMakeLists.txt b/apps/rigidCubes/CMakeLists.txt index 50adc99f7632c..fe231e4b0edfa 100644 --- a/apps/rigidCubes/CMakeLists.txt +++ b/apps/rigidCubes/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB rigidCubes_srcs "*.cpp") file(GLOB rigidCubes_hdrs "*.h") add_executable(rigidCubes ${rigidCubes_srcs} ${rigidCubes_hdrs}) -target_link_libraries(rigidCubes dart) +target_link_libraries(rigidCubes dart dart-gui) set_target_properties(rigidCubes PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/rigidCubes/MyWindow.h b/apps/rigidCubes/MyWindow.h index dc09b2aebf788..777151321cdc7 100644 --- a/apps/rigidCubes/MyWindow.h +++ b/apps/rigidCubes/MyWindow.h @@ -39,6 +39,7 @@ #define APPS_CUBES_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" /// \brief class MyWindow : public dart::gui::SimWindow { diff --git a/apps/rigidLoop/CMakeLists.txt b/apps/rigidLoop/CMakeLists.txt index 6ef9f0c7d5286..c1b0b31faac87 100644 --- a/apps/rigidLoop/CMakeLists.txt +++ b/apps/rigidLoop/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB rigidLoop_srcs "*.cpp") file(GLOB rigidLoop_hdrs "*.h") add_executable(rigidLoop ${rigidLoop_srcs} ${rigidLoop_hdrs}) -target_link_libraries(rigidLoop dart) +target_link_libraries(rigidLoop dart dart-gui) set_target_properties(rigidLoop PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/rigidLoop/MyWindow.h b/apps/rigidLoop/MyWindow.h index 5621a8ba1eb01..37a2233ae4c18 100644 --- a/apps/rigidLoop/MyWindow.h +++ b/apps/rigidLoop/MyWindow.h @@ -38,6 +38,7 @@ #define APPS_CLOSEDLOOP_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" class MyWindow : public dart::gui::SimWindow { diff --git a/apps/rigidShapes/CMakeLists.txt b/apps/rigidShapes/CMakeLists.txt index d9815c2e25cb7..3ecb6b7f372f9 100644 --- a/apps/rigidShapes/CMakeLists.txt +++ b/apps/rigidShapes/CMakeLists.txt @@ -4,5 +4,5 @@ set(APP_NAME rigidShapes) file(GLOB ${APP_NAME}_srcs "*.cpp") file(GLOB ${APP_NAME}_hdrs "*.h") add_executable(${APP_NAME} ${${APP_NAME}_srcs} ${${APP_NAME}_hdrs}) -target_link_libraries(${APP_NAME} dart) +target_link_libraries(${APP_NAME} dart dart-gui) set_target_properties(${APP_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/rigidShapes/MyWindow.h b/apps/rigidShapes/MyWindow.h index 3bbfa44fdb849..7bccbadd64189 100644 --- a/apps/rigidShapes/MyWindow.h +++ b/apps/rigidShapes/MyWindow.h @@ -44,6 +44,7 @@ #define APPS_RIGIDSHAPES_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" /// MyWindow class MyWindow : public dart::gui::SimWindow diff --git a/apps/simpleFrames/CMakeLists.txt b/apps/simpleFrames/CMakeLists.txt index 62080979bab54..232b4c4c59ab1 100644 --- a/apps/simpleFrames/CMakeLists.txt +++ b/apps/simpleFrames/CMakeLists.txt @@ -4,5 +4,5 @@ set(APP_NAME simpleFrames) file(GLOB ${APP_NAME}_srcs "*.cpp") file(GLOB ${APP_NAME}_hdrs "*.h") add_executable(${APP_NAME} ${${APP_NAME}_srcs} ${${APP_NAME}_hdrs}) -target_link_libraries(${APP_NAME} dart) +target_link_libraries(${APP_NAME} dart dart-gui) set_target_properties(${APP_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/simpleFrames/Main.cpp b/apps/simpleFrames/Main.cpp index d02b29a69bfcc..7fd234a32648b 100644 --- a/apps/simpleFrames/Main.cpp +++ b/apps/simpleFrames/Main.cpp @@ -35,6 +35,7 @@ */ #include "dart/dart.h" +#include "dart/gui/gui.h" using namespace dart::dynamics; diff --git a/apps/softBodies/CMakeLists.txt b/apps/softBodies/CMakeLists.txt index c546afac4bad4..f1f3d40f30463 100644 --- a/apps/softBodies/CMakeLists.txt +++ b/apps/softBodies/CMakeLists.txt @@ -4,5 +4,5 @@ set(APP_NAME softBodies) file(GLOB ${APP_NAME}_srcs "*.cpp") file(GLOB ${APP_NAME}_hdrs "*.h") add_executable(${APP_NAME} ${${APP_NAME}_srcs} ${${APP_NAME}_hdrs}) -target_link_libraries(${APP_NAME} dart) +target_link_libraries(${APP_NAME} dart dart-gui) set_target_properties(${APP_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/softBodies/MyWindow.h b/apps/softBodies/MyWindow.h index 70393057666f5..5243d38e87c98 100644 --- a/apps/softBodies/MyWindow.h +++ b/apps/softBodies/MyWindow.h @@ -44,6 +44,7 @@ #define APPS_SOFTBODIES_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" /// \brief class MyWindow : public dart::gui::SoftSimWindow diff --git a/apps/speedTest/CMakeLists.txt b/apps/speedTest/CMakeLists.txt index cf836cf0e3c2e..4f73e2967ae18 100644 --- a/apps/speedTest/CMakeLists.txt +++ b/apps/speedTest/CMakeLists.txt @@ -6,5 +6,5 @@ get_filename_component(app_name ${CMAKE_CURRENT_LIST_DIR} NAME) file(GLOB ${app_name}_srcs "*.cpp" "*.h" "*.hpp") add_executable(${app_name} ${${app_name}_srcs}) -target_link_libraries(${app_name} dart) +target_link_libraries(${app_name} dart dart-gui) set_target_properties(${app_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/speedTest/Main.cpp b/apps/speedTest/Main.cpp index fb07ebf69feb1..ef72aceb3ec7b 100644 --- a/apps/speedTest/Main.cpp +++ b/apps/speedTest/Main.cpp @@ -39,6 +39,7 @@ #include #include "dart/dart.h" +#include "dart/utils/utils.h" double testForwardKinematicSpeed(dart::dynamics::SkeletonPtr skel, bool position=true, diff --git a/apps/vehicle/CMakeLists.txt b/apps/vehicle/CMakeLists.txt index b8eb47fa5a555..2fc5753715964 100644 --- a/apps/vehicle/CMakeLists.txt +++ b/apps/vehicle/CMakeLists.txt @@ -3,5 +3,5 @@ file(GLOB vehicle_srcs "*.cpp") file(GLOB vehicle_hdrs "*.h") add_executable(vehicle ${vehicle_srcs} ${vehicle_hdrs}) -target_link_libraries(vehicle dart) +target_link_libraries(vehicle dart dart-gui) set_target_properties(vehicle PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") diff --git a/apps/vehicle/MyWindow.h b/apps/vehicle/MyWindow.h index 893daeb88cfa4..ec97e6b4186d6 100644 --- a/apps/vehicle/MyWindow.h +++ b/apps/vehicle/MyWindow.h @@ -39,6 +39,7 @@ #define APPS_VEHICLE_MYWINDOW_H_ #include "dart/dart.h" +#include "dart/gui/gui.h" /// \brief class MyWindow : public dart::gui::SimWindow { diff --git a/appveyor.yml b/appveyor.yml index fec6ee9dabdfd..d77e9e85ac8ac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,9 +16,6 @@ environment: BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib32-msvc-14.0 BUILD_EXAMPLES: OFF # don't build examples to not exceed allowed build time (40 min) BUILD_TUTORIALS: OFF # don't build tutorials to not exceed allowed build time (40 min) - matrix: - - BUILD_CORE_ONLY: ON - - BUILD_CORE_ONLY: OFF # build configuration, i.e. Debug, Release, etc. configuration: @@ -55,7 +52,7 @@ before_build: # We generate project files for Visual Studio 12 because the boost binaries installed on the test server are for Visual Studio 12. - cmd: if "%platform%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 - cmd: if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64 - - cmd: cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%configuration% -DBUILD_CORE_ONLY="%BUILD_CORE_ONLY%" -DDART_BUILD_EXAMPLES="%BUILD_EXAMPLES%" -DDART_BUILD_TUTORIALS="%BUILD_TUTORIALS%" -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DBoost_USE_STATIC_LIBS="ON" -Durdfdom_DIR="%urdfdom_DIR%" -Durdfdom_headers_DIR="%urdfdom_headers_DIR%" -DDART_MSVC_DEFAULT_OPTIONS="%MSVC_DEFAULT_OPTIONS%" .. + - cmd: cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%configuration% -DDART_BUILD_EXAMPLES="%BUILD_EXAMPLES%" -DDART_BUILD_TUTORIALS="%BUILD_TUTORIALS%" -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DBoost_USE_STATIC_LIBS="ON" -Durdfdom_DIR="%urdfdom_DIR%" -Durdfdom_headers_DIR="%urdfdom_headers_DIR%" -DDART_MSVC_DEFAULT_OPTIONS="%MSVC_DEFAULT_OPTIONS%" .. build: off #build: diff --git a/ci/before_install_linux.sh b/ci/before_install_linux.sh index e11ada7490fbe..4b0410dc550b5 100755 --- a/ci/before_install_linux.sh +++ b/ci/before_install_linux.sh @@ -3,16 +3,13 @@ sudo apt-add-repository --yes ppa:fcl-debs/ppa sudo apt-add-repository --yes ppa:dartsim/ppa sudo apt-get -qq update -APT_CORE=' +APT=' cmake libassimp-dev libboost-all-dev libccd-dev libeigen3-dev libfcl-dev -' - -APT=$APT_CORE' freeglut3-dev libxi-dev libxmu-dev @@ -26,11 +23,4 @@ liburdfdom-headers-dev libopenscenegraph-dev ' -if [ $BUILD_CORE_ONLY = OFF ]; then - sudo apt-get -qq --yes --force-yes install $APT -else - sudo apt-get -qq --yes --force-yes install $APT_CORE -fi - -sudo apt-get -qq --yes install lcov curl - +sudo apt-get -qq --yes --force-yes install $APT diff --git a/ci/before_install_osx.sh b/ci/before_install_osx.sh index 3a3357142d204..e261b48b61927 100755 --- a/ci/before_install_osx.sh +++ b/ci/before_install_osx.sh @@ -20,7 +20,7 @@ ipopt ros/deps/urdfdom ros/deps/urdfdom_headers ros/deps/console_bridge -ros/deps/gtest +open-scene-graph ' brew install $PACKAGES | grep -v '%$' diff --git a/ci/script_linux.sh b/ci/script_linux.sh index 3bb1e233760b7..d9356f6bd0ef7 100755 --- a/ci/script_linux.sh +++ b/ci/script_linux.sh @@ -1,8 +1,5 @@ make if [ $COVERALLS = ON ]; then make coveralls; fi sudo ldconfig --verbose # So the test executeables can detect libtinyxml2 -if [ $BUILD_CORE_ONLY = OFF ]; then make test; fi -# cd tools/ -# ./code_check.sh -# ./abi_check.sh 4.1.0 # Check with DART 4.1.0 +make test diff --git a/ci/script_osx.sh b/ci/script_osx.sh index 844bb27946b13..254fb65e5ba94 100755 --- a/ci/script_osx.sh +++ b/ci/script_osx.sh @@ -1,5 +1,2 @@ make -if [ $BUILD_CORE_ONLY = OFF ]; then make test; fi -# cd tools/ -# ./code_check.sh -# ./abi_check.sh 4.1.0 # Check with DART 4.1.0 \ No newline at end of file +make test diff --git a/cmake/DARTCoreConfig.cmake.in b/cmake/DARTCoreConfig.cmake.in deleted file mode 100644 index b343fe5295000..0000000000000 --- a/cmake/DARTCoreConfig.cmake.in +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################### -# Config file for DARTCore -# -# This sets the following variables: -# DARTCore_INCLUDE_DIRS - Directories containing the DART include files. -# DARTCore_LIBRARIES - Libraries needed to use DART. -# DARTCore_LIBRARY_DIRS - Directories that contain the DART libraries. -# DARTCore_VERSION - DART version. - -#=============================================================================== -# DARTCore_INCLUDE_DIRS -#=============================================================================== -set(DARTCore_INCLUDE_DIRS - "@CMAKE_INSTALL_PREFIX@/include" - "@EIGEN3_INCLUDE_DIRS@" - "@BULLET_INCLUDE_DIRS@") - -#=============================================================================== -# DARTCore_LIBRARY_DIRS -#=============================================================================== -set(DARTCore_LIBRARY_DIRS "@CMAKE_INSTALL_PREFIX@/lib" "@Boost_LIBRARY_DIRS@") - -#=============================================================================== -# DARTCore_LIBRARIES -#=============================================================================== -get_filename_component(CURRENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -include("${CURRENT_DIR}/DARTCoreTargets.cmake") -# Return absolute path of the library instead of just library name as -# recommended in CMake documentation: -# http://www.cmake.org/cmake/help/v3.0/command/link_directories.html -find_library(dart_core_location - NAMES "dart-core" - PATHS "@CMAKE_INSTALL_PREFIX@/lib") -set(DARTCore_LIBRARIES "${dart_core_location}") - -#=============================================================================== -# DARTCore_VERSION -#=============================================================================== -set(DARTCore_VERSION @DART_VERSION@) diff --git a/cmake/DARTFindDependencies.cmake b/cmake/DARTFindDependencies.cmake new file mode 100644 index 0000000000000..dcefd58ed5d55 --- /dev/null +++ b/cmake/DARTFindDependencies.cmake @@ -0,0 +1,283 @@ + +# If you add a dependency, please add the corresponding rosdep key as a +# dependency in package.xml. + +#------------------------ +# Mandatory dependencies +#------------------------ +message(STATUS "") +message(STATUS "[ Mandatory dependencies ]") + +# Eigen +find_package(EIGEN3 3.0.5 QUIET) +if(EIGEN3_FOUND) + message(STATUS "Looking for EIGEN3 - ${EIGEN3_VERSION} found") +else() + message(SEND_ERROR "Looking for EIGEN3 - NOT found, please install libeigen3-dev (>= 3.0.5)") +endif() + +# CCD +find_package(CCD 1.4.0 QUIET) +if(CCD_FOUND) + message(STATUS "Looking for CCD - ${CCD_VERSION} found") +else() + message(SEND_ERROR "Looking for CCD - NOT found, please install libccd-dev (>= 1.4.0)") +endif() + +# FCL +# TODO: We need to increate the minimum required fcl version to 0.4.0 for DART +# 5.0 once fcl 0.4.0 is released. +find_package(FCL 0.2.9 QUIET) +if(FCL_FOUND) + message(STATUS "Looking for FCL - ${FCL_VERSION} found") + if(FCL_VERSION) + if("${FCL_VERSION}" VERSION_LESS "0.4.0") + message(WARNING + "Found FCL version ${FCL_VERSION}, which is older than 0.4.0. FCL" + " versions predating 0.4.0 return incorrect contacts for" + " primitive-primitive collsions. You should use FCLMeshCollisionDetector" + " instead of FCLCollisionDetector if you need accurate contacts." + ) + set(DART_USE_FCLMESHCOLLISIONDETECTOR TRUE) + else() + set(DART_USE_FCLMESHCOLLISIONDETECTOR FALSE) + endif() + endif() +else() + message(SEND_ERROR "Looking for FCL - NOT found, please install libfcl-dev (>= 0.2.9)") +endif() + +# ASSIMP +find_package(ASSIMP 3.0.0 QUIET) +if(ASSIMP_FOUND) + message(STATUS "Looking for ASSIMP - ${ASSIMP_VERSION} found") + + # Check for missing symbols in ASSIMP (see #451) + include(CheckCXXSourceCompiles) + set(CMAKE_REQUIRED_INCLUDES ${ASSIMP_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${ASSIMP_LIBRARIES}) + set(CMAKE_REQUIRED_QUIET TRUE) + + check_cxx_source_compiles( + " + #include + int main() + { + aiScene* scene = new aiScene; + delete scene; + return 1; + } + " + ASSIMP_AISCENE_CTOR_DTOR_DEFINED) + + if(NOT ASSIMP_AISCENE_CTOR_DTOR_DEFINED) + message(WARNING "The installed version of ASSIMP (${ASSIMP_VERSION}) is " + "missing symbols for the constructor and/or destructor of " + "aiScene. DART will use its own implementations of these " + "functions. We recommend using a version of ASSIMP that " + "does not have this issue, once one becomes available.") + endif(NOT ASSIMP_AISCENE_CTOR_DTOR_DEFINED) + + check_cxx_source_compiles( + " + #include + int main() + { + aiMaterial* material = new aiMaterial; + delete material; + return 1; + } + " + ASSIMP_AIMATERIAL_CTOR_DTOR_DEFINED) + + if(NOT ASSIMP_AIMATERIAL_CTOR_DTOR_DEFINED) + message(WARNING "The installed version of ASSIMP (${ASSIMP_VERSION}) is " + "missing symbols for the constructor and/or destructor of " + "aiMaterial. DART will use its own implementations of " + "these functions. We recommend using a version of ASSIMP " + "that does not have this issue, once one becomes available.") + endif(NOT ASSIMP_AIMATERIAL_CTOR_DTOR_DEFINED) + + unset(CMAKE_REQUIRED_INCLUDES) + unset(CMAKE_REQUIRED_LIBRARIES) + unset(CMAKE_REQUIRED_QUIET) + +else() + message(SEND_ERROR "Looking for ASSIMP - NOT found, please install libassimp-dev (>= 3.0.0)") +endif() + +# OpenGL +find_package(OpenGL QUIET) +if(OPENGL_FOUND) + message(STATUS "Looking for OpenGL - found") +else() + message(SEND_ERROR "Looking for OpenGL - NOT found, please install OpenGL") +endif() + +# Boost +set(DART_MIN_BOOST_VERSION 1.46.0 CACHE INTERNAL "Boost min version requirement" FORCE) +if(MSVC) + add_definitions(-DBOOST_ALL_NO_LIB) +endif() +add_definitions(-DBOOST_TEST_DYN_LINK) +set(Boost_USE_MULTITHREADED ON) +set(Boost_USE_STATIC_RUNTIME OFF) +find_package(Boost ${DART_MIN_BOOST_VERSION} COMPONENTS regex system QUIET) +if(Boost_FOUND) + message(STATUS "Looking for Boost - ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} found") +else() + message(SEND_ERROR "Please install system boost version ${DART_MIN_BOOST_VERSION} or higher.") +endif() + +#----------------------- +# Optional dependencies +#----------------------- +message(STATUS "") +message(STATUS "[ Optional dependencies ]") + +# FLANN +find_package(FLANN 1.8.4 QUIET) +if(FLANN_FOUND) + message(STATUS "Looking for FLANN - ${FLANN_VERSION} found") +else() + message(SEND_ERROR "Looking for FLANN - NOT found, please install libflann-dev (>= 1.8.4)") +endif() + +# TINYXML +find_package(TINYXML 2.6.2 QUIET) +if(TINYXML_FOUND) + message(STATUS "Looking for TINYXML - ${TINYXML_VERSION} found") +else() + message(SEND_ERROR "Looking for TINYXML - NOT found, please install libtinyxml-dev (>= 2.6.2)") +endif() + +# TINYXML2 +find_package(TINYXML2 QUIET) +if(TINYXML2_FOUND) + message(STATUS "Looking for TINYXML2 - ${TINYXML2_VERSION} found") +else() + message(SEND_ERROR "Looking for TINYXML2 - NOT found, please install libtinyxml2-dev (>= 1.0.1)") +endif() + +# urdfdom +find_package(urdfdom QUIET) +if(urdfdom_FOUND) + message(STATUS "Looking for urdfdom - found") +else() + message(SEND_ERROR "Looking for urdfdom - NOT found, please install liburdfdom-dev") +endif() +if(MSVC) + set(urdfdom_LIBRARIES optimized urdfdom_sensor debug urdfdom_sensord + optimized urdfdom_model_state debug urdfdom_model_stated + optimized urdfdom_model debug urdfdom_modeld + optimized urdfdom_world debug urdfdom_worldd + optimized console_bridge debug console_bridged) +endif() + +# GLUT +if(WIN32 AND NOT CYGWIN) + set(GLUT_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include") + set(GLUT_LIBRARIES glut32) +else() + find_package(GLUT QUIET) + if(GLUT_FOUND) + message(STATUS "Looking for GLUT - found") + set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY}) + else() + message(SEND_ERROR "Looking for GLUT - NOT found, Please install freeglut3-dev") + endif() +endif() + +# OpenSceneGraph +find_package(OpenSceneGraph 3.0 QUIET + COMPONENTS osg osgViewer osgManipulator osgGA osgDB) +if(OPENSCENEGRAPH_FOUND) + message(STATUS "Looking for OpenSceneGraph -- ${OPENSCENEGRAPH_VERSION} found") + set(HAVE_OPENSCENEGRAPH TRUE) +else(OPENSCENEGRAPH_FOUND) + # kido-gui-osg requires both OSG and OpenThreads. This section attempts to + # identify which of those are missing from the building machine and offer + # advice to the user for getting osgKido to build. + find_package(OpenThreads QUIET) + if(OPENTHREADS_FOUND) + set(warning_msg "Could NOT find OpenSceneGraph") + else(OPENTHREADS_FOUND) + if(OSG_LIBRARY) + set(warning_msg "Could NOT find OpenThreads") + else(OSG_LIBRARY) + set(warning_msg "Could NOT find OpenSceneGraph nor OpenThreads") + endif(OSG_LIBRARY) + endif(OPENTHREADS_FOUND) + message(WARNING "${warning_msg} -- we will skip kido-gui-osg\n" + "If you believe you do have both OSG and OpenThreads installed, try setting OSG_DIR") + set(HAVE_OPENSCENEGRAPH FALSE) +endif(OPENSCENEGRAPH_FOUND) + +# OpenMP +if(ENABLE_OPENMP) + find_package(OpenMP QUIET) + if(OPENMP_FOUND) + message(STATUS "Looking for OpenMP - found") + else() + message(STATUS "Looking for OpenMP - NOT found") + endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +endif() + +# NLOPT +find_package(NLOPT 2.4.1 QUIET) +if(NLOPT_FOUND) + message(STATUS "Looking for NLOPT - ${NLOPT_VERSION} found") + set(HAVE_NLOPT TRUE) +else() + message(STATUS "Looking for NLOPT - NOT found, please install libnlopt-dev (>= 2.4.1)") + set(HAVE_NLOPT FALSE) +endif() + +# IPOPT +find_package(IPOPT 3.11.4 QUIET) +if(IPOPT_FOUND) + message(STATUS "Looking for IPOPT - ${IPOPT_VERSION} found") + set(HAVE_IPOPT TRUE) +else() + message(STATUS "Looking for IPOPT - NOT found, please install coinor-libipopt-dev (>= 3.11.4)") + set(HAVE_IPOPT FALSE) +endif() + +# Shark +find_package(SHARK QUIET) +if(SHARK_FOUND) + message(STATUS "Looking for SHARK - ${SHARK_VERSION} found") + set(HAVE_SHARK TRUE) +else() + message(STATUS "Looking for SHARK - NOT found, please install SHARK (http://image.diku.dk/shark)") + set(HAVE_SHARK FALSE) +endif() + +# BulletCollision +find_package(Bullet COMPONENTS BulletMath BulletCollision QUIET) + +if(BULLET_FOUND) + message(STATUS "Looking for BulletCollision - ${BULLET_VERSION} found") + set(HAVE_BULLET_COLLISION TRUE) + add_definitions(-DHAVE_BULLET_COLLISION) +else() + message(STATUS "Looking for BulletCollision - NOT found, please install libbullet-dev") + set(HAVE_BULLET_COLLISION FALSE) +endif() + +# Perl modules +find_package(PerlModules COMPONENTS Regexp::Common Getopt::ArgvFile Getopt::Long Term::ANSIColor QUIET) +if("${PERLMODULES_FOUND}" STREQUAL "TRUE") + message(STATUS "Looking for PerlModules - found") +else() + message(STATUS "Looking for PerlModules - NOT found, please install Regexp::Common Getopt::ArgvFile Getopt::Long Term::ANSIColor (http://www.cpan.org/modules/INSTALL.html)") +endif() + +# Doxygen +find_package(Doxygen QUIET) +if(DOXYGEN_FOUND) + message(STATUS "Looking for Doxygen - found") +else() + message(STATUS "Looking for Doxygen - NOT found, please install doxygen") +endif() diff --git a/dart/CMakeLists.txt b/dart/CMakeLists.txt index c118755fed9b4..a4e19a2328787 100644 --- a/dart/CMakeLists.txt +++ b/dart/CMakeLists.txt @@ -19,16 +19,23 @@ add_subdirectory(lcpsolver) add_subdirectory(math) add_subdirectory(renderer) add_subdirectory(simulation) -if(NOT BUILD_CORE_ONLY) - add_subdirectory(gui) + +if(FLANN_FOUND) add_subdirectory(planning) +endif() + +if(GLUT_FOUND) + add_subdirectory(gui) +endif() + +if(TINYXML_FOUND AND TINYXML2_FOUND AND urdfdom_FOUND) add_subdirectory(utils) endif() # Set header and source files -get_filename_component(dart_core_h "dart-core.h" ABSOLUTE) -set(dart_core_hdrs - ${dart_core_h} +get_filename_component(dart_h "dart.h" ABSOLUTE) +set(dart_hdrs + ${dart_h} ${dart_common_hdrs} ${dart_math_hdrs} ${dart_integration_hdrs} @@ -40,7 +47,7 @@ set(dart_core_hdrs ${dart_renderer_hdrs} ${dart_simulation_hdrs} ) -set(dart_core_srcs +set(dart_srcs ${dart_common_srcs} ${dart_math_srcs} ${dart_integration_srcs} @@ -52,30 +59,10 @@ set(dart_core_srcs ${dart_renderer_srcs} ${dart_simulation_srcs} ) -if(NOT BUILD_CORE_ONLY) - get_filename_component(dart_h "dart.h" ABSOLUTE) - set(dart_hdrs - ${dart_h} - ${dart_gui_hdrs} - ${dart_planning_hdrs} - ${dart_utils_hdrs} - ) - set(dart_srcs - ${dart_gui_srcs} - ${dart_planning_srcs} - ${dart_utils_srcs} - ) -endif() - -# Library: dart-core -dart_add_library(dart-core ${dart_core_hdrs} ${dart_core_srcs}) -target_link_libraries(dart-core ${DART_CORE_DEPENDENCIES}) # Library: dart -if(NOT BUILD_CORE_ONLY) - dart_add_library(dart ${dart_hdrs} ${dart_srcs}) - target_link_libraries(dart dart-core ${DART_DEPENDENCIES}) -endif() +dart_add_library(dart ${dart_hdrs} ${dart_srcs}) +target_link_libraries(dart ${DART_DEPENDENCIES}) if(MSVC) set_target_properties( @@ -84,22 +71,12 @@ if(MSVC) ) endif() -#install(FILES ${dart_core_hdrs} DESTINATION include/dart/ COMPONENT headers) -install(FILES dart-core.h DESTINATION include/dart/ COMPONENT headers) -install(TARGETS dart-core EXPORT DARTCoreTargets DESTINATION lib) -if(NOT BUILD_CORE_ONLY) -# install(FILES ${dart_hdrs} DESTINATION include/dart/ COMPONENT headers) - install(FILES dart.h DESTINATION include/dart/ COMPONENT headers) - install(TARGETS dart-core dart EXPORT DARTTargets DESTINATION lib) -endif() +install(FILES dart.h DESTINATION include/dart/ COMPONENT headers) +install(TARGETS dart EXPORT DARTTargets DESTINATION lib) # Setup the coveralls target and tell it to gather # coverage data for all the lib sources. if(DART_COVERALLS) - if(BUILD_CORE_ONLY) - message(SEND_ERROR "'BUILD_CORE_ONLY' option is 'on'. This option should be 'off' when 'DART_COVERALLS' option is 'on'.") - endif() - coveralls_setup("${dart_core_hdrs};${dart_core_srcs};${dart_hdrs};${dart_srcs}" ${DART_COVERALLS_UPLOAD}) + coveralls_setup("${dart_hdrs};${dart_srcs}" ${DART_COVERALLS_UPLOAD}) endif() - - +# TODO(JS): Collect all the headers and sources to pass it to coverage setup function diff --git a/dart/collision/CMakeLists.txt b/dart/collision/CMakeLists.txt index e80d01296c9d7..8e6cc9bdaa73e 100644 --- a/dart/collision/CMakeLists.txt +++ b/dart/collision/CMakeLists.txt @@ -14,20 +14,6 @@ endif() set(dart_collision_hdrs ${hdrs} "${dart_collision_hdrs};${detail_hdrs}" PARENT_SCOPE) set(dart_collision_srcs ${srcs} "${dart_collision_srcs};${detail_srcs}" PARENT_SCOPE) -# Library -#dart_add_library(dart_collision ${srcs} ${hdrs}) -#target_link_libraries( -# dart_collision -# dart_common -# dart_math -# dart_collision_dart -# dart_collision_fcl -# ${DART_CORE_DEPENDENCIES} -#) -#if(HAVE_BULLET_COLLISION) -# target_link_libraries(dart_collision dart_collision_bullet) -#endif() - # Generate header for this namespace dart_get_filename_components(header_names "collision headers" ${hdrs}) set( @@ -56,5 +42,3 @@ install( DESTINATION include/dart/collision COMPONENT headers ) -#install(TARGETS dart_collision EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_collision EXPORT DARTTargets DESTINATION lib) diff --git a/dart/collision/bullet/CMakeLists.txt b/dart/collision/bullet/CMakeLists.txt index 740f6a4e9ff7b..79e757aa74557 100644 --- a/dart/collision/bullet/CMakeLists.txt +++ b/dart/collision/bullet/CMakeLists.txt @@ -5,10 +5,6 @@ file(GLOB hdrs "*.h") set(dart_collision_hdrs ${dart_collision_hdrs} ${hdrs} PARENT_SCOPE) set(dart_collision_srcs ${dart_collision_srcs} ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_collision_bullet ${srcs} ${hdrs}) -#target_link_libraries(dart_collision_bullet ${DART_CORE_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "collision_bullet headers" ${hdrs}) dart_generate_include_header_list( @@ -28,6 +24,3 @@ install( DESTINATION include/dart/collision/bullet COMPONENT headers ) -#install(TARGETS dart_collision_bullet EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_collision_bullet EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/collision/dart/CMakeLists.txt b/dart/collision/dart/CMakeLists.txt index bb8971db1f137..fd07bf4083274 100644 --- a/dart/collision/dart/CMakeLists.txt +++ b/dart/collision/dart/CMakeLists.txt @@ -5,10 +5,6 @@ file(GLOB hdrs "*.h") set(dart_collision_hdrs ${dart_collision_hdrs} ${hdrs} PARENT_SCOPE) set(dart_collision_srcs ${dart_collision_srcs} ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_collision_dart ${srcs} ${hdrs}) -#target_link_libraries(dart_collision_dart ${DART_CORE_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "collision_dart headers" ${hdrs}) dart_generate_include_header_list( @@ -28,6 +24,3 @@ install( DESTINATION include/dart/collision/dart COMPONENT headers ) -#install(TARGETS dart_collision_dart EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_collision_dart EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/collision/fcl/CMakeLists.txt b/dart/collision/fcl/CMakeLists.txt index 2396884fc7ff5..453a8c0e72b1d 100644 --- a/dart/collision/fcl/CMakeLists.txt +++ b/dart/collision/fcl/CMakeLists.txt @@ -5,10 +5,6 @@ file(GLOB hdrs "*.h") set(dart_collision_hdrs ${dart_collision_hdrs} ${hdrs} PARENT_SCOPE) set(dart_collision_srcs ${dart_collision_srcs} ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_collision_fcl ${srcs} ${hdrs}) -#target_link_libraries(dart_collision_fcl ${DART_CORE_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "collision_fcl headers" ${hdrs}) dart_generate_include_header_list( @@ -28,6 +24,3 @@ install( DESTINATION include/dart/collision/fcl COMPONENT headers ) -#install(TARGETS dart_collision_fcl EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_collision_fcl EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/common/CMakeLists.txt b/dart/common/CMakeLists.txt index 616e3ee7b9c42..41c3c9ba32ff3 100644 --- a/dart/common/CMakeLists.txt +++ b/dart/common/CMakeLists.txt @@ -7,10 +7,6 @@ file(GLOB detail_hdrs "detail/*.h") set(dart_common_hdrs "${hdrs};${detail_hdrs}" PARENT_SCOPE) set(dart_common_srcs "${srcs};${detail_srcs}" PARENT_SCOPE) -# Library -#dart_add_library(dart_common ${srcs} ${hdrs}) -#target_link_libraries(dart_common ${DART_CORE_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "common headers" ${hdrs}) dart_generate_include_header_list( @@ -36,7 +32,3 @@ install( DESTINATION include/dart/common/detail COMPONENT headers ) - -#install(TARGETS dart_common EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_common EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/constraint/CMakeLists.txt b/dart/constraint/CMakeLists.txt index 3f8e3ada0d7c3..0f4cb7e63c46f 100644 --- a/dart/constraint/CMakeLists.txt +++ b/dart/constraint/CMakeLists.txt @@ -5,15 +5,6 @@ file(GLOB hdrs "*.h") set(dart_constraint_hdrs ${hdrs} PARENT_SCOPE) set(dart_constraint_srcs ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_constraint ${srcs} ${hdrs}) -#target_link_libraries( -# dart_constraint -# dart_collision -# dart_lcpsolver -# ${DART_CORE_DEPENDENCIES} -#) - # Generate header for this namespace dart_get_filename_components(header_names "constraint headers" ${hdrs}) dart_generate_include_header_list( @@ -33,6 +24,3 @@ install( DESTINATION include/dart/constraint COMPONENT headers ) -#install(TARGETS dart_constraint EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_constraint EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/dart-core.h b/dart/dart-core.h deleted file mode 100644 index db2a5e47d4531..0000000000000 --- a/dart/dart-core.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2015, Georgia Tech Research Corporation - * All rights reserved. - * - * Author(s): Jeongseok Lee - * - * Georgia Tech Graphics Lab and Humanoid Robotics Lab - * - * Directed by Prof. C. Karen Liu and Prof. Mike Stilman - * - * - * This file is provided under the following "BSD-style" License: - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "dart/config.h" -#include "dart/collision/collision.h" -#include "dart/common/common.h" -#include "dart/constraint/constraint.h" -#include "dart/dynamics/dynamics.h" -#include "dart/integration/integration.h" -#include "dart/lcpsolver/lcpsolver.h" -#include "dart/math/math.h" -#include "dart/renderer/renderer.h" -#include "dart/simulation/simulation.h" diff --git a/dart/dart.h b/dart/dart.h index d53f0c83a5e8f..8e073ef67221b 100644 --- a/dart/dart.h +++ b/dart/dart.h @@ -34,8 +34,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "dart/dart-core.h" -#include "dart/gui/gui.h" +#include "dart/config.h" +#include "dart/common/common.h" +#include "dart/math/math.h" +#include "dart/integration/integration.h" +#include "dart/collision/collision.h" +#include "dart/lcpsolver/lcpsolver.h" +#include "dart/constraint/constraint.h" #include "dart/optimizer/optimizer.h" -#include "dart/planning/planning.h" -#include "dart/utils/utils.h" +#include "dart/dynamics/dynamics.h" +#include "dart/renderer/renderer.h" +#include "dart/simulation/simulation.h" diff --git a/dart/dynamics/CMakeLists.txt b/dart/dynamics/CMakeLists.txt index a4b9c174ba4a2..21642c2866f3b 100644 --- a/dart/dynamics/CMakeLists.txt +++ b/dart/dynamics/CMakeLists.txt @@ -6,15 +6,6 @@ file(GLOB detail "detail/*.h") set(dart_dynamics_hdrs "${hdrs};${detail}" PARENT_SCOPE) set(dart_dynamics_srcs ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_dynamics ${srcs} ${hdrs}) -#target_link_libraries( -# dart_dynamics -# dart_common -# dart_math -# ${DART_CORE_DEPENDENCIES} -#) - # Generate header for this namespace dart_get_filename_components(header_names "dynamics headers" ${hdrs}) dart_generate_include_header_list( @@ -40,6 +31,3 @@ install( DESTINATION include/dart/dynamics/detail COMPONENT headers ) - -#install(TARGETS dart_dynamics EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_dynamics EXPORT DARTTargets DESTINATION lib) diff --git a/dart/gui/CMakeLists.txt b/dart/gui/CMakeLists.txt index 39dadcc3526db..dfd07ef2ee86c 100644 --- a/dart/gui/CMakeLists.txt +++ b/dart/gui/CMakeLists.txt @@ -2,22 +2,19 @@ file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") +include_directories(SYSTEM ${GLUT_INCLUDE_DIR}) + # Add subdirectories if(HAVE_OPENSCENEGRAPH) add_subdirectory(osg) endif(HAVE_OPENSCENEGRAPH) -set(dart_gui_hdrs ${dart_gui_hdrs} ${hdrs} PARENT_SCOPE) -set(dart_gui_srcs ${dart_gui_srcs} ${srcs} PARENT_SCOPE) +set(dart_gui_hdrs ${dart_gui_hdrs} ${hdrs}) +set(dart_gui_srcs ${dart_gui_srcs} ${srcs}) # Library -#dart_add_library(dart_gui ${srcs} ${hdrs}) -#target_link_libraries( -# dart_gui -# dart_collision -# dart_simulation -# ${DART_DEPENDENCIES} -#) +dart_add_library(dart-gui ${srcs} ${hdrs}) +target_link_libraries(dart-gui dart-utils ${GLUT_LIBRARY}) # Generate header for this namespace dart_get_filename_components(header_names "gui headers" ${hdrs}) @@ -41,5 +38,4 @@ install( DESTINATION include/dart/gui COMPONENT headers ) -#install(TARGETS dart_gui EXPORT DARTTargets DESTINATION lib) - +install(TARGETS dart-gui EXPORT DARTTargets DESTINATION lib) diff --git a/dart/gui/gui.h.in b/dart/gui/gui.h.in index 3d277d4bde4b0..475eb5d51b177 100644 --- a/dart/gui/gui.h.in +++ b/dart/gui/gui.h.in @@ -1,3 +1,4 @@ // Automatically generated file by cmake +#include "dart/utils/utils.h" ${gui_headers} diff --git a/dart/gui/osg/CMakeLists.txt b/dart/gui/osg/CMakeLists.txt index abce14c1244bd..ca71fd37d4d40 100644 --- a/dart/gui/osg/CMakeLists.txt +++ b/dart/gui/osg/CMakeLists.txt @@ -4,10 +4,14 @@ include_directories(SYSTEM ${OPENSCENEGRAPH_INCLUDE_DIRS}) file(GLOB hdrs "*.h") file(GLOB srcs "*.cpp") +set(dart_gui_osg_hdrs ${hdrs}) +set(dart_gui_osg_srcs ${srcs}) + add_subdirectory(render) -set(dart_gui_hdrs ${dart_gui_hdrs} ${hdrs} PARENT_SCOPE) -set(dart_gui_srcs ${dart_gui_srcs} ${srcs} PARENT_SCOPE) +# Library +dart_add_library(dart-gui-osg ${dart_gui_osg_srcs} ${dart_gui_osg_hdrs}) +target_link_libraries(dart-gui-osg dart-gui ${OPENSCENEGRAPH_LIBRARIES}) # Generate header for this namespace dart_get_filename_components(header_names "gui osg headers" ${hdrs}) @@ -32,4 +36,4 @@ install( DESTINATION include/dart/gui/osg COMPONENT headers ) -#install(TARGETS osgDart EXPORT osgDartTargets DESTINATION lib) +install(TARGETS dart-gui-osg EXPORT DARTTargets DESTINATION lib) diff --git a/dart/gui/osg/examples/CMakeLists.txt b/dart/gui/osg/examples/CMakeLists.txt index 1a36d1b998e9c..5dc8b3fc3e9ff 100644 --- a/dart/gui/osg/examples/CMakeLists.txt +++ b/dart/gui/osg/examples/CMakeLists.txt @@ -9,6 +9,6 @@ foreach(example ${osgdart_examples_src}) get_filename_component(example_base ${example} NAME_WE) message(STATUS "Adding example: " ${example_base}) add_executable(${example_base} ${example}) - target_link_libraries(${example_base} dart osgDart ${OPENSCENEGRAPH_LIBRARIES}) + target_link_libraries(${example_base} dart dart-gui-osg dart-utils-urdf) endforeach(example) diff --git a/dart/gui/osg/examples/osgAtlasPuppet.cpp b/dart/gui/osg/examples/osgAtlasPuppet.cpp index 4cdc9f06815fd..03daf2acf6671 100644 --- a/dart/gui/osg/examples/osgAtlasPuppet.cpp +++ b/dart/gui/osg/examples/osgAtlasPuppet.cpp @@ -34,9 +34,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "dart/gui/osg/osg.h" - -#include "dart/dart.h" +#include +#include +#include using namespace dart::common; using namespace dart::dynamics; diff --git a/dart/gui/osg/examples/osgDragAndDrop.cpp b/dart/gui/osg/examples/osgDragAndDrop.cpp index 9b9028e106570..7b3ab15a687e7 100644 --- a/dart/gui/osg/examples/osgDragAndDrop.cpp +++ b/dart/gui/osg/examples/osgDragAndDrop.cpp @@ -34,9 +34,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "dart/gui/osg/osg.h" - -#include "dart/dart.h" +#include +#include using namespace dart::dynamics; diff --git a/dart/gui/osg/examples/osgHuboPuppet.cpp b/dart/gui/osg/examples/osgHuboPuppet.cpp index 8b242d181e57d..58a5ade626477 100644 --- a/dart/gui/osg/examples/osgHuboPuppet.cpp +++ b/dart/gui/osg/examples/osgHuboPuppet.cpp @@ -35,6 +35,8 @@ */ #include +#include +#include using namespace dart::dynamics; using namespace dart::simulation; diff --git a/dart/gui/osg/examples/osgOperationalSpaceControl.cpp b/dart/gui/osg/examples/osgOperationalSpaceControl.cpp index c4aae41732707..f88ec1e03c324 100644 --- a/dart/gui/osg/examples/osgOperationalSpaceControl.cpp +++ b/dart/gui/osg/examples/osgOperationalSpaceControl.cpp @@ -35,9 +35,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "dart/gui/osg/osg.h" - -#include "dart/dart.h" +#include +#include +#include using namespace dart::common; using namespace dart::dynamics; diff --git a/dart/gui/osg/examples/osgSoftBodies.cpp b/dart/gui/osg/examples/osgSoftBodies.cpp index 4698e5946466f..358be7fdb887d 100644 --- a/dart/gui/osg/examples/osgSoftBodies.cpp +++ b/dart/gui/osg/examples/osgSoftBodies.cpp @@ -35,12 +35,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "dart/dart.h" - -#include "dart/gui/osg/osg.h" - #include +#include +#include +#include + int main() { using namespace dart::dynamics; diff --git a/dart/gui/osg/render/CMakeLists.txt b/dart/gui/osg/render/CMakeLists.txt index 644c59c314537..c03a43ce8775a 100644 --- a/dart/gui/osg/render/CMakeLists.txt +++ b/dart/gui/osg/render/CMakeLists.txt @@ -2,8 +2,8 @@ file(GLOB hdrs "*.h") file(GLOB srcs "*.cpp") -set(dart_gui_hdrs ${dart_gui_hdrs} ${hdrs} PARENT_SCOPE) -set(dart_gui_srcs ${dart_gui_srcs} ${srcs} PARENT_SCOPE) +set(dart_gui_osg_srcs ${dart_gui_osg_srcs} ${srcs} PARENT_SCOPE) +set(dart_gui_osg_hdrs ${dart_gui_osg_hdrs} ${hdrs} PARENT_SCOPE) dart_get_filename_components(header_names "gui osg render headers" ${hdrs}) dart_generate_include_header_list( diff --git a/dart/integration/CMakeLists.txt b/dart/integration/CMakeLists.txt index 0b9f2a33bdf13..0344f49f0a22d 100644 --- a/dart/integration/CMakeLists.txt +++ b/dart/integration/CMakeLists.txt @@ -5,10 +5,6 @@ file(GLOB hdrs "*.h") set(dart_integration_hdrs ${hdrs} PARENT_SCOPE) set(dart_integration_srcs ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_integration ${srcs} ${hdrs}) -#target_link_libraries(dart_integration ${DART_CORE_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "integration headers" ${hdrs}) dart_generate_include_header_list( @@ -28,6 +24,3 @@ install( DESTINATION include/dart/integration COMPONENT headers ) -#install(TARGETS dart_integration EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_integration EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/lcpsolver/CMakeLists.txt b/dart/lcpsolver/CMakeLists.txt index f9422270af334..14d889ffe40e3 100644 --- a/dart/lcpsolver/CMakeLists.txt +++ b/dart/lcpsolver/CMakeLists.txt @@ -5,10 +5,6 @@ file(GLOB hdrs "*.h") set(dart_lcpsolver_hdrs ${hdrs} PARENT_SCOPE) set(dart_lcpsolver_srcs ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_lcpsolver ${srcs} ${hdrs}) -#target_link_libraries(dart_lcpsolver ${DART_CORE_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "lcpsolver headers" ${hdrs}) dart_generate_include_header_list( @@ -28,6 +24,3 @@ install( DESTINATION include/dart/lcpsolver COMPONENT headers ) -#install(TARGETS dart_lcpsolver EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_lcpsolver EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/math/CMakeLists.txt b/dart/math/CMakeLists.txt index 31841b9f0c6e7..4f3f268d489e6 100644 --- a/dart/math/CMakeLists.txt +++ b/dart/math/CMakeLists.txt @@ -5,10 +5,6 @@ file(GLOB hdrs "*.h") set(dart_math_hdrs ${hdrs} PARENT_SCOPE) set(dart_math_srcs ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_math ${srcs} ${hdrs}) -#target_link_libraries(dart_math ${DART_CORE_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "math headers" ${hdrs}) dart_generate_include_header_list( @@ -28,6 +24,3 @@ install( DESTINATION include/dart/math COMPONENT headers ) -#install(TARGETS dart_math EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_math EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/optimizer/CMakeLists.txt b/dart/optimizer/CMakeLists.txt index 09944483e048a..b5145c8d0f173 100644 --- a/dart/optimizer/CMakeLists.txt +++ b/dart/optimizer/CMakeLists.txt @@ -16,24 +16,6 @@ endif() set(dart_optimizer_hdrs ${hdrs} ${dart_optimizer_hdrs} PARENT_SCOPE) set(dart_optimizer_srcs ${srcs} ${dart_optimizer_srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_optimizer ${srcs} ${hdrs}) -#target_link_libraries( -# dart_optimizer -# dart_common -# dart_math -# ${DART_DEPENDENCIES} -#) -#if(HAVE_IPOPT) -# target_link_libraries(dart_optimizer dart_optimizer_ipopt) -#endif() -#if(HAVE_NLOPT) -# target_link_libraries(dart_optimizer dart_optimizer_nlopt) -#endif() -#if(HAVE_SNOPT) -# target_link_libraries(dart_optimizer dart_optimizer_snopt) -#endif() - # Generate header for this namespace dart_get_filename_components(header_names "optimizer headers" ${hdrs}) if(HAVE_IPOPT) @@ -62,5 +44,3 @@ install( DESTINATION include/dart/optimizer COMPONENT headers ) -#install(TARGETS dart_optimizer EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/optimizer/ipopt/CMakeLists.txt b/dart/optimizer/ipopt/CMakeLists.txt index fb03d7fcfc3ac..e4ba6809cb4ef 100644 --- a/dart/optimizer/ipopt/CMakeLists.txt +++ b/dart/optimizer/ipopt/CMakeLists.txt @@ -2,9 +2,11 @@ file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") +include_directories(SYSTEM ${NLOPT_INCLUDE_DIRS}) + # Library dart_add_library(dart-optimizer-ipopt ${srcs} ${hdrs}) -target_link_libraries(dart-optimizer-ipopt dart-core ${IPOPT_LIBRARIES}) +target_link_libraries(dart-optimizer-ipopt dart ${IPOPT_LIBRARIES}) # Generate header for this namespace dart_get_filename_components(header_names "optimizer_ipopt headers" ${hdrs}) @@ -25,7 +27,4 @@ install( DESTINATION include/dart/optimizer/ipopt COMPONENT headers ) -install(TARGETS dart-optimizer-ipopt - EXPORT DARTTargets - DESTINATION lib -) +install(TARGETS dart-optimizer-ipopt EXPORT DARTTargets DESTINATION lib) diff --git a/dart/optimizer/nlopt/CMakeLists.txt b/dart/optimizer/nlopt/CMakeLists.txt index 8a2ea47004a30..fc297bb72eed0 100644 --- a/dart/optimizer/nlopt/CMakeLists.txt +++ b/dart/optimizer/nlopt/CMakeLists.txt @@ -2,9 +2,11 @@ file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") +include_directories(SYSTEM ${IPOPT_INCLUDE_DIRS}) + # Library dart_add_library(dart-optimizer-nlopt ${srcs} ${hdrs}) -target_link_libraries(dart-optimizer-nlopt dart-core ${NLOPT_LIBRARIES}) +target_link_libraries(dart-optimizer-nlopt dart ${NLOPT_LIBRARIES}) # Generate header for this namespace dart_get_filename_components(header_names "optimizer_nlopt headers" ${hdrs}) @@ -25,7 +27,4 @@ install( DESTINATION include/dart/optimizer/nlopt COMPONENT headers ) -install(TARGETS dart-optimizer-nlopt - EXPORT DARTTargets - DESTINATION lib -) +install(TARGETS dart-optimizer-nlopt EXPORT DARTTargets DESTINATION lib) diff --git a/dart/planning/CMakeLists.txt b/dart/planning/CMakeLists.txt index 1e800018eeef2..52fefcdcf034f 100644 --- a/dart/planning/CMakeLists.txt +++ b/dart/planning/CMakeLists.txt @@ -2,12 +2,11 @@ file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") -set(dart_planning_hdrs ${hdrs} PARENT_SCOPE) -set(dart_planning_srcs ${srcs} PARENT_SCOPE) +include_directories(SYSTEM ${FLANN_INCLUDE_DIRS}) # Library -#dart_add_library(dart_planning ${srcs} ${hdrs}) -#target_link_libraries(dart_planning ${DART_DEPENDENCIES}) +dart_add_library(dart-planning ${srcs} ${hdrs}) +target_link_libraries(dart-planning dart ${FLANN_LIBRARIES}) # Generate header for this namespace dart_get_filename_components(header_names "planning headers" ${hdrs}) @@ -28,5 +27,5 @@ install( DESTINATION include/dart/planning COMPONENT headers ) -#install(TARGETS dart_planning EXPORT DARTTargets DESTINATION lib) +install(TARGETS dart-planning EXPORT DARTTargets DESTINATION lib) diff --git a/dart/renderer/CMakeLists.txt b/dart/renderer/CMakeLists.txt index 7a3ca8275fe16..5fa726d47acfa 100644 --- a/dart/renderer/CMakeLists.txt +++ b/dart/renderer/CMakeLists.txt @@ -5,10 +5,6 @@ file(GLOB hdrs "*.h") set(dart_renderer_hdrs ${hdrs} PARENT_SCOPE) set(dart_renderer_srcs ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_renderer ${srcs} ${hdrs}) -#target_link_libraries(dart_renderer ${DART_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "renderer headers" ${hdrs}) dart_generate_include_header_list( @@ -28,5 +24,3 @@ install( DESTINATION include/dart/renderer COMPONENT headers ) -#install(TARGETS dart_renderer EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/simulation/CMakeLists.txt b/dart/simulation/CMakeLists.txt index 8af31b4e686f4..8d7403e3d7ad0 100644 --- a/dart/simulation/CMakeLists.txt +++ b/dart/simulation/CMakeLists.txt @@ -5,15 +5,6 @@ file(GLOB hdrs "*.h") set(dart_simulation_hdrs ${hdrs} PARENT_SCOPE) set(dart_simulation_srcs ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_simulation ${srcs} ${hdrs}) -#target_link_libraries( -# dart_simulation -# dart_constraint -# dart_integration -# ${DART_CORE_DEPENDENCIES} -#) - # Generate header for this namespace dart_get_filename_components(header_names "simulation headers" ${hdrs}) dart_generate_include_header_list( @@ -33,6 +24,3 @@ install( DESTINATION include/dart/simulation COMPONENT headers ) -#install(TARGETS dart_simulation EXPORT DARTCoreTargets DESTINATION lib) -#install(TARGETS dart_simulation EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/utils/CMakeLists.txt b/dart/utils/CMakeLists.txt index f589064c8f4e7..ce6dbfca88dd3 100644 --- a/dart/utils/CMakeLists.txt +++ b/dart/utils/CMakeLists.txt @@ -1,33 +1,37 @@ # Search all header and source files -file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") +file(GLOB srcs "*.cpp") + +set(dart_utils_hdrs ${hdrs}) +set(dart_utils_srcs ${srcs}) + +include_directories(SYSTEM ${TINYXML_INCLUDE_DIRS}) +include_directories(SYSTEM ${TINYXML2_INCLUDE_DIRS}) # Add subdirectories add_subdirectory(sdf) -add_subdirectory(urdf) - -set(dart_utils_hdrs ${hdrs} ${dart_utils_hdrs} PARENT_SCOPE) -set(dart_utils_srcs ${srcs} ${dart_utils_srcs} PARENT_SCOPE) +if(urdfdom_FOUND) + add_subdirectory(urdf) +endif() # Library -#dart_add_library(dart_utils ${srcs} ${hdrs}) -#target_link_libraries( -# dart_utils -# dart_utils_sdf -# dart_utils_urdf -# dart_collision -# dart_dynamics -# dart_simulation -# ${DART_DEPENDENCIES} -#) +dart_add_library(dart-utils ${dart_utils_srcs} ${dart_utils_hdrs}) +target_link_libraries( + dart-utils + dart + ${TINYXML_LIBRARIES} + ${TINYXML2_LIBRARIES} +) # Generate header for this namespace dart_get_filename_components(header_names "utils headers" ${hdrs}) +if(urdfdom_FOUND) + list(APPEND header_names "urdf/urdf.h") +endif() set( header_names ${header_names} sdf/sdf.h - urdf/urdf.h ) dart_generate_include_header_list( utils_headers @@ -46,5 +50,4 @@ install( DESTINATION include/dart/utils COMPONENT headers ) -#install(TARGETS dart_utils EXPORT DARTTargets DESTINATION lib) - +install(TARGETS dart-utils EXPORT DARTTargets DESTINATION lib) diff --git a/dart/utils/sdf/CMakeLists.txt b/dart/utils/sdf/CMakeLists.txt index edde1982d1d2d..cd0aba85049da 100644 --- a/dart/utils/sdf/CMakeLists.txt +++ b/dart/utils/sdf/CMakeLists.txt @@ -1,14 +1,10 @@ # Search all header and source files -file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") +file(GLOB srcs "*.cpp") set(dart_utils_hdrs ${dart_utils_hdrs} ${hdrs} PARENT_SCOPE) set(dart_utils_srcs ${dart_utils_srcs} ${srcs} PARENT_SCOPE) -# Library -#dart_add_library(dart_utils_sdf ${srcs} ${hdrs}) -#target_link_libraries(dart_utils_sdf ${DART_DEPENDENCIES}) - # Generate header for this namespace dart_get_filename_components(header_names "utils_sdf headers" ${hdrs}) dart_generate_include_header_list( @@ -28,5 +24,3 @@ install( DESTINATION include/dart/utils/sdf COMPONENT headers ) -#install(TARGETS dart_utils_sdf EXPORT DARTTargets DESTINATION lib) - diff --git a/dart/utils/urdf/CMakeLists.txt b/dart/utils/urdf/CMakeLists.txt index 012b8cff11a75..0c0b4a5366141 100644 --- a/dart/utils/urdf/CMakeLists.txt +++ b/dart/utils/urdf/CMakeLists.txt @@ -1,13 +1,12 @@ # Search all header and source files -file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") +file(GLOB srcs "*.cpp") -set(dart_utils_hdrs ${dart_utils_hdrs} ${hdrs} PARENT_SCOPE) -set(dart_utils_srcs ${dart_utils_srcs} ${srcs} PARENT_SCOPE) +include_directories(SYSTEM ${urdfdom_INCLUDE_DIRS}) # Library -#dart_add_library(dart_utils_urdf ${srcs} ${hdrs}) -#target_link_libraries(dart_utils_urdf ${DART_DEPENDENCIES}) +dart_add_library(dart-utils-urdf ${hdrs} ${srcs}) +target_link_libraries(dart-utils-urdf dart-utils ${urdfdom_LIBRARIES}) # Generate header for this namespace dart_get_filename_components(header_names "utils_urdf headers" ${hdrs}) @@ -28,5 +27,4 @@ install( DESTINATION include/dart/utils/urdf COMPONENT headers ) -#install(TARGETS dart_utils_urdf EXPORT DARTTargets DESTINATION lib) - +install(TARGETS dart-utils-urdf EXPORT DARTTargets DESTINATION lib) diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt index 5162a65829a20..88b6c7ed7a6cf 100644 --- a/tutorials/CMakeLists.txt +++ b/tutorials/CMakeLists.txt @@ -8,5 +8,5 @@ foreach(tutorial ${tutorials_src}) get_filename_component(tutorial_base ${tutorial} NAME_WE) message(STATUS "Adding tutorial: ${tutorial_base}") add_executable(${tutorial_base} ${tutorial}) - target_link_libraries(${tutorial_base} dart) + target_link_libraries(${tutorial_base} dart dart-gui dart-utils-urdf) endforeach(tutorial) diff --git a/tutorials/tutorialBiped-Finished.cpp b/tutorials/tutorialBiped-Finished.cpp index abcc872716cba..0d4c8738edd15 100644 --- a/tutorials/tutorialBiped-Finished.cpp +++ b/tutorials/tutorialBiped-Finished.cpp @@ -43,6 +43,7 @@ const double default_force = 50.0; // N const int default_countdown = 100; // Number of timesteps for applying force #include "dart/dart.h" +#include "dart/gui/gui.h" using namespace dart::common; using namespace dart::dynamics; diff --git a/tutorials/tutorialBiped.cpp b/tutorials/tutorialBiped.cpp index 69ef3e2d16687..26eb4da85a9a0 100644 --- a/tutorials/tutorialBiped.cpp +++ b/tutorials/tutorialBiped.cpp @@ -43,6 +43,7 @@ const double default_force = 50.0; // N const int default_countdown = 100; // Number of timesteps for applying force #include "dart/dart.h" +#include "dart/gui/gui.h" using namespace dart::common; using namespace dart::dynamics; diff --git a/tutorials/tutorialCollisions-Finished.cpp b/tutorials/tutorialCollisions-Finished.cpp index 1ea34060f4e8a..eff3228b8c4cc 100644 --- a/tutorials/tutorialCollisions-Finished.cpp +++ b/tutorials/tutorialCollisions-Finished.cpp @@ -35,7 +35,9 @@ */ #include + #include "dart/dart.h" +#include "dart/gui/gui.h" const double default_shape_density = 1000; // kg/m^3 const double default_shape_height = 0.1; // m diff --git a/tutorials/tutorialCollisions.cpp b/tutorials/tutorialCollisions.cpp index 4c33c8e8428df..29f9dcf61f8ba 100644 --- a/tutorials/tutorialCollisions.cpp +++ b/tutorials/tutorialCollisions.cpp @@ -35,7 +35,9 @@ */ #include + #include "dart/dart.h" +#include "dart/gui/gui.h" const double default_shape_density = 1000; // kg/m^3 const double default_shape_height = 0.1; // m diff --git a/tutorials/tutorialDominoes-Finished.cpp b/tutorials/tutorialDominoes-Finished.cpp index 61d2a45490195..d68600787f070 100644 --- a/tutorials/tutorialDominoes-Finished.cpp +++ b/tutorials/tutorialDominoes-Finished.cpp @@ -35,6 +35,7 @@ */ #include "dart/dart.h" +#include "dart/gui/gui.h" const double default_domino_height = 0.3; const double default_domino_width = 0.4 * default_domino_height; diff --git a/tutorials/tutorialDominoes.cpp b/tutorials/tutorialDominoes.cpp index c229a4fefbce4..be54d5cc015b2 100644 --- a/tutorials/tutorialDominoes.cpp +++ b/tutorials/tutorialDominoes.cpp @@ -35,6 +35,7 @@ */ #include "dart/dart.h" +#include "dart/gui/gui.h" const double default_domino_height = 0.3; const double default_domino_width = 0.4 * default_domino_height; diff --git a/tutorials/tutorialMultiPendulum-Finished.cpp b/tutorials/tutorialMultiPendulum-Finished.cpp index 36dae47af0607..699d023b8f0f7 100644 --- a/tutorials/tutorialMultiPendulum-Finished.cpp +++ b/tutorials/tutorialMultiPendulum-Finished.cpp @@ -35,6 +35,7 @@ */ #include "dart/dart.h" +#include "dart/gui/gui.h" const double default_height = 1.0; // m const double default_width = 0.2; // m diff --git a/tutorials/tutorialMultiPendulum.cpp b/tutorials/tutorialMultiPendulum.cpp index ec46f8bbf95ee..5238a02038b06 100644 --- a/tutorials/tutorialMultiPendulum.cpp +++ b/tutorials/tutorialMultiPendulum.cpp @@ -35,6 +35,7 @@ */ #include "dart/dart.h" +#include "dart/gui/gui.h" const double default_height = 1.0; // m const double default_width = 0.2; // m diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index c94cc7b51adff..8152aedae6409 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -67,9 +67,9 @@ foreach(test ${tests}) link_directories(${DARTExt_LIBRARY_DIRS}) add_executable(${base} ${test}) if(MSVC) - target_link_libraries(${base} dart optimized gtest debug gtestd) + target_link_libraries(${base} dart dart-utils dart-utils-urdf optimized gtest debug gtestd) else() - target_link_libraries(${base} dart gtest) + target_link_libraries(${base} dart dart-utils dart-utils-urdf gtest) endif() set_target_properties(${base} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/tests") From 30ca7fea06303343a1ca3764774eb66da2ca7113 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Tue, 29 Mar 2016 10:33:36 -0400 Subject: [PATCH 03/26] Include DART component files to coverage test --- dart/CMakeLists.txt | 31 ++++++++++++++++------------- dart/gui/CMakeLists.txt | 4 ++++ dart/gui/osg/CMakeLists.txt | 4 ++++ dart/gui/osg/render/CMakeLists.txt | 4 ++++ dart/optimizer/ipopt/CMakeLists.txt | 4 ++++ dart/optimizer/nlopt/CMakeLists.txt | 4 ++++ dart/planning/CMakeLists.txt | 3 +++ dart/utils/CMakeLists.txt | 4 ++++ dart/utils/sdf/CMakeLists.txt | 4 ++++ dart/utils/urdf/CMakeLists.txt | 4 ++++ 10 files changed, 52 insertions(+), 14 deletions(-) diff --git a/dart/CMakeLists.txt b/dart/CMakeLists.txt index a4e19a2328787..2e23ee4f4d2f9 100644 --- a/dart/CMakeLists.txt +++ b/dart/CMakeLists.txt @@ -20,18 +20,6 @@ add_subdirectory(math) add_subdirectory(renderer) add_subdirectory(simulation) -if(FLANN_FOUND) - add_subdirectory(planning) -endif() - -if(GLUT_FOUND) - add_subdirectory(gui) -endif() - -if(TINYXML_FOUND AND TINYXML2_FOUND AND urdfdom_FOUND) - add_subdirectory(utils) -endif() - # Set header and source files get_filename_component(dart_h "dart.h" ABSOLUTE) set(dart_hdrs @@ -74,9 +62,24 @@ endif() install(FILES dart.h DESTINATION include/dart/ COMPONENT headers) install(TARGETS dart EXPORT DARTTargets DESTINATION lib) +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${dart_hdrs};${dart_srcs}" + CACHE INTERNAL "Files for coverage tests" FORCE) + +if(FLANN_FOUND) + add_subdirectory(planning) +endif() + +if(GLUT_FOUND) + add_subdirectory(gui) +endif() + +if(TINYXML_FOUND AND TINYXML2_FOUND AND urdfdom_FOUND) + add_subdirectory(utils) +endif() + # Setup the coveralls target and tell it to gather # coverage data for all the lib sources. if(DART_COVERALLS) - coveralls_setup("${dart_hdrs};${dart_srcs}" ${DART_COVERALLS_UPLOAD}) + coveralls_setup(${dart_coveralls_files} ${DART_COVERALLS_UPLOAD}) endif() -# TODO(JS): Collect all the headers and sources to pass it to coverage setup function diff --git a/dart/gui/CMakeLists.txt b/dart/gui/CMakeLists.txt index dfd07ef2ee86c..1749f77a9dbef 100644 --- a/dart/gui/CMakeLists.txt +++ b/dart/gui/CMakeLists.txt @@ -39,3 +39,7 @@ install( COMPONENT headers ) install(TARGETS dart-gui EXPORT DARTTargets DESTINATION lib) + +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") diff --git a/dart/gui/osg/CMakeLists.txt b/dart/gui/osg/CMakeLists.txt index 43111c6630693..8d7334ad2b70b 100644 --- a/dart/gui/osg/CMakeLists.txt +++ b/dart/gui/osg/CMakeLists.txt @@ -35,3 +35,7 @@ install( COMPONENT headers ) install(TARGETS dart-gui-osg EXPORT DARTTargets DESTINATION lib) + +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") diff --git a/dart/gui/osg/render/CMakeLists.txt b/dart/gui/osg/render/CMakeLists.txt index c03a43ce8775a..649dcf55e2c27 100644 --- a/dart/gui/osg/render/CMakeLists.txt +++ b/dart/gui/osg/render/CMakeLists.txt @@ -22,3 +22,7 @@ install( DESTINATION include/dart/gui/osg/render COMPONENT headers ) + +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") diff --git a/dart/optimizer/ipopt/CMakeLists.txt b/dart/optimizer/ipopt/CMakeLists.txt index e4ba6809cb4ef..3881412605082 100644 --- a/dart/optimizer/ipopt/CMakeLists.txt +++ b/dart/optimizer/ipopt/CMakeLists.txt @@ -28,3 +28,7 @@ install( COMPONENT headers ) install(TARGETS dart-optimizer-ipopt EXPORT DARTTargets DESTINATION lib) + +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") diff --git a/dart/optimizer/nlopt/CMakeLists.txt b/dart/optimizer/nlopt/CMakeLists.txt index fc297bb72eed0..f16399e4981e7 100644 --- a/dart/optimizer/nlopt/CMakeLists.txt +++ b/dart/optimizer/nlopt/CMakeLists.txt @@ -28,3 +28,7 @@ install( COMPONENT headers ) install(TARGETS dart-optimizer-nlopt EXPORT DARTTargets DESTINATION lib) + +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") diff --git a/dart/planning/CMakeLists.txt b/dart/planning/CMakeLists.txt index 52fefcdcf034f..a8a7705cfe001 100644 --- a/dart/planning/CMakeLists.txt +++ b/dart/planning/CMakeLists.txt @@ -29,3 +29,6 @@ install( ) install(TARGETS dart-planning EXPORT DARTTargets DESTINATION lib) +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") diff --git a/dart/utils/CMakeLists.txt b/dart/utils/CMakeLists.txt index ce6dbfca88dd3..31844599c64e2 100644 --- a/dart/utils/CMakeLists.txt +++ b/dart/utils/CMakeLists.txt @@ -51,3 +51,7 @@ install( COMPONENT headers ) install(TARGETS dart-utils EXPORT DARTTargets DESTINATION lib) + +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") diff --git a/dart/utils/sdf/CMakeLists.txt b/dart/utils/sdf/CMakeLists.txt index cd0aba85049da..0d730a8533532 100644 --- a/dart/utils/sdf/CMakeLists.txt +++ b/dart/utils/sdf/CMakeLists.txt @@ -24,3 +24,7 @@ install( DESTINATION include/dart/utils/sdf COMPONENT headers ) + +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") diff --git a/dart/utils/urdf/CMakeLists.txt b/dart/utils/urdf/CMakeLists.txt index 0c0b4a5366141..4c2e4be29c44a 100644 --- a/dart/utils/urdf/CMakeLists.txt +++ b/dart/utils/urdf/CMakeLists.txt @@ -28,3 +28,7 @@ install( COMPONENT headers ) install(TARGETS dart-utils-urdf EXPORT DARTTargets DESTINATION lib) + +# Coverage test files +set(dart_coveralls_files "${dart_coveralls_files};${hdrs};${srcs}" + CACHE INTERNAL "files for coverage tests") From bb31f964e1eea66f98770c3400099da86903e304 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 7 Apr 2016 11:50:01 -0400 Subject: [PATCH 04/26] Quote list of files to pass it as a single list parameter --- dart/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/CMakeLists.txt b/dart/CMakeLists.txt index 2e23ee4f4d2f9..5443e0c5ebcc4 100644 --- a/dart/CMakeLists.txt +++ b/dart/CMakeLists.txt @@ -81,5 +81,5 @@ endif() # Setup the coveralls target and tell it to gather # coverage data for all the lib sources. if(DART_COVERALLS) - coveralls_setup(${dart_coveralls_files} ${DART_COVERALLS_UPLOAD}) + coveralls_setup("${dart_coveralls_files}" ${DART_COVERALLS_UPLOAD}) endif() From 75ab087a3ce445d5a619b49ed2dd45c323546851 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 7 Apr 2016 11:59:46 -0400 Subject: [PATCH 05/26] Remove BUILD_CORE_ONLY option from .travis.yml --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 515a88ce39842..37bba1991173a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,9 +31,8 @@ install: script: - mkdir build && cd build - - cmake -DBUILD_CORE_ONLY=$BUILD_CORE_ONLY -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDART_COVERALLS=$COVERALLS .. - - make all - - if [ $BUILD_CORE_ONLY = OFF ]; then make tutorials examples tests test; fi + - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDART_COVERALLS=$COVERALLS .. + - make all tutorials examples tests test - if [ $COVERALLS = ON ]; then make coveralls; fi after_failure: From ecb5aff432d15ef3b838e7283895e63affcf71c4 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 7 Apr 2016 14:50:24 -0400 Subject: [PATCH 06/26] Build using multicore by adding '-j4' option to make command --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 37bba1991173a..ecd77f49437dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,8 +32,8 @@ install: script: - mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDART_COVERALLS=$COVERALLS .. - - make all tutorials examples tests test - - if [ $COVERALLS = ON ]; then make coveralls; fi + - make -j4 all tutorials examples tests test + - if [ $COVERALLS = ON ]; then make -j4 coveralls; fi after_failure: - cat Testing/Temporary/LastTest.log From 9d00105399f3b6be05025cedcc0a3ee5c953258c Mon Sep 17 00:00:00 2001 From: "M.X. Grey" Date: Wed, 13 Apr 2016 16:49:43 -0400 Subject: [PATCH 07/26] correct IPOPT_INCLUDE_DIRS --> NLOPT_INCLUDE_DIRS --- dart/optimizer/nlopt/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/optimizer/nlopt/CMakeLists.txt b/dart/optimizer/nlopt/CMakeLists.txt index f16399e4981e7..366e0cc66bded 100644 --- a/dart/optimizer/nlopt/CMakeLists.txt +++ b/dart/optimizer/nlopt/CMakeLists.txt @@ -2,7 +2,7 @@ file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") -include_directories(SYSTEM ${IPOPT_INCLUDE_DIRS}) +include_directories(SYSTEM ${NLOPT_INCLUDE_DIRS}) # Library dart_add_library(dart-optimizer-nlopt ${srcs} ${hdrs}) From 19d71b5739830e24e5387628b0e5f7c91aab79d1 Mon Sep 17 00:00:00 2001 From: Konstantinos Chatzilygeroudis Date: Thu, 14 Apr 2016 14:22:13 +0200 Subject: [PATCH 08/26] Removing OpenGL dep from main lib and fixes for installation --- CMakeLists.txt | 3 - cmake/DARTFindDependencies.cmake | 94 ++++++++++++++---------------- dart/CMakeLists.txt | 4 +- dart/gui/CMakeLists.txt | 7 ++- dart/gui/osg/render/CMakeLists.txt | 2 +- 5 files changed, 51 insertions(+), 59 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d50d9ea25fb2..b858098097549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,8 +117,6 @@ include_directories(SYSTEM ${CCD_INCLUDE_DIRS}) include_directories(SYSTEM ${FCL_INCLUDE_DIRS}) include_directories(SYSTEM ${ASSIMP_INCLUDE_DIRS}) include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) -include_directories(SYSTEM ${OPENGL_INCLUDE_DIR}) -include_directories(SYSTEM ${GLUT_INCLUDE_DIR}) if(HAVE_BULLET_COLLISION) include_directories(SYSTEM ${BULLET_INCLUDE_DIRS}) endif() @@ -138,7 +136,6 @@ set(DART_DEPENDENCIES ${CCD_LIBRARIES} ${FCL_LIBRARIES} ${ASSIMP_LIBRARIES} ${Boost_LIBRARIES} - ${OPENGL_LIBRARIES} # TODO(JS): Should be removed once draw functions are removed from classes in dynamics namespace ) if(HAVE_BULLET_COLLISION) diff --git a/cmake/DARTFindDependencies.cmake b/cmake/DARTFindDependencies.cmake index fbc51fbb4840e..652c61e208552 100644 --- a/cmake/DARTFindDependencies.cmake +++ b/cmake/DARTFindDependencies.cmake @@ -128,61 +128,57 @@ else() message(SEND_ERROR "Please install system boost version ${DART_MIN_BOOST_VERSION} or higher.") endif() -if(NOT BUILD_CORE_ONLY) - - # GLUT - if(WIN32 AND NOT CYGWIN) - set(GLUT_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include") - set(GLUT_LIBRARIES glut32) - else() - find_package(GLUT QUIET) - if(GLUT_FOUND) - message(STATUS "Looking for GLUT - found") - set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY}) - else() - message(SEND_ERROR "Looking for GLUT - NOT found, Please install freeglut3-dev") - endif() - endif() - - # FLANN - find_package(FLANN 1.8.4 QUIET) - if(FLANN_FOUND) - message(STATUS "Looking for FLANN - ${FLANN_VERSION} found") +# GLUT +if(WIN32 AND NOT CYGWIN) + set(GLUT_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include") + set(GLUT_LIBRARIES glut32) +else() + find_package(GLUT QUIET) + if(GLUT_FOUND) + message(STATUS "Looking for GLUT - found") + set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY}) else() - message(SEND_ERROR "Looking for FLANN - NOT found, please install libflann-dev (>= 1.8.4)") + message(SEND_ERROR "Looking for GLUT - NOT found, Please install freeglut3-dev") endif() +endif() - # TINYXML - find_package(TINYXML 2.6.2 QUIET) - if(TINYXML_FOUND) - message(STATUS "Looking for TINYXML - ${TINYXML_VERSION} found") - else() - message(SEND_ERROR "Looking for TINYXML - NOT found, please install libtinyxml-dev (>= 2.6.2)") - endif() +# FLANN +find_package(FLANN 1.8.4 QUIET) +if(FLANN_FOUND) + message(STATUS "Looking for FLANN - ${FLANN_VERSION} found") +else() + message(SEND_ERROR "Looking for FLANN - NOT found, please install libflann-dev (>= 1.8.4)") +endif() - # TINYXML2 - find_package(TINYXML2 QUIET) - if(TINYXML2_FOUND) - message(STATUS "Looking for TINYXML2 - ${TINYXML2_VERSION} found") - else() - message(SEND_ERROR "Looking for TINYXML2 - NOT found, please install libtinyxml2-dev (>= 1.0.1)") - endif() +# TINYXML +find_package(TINYXML 2.6.2 QUIET) +if(TINYXML_FOUND) + message(STATUS "Looking for TINYXML - ${TINYXML_VERSION} found") +else() + message(SEND_ERROR "Looking for TINYXML - NOT found, please install libtinyxml-dev (>= 2.6.2)") +endif() - # urdfdom - find_package(urdfdom QUIET) - if(urdfdom_FOUND) - message(STATUS "Looking for urdfdom - found") - else() - message(SEND_ERROR "Looking for urdfdom - NOT found, please install liburdfdom-dev") - endif() - if(MSVC) - set(urdfdom_LIBRARIES optimized urdfdom_sensor debug urdfdom_sensord - optimized urdfdom_model_state debug urdfdom_model_stated - optimized urdfdom_model debug urdfdom_modeld - optimized urdfdom_world debug urdfdom_worldd - optimized console_bridge debug console_bridged) - endif() +# TINYXML2 +find_package(TINYXML2 QUIET) +if(TINYXML2_FOUND) + message(STATUS "Looking for TINYXML2 - ${TINYXML2_VERSION} found") +else() + message(SEND_ERROR "Looking for TINYXML2 - NOT found, please install libtinyxml2-dev (>= 1.0.1)") +endif() +# urdfdom +find_package(urdfdom QUIET) +if(urdfdom_FOUND) + message(STATUS "Looking for urdfdom - found") +else() + message(SEND_ERROR "Looking for urdfdom - NOT found, please install liburdfdom-dev") +endif() +if(MSVC) + set(urdfdom_LIBRARIES optimized urdfdom_sensor debug urdfdom_sensord + optimized urdfdom_model_state debug urdfdom_model_stated + optimized urdfdom_model debug urdfdom_modeld + optimized urdfdom_world debug urdfdom_worldd + optimized console_bridge debug console_bridged) endif() #----------------------- diff --git a/dart/CMakeLists.txt b/dart/CMakeLists.txt index 5443e0c5ebcc4..f501caf457408 100644 --- a/dart/CMakeLists.txt +++ b/dart/CMakeLists.txt @@ -17,7 +17,6 @@ add_subdirectory(optimizer) add_subdirectory(integration) add_subdirectory(lcpsolver) add_subdirectory(math) -add_subdirectory(renderer) add_subdirectory(simulation) # Set header and source files @@ -32,7 +31,6 @@ set(dart_hdrs ${dart_optimizer_hdrs} ${dart_collision_hdrs} ${dart_constraint_hdrs} - ${dart_renderer_hdrs} ${dart_simulation_hdrs} ) set(dart_srcs @@ -44,7 +42,6 @@ set(dart_srcs ${dart_optimizer_srcs} ${dart_collision_srcs} ${dart_constraint_srcs} - ${dart_renderer_srcs} ${dart_simulation_srcs} ) @@ -71,6 +68,7 @@ if(FLANN_FOUND) endif() if(GLUT_FOUND) + add_subdirectory(renderer) add_subdirectory(gui) endif() diff --git a/dart/gui/CMakeLists.txt b/dart/gui/CMakeLists.txt index 1749f77a9dbef..641246e2405b3 100644 --- a/dart/gui/CMakeLists.txt +++ b/dart/gui/CMakeLists.txt @@ -2,6 +2,7 @@ file(GLOB srcs "*.cpp") file(GLOB hdrs "*.h") +include_directories(SYSTEM ${OPENGL_INCLUDE_DIR}) include_directories(SYSTEM ${GLUT_INCLUDE_DIR}) # Add subdirectories @@ -9,12 +10,12 @@ if(HAVE_OPENSCENEGRAPH) add_subdirectory(osg) endif(HAVE_OPENSCENEGRAPH) -set(dart_gui_hdrs ${dart_gui_hdrs} ${hdrs}) -set(dart_gui_srcs ${dart_gui_srcs} ${srcs}) +set(dart_gui_hdrs ${dart_gui_hdrs} ${hdrs} ${dart_renderer_hdrs}) +set(dart_gui_srcs ${dart_gui_srcs} ${srcs} ${dart_renderer_srcs}) # Library dart_add_library(dart-gui ${srcs} ${hdrs}) -target_link_libraries(dart-gui dart-utils ${GLUT_LIBRARY}) +target_link_libraries(dart-gui dart-utils ${GLUT_LIBRARY} ${OPENGL_LIBRARIES}) # Generate header for this namespace dart_get_filename_components(header_names "gui headers" ${hdrs}) diff --git a/dart/gui/osg/render/CMakeLists.txt b/dart/gui/osg/render/CMakeLists.txt index 649dcf55e2c27..929ec13cc1d1d 100644 --- a/dart/gui/osg/render/CMakeLists.txt +++ b/dart/gui/osg/render/CMakeLists.txt @@ -18,7 +18,7 @@ configure_file( ) install( - FILES ${dart_gui_osg_hdrs} ${CMAKE_CURRENT_BINARY_DIR}/render.h + FILES ${hdrs} ${CMAKE_CURRENT_BINARY_DIR}/render.h DESTINATION include/dart/gui/osg/render COMPONENT headers ) From fcb3fba29f532f0d7a5b28d71b091dfcfacef956 Mon Sep 17 00:00:00 2001 From: Konstantinos Chatzilygeroudis Date: Thu, 14 Apr 2016 15:05:23 +0200 Subject: [PATCH 09/26] Fixes #666 - quick n dirty --- dart/constraint/ConstraintSolver.cpp | 7 +++++++ dart/dynamics/MetaSkeleton.h | 3 +++ dart/dynamics/ReferentialSkeleton.cpp | 11 +++++++++++ dart/dynamics/ReferentialSkeleton.h | 3 +++ dart/dynamics/Skeleton.cpp | 11 +++++++++++ dart/dynamics/Skeleton.h | 3 +++ 6 files changed, 38 insertions(+) diff --git a/dart/constraint/ConstraintSolver.cpp b/dart/constraint/ConstraintSolver.cpp index 6d2aaa5624d49..07a59484a128d 100644 --- a/dart/constraint/ConstraintSolver.cpp +++ b/dart/constraint/ConstraintSolver.cpp @@ -291,7 +291,10 @@ LCPSolver* ConstraintSolver::getLCPSolver() const void ConstraintSolver::solve() { for (size_t i = 0; i < mSkeletons.size(); ++i) + { mSkeletons[i]->clearConstraintImpulses(); + mSkeletons[i]->clearCollidingBodies(); + } // Update constraints and collect active constraints updateConstraints(); @@ -394,6 +397,10 @@ void ConstraintSolver::updateConstraints() { auto& ct = mCollisionResult.getContact(i); + // Set colliding bodies + const_cast(ct.collisionObject1->getShapeFrame())->asShapeNode()->getBodyNodePtr()->setColliding(true); + const_cast(ct.collisionObject2->getShapeFrame())->asShapeNode()->getBodyNodePtr()->setColliding(true); + if (isSoftContact(ct)) { mSoftContactConstraints.push_back( diff --git a/dart/dynamics/MetaSkeleton.h b/dart/dynamics/MetaSkeleton.h index 7d6041ea28ada..0b8c816fcc4d6 100644 --- a/dart/dynamics/MetaSkeleton.h +++ b/dart/dynamics/MetaSkeleton.h @@ -537,6 +537,9 @@ class MetaSkeleton : public common::Subject /// Get the potential energy of this MetaSkeleton virtual double getPotentialEnergy() const = 0; + /// Clear collision flags of the BodyNodes in this MetaSkeleton + virtual void clearCollidingBodies() = 0; + /// \} //---------------------------------------------------------------------------- diff --git a/dart/dynamics/ReferentialSkeleton.cpp b/dart/dynamics/ReferentialSkeleton.cpp index daf6a25665e9e..1de7b7eff6fd7 100644 --- a/dart/dynamics/ReferentialSkeleton.cpp +++ b/dart/dynamics/ReferentialSkeleton.cpp @@ -785,6 +785,17 @@ double ReferentialSkeleton::getPotentialEnergy() const return PE; } +//============================================================================== +void ReferentialSkeleton::clearCollidingBodies() +{ + for(size_t i = 0; i < this->getNumBodyNodes(); i++) + { + auto bd = this->getBodyNode(i); + if(bd) + bd->setColliding(false); + } +} + //============================================================================== Eigen::Vector3d ReferentialSkeleton::getCOM(const Frame* _withRespectTo) const { diff --git a/dart/dynamics/ReferentialSkeleton.h b/dart/dynamics/ReferentialSkeleton.h index eda06c81ed04d..d7a44d24ed891 100644 --- a/dart/dynamics/ReferentialSkeleton.h +++ b/dart/dynamics/ReferentialSkeleton.h @@ -273,6 +273,9 @@ class ReferentialSkeleton : public MetaSkeleton // Documentation inherited double getPotentialEnergy() const override; + // Documentation inherited + void clearCollidingBodies() override; + /// \} //---------------------------------------------------------------------------- diff --git a/dart/dynamics/Skeleton.cpp b/dart/dynamics/Skeleton.cpp index bf51486babab8..243ee8518d153 100644 --- a/dart/dynamics/Skeleton.cpp +++ b/dart/dynamics/Skeleton.cpp @@ -3613,6 +3613,17 @@ double Skeleton::getPotentialEnergy() const return PE; } +//============================================================================== +void Skeleton::clearCollidingBodies() +{ + for(size_t i = 0; i < this->getNumBodyNodes(); i++) + { + auto bd = this->getBodyNode(i); + if(bd) + bd->setColliding(false); + } +} + //============================================================================== Eigen::Vector3d Skeleton::getCOM(const Frame* _withRespectTo) const { diff --git a/dart/dynamics/Skeleton.h b/dart/dynamics/Skeleton.h index 569a1fb1b259e..2bf283e515019 100644 --- a/dart/dynamics/Skeleton.h +++ b/dart/dynamics/Skeleton.h @@ -878,6 +878,9 @@ class Skeleton : // Documentation inherited double getPotentialEnergy() const override; + // Documentation inherited + void clearCollidingBodies() override; + /// \} //---------------------------------------------------------------------------- From 05846ae97dfd22f13586901fd5e94ff6b5cd4fe9 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 09:15:14 -0400 Subject: [PATCH 10/26] Merge `renderer` namespace into `gui` namespace --- dart/CMakeLists.txt | 1 - dart/dart.h | 1 - dart/gui/CMakeLists.txt | 4 +-- dart/gui/GLFuncs.cpp | 2 +- dart/gui/GlutWindow.cpp | 4 +-- dart/gui/GlutWindow.h | 6 ++--- dart/gui/Jitter.h | 2 +- dart/{renderer => gui}/LoadOpengl.h | 6 ++--- .../OpenGLRenderInterface.cpp | 8 +++--- .../{renderer => gui}/OpenGLRenderInterface.h | 14 +++++----- dart/{renderer => gui}/RenderInterface.cpp | 4 +-- dart/{renderer => gui}/RenderInterface.h | 10 +++---- dart/gui/Trackball.cpp | 2 +- dart/renderer/CMakeLists.txt | 26 ------------------- dart/renderer/renderer.h.in | 3 --- 15 files changed, 31 insertions(+), 62 deletions(-) rename dart/{renderer => gui}/LoadOpengl.h (95%) rename dart/{renderer => gui}/OpenGLRenderInterface.cpp (99%) rename dart/{renderer => gui}/OpenGLRenderInterface.h (94%) rename dart/{renderer => gui}/RenderInterface.cpp (98%) rename dart/{renderer => gui}/RenderInterface.h (95%) delete mode 100644 dart/renderer/CMakeLists.txt delete mode 100644 dart/renderer/renderer.h.in diff --git a/dart/CMakeLists.txt b/dart/CMakeLists.txt index f501caf457408..cf98f4a8294e5 100644 --- a/dart/CMakeLists.txt +++ b/dart/CMakeLists.txt @@ -68,7 +68,6 @@ if(FLANN_FOUND) endif() if(GLUT_FOUND) - add_subdirectory(renderer) add_subdirectory(gui) endif() diff --git a/dart/dart.h b/dart/dart.h index 8e073ef67221b..75759b40a196a 100644 --- a/dart/dart.h +++ b/dart/dart.h @@ -43,5 +43,4 @@ #include "dart/constraint/constraint.h" #include "dart/optimizer/optimizer.h" #include "dart/dynamics/dynamics.h" -#include "dart/renderer/renderer.h" #include "dart/simulation/simulation.h" diff --git a/dart/gui/CMakeLists.txt b/dart/gui/CMakeLists.txt index 641246e2405b3..754f735f79d79 100644 --- a/dart/gui/CMakeLists.txt +++ b/dart/gui/CMakeLists.txt @@ -10,8 +10,8 @@ if(HAVE_OPENSCENEGRAPH) add_subdirectory(osg) endif(HAVE_OPENSCENEGRAPH) -set(dart_gui_hdrs ${dart_gui_hdrs} ${hdrs} ${dart_renderer_hdrs}) -set(dart_gui_srcs ${dart_gui_srcs} ${srcs} ${dart_renderer_srcs}) +set(dart_gui_hdrs ${dart_gui_hdrs} ${hdrs}) +set(dart_gui_srcs ${dart_gui_srcs} ${srcs}) # Library dart_add_library(dart-gui ${srcs} ${hdrs}) diff --git a/dart/gui/GLFuncs.cpp b/dart/gui/GLFuncs.cpp index 0a774744eb878..0a10c829fb1d4 100644 --- a/dart/gui/GLFuncs.cpp +++ b/dart/gui/GLFuncs.cpp @@ -42,8 +42,8 @@ #include +#include "dart/gui/LoadOpengl.h" #include "dart/gui/LoadGlut.h" -#include "dart/renderer/LoadOpengl.h" namespace dart { namespace gui { diff --git a/dart/gui/GlutWindow.cpp b/dart/gui/GlutWindow.cpp index 526b8a724cbd2..8329d6d634971 100644 --- a/dart/gui/GlutWindow.cpp +++ b/dart/gui/GlutWindow.cpp @@ -53,7 +53,7 @@ #include "dart/common/Console.h" #include "dart/gui/LoadGlut.h" #include "dart/gui/GLFuncs.h" -#include "dart/renderer/OpenGLRenderInterface.h" +#include "dart/gui/OpenGLRenderInterface.h" namespace dart { namespace gui { @@ -101,7 +101,7 @@ void GlutWindow::initWindow(int _w, int _h, const char* _name) { glutPassiveMotionFunc(mouseMove); delete mRI; - mRI = new renderer::OpenGLRenderInterface(); + mRI = new gui::OpenGLRenderInterface(); mRI->initialize(); // glutTimerFunc(mDisplayTimeout, refreshTimer, 0); // glutTimerFunc(mDisplayTimeout, runTimer, 0); diff --git a/dart/gui/GlutWindow.h b/dart/gui/GlutWindow.h index 87f7eedfeb097..b9f9392aba776 100644 --- a/dart/gui/GlutWindow.h +++ b/dart/gui/GlutWindow.h @@ -40,8 +40,8 @@ #include -#include "dart/renderer/LoadOpengl.h" -#include "dart/renderer/RenderInterface.h" +#include "dart/gui/LoadOpengl.h" +#include "dart/gui/RenderInterface.h" #include "dart/gui/lodepng.h" namespace dart { @@ -93,7 +93,7 @@ class GlutWindow { bool mMouseDrag; bool mCapture; double mBackground[4]; - renderer::RenderInterface* mRI; + gui::RenderInterface* mRI; std::vector mScreenshotTemp; std::vector mScreenshotTemp2; }; diff --git a/dart/gui/Jitter.h b/dart/gui/Jitter.h index a4e4d163cdc02..0a2ba6a2edbaa 100644 --- a/dart/gui/Jitter.h +++ b/dart/gui/Jitter.h @@ -53,7 +53,7 @@ accwindow() routine. #ifndef DART_GUI_JITTER_H_ #define DART_GUI_JITTER_H_ -#include "dart/renderer/LoadOpengl.h" +#include "dart/gui/LoadOpengl.h" namespace dart { namespace gui { diff --git a/dart/renderer/LoadOpengl.h b/dart/gui/LoadOpengl.h similarity index 95% rename from dart/renderer/LoadOpengl.h rename to dart/gui/LoadOpengl.h index 7303d591cf79a..ca0e2e7850870 100644 --- a/dart/renderer/LoadOpengl.h +++ b/dart/gui/LoadOpengl.h @@ -34,8 +34,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DART_RENDERER_LOADOPENGL_H_ -#define DART_RENDERER_LOADOPENGL_H_ +#ifndef DART_GUI_LOADOPENGL_H_ +#define DART_GUI_LOADOPENGL_H_ #if defined(_WIN32) #ifdef NOMINMAX @@ -57,4 +57,4 @@ #error "Load OpenGL Error: What's your operating system?" #endif -#endif // DART_RENDERER_LOADOPENGL_H_ +#endif // DART_GUI_LOADOPENGL_H_ diff --git a/dart/renderer/OpenGLRenderInterface.cpp b/dart/gui/OpenGLRenderInterface.cpp similarity index 99% rename from dart/renderer/OpenGLRenderInterface.cpp rename to dart/gui/OpenGLRenderInterface.cpp index e6978918f0b15..244c91129c8a5 100644 --- a/dart/renderer/OpenGLRenderInterface.cpp +++ b/dart/gui/OpenGLRenderInterface.cpp @@ -47,8 +47,8 @@ #include "dart/dynamics/EllipsoidShape.h" #include "dart/dynamics/MeshShape.h" #include "dart/dynamics/LineSegmentShape.h" -#include "dart/renderer/LoadOpengl.h" -#include "dart/renderer/OpenGLRenderInterface.h" +#include "dart/gui/LoadOpengl.h" +#include "dart/gui/OpenGLRenderInterface.h" // Code taken from glut/lib/glut_shapes.c static GLUquadricObj *quadObj; @@ -65,7 +65,7 @@ static void initQuadObj(void) //glut/lib/glut_shapes.c namespace dart { -namespace renderer { +namespace gui { void OpenGLRenderInterface::initialize() { glMatrixMode(GL_MODELVIEW); @@ -539,5 +539,5 @@ void OpenGLRenderInterface::saveToImage(const char* /*_filename*/, DecoBufferTyp } -} // namespace renderer +} // namespace gui } // namespace dart diff --git a/dart/renderer/OpenGLRenderInterface.h b/dart/gui/OpenGLRenderInterface.h similarity index 94% rename from dart/renderer/OpenGLRenderInterface.h rename to dart/gui/OpenGLRenderInterface.h index 37035c7db9600..8ed2d431a1f7c 100644 --- a/dart/renderer/OpenGLRenderInterface.h +++ b/dart/gui/OpenGLRenderInterface.h @@ -34,14 +34,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DART_RENDERER_OPENGLRENDERINTERFACE_H -#define DART_RENDERER_OPENGLRENDERINTERFACE_H +#ifndef DART_GUI_OPENGLRENDERINTERFACE_H_ +#define DART_GUI_OPENGLRENDERINTERFACE_H_ #include #include #include "dart/common/Deprecated.h" -#include "dart/renderer/RenderInterface.h" -#include "dart/renderer/LoadOpengl.h" +#include "dart/gui/RenderInterface.h" +#include "dart/gui/LoadOpengl.h" namespace dart { @@ -52,7 +52,7 @@ class Shape; class ShapeFrame; } -namespace renderer { +namespace gui { class OpenGLRenderInterface : public RenderInterface { public: @@ -115,7 +115,7 @@ class OpenGLRenderInterface : public RenderInterface { EIGEN_MAKE_ALIGNED_OPERATOR_NEW }; -} // namespace renderer +} // namespace gui } // namespace dart -#endif // #ifndef DART_RENDERER_OPENGLRENDERINTERFACE_H +#endif // #ifndef DART_GUI_OPENGLRENDERINTERFACE_H_ diff --git a/dart/renderer/RenderInterface.cpp b/dart/gui/RenderInterface.cpp similarity index 98% rename from dart/renderer/RenderInterface.cpp rename to dart/gui/RenderInterface.cpp index 22bdfbc1c4b48..4ce89d4848617 100644 --- a/dart/renderer/RenderInterface.cpp +++ b/dart/gui/RenderInterface.cpp @@ -37,7 +37,7 @@ #include "RenderInterface.h" namespace dart { -namespace renderer { +namespace gui { void RenderInterface::initialize() { @@ -164,5 +164,5 @@ void RenderInterface::readFrameBuffer(DecoBufferType /*_buffType*/, DecoColorCha } -} // namespace renderer +} // namespace gui } // namespace dart diff --git a/dart/renderer/RenderInterface.h b/dart/gui/RenderInterface.h similarity index 95% rename from dart/renderer/RenderInterface.h rename to dart/gui/RenderInterface.h index ac48bdb1a0f8f..7602d4039647a 100644 --- a/dart/renderer/RenderInterface.h +++ b/dart/gui/RenderInterface.h @@ -34,8 +34,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DART_RENDERER_RENDERINTERFACE_H -#define DART_RENDERER_RENDERINTERFACE_H +#ifndef DART_GUI_RENDERINTERFACE_H_ +#define DART_GUI_RENDERINTERFACE_H_ #include #include @@ -44,7 +44,7 @@ #include "dart/math/MathTypes.h" namespace dart { -namespace renderer { +namespace gui { enum DecoBufferType { BT_Front, @@ -115,7 +115,7 @@ class RenderInterface { virtual void readFrameBuffer(DecoBufferType _buffType, DecoColorChannel _ch, void* _pixels); }; -} // namespace renderer +} // namespace gui } // namespace dart -#endif // #ifndef DART_RENDERER_RENDERINTERFACE_H +#endif // #ifndef DART_GUI_RENDERINTERFACE_H_ diff --git a/dart/gui/Trackball.cpp b/dart/gui/Trackball.cpp index 067712d8a3235..1e95f15248c51 100644 --- a/dart/gui/Trackball.cpp +++ b/dart/gui/Trackball.cpp @@ -36,7 +36,7 @@ #include "dart/gui/Trackball.h" -#include "dart/renderer/LoadOpengl.h" +#include "dart/gui/LoadOpengl.h" namespace dart { namespace gui { diff --git a/dart/renderer/CMakeLists.txt b/dart/renderer/CMakeLists.txt deleted file mode 100644 index 5fa726d47acfa..0000000000000 --- a/dart/renderer/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -# Search all header and source files -file(GLOB srcs "*.cpp") -file(GLOB hdrs "*.h") - -set(dart_renderer_hdrs ${hdrs} PARENT_SCOPE) -set(dart_renderer_srcs ${srcs} PARENT_SCOPE) - -# Generate header for this namespace -dart_get_filename_components(header_names "renderer headers" ${hdrs}) -dart_generate_include_header_list( - renderer_headers - "dart/renderer/" - "renderer headers" - ${header_names} -) -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/renderer.h.in - ${CMAKE_CURRENT_BINARY_DIR}/renderer.h -) - -# Install -install( - FILES ${hdrs} ${CMAKE_CURRENT_BINARY_DIR}/renderer.h - DESTINATION include/dart/renderer - COMPONENT headers -) diff --git a/dart/renderer/renderer.h.in b/dart/renderer/renderer.h.in deleted file mode 100644 index faa5919df1abb..0000000000000 --- a/dart/renderer/renderer.h.in +++ /dev/null @@ -1,3 +0,0 @@ -// Automatically generated file by cmake - -${renderer_headers} From 2782aae1015745476b722efd27e8e356579b5a3c Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 10:03:20 -0400 Subject: [PATCH 11/26] Make dependencies for component libraries as optional Here is a quick summary of the dependencies. - mandatories for core library: eigen, ccd, fcl, assimp, boost - optional for component libraries: - dart-optimizer: nlopt, ipopt - dart-collision: bullet - dart-planning: flann - dart-utils: tinyxml, tinyxml2, urdfdom - dart-gui: opengl, glut, openscenegraph --- cmake/DARTFindDependencies.cmake | 244 +++++++++++++++++-------------- 1 file changed, 135 insertions(+), 109 deletions(-) diff --git a/cmake/DARTFindDependencies.cmake b/cmake/DARTFindDependencies.cmake index 652c61e208552..e68412458384d 100644 --- a/cmake/DARTFindDependencies.cmake +++ b/cmake/DARTFindDependencies.cmake @@ -1,11 +1,11 @@ # If you add a dependency, please add the corresponding rosdep key as a # dependency in package.xml. -#------------------------ -# Mandatory dependencies -#------------------------ +#====================================== +# Mandatory dependencies for DART core +#====================================== message(STATUS "") -message(STATUS "[ Mandatory dependencies ]") +message(STATUS "[ Mandatory dependencies for DART core ]") # Eigen find_package(EIGEN3 3.0.5 QUIET) @@ -105,14 +105,6 @@ else() message(SEND_ERROR "Looking for ASSIMP - NOT found, please install libassimp-dev (>= 3.0.0)") endif() -# OpenGL -find_package(OpenGL QUIET) -if(OPENGL_FOUND) - message(STATUS "Looking for OpenGL - found") -else() - message(SEND_ERROR "Looking for OpenGL - NOT found, please install OpenGL") -endif() - # Boost set(DART_MIN_BOOST_VERSION 1.46.0 CACHE INTERNAL "Boost min version requirement" FORCE) if(MSVC) @@ -128,98 +120,12 @@ else() message(SEND_ERROR "Please install system boost version ${DART_MIN_BOOST_VERSION} or higher.") endif() -# GLUT -if(WIN32 AND NOT CYGWIN) - set(GLUT_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include") - set(GLUT_LIBRARIES glut32) -else() - find_package(GLUT QUIET) - if(GLUT_FOUND) - message(STATUS "Looking for GLUT - found") - set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY}) - else() - message(SEND_ERROR "Looking for GLUT - NOT found, Please install freeglut3-dev") - endif() -endif() - -# FLANN -find_package(FLANN 1.8.4 QUIET) -if(FLANN_FOUND) - message(STATUS "Looking for FLANN - ${FLANN_VERSION} found") -else() - message(SEND_ERROR "Looking for FLANN - NOT found, please install libflann-dev (>= 1.8.4)") -endif() - -# TINYXML -find_package(TINYXML 2.6.2 QUIET) -if(TINYXML_FOUND) - message(STATUS "Looking for TINYXML - ${TINYXML_VERSION} found") -else() - message(SEND_ERROR "Looking for TINYXML - NOT found, please install libtinyxml-dev (>= 2.6.2)") -endif() - -# TINYXML2 -find_package(TINYXML2 QUIET) -if(TINYXML2_FOUND) - message(STATUS "Looking for TINYXML2 - ${TINYXML2_VERSION} found") -else() - message(SEND_ERROR "Looking for TINYXML2 - NOT found, please install libtinyxml2-dev (>= 1.0.1)") -endif() - -# urdfdom -find_package(urdfdom QUIET) -if(urdfdom_FOUND) - message(STATUS "Looking for urdfdom - found") -else() - message(SEND_ERROR "Looking for urdfdom - NOT found, please install liburdfdom-dev") -endif() -if(MSVC) - set(urdfdom_LIBRARIES optimized urdfdom_sensor debug urdfdom_sensord - optimized urdfdom_model_state debug urdfdom_model_stated - optimized urdfdom_model debug urdfdom_modeld - optimized urdfdom_world debug urdfdom_worldd - optimized console_bridge debug console_bridged) -endif() +#=========================================== +# Optional dependencies for DART components +#=========================================== -#----------------------- -# Optional dependencies -#----------------------- message(STATUS "") -message(STATUS "[ Optional dependencies ]") - -# OpenSceneGraph -if(DART_BUILD_GUI_OSG) - - find_package(OpenSceneGraph 3.0 QUIET - COMPONENTS osg osgViewer osgManipulator osgGA osgDB) - if(OPENSCENEGRAPH_FOUND) - message(STATUS "Looking for OpenSceneGraph - ${OPENSCENEGRAPH_VERSION} found") - set(HAVE_OPENSCENEGRAPH TRUE) - else(OPENSCENEGRAPH_FOUND) - # dart-gui-osg requires both OSG and OpenThreads. This section attempts to - # identify which of those are missing from the building machine and offer - # advice to the user for getting dart-gui-osg to build. - find_package(OpenThreads QUIET) - if(OPENTHREADS_FOUND) - set(warning_msg "Could NOT find OpenSceneGraph") - else(OPENTHREADS_FOUND) - if(OSG_LIBRARY) - set(warning_msg "Could NOT find OpenThreads") - else(OSG_LIBRARY) - set(warning_msg "Could NOT find OpenSceneGraph nor OpenThreads") - endif(OSG_LIBRARY) - endif(OPENTHREADS_FOUND) - message(WARNING "${warning_msg} -- we will skip dart-gui-osg\n" - "If you believe you do have both OSG and OpenThreads installed, try setting OSG_DIR") - set(HAVE_OPENSCENEGRAPH FALSE) - endif(OPENSCENEGRAPH_FOUND) - -else() - - message(STATUS "Skipping OpenSceneGraph (DART_BUILD_GUI_OSG == ${DART_BUILD_GUI_OSG})") - set(HAVE_OPENSCENEGRAPH FALSE) - -endif(DART_BUILD_GUI_OSG) +message(STATUS "[ Optional dependencies for DART components ]") # OpenMP if(ENABLE_OPENMP) @@ -232,13 +138,17 @@ if(ENABLE_OPENMP) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") endif() +#--------------------------------- +# Dependencies for dart-optimizer +#--------------------------------- + # NLOPT find_package(NLOPT 2.4.1 QUIET) if(NLOPT_FOUND) message(STATUS "Looking for NLOPT - ${NLOPT_VERSION} found") set(HAVE_NLOPT TRUE) else() - message(STATUS "Looking for NLOPT - NOT found, please install libnlopt-dev (>= 2.4.1)") + message(STATUS "Looking for NLOPT - NOT found, to build dart-optimizer-nlopt, please install libnlopt-dev (>= 2.4.1)") set(HAVE_NLOPT FALSE) endif() @@ -248,7 +158,7 @@ if(IPOPT_FOUND) message(STATUS "Looking for IPOPT - ${IPOPT_VERSION} found") set(HAVE_IPOPT TRUE) else() - message(STATUS "Looking for IPOPT - NOT found, please install coinor-libipopt-dev (>= 3.11.4)") + message(STATUS "Looking for IPOPT - NOT found, to build dart-optimizer-ipopt, please install coinor-libipopt-dev (>= 3.11.4)") set(HAVE_IPOPT FALSE) endif() @@ -258,10 +168,15 @@ if(SHARK_FOUND) message(STATUS "Looking for SHARK - ${SHARK_VERSION} found") set(HAVE_SHARK TRUE) else() - message(STATUS "Looking for SHARK - NOT found, please install SHARK (http://image.diku.dk/shark)") + # message(STATUS "Looking for SHARK - NOT found, please install SHARK (http://image.diku.dk/shark)") + # TODO(JS): Disabled since not used anywhere for now set(HAVE_SHARK FALSE) endif() +#--------------------------------- +# Dependencies for dart-collision +#--------------------------------- + # Bullet. Force MODULE mode to use the FindBullet.cmake file distributed with # CMake. Otherwise, we may end up using the BulletConfig.cmake file distributed # with Bullet, which uses relative paths and may break transitive dependencies. @@ -298,22 +213,133 @@ if(BULLET_FOUND) set(HAVE_BULLET_COLLISION TRUE) else() - message(STATUS "Looking for Bullet - NOT found, please install libbullet-dev") + message(STATUS "Looking for Bullet - NOT found, to use BulletCollisionDetector, please install libbullet-dev") set(HAVE_BULLET_COLLISION FALSE) endif() +#-------------------------------- +# Dependencies for dart-planning +#-------------------------------- + +# FLANN +find_package(FLANN 1.8.4 QUIET) +if(FLANN_FOUND) + message(STATUS "Looking for FLANN - ${FLANN_VERSION} found") +else() + message(STATUS "Looking for FLANN - NOT found, to build dart-planning, please install libflann-dev (>= 1.8.4)") +endif() + +#----------------------------- +# Dependencies for dart-utils +#----------------------------- + +# TINYXML +find_package(TINYXML 2.6.2 QUIET) +if(TINYXML_FOUND) + message(STATUS "Looking for TINYXML - ${TINYXML_VERSION} found") +else() + message(STATUS "Looking for TINYXML - NOT found, please install libtinyxml-dev (>= 2.6.2)") +endif() + +# TINYXML2 +find_package(TINYXML2 QUIET) +if(TINYXML2_FOUND) + message(STATUS "Looking for TINYXML2 - ${TINYXML2_VERSION} found") +else() + message(STATUS "Looking for TINYXML2 - NOT found, please install libtinyxml2-dev (>= 1.0.1)") +endif() + +# urdfdom +find_package(urdfdom QUIET) +if(urdfdom_FOUND) + message(STATUS "Looking for urdfdom - found") +else() + message(STATUS "Looking for urdfdom - NOT found, please install liburdfdom-dev") +endif() +if(MSVC) + set(urdfdom_LIBRARIES optimized urdfdom_sensor debug urdfdom_sensord + optimized urdfdom_model_state debug urdfdom_model_stated + optimized urdfdom_model debug urdfdom_modeld + optimized urdfdom_world debug urdfdom_worldd + optimized console_bridge debug console_bridged) +endif() + +#--------------------------- +# Dependencies for dart-gui +#--------------------------- + +# OpenGL +find_package(OpenGL QUIET) +if(OPENGL_FOUND) + message(STATUS "Looking for OpenGL - found") +else() + message(STATUS "Looking for OpenGL - NOT found, to build dart-gui, please install OpenGL") +endif() + +# GLUT +if(WIN32 AND NOT CYGWIN) + set(GLUT_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include") + set(GLUT_LIBRARIES glut32) +else() + find_package(GLUT QUIET) + if(GLUT_FOUND) + message(STATUS "Looking for GLUT - found") + set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY}) + else() + message(STATUS "Looking for GLUT - NOT found, to build dart-gui, please install freeglut3-dev") + endif() +endif() + +# OpenSceneGraph +if(DART_BUILD_GUI_OSG) + + find_package(OpenSceneGraph 3.0 QUIET + COMPONENTS osg osgViewer osgManipulator osgGA osgDB) + if(OPENSCENEGRAPH_FOUND) + message(STATUS "Looking for OpenSceneGraph - ${OPENSCENEGRAPH_VERSION} found") + set(HAVE_OPENSCENEGRAPH TRUE) + else(OPENSCENEGRAPH_FOUND) + # dart-gui-osg requires both OSG and OpenThreads. This section attempts to + # identify which of those are missing from the building machine and offer + # advice to the user for getting dart-gui-osg to build. + find_package(OpenThreads QUIET) + if(OPENTHREADS_FOUND) + set(warning_msg "Could NOT find OpenSceneGraph") + else(OPENTHREADS_FOUND) + if(OSG_LIBRARY) + set(warning_msg "Could NOT find OpenThreads") + else(OSG_LIBRARY) + set(warning_msg "Could NOT find OpenSceneGraph nor OpenThreads") + endif(OSG_LIBRARY) + endif(OPENTHREADS_FOUND) + message(WARNING "${warning_msg} -- we will skip dart-gui-osg\n" + "If you believe you do have both OSG and OpenThreads installed, try setting OSG_DIR") + set(HAVE_OPENSCENEGRAPH FALSE) + endif(OPENSCENEGRAPH_FOUND) + +else() + + message(STATUS "Skipping OpenSceneGraph (DART_BUILD_GUI_OSG == ${DART_BUILD_GUI_OSG})") + set(HAVE_OPENSCENEGRAPH FALSE) + +endif(DART_BUILD_GUI_OSG) + +#-------------------- +# Misc. dependencies +#-------------------- + # Perl modules find_package(PerlModules COMPONENTS Regexp::Common Getopt::ArgvFile Getopt::Long Term::ANSIColor QUIET) if("${PERLMODULES_FOUND}" STREQUAL "TRUE") message(STATUS "Looking for PerlModules - found") else() - message(STATUS "Looking for PerlModules - NOT found, please install Regexp::Common Getopt::ArgvFile Getopt::Long Term::ANSIColor (http://www.cpan.org/modules/INSTALL.html)") + message(STATUS "Looking for PerlModules - NOT found, to colorize gcc messages, please install Regexp::Common Getopt::ArgvFile Getopt::Long Term::ANSIColor (http://www.cpan.org/modules/INSTALL.html)") endif() # Doxygen find_package(Doxygen QUIET) if(DOXYGEN_FOUND) - message(STATUS "Looking for Doxygen - found") + message(STATUS "Looking for Doxygen - ${DOXYGEN_VERSION} found") else() - message(STATUS "Looking for Doxygen - NOT found, please install doxygen") + message(STATUS "Looking for Doxygen - NOT found, to generate the API documentation, please install doxygen") endif() From c4ae8771462e2fc291030a5b630b5f1675ea34dd Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 10:26:16 -0400 Subject: [PATCH 12/26] Remove unnecessary cmake script lines --- CMakeLists.txt | 20 -------------------- dart/CMakeLists.txt | 8 +++++++- unittests/CMakeLists.txt | 1 - 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b858098097549..b81d3c856916a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,26 +122,6 @@ if(HAVE_BULLET_COLLISION) endif() include_directories("${CMAKE_BINARY_DIR}") -#=============================================================================== -# Link directories -#=============================================================================== -link_directories("${CMAKE_BINARY_DIR}/lib") -link_directories("${CMAKE_INSTALL_PREFIX}/lib") -link_directories(${Boost_LIBRARY_DIRS}) - -#=============================================================================== -# DART dependency variable settings -#=============================================================================== -set(DART_DEPENDENCIES ${CCD_LIBRARIES} - ${FCL_LIBRARIES} - ${ASSIMP_LIBRARIES} - ${Boost_LIBRARIES} -) - -if(HAVE_BULLET_COLLISION) - set(DART_DEPENDENCIES ${DART_DEPENDENCIES} ${BULLET_LIBRARIES}) -endif() - #=============================================================================== # Check for non-case-sensitive filesystems #=============================================================================== diff --git a/dart/CMakeLists.txt b/dart/CMakeLists.txt index cf98f4a8294e5..954fdef84be1e 100644 --- a/dart/CMakeLists.txt +++ b/dart/CMakeLists.txt @@ -47,7 +47,13 @@ set(dart_srcs # Library: dart dart_add_library(dart ${dart_hdrs} ${dart_srcs}) -target_link_libraries(dart ${DART_DEPENDENCIES}) +target_link_libraries(dart ${CCD_LIBRARIES} + ${FCL_LIBRARIES} + ${ASSIMP_LIBRARIES} + ${Boost_LIBRARIES}) +if(HAVE_BULLET_COLLISION) + target_link_libraries(dart ${BULLET_LIBRARIES}) +endif() if(MSVC) set_target_properties( diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index fef191b83703d..5de8239a4318c 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -63,7 +63,6 @@ foreach(test ${tests}) get_filename_component(base ${test} NAME_WE) list(APPEND all_tests ${base}) - link_directories(${DARTExt_LIBRARY_DIRS}) add_executable(${base} ${test}) dart_add_unittest(${base}) From 4309abebec99c40e4163f0bc6871a87628b740e7 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 10:37:55 -0400 Subject: [PATCH 13/26] Reverting #635: Keep using mesh for primitive shapes because FCL (even 0.4) still returns incorrect contact points for primitive shapes --- cmake/DARTFindDependencies.cmake | 15 --------------- dart/config.h.in | 2 -- 2 files changed, 17 deletions(-) diff --git a/cmake/DARTFindDependencies.cmake b/cmake/DARTFindDependencies.cmake index e68412458384d..fb6dd1aeb9737 100644 --- a/cmake/DARTFindDependencies.cmake +++ b/cmake/DARTFindDependencies.cmake @@ -24,24 +24,9 @@ else() endif() # FCL -# TODO: We need to increate the minimum required fcl version to 0.4.0 for DART -# 5.0 once fcl 0.4.0 is released. find_package(FCL 0.2.9 QUIET) if(FCL_FOUND) message(STATUS "Looking for FCL - ${FCL_VERSION} found") - if(FCL_VERSION) - if("${FCL_VERSION}" VERSION_LESS "0.4.0") - message(WARNING - "Found FCL version ${FCL_VERSION}, which is older than 0.4.0. FCL" - " versions predating 0.4.0 return incorrect contacts for" - " primitive-primitive collsions. You should use FCLMeshCollisionDetector" - " instead of FCLCollisionDetector if you need accurate contacts." - ) - set(DART_USE_FCLMESHCOLLISIONDETECTOR TRUE) - else() - set(DART_USE_FCLMESHCOLLISIONDETECTOR FALSE) - endif() - endif() else() message(SEND_ERROR "Looking for FCL - NOT found, please install libfcl-dev (>= 0.2.9)") endif() diff --git a/dart/config.h.in b/dart/config.h.in index 9235c478b3fd3..21c7a3ca9b7b9 100644 --- a/dart/config.h.in +++ b/dart/config.h.in @@ -47,8 +47,6 @@ #cmakedefine01 HAVE_SNOPT #cmakedefine01 HAVE_BULLET_COLLISION -#cmakedefine01 DART_USE_FCLMESHCOLLISIONDETECTOR - #define DART_ROOT_PATH "@CMAKE_SOURCE_DIR@/" #define DART_DATA_PATH "@CMAKE_SOURCE_DIR@/data/" From f084f493e328a1d9e107bb387c2b8c3c7bc1a17e Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 10:45:21 -0400 Subject: [PATCH 14/26] Add OPENGL_FOUND to the condition of adding gui directory to build --- dart/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/CMakeLists.txt b/dart/CMakeLists.txt index 954fdef84be1e..b5857112505f9 100644 --- a/dart/CMakeLists.txt +++ b/dart/CMakeLists.txt @@ -73,7 +73,7 @@ if(FLANN_FOUND) add_subdirectory(planning) endif() -if(GLUT_FOUND) +if(OPENGL_FOUND AND GLUT_FOUND) add_subdirectory(gui) endif() From eeaebb71f12477a1fbb931bbd12ce257bd7913fb Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 11:35:53 -0400 Subject: [PATCH 15/26] Update debian files for DART 6.0 -- not tested --- debian/control | 341 +++++++++++++++++- debian/copyright | 2 +- debian/libdart-core5.1.install | 1 - debian/libdart-gui-osg0-dev.install | 2 + debian/libdart-gui-osg0.1.install | 1 + debian/libdart-gui0-dev.install | 2 + debian/libdart-gui0.1.install | 1 + debian/libdart-optimizer-ipopt0-dev.install | 2 + debian/libdart-optimizer-ipopt0.1.install | 1 + debian/libdart-optimizer-nlopt0-dev.install | 2 + debian/libdart-optimizer-nlopt0.1.install | 1 + debian/libdart-planning0-dev.install | 2 + debian/libdart-planning0.1.install | 1 + debian/libdart-utils0-dev.install | 2 + debian/libdart-utils0.1.install | 1 + debian/libdart5-dev.install | 10 - debian/libdart5.1.install | 2 - ...core5-dev.install => libdart6-dev.install} | 13 +- debian/libdart6.0.install | 1 + debian/rules | 3 + 20 files changed, 356 insertions(+), 35 deletions(-) delete mode 100644 debian/libdart-core5.1.install create mode 100644 debian/libdart-gui-osg0-dev.install create mode 100644 debian/libdart-gui-osg0.1.install create mode 100644 debian/libdart-gui0-dev.install create mode 100644 debian/libdart-gui0.1.install create mode 100644 debian/libdart-optimizer-ipopt0-dev.install create mode 100644 debian/libdart-optimizer-ipopt0.1.install create mode 100644 debian/libdart-optimizer-nlopt0-dev.install create mode 100644 debian/libdart-optimizer-nlopt0.1.install create mode 100644 debian/libdart-planning0-dev.install create mode 100644 debian/libdart-planning0.1.install create mode 100644 debian/libdart-utils0-dev.install create mode 100644 debian/libdart-utils0.1.install delete mode 100644 debian/libdart5-dev.install delete mode 100644 debian/libdart5.1.install rename debian/{libdart-core5-dev.install => libdart6-dev.install} (51%) create mode 100644 debian/libdart6.0.install diff --git a/debian/control b/debian/control index 1ae442ca3a304..3c31333c12700 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,10 @@ Build-Depends: debhelper (>= 9), cmake, libeigen3-dev, libfcl-dev (>= 0.2.7), + libbullet-dev, libassimp-dev (>= 3), + libnlopt-dev, + coinor-libipopt-dev, freeglut3-dev, libxi-dev, libxmu-dev, @@ -24,16 +27,17 @@ Homepage: http://dartsim.github.io/ Vcs-Git: git://github.com/dartsim/dart.git Vcs-Browser: https://github.com/dartsim/dart -Package: libdart-core5-dev +Package: libdart6-dev Section: libdevel Architecture: any Pre-Depends: ${misc:Pre-Depends} -Conflicts: libdart-core3-dev, libdart-core4-dev +Conflicts: libdart-core3-dev, libdart-core4-dev, libdart-core5-dev Depends: ${misc:Depends}, - libdart-core5.1 (= ${binary:Version}), + libdart6.0 (= ${binary:Version}), libeigen3-dev, libassimp-dev (>= 3), libfcl-dev, + libbullet-dev, libboost-all-dev (>= 1.54.0.1ubuntu1) Description: Dynamic Animation and Robotics Toolkit, core development files DART is a collaborative, cross-platform, open source library created by the @@ -59,21 +63,237 @@ Description: Dynamic Animation and Robotics Toolkit, core development files Multibody dynamic simulation in DART is an extension of RTQL8, an open source software created by the Georgia Tech Graphics Lab. -Package: libdart5-dev +Package: libdart6.0 +Section: libs +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-planning6-dev +Section: libdevel +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + libdart6-dev, + libdart-planning6.0 (= ${binary:Version}), + libflann-dev +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-planning6.0 +Section: libs +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-utils6-dev +Section: libdevel +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + libdart6-dev, + libdart-utils6.0 (= ${binary:Version}), + libtinyxml-dev, + libtinyxml2-dev, + liburdfdom-dev +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-utils6.0 +Section: libs +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-gui6-dev Section: libdevel Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, - libdart-core5-dev, - libdart5.1 (= ${binary:Version}), + libdart6-dev, + libdart-utils6-dev, + libdart-gui6.0 (= ${binary:Version}), freeglut3-dev, libxi-dev, - libxmu-dev, - libtinyxml2-dev, + libxmu-dev +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-gui6.0 +Section: libs +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-gui-osg6-dev +Section: libdevel +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + libdart-gui6-dev, + libdart-gui-osg6.0 (= ${binary:Version}), libopenthreads-dev, - libopenscenegraph-dev, - liburdfdom-dev -Description: Dynamic Animation and Robotics Toolkit, development files + libopenscenegraph-dev +Description: Dynamic Animation and Robotics Toolkit, core library files DART is a collaborative, cross-platform, open source library created by the Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data structures and algorithms for kinematic and dynamic applications in robotics @@ -97,8 +317,69 @@ Description: Dynamic Animation and Robotics Toolkit, development files Multibody dynamic simulation in DART is an extension of RTQL8, an open source software created by the Georgia Tech Graphics Lab. +Package: libdart-gui-osg6.0 +Section: libs +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-optimizer-nlopt6-dev +Section: libdevel +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + libdart6-dev, + libdart-optimizer-nlopt6.0 (= ${binary:Version}), + libnlopt-dev +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. -Package: libdart-core5.1 +Package: libdart-optimizer-nlopt6.0 Section: libs Architecture: any Pre-Depends: ${misc:Pre-Depends} @@ -128,13 +409,45 @@ Description: Dynamic Animation and Robotics Toolkit, core library files Multibody dynamic simulation in DART is an extension of RTQL8, an open source software created by the Georgia Tech Graphics Lab. -Package: libdart5.1 +Package: libdart-optimizer-ipopt6-dev +Section: libdevel +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + libdart6-dev, + libdart-optimizer-ipopt6.0 (= ${binary:Version}), + coinor-libipopt-dev +Description: Dynamic Animation and Robotics Toolkit, core library files + DART is a collaborative, cross-platform, open source library created by the + Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data + structures and algorithms for kinematic and dynamic applications in robotics + and computer animation. + DART is distinguished by it's accuracy and stability due to its use of + generalized coordinates to represent articulated rigid body systems and + computation of Lagrange's equations derived from D.Alembert's principle to + describe the dynamics of motion. + For developers, in contrast to many popular physics engines which view the + simulator as a black box, DART gives full access to internal kinematic and + dynamic quantities, such as the mass matrix, Coriolis and centrifugal forces, + transformation matrices and their derivatives. DART also provides efficient + computation of Jacobian matrices for arbitrary body points and coordinate + frames. Contact and collision are handled using an implicit time-stepping, + velocity-based LCP (linear-complementarity problem) to guarantee + non-penetration, directional friction, and approximated Coulomb friction cone + conditions. For collision detection, DART uses FCL developed by Willow Garage + and the UNC Gamma Lab. + DART has applications in robotics and computer animation because it features a + multibody dynamic simulator and tools for control and motion planning. + Multibody dynamic simulation in DART is an extension of RTQL8, an open source + software created by the Georgia Tech Graphics Lab. + +Package: libdart-optimizer-ipopt6.0 Section: libs Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} -Description: Dynamic Animation and Robotics Toolkit, library files +Description: Dynamic Animation and Robotics Toolkit, core library files DART is a collaborative, cross-platform, open source library created by the Georgia Tech Graphics Lab and Humanoid Robotics Lab. The library provides data structures and algorithms for kinematic and dynamic applications in robotics diff --git a/debian/copyright b/debian/copyright index 8e440a5a76052..de522a71d086d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,7 +3,7 @@ Upstream-Name: DART Source: http://github.com/dartsim/dart Files: * -Copyright: Copyright 2008-2015 Georgia Tech Research Corporation +Copyright: Copyright 2008-2016 Georgia Tech Research Corporation License: BSD-2-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/debian/libdart-core5.1.install b/debian/libdart-core5.1.install deleted file mode 100644 index 160e0e5825234..0000000000000 --- a/debian/libdart-core5.1.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/libdart-core.so.* diff --git a/debian/libdart-gui-osg0-dev.install b/debian/libdart-gui-osg0-dev.install new file mode 100644 index 0000000000000..333a8986d82d2 --- /dev/null +++ b/debian/libdart-gui-osg0-dev.install @@ -0,0 +1,2 @@ +usr/include/dart/gui/osg/* +usr/lib/libdart-gui-osg.so diff --git a/debian/libdart-gui-osg0.1.install b/debian/libdart-gui-osg0.1.install new file mode 100644 index 0000000000000..3ab0e669399a4 --- /dev/null +++ b/debian/libdart-gui-osg0.1.install @@ -0,0 +1 @@ +usr/lib/libdart-gui-osg.so.* diff --git a/debian/libdart-gui0-dev.install b/debian/libdart-gui0-dev.install new file mode 100644 index 0000000000000..c426c2f76db86 --- /dev/null +++ b/debian/libdart-gui0-dev.install @@ -0,0 +1,2 @@ +usr/include/dart/gui/*.* +usr/lib/libdart-gui.so diff --git a/debian/libdart-gui0.1.install b/debian/libdart-gui0.1.install new file mode 100644 index 0000000000000..10382218f6525 --- /dev/null +++ b/debian/libdart-gui0.1.install @@ -0,0 +1 @@ +usr/lib/libdart-gui.so.* diff --git a/debian/libdart-optimizer-ipopt0-dev.install b/debian/libdart-optimizer-ipopt0-dev.install new file mode 100644 index 0000000000000..4134a2e33e711 --- /dev/null +++ b/debian/libdart-optimizer-ipopt0-dev.install @@ -0,0 +1,2 @@ +usr/include/dart/optimizer/ipopt/* +usr/lib/libdart-optimizer-ipopt.so diff --git a/debian/libdart-optimizer-ipopt0.1.install b/debian/libdart-optimizer-ipopt0.1.install new file mode 100644 index 0000000000000..29b2194ab4ad7 --- /dev/null +++ b/debian/libdart-optimizer-ipopt0.1.install @@ -0,0 +1 @@ +usr/lib/libdart-optimizer-ipopt.so.* diff --git a/debian/libdart-optimizer-nlopt0-dev.install b/debian/libdart-optimizer-nlopt0-dev.install new file mode 100644 index 0000000000000..362a0ec48d4ab --- /dev/null +++ b/debian/libdart-optimizer-nlopt0-dev.install @@ -0,0 +1,2 @@ +usr/include/dart/optimizer/nlopt/* +usr/lib/libdart-optimizer-nlopt.so diff --git a/debian/libdart-optimizer-nlopt0.1.install b/debian/libdart-optimizer-nlopt0.1.install new file mode 100644 index 0000000000000..9698d205dfbc6 --- /dev/null +++ b/debian/libdart-optimizer-nlopt0.1.install @@ -0,0 +1 @@ +usr/lib/libdart-optimizer-nlopt.so.* diff --git a/debian/libdart-planning0-dev.install b/debian/libdart-planning0-dev.install new file mode 100644 index 0000000000000..62a151c9849f8 --- /dev/null +++ b/debian/libdart-planning0-dev.install @@ -0,0 +1,2 @@ +usr/include/dart/planning/* +usr/lib/libdart-planning.so diff --git a/debian/libdart-planning0.1.install b/debian/libdart-planning0.1.install new file mode 100644 index 0000000000000..401dbd3bdba24 --- /dev/null +++ b/debian/libdart-planning0.1.install @@ -0,0 +1 @@ +usr/lib/libdart-planning.so.* diff --git a/debian/libdart-utils0-dev.install b/debian/libdart-utils0-dev.install new file mode 100644 index 0000000000000..8ff9df2af0fcf --- /dev/null +++ b/debian/libdart-utils0-dev.install @@ -0,0 +1,2 @@ +usr/include/dart/utils/* +usr/lib/libdart-utils.so diff --git a/debian/libdart-utils0.1.install b/debian/libdart-utils0.1.install new file mode 100644 index 0000000000000..1bb725f83910a --- /dev/null +++ b/debian/libdart-utils0.1.install @@ -0,0 +1 @@ +usr/lib/libdart-utils.so.* diff --git a/debian/libdart5-dev.install b/debian/libdart5-dev.install deleted file mode 100644 index ef992b5fe6edb..0000000000000 --- a/debian/libdart5-dev.install +++ /dev/null @@ -1,10 +0,0 @@ -usr/include/dart/dart.h -usr/include/dart/planning/* -usr/include/dart/utils/* -usr/include/dart/gui/* -usr/include/osgDart/* -usr/share/dart/DARTConfig.cmake -usr/share/dart/DARTConfigVersion.cmake -usr/share/dart/DARTTargets*.cmake -usr/lib/libdart.so -usr/lib/libosgDart.so diff --git a/debian/libdart5.1.install b/debian/libdart5.1.install deleted file mode 100644 index 139dd80dfa42d..0000000000000 --- a/debian/libdart5.1.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/libdart.so.* -usr/lib/libosgDart.so.* diff --git a/debian/libdart-core5-dev.install b/debian/libdart6-dev.install similarity index 51% rename from debian/libdart-core5-dev.install rename to debian/libdart6-dev.install index 5dda48f9d8fbf..e4b1376bc30ed 100644 --- a/debian/libdart-core5-dev.install +++ b/debian/libdart6-dev.install @@ -1,4 +1,4 @@ -usr/include/dart/dart-core.h +usr/include/dart/dart.h usr/include/dart/config.h usr/include/dart/collision/* usr/include/dart/common/* @@ -7,10 +7,9 @@ usr/include/dart/dynamics/* usr/include/dart/integration/* usr/include/dart/lcpsolver/* usr/include/dart/math/* -usr/include/dart/optimizer/* -usr/include/dart/renderer/* +usr/include/dart/optimizer/*.* usr/include/dart/simulation/* -usr/share/dartcore/DARTCoreConfig.cmake -usr/share/dartcore/DARTCoreConfigVersion.cmake -usr/share/dartcore/DARTCoreTargets*.cmake -usr/lib/libdart-core.so +usr/share/dart/DARTConfig.cmake +usr/share/dart/DARTConfigVersion.cmake +usr/share/dart/DARTTargets.cmake +usr/lib/libdart.so diff --git a/debian/libdart6.0.install b/debian/libdart6.0.install new file mode 100644 index 0000000000000..5b286642bf955 --- /dev/null +++ b/debian/libdart6.0.install @@ -0,0 +1 @@ +usr/lib/libdart.so.* diff --git a/debian/rules b/debian/rules index f3b8eb95844e5..55e1c946d1368 100755 --- a/debian/rules +++ b/debian/rules @@ -13,5 +13,8 @@ override_dh_auto_configure: dh_auto_configure -- \ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo +override_dh_auto_build: + dh_auto_build -- tests + %: dh $@ From 3d26c2af5bec9e9403fec9ddf4d86d93a0cdbc38 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 13:26:31 -0400 Subject: [PATCH 16/26] Reduce number of travis ci builds --- .travis.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ecd77f49437dd..66ece4e2b46a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,14 +13,10 @@ compiler: - clang env: - - BUILD_TYPE=Debug COVERALLS=OFF + - BUILD_TYPE=Debug COVERALLS=ON COVERALLS_REPO_TOKEN=FKh1HgwfV5uzNrYxIT6ZWjcFqybYZSUym - BUILD_TYPE=Release COVERALLS=OFF matrix: - include: - - os: linux - compiler: gcc - env: BUILD_TYPE=Debug COVERALLS=ON COVERALLS_REPO_TOKEN=FKh1HgwfV5uzNrYxIT6ZWjcFqybYZSUym exclude: - os: osx compiler: gcc @@ -33,7 +29,7 @@ script: - mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDART_COVERALLS=$COVERALLS .. - make -j4 all tutorials examples tests test - - if [ $COVERALLS = ON ]; then make -j4 coveralls; fi + - if [ $COVERALLS = ON ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then make -j4 coveralls; fi after_failure: - cat Testing/Temporary/LastTest.log From 46e9c03516f9bc71d60c7e066b0e02d82cf66277 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 15:17:29 -0400 Subject: [PATCH 17/26] Let ConstraintSolver set the colliding status of PointMass --- dart/constraint/ConstraintSolver.cpp | 9 +++++++-- dart/constraint/SoftContactConstraint.cpp | 2 ++ dart/dynamics/BodyNode.cpp | 12 ++++++++++++ dart/dynamics/BodyNode.h | 15 ++++++++++++--- dart/dynamics/PointMass.h | 6 ++++-- dart/dynamics/ReferentialSkeleton.cpp | 17 +++++++++++++---- dart/dynamics/Skeleton.cpp | 16 ++++++++++++---- dart/dynamics/SoftBodyNode.cpp | 12 ++++++++++++ dart/dynamics/SoftBodyNode.h | 6 ++++++ 9 files changed, 80 insertions(+), 15 deletions(-) diff --git a/dart/constraint/ConstraintSolver.cpp b/dart/constraint/ConstraintSolver.cpp index 07a59484a128d..c4dc820c89356 100644 --- a/dart/constraint/ConstraintSolver.cpp +++ b/dart/constraint/ConstraintSolver.cpp @@ -398,8 +398,13 @@ void ConstraintSolver::updateConstraints() auto& ct = mCollisionResult.getContact(i); // Set colliding bodies - const_cast(ct.collisionObject1->getShapeFrame())->asShapeNode()->getBodyNodePtr()->setColliding(true); - const_cast(ct.collisionObject2->getShapeFrame())->asShapeNode()->getBodyNodePtr()->setColliding(true); + auto shapeFrame1 = const_cast( + ct.collisionObject1->getShapeFrame()); + auto shapeFrame2 = const_cast( + ct.collisionObject2->getShapeFrame()); + + shapeFrame1->asShapeNode()->getBodyNodePtr()->setColliding(true); + shapeFrame2->asShapeNode()->getBodyNodePtr()->setColliding(true); if (isSoftContact(ct)) { diff --git a/dart/constraint/SoftContactConstraint.cpp b/dart/constraint/SoftContactConstraint.cpp index 2af46a45b7618..b97d0be891984 100644 --- a/dart/constraint/SoftContactConstraint.cpp +++ b/dart/constraint/SoftContactConstraint.cpp @@ -109,6 +109,7 @@ SoftContactConstraint::SoftContactConstraint( { mPointMass1 = selectCollidingPointMass(mSoftBodyNode1, contact.point, contact.triID1); + mPointMass1->setColliding(true); } } if (mSoftBodyNode2) @@ -118,6 +119,7 @@ SoftContactConstraint::SoftContactConstraint( { mPointMass2 = selectCollidingPointMass(mSoftBodyNode2, contact.point, contact.triID2); + mPointMass2->setColliding(true); } } diff --git a/dart/dynamics/BodyNode.cpp b/dart/dynamics/BodyNode.cpp index 26f3c245117c1..9fa3b9a3e8c66 100644 --- a/dart/dynamics/BodyNode.cpp +++ b/dart/dynamics/BodyNode.cpp @@ -180,6 +180,18 @@ BodyNode::~BodyNode() delete mParentJoint; } +//============================================================================== +SoftBodyNode* BodyNode::asSoftBodyNode() +{ + return nullptr; +} + +//============================================================================== +const SoftBodyNode* BodyNode::asSoftBodyNode() const +{ + return nullptr; +} + //============================================================================== void BodyNode::setProperties(const ExtendedProperties& _properties) { diff --git a/dart/dynamics/BodyNode.h b/dart/dynamics/BodyNode.h index d5b9a8d574939..f5507da750220 100644 --- a/dart/dynamics/BodyNode.h +++ b/dart/dynamics/BodyNode.h @@ -103,6 +103,14 @@ class BodyNode : /// Destructor virtual ~BodyNode(); + /// Convert 'this' into a SoftBodyNode pointer if this BodyNode is a + /// SoftBodyNode, otherwise return nullptr + virtual SoftBodyNode* asSoftBodyNode(); + + /// Convert 'const this' into a SoftBodyNode pointer if this BodyNode is a + /// SoftBodyNode, otherwise return nullptr + virtual const SoftBodyNode* asSoftBodyNode() const; + /// Set the ExtendedProperties of this BodyNode void setProperties(const ExtendedProperties& _properties); @@ -699,12 +707,13 @@ class BodyNode : /// Return the velocity change due to the constraint impulse const Eigen::Vector6d& getBodyVelocityChange() const; - /// Set whether this body node is colliding with others. This is called by - /// collision detector. + /// Set whether this body node is colliding with other objects. Note that + /// this status is set by the constraint solver during dynamics simulation but + /// not by collision detector. /// \param[in] True if this body node is colliding. void setColliding(bool _isColliding); - /// Return whether this body node is colliding with others + /// Return whether this body node is set to be colliding with other objects. /// \return True if this body node is colliding. bool isColliding(); diff --git a/dart/dynamics/PointMass.h b/dart/dynamics/PointMass.h index 6df83d7be6969..95fa3de38a0e7 100644 --- a/dart/dynamics/PointMass.h +++ b/dart/dynamics/PointMass.h @@ -156,11 +156,13 @@ class PointMass : public common::Subject const PointMass* getConnectedPointMass(size_t _idx) const; - /// Set whether this point mass is colliding with others. + /// Set whether this point mass is colliding with other objects. Note that + /// this status is set by the constraint solver during dynamics simulation but + /// not by collision detector. /// \param[in] True if this point mass is colliding. void setColliding(bool _isColliding); - /// Get whether this point mass is colliding with others. + /// Return whether this point mass is set to be colliding with other objects. /// \return True if this point mass is colliding. bool isColliding(); diff --git a/dart/dynamics/ReferentialSkeleton.cpp b/dart/dynamics/ReferentialSkeleton.cpp index 1de7b7eff6fd7..676fe22287370 100644 --- a/dart/dynamics/ReferentialSkeleton.cpp +++ b/dart/dynamics/ReferentialSkeleton.cpp @@ -36,6 +36,7 @@ #include "dart/dynamics/ReferentialSkeleton.h" #include "dart/dynamics/BodyNode.h" +#include "dart/dynamics/SoftBodyNode.h" #include "dart/dynamics/Joint.h" #include "dart/dynamics/DegreeOfFreedom.h" @@ -788,11 +789,19 @@ double ReferentialSkeleton::getPotentialEnergy() const //============================================================================== void ReferentialSkeleton::clearCollidingBodies() { - for(size_t i = 0; i < this->getNumBodyNodes(); i++) + for (auto i = 0u; i < getNumBodyNodes(); ++i) { - auto bd = this->getBodyNode(i); - if(bd) - bd->setColliding(false); + auto bodyNode = getBodyNode(i); + bodyNode->setColliding(false); + + auto softBodyNode = bodyNode->asSoftBodyNode(); + if (softBodyNode) + { + auto& pointMasses = softBodyNode->getPointMasses(); + + for (auto pointMass : pointMasses) + pointMass->setColliding(false); + } } } diff --git a/dart/dynamics/Skeleton.cpp b/dart/dynamics/Skeleton.cpp index 243ee8518d153..6a6a6c1226e0e 100644 --- a/dart/dynamics/Skeleton.cpp +++ b/dart/dynamics/Skeleton.cpp @@ -3616,11 +3616,19 @@ double Skeleton::getPotentialEnergy() const //============================================================================== void Skeleton::clearCollidingBodies() { - for(size_t i = 0; i < this->getNumBodyNodes(); i++) + for (auto i = 0u; i < getNumBodyNodes(); ++i) { - auto bd = this->getBodyNode(i); - if(bd) - bd->setColliding(false); + auto bodyNode = getBodyNode(i); + bodyNode->setColliding(false); + + auto softBodyNode = bodyNode->asSoftBodyNode(); + if (softBodyNode) + { + auto& pointMasses = softBodyNode->getPointMasses(); + + for (auto pointMass : pointMasses) + pointMass->setColliding(false); + } } } diff --git a/dart/dynamics/SoftBodyNode.cpp b/dart/dynamics/SoftBodyNode.cpp index 3e47a4e2f09f8..ad011c7799367 100644 --- a/dart/dynamics/SoftBodyNode.cpp +++ b/dart/dynamics/SoftBodyNode.cpp @@ -127,6 +127,18 @@ SoftBodyNode::~SoftBodyNode() delete mNotifier; } +//============================================================================== +SoftBodyNode* SoftBodyNode::asSoftBodyNode() +{ + return this; +} + +//============================================================================== +const SoftBodyNode* SoftBodyNode::asSoftBodyNode() const +{ + return this; +} + //============================================================================== void SoftBodyNode::setProperties(const Properties& _properties) { diff --git a/dart/dynamics/SoftBodyNode.h b/dart/dynamics/SoftBodyNode.h index cac06047f8b26..9be2fdc64a16d 100644 --- a/dart/dynamics/SoftBodyNode.h +++ b/dart/dynamics/SoftBodyNode.h @@ -121,6 +121,12 @@ class SoftBodyNode : public BodyNode /// \brief virtual ~SoftBodyNode(); + // Documentation inherited + SoftBodyNode* asSoftBodyNode() override; + + // Documentation inherited + const SoftBodyNode* asSoftBodyNode() const override; + /// Set the Properties of this SoftBodyNode void setProperties(const Properties& _properties); From d22b556e954354e2dc7fc85e756fc8c25868ebda Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Thu, 14 Apr 2016 17:06:53 -0400 Subject: [PATCH 18/26] Add simple regression test for #666 --- unittests/testCollision.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/unittests/testCollision.cpp b/unittests/testCollision.cpp index ade51d056e526..757306b90b434 100644 --- a/unittests/testCollision.cpp +++ b/unittests/testCollision.cpp @@ -802,6 +802,18 @@ void testCreateCollisionGroups(const std::shared_ptr& cd) EXPECT_TRUE(skeletonGroup1->collide(skeletonGroup2.get(), option, result)); EXPECT_TRUE(bodyNodeGroup1->collide(bodyNodeGroup2.get(), option, result)); EXPECT_TRUE(shapeNodeGroup1->collide(shapeNodeGroup2.get(), option, result)); + + // Regression test for #666 + auto world = common::make_unique(); + world->getConstraintSolver()->setCollisionDetector(cd); + world->addSkeleton(boxSkeleton1); + world->addSkeleton(boxSkeleton2); + EXPECT_FALSE(boxBodyNode1->isColliding()); + EXPECT_FALSE(boxBodyNode2->isColliding()); + + world->step(); + EXPECT_TRUE(boxBodyNode1->isColliding()); + EXPECT_TRUE(boxBodyNode2->isColliding()); } //============================================================================== From 5d0d9ffa34425a46c379022b0fcfea5d92219e09 Mon Sep 17 00:00:00 2001 From: "M.X. Grey" Date: Fri, 15 Apr 2016 14:37:57 -0400 Subject: [PATCH 19/26] Made changes according to the discussion in PR #668 --- dart/collision/Contact.cpp | 17 ++++ dart/collision/Contact.h | 3 + dart/collision/Result.cpp | 65 ++++++++++++++++ dart/collision/Result.h | 34 ++++++++ dart/collision/dart/DARTCollide.cpp | 77 +++++++++++++++---- dart/collision/dart/DARTCollide.h | 17 ++-- dart/collision/dart/DARTCollisionDetector.cpp | 4 +- dart/dynamics/BodyNode.h | 3 + dart/dynamics/MetaSkeleton.h | 1 + dart/dynamics/ReferentialSkeleton.h | 1 + dart/dynamics/Skeleton.h | 1 + 11 files changed, 198 insertions(+), 25 deletions(-) diff --git a/dart/collision/Contact.cpp b/dart/collision/Contact.cpp index 98f4269fbc0e8..57a825822bb1b 100644 --- a/dart/collision/Contact.cpp +++ b/dart/collision/Contact.cpp @@ -3,6 +3,7 @@ * All rights reserved. * * Author(s): Jeongseok Lee + * Michael X. Grey * * Georgia Tech Graphics Lab and Humanoid Robotics Lab * @@ -39,5 +40,21 @@ namespace dart { namespace collision { +//============================================================================== +Contact::Contact() + : point(Eigen::Vector3d::Zero()), + normal(Eigen::Vector3d::Zero()), + force(Eigen::Vector3d::Zero()), + collisionObject1(nullptr), + collisionObject2(nullptr), + penetrationDepth(0), + triID1(0), + triID2(0), + userData(nullptr) +{ + // TODO(MXG): Consider using NaN instead of zero for uninitialized quantities + // Do nothing +} + } // namespace collision } // namespace dart diff --git a/dart/collision/Contact.h b/dart/collision/Contact.h index 7d3f5a51f5c0b..5a7416377d850 100644 --- a/dart/collision/Contact.h +++ b/dart/collision/Contact.h @@ -47,6 +47,9 @@ namespace collision { /// Contact information struct Contact { + /// Default constructor + Contact(); + /// Contact point w.r.t. the world frame Eigen::Vector3d point; diff --git a/dart/collision/Result.cpp b/dart/collision/Result.cpp index 55333262fb879..485af81942a8f 100644 --- a/dart/collision/Result.cpp +++ b/dart/collision/Result.cpp @@ -35,6 +35,11 @@ */ #include "dart/collision/Result.h" +#include "dart/collision/CollisionObject.h" + +#include "dart/dynamics/ShapeFrame.h" +#include "dart/dynamics/ShapeNode.h" +#include "dart/dynamics/BodyNode.h" namespace dart { namespace collision { @@ -43,6 +48,8 @@ namespace collision { void CollisionResult::addContact(const Contact& contact) { mContacts.push_back(contact); + addObject(contact.collisionObject1); + addObject(contact.collisionObject2); } //============================================================================== @@ -73,16 +80,74 @@ const std::vector& CollisionResult::getContacts() const return mContacts; } +//============================================================================== +const std::unordered_set +CollisionResult::getCollidingBodyNodes() const +{ + return mCollidingBodyNodes; +} + +//============================================================================== +const std::unordered_set +CollisionResult::getCollidingShapeFrames() const +{ + return mCollidingShapeFrames; +} + +//============================================================================== +bool CollisionResult::inCollision(const dynamics::BodyNode* bn) const +{ + return (mCollidingBodyNodes.find(bn) != mCollidingBodyNodes.end()); +} + +//============================================================================== +bool CollisionResult::inCollision(const dynamics::ShapeFrame* frame) const +{ + return (mCollidingShapeFrames.find(frame) != mCollidingShapeFrames.end()); +} + //============================================================================== bool CollisionResult::isCollision() const { return !mContacts.empty(); } +//============================================================================== +CollisionResult::operator bool() const +{ + return isCollision(); +} + //============================================================================== void CollisionResult::clear() { mContacts.clear(); + mCollidingShapeFrames.clear(); + mCollidingBodyNodes.clear(); +} + +//============================================================================== +void CollisionResult::addObject(CollisionObject* object) +{ + if(!object) + { + dterr << "[CollisionResult::addObject] Attempting to add a collision with " + << "a nullptr object to a CollisionResult instance. This is not " + << "allowed. Please report this as a bug!"; + assert(false); + return; + } + + const dynamics::ShapeFrame* frame = object->getShapeFrame(); + mCollidingShapeFrames.insert(frame); + + if(frame->isShapeNode()) + { + const dynamics::ShapeNode* node = + dynamic_cast(frame); + + mCollidingBodyNodes.insert(node->getBodyNodePtr()); + } } } // namespace collision diff --git a/dart/collision/Result.h b/dart/collision/Result.h index 4e3ded8970193..053a05a117ec3 100644 --- a/dart/collision/Result.h +++ b/dart/collision/Result.h @@ -38,9 +38,18 @@ #define DART_COLLISION_RESULT_H_ #include +#include #include "dart/collision/Contact.h" namespace dart { + +namespace dynamics { + +class BodyNode; +class ShapeFrame; + +} // namespace dynamics + namespace collision { class CollisionResult @@ -62,17 +71,42 @@ class CollisionResult /// Return contacts const std::vector& getContacts() const; + /// Return the set of BodyNodes that are in collision + const std::unordered_set + getCollidingBodyNodes() const; + + /// Return the set of ShapeFrames that are in collision + const std::unordered_set + getCollidingShapeFrames() const; + + /// Returns true if the given BodyNode is in collision + bool inCollision(const dynamics::BodyNode* bn) const; + + /// Returns true if the given ShapeFrame is in collision + bool inCollision(const dynamics::ShapeFrame* frame) const; + /// Return binary collision result bool isCollision() const; + /// Implicitly converts this CollisionResult to the value of isCollision() + operator bool() const; + /// Clear all the contacts void clear(); protected: + void addObject(CollisionObject* object); + /// List of contact information for each contact std::vector mContacts; + /// Set of BodyNodes that are colliding + std::unordered_set mCollidingBodyNodes; + + /// Set of ShapeFrames that are colliding + std::unordered_set mCollidingShapeFrames; + }; } // namespace collision diff --git a/dart/collision/dart/DARTCollide.cpp b/dart/collision/dart/DARTCollide.cpp index 9e7da65946a12..d9bc7ae8fae5c 100644 --- a/dart/collision/dart/DARTCollide.cpp +++ b/dart/collision/dart/DARTCollide.cpp @@ -35,6 +35,7 @@ */ #include "dart/collision/dart/DARTCollide.h" +#include "dart/collision/CollisionObject.h" #include @@ -417,7 +418,8 @@ void dClosestLineBoxPoints (const dVector3 p1, const dVector3 p2, // `contact' and `skip' are the contact array information provided to the // collision functions. this function only fills in the position and depth // fields. -int dBoxBox(const dVector3 p1, const dMatrix3 R1, const dVector3 side1, +int dBoxBox(CollisionObject* o1, CollisionObject* o2, + const dVector3 p1, const dMatrix3 R1, const dVector3 side1, const dVector3 p2, const dMatrix3 R2, const dVector3 side2, CollisionResult& result) { @@ -583,6 +585,8 @@ int dBoxBox(const dVector3 p1, const dMatrix3 R1, const dVector3 side1, penetration = -s; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = point_vec; contact.normal = normal; contact.penetrationDepth = penetration; @@ -764,6 +768,8 @@ int dBoxBox(const dVector3 p1, const dMatrix3 R1, const dVector3 side1, point_vec << point[j*3+0] + pa[0], point[j*3+1] + pa[1], point[j*3+2] + pa[2]; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = point_vec; contact.normal = normal; contact.penetrationDepth = dep[j]; @@ -791,6 +797,8 @@ int dBoxBox(const dVector3 p1, const dMatrix3 R1, const dVector3 side1, point_vec << point[iret[j]*3+0] + pa[0], point[iret[j]*3+1] + pa[1], point[iret[j]*3+2] + pa[2]; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = point_vec; contact.normal = normal; contact.penetrationDepth = dep[iret[j]]; @@ -800,7 +808,8 @@ int dBoxBox(const dVector3 p1, const dMatrix3 R1, const dVector3 side1, return cnum; } -int collideBoxBox(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, +int collideBoxBox(CollisionObject* o1, CollisionObject* o2, + const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, const Eigen::Vector3d& size1, const Eigen::Isometry3d& T1, CollisionResult& result) { @@ -821,10 +830,11 @@ int collideBoxBox(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, convVector(T0.translation(), p0); convVector(T1.translation(), p1); - return dBoxBox(p1, R1, halfSize1, p0, R0, halfSize0, result); + return dBoxBox(o1, o2, p1, R1, halfSize1, p0, R0, halfSize0, result); } -int collideBoxSphere(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, +int collideBoxSphere(CollisionObject* o1, CollisionObject* o2, + const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, const double& r1, const Eigen::Isometry3d& T1, CollisionResult& result) { @@ -874,6 +884,8 @@ int collideBoxSphere(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, penetration = min + r1; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = c0; contact.normal = normal; contact.penetrationDepth = penetration; @@ -897,6 +909,8 @@ int collideBoxSphere(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, normal *= (1.0/mag); Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = contactpt; contact.normal = normal; contact.penetrationDepth = penetration; @@ -925,6 +939,8 @@ int collideBoxSphere(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, normal = T0.linear() * normal; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = contactpt; contact.normal = normal; contact.penetrationDepth = penetration; @@ -933,7 +949,8 @@ int collideBoxSphere(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, return 1; } -int collideSphereBox(const double& r0, const Eigen::Isometry3d& T0, +int collideSphereBox(CollisionObject* o1, CollisionObject* o2, + const double& r0, const Eigen::Isometry3d& T0, const Eigen::Vector3d& size1, const Eigen::Isometry3d& T1, CollisionResult& result) { @@ -981,6 +998,8 @@ int collideSphereBox(const double& r0, const Eigen::Isometry3d& T0, penetration = min + r0; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = c0; contact.normal = normal; contact.penetrationDepth = penetration; @@ -1004,10 +1023,13 @@ int collideSphereBox(const double& r0, const Eigen::Isometry3d& T0, normal *= (1.0/mag); Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = contactpt; contact.normal = normal; contact.penetrationDepth = penetration; - result.addContact(contact);} + result.addContact(contact); + } else { double min = size[0] - std::abs(p[0]); @@ -1030,6 +1052,8 @@ int collideSphereBox(const double& r0, const Eigen::Isometry3d& T0, normal = T1.linear() * normal; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = contactpt; contact.normal = normal; contact.penetrationDepth = penetration; @@ -1038,7 +1062,7 @@ int collideSphereBox(const double& r0, const Eigen::Isometry3d& T0, return 1; } -int collideSphereSphere(const double& _r0, const Eigen::Isometry3d& c0, +int collideSphereSphere(CollisionObject* o1, CollisionObject* o2, const double& _r0, const Eigen::Isometry3d& c0, const double& _r1, const Eigen::Isometry3d& c1, CollisionResult& result) { @@ -1065,6 +1089,8 @@ int collideSphereSphere(const double& _r0, const Eigen::Isometry3d& c0, penetration = rsum; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = point; contact.normal = normal; contact.penetrationDepth = penetration; @@ -1077,6 +1103,8 @@ int collideSphereSphere(const double& _r0, const Eigen::Isometry3d& c0, penetration = rsum - normal_sqr; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = point; contact.normal = normal; contact.penetrationDepth = penetration; @@ -1085,7 +1113,7 @@ int collideSphereSphere(const double& _r0, const Eigen::Isometry3d& c0, } -int collideCylinderSphere(const double& cyl_rad, const double& half_height, const Eigen::Isometry3d& T0, +int collideCylinderSphere(CollisionObject* o1, CollisionObject* o2, const double& cyl_rad, const double& half_height, const Eigen::Isometry3d& T0, const double& sphere_rad, const Eigen::Isometry3d& T1, CollisionResult& result) { @@ -1096,6 +1124,8 @@ int collideCylinderSphere(const double& cyl_rad, const double& half_height, cons if ( dist < cyl_rad && std::abs(center[2]) < half_height + sphere_rad ) { Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.penetrationDepth = 0.5 * (half_height + sphere_rad - math::sign(center[2]) * center[2]); contact.point = T0 * Eigen::Vector3d(center[0], center[1], half_height - contact.penetrationDepth); contact.normal = T0.linear() * Eigen::Vector3d(0.0, 0.0, math::sign(center[2])); @@ -1120,6 +1150,8 @@ int collideCylinderSphere(const double& cyl_rad, const double& half_height, cons if (penetration > 0.0) { Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = point; contact.normal = normal; contact.penetrationDepth = penetration; @@ -1136,6 +1168,8 @@ int collideCylinderSphere(const double& cyl_rad, const double& half_height, cons point = T0 * point; Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = point; contact.normal = normal; contact.penetrationDepth = penetration; @@ -1147,7 +1181,7 @@ int collideCylinderSphere(const double& cyl_rad, const double& half_height, cons return 0; } -int collideCylinderPlane(const double& cyl_rad, const double& half_height, const Eigen::Isometry3d& T0, +int collideCylinderPlane(CollisionObject* o1, CollisionObject* o2, const double& cyl_rad, const double& half_height, const Eigen::Isometry3d& T0, const Eigen::Vector3d& plane_normal, const Eigen::Isometry3d& T1, CollisionResult& result) { @@ -1206,6 +1240,8 @@ int collideCylinderPlane(const double& cyl_rad, const double& half_height, const if (penetration > 0.0) { Contact contact; + contact.collisionObject1 = o1; + contact.collisionObject2 = o2; contact.point = point; contact.normal = normal; contact.penetrationDepth = penetration; @@ -1217,10 +1253,13 @@ int collideCylinderPlane(const double& cyl_rad, const double& half_height, const } //============================================================================== -int collide(dynamics::ConstShapePtr shape0, const Eigen::Isometry3d& T0, - dynamics::ConstShapePtr shape1, const Eigen::Isometry3d& T1, - CollisionResult& result) +int collide(CollisionObject* o1, CollisionObject* o2, CollisionResult& result) { + const dynamics::ConstShapePtr& shape0 = o1->getShape(); + const dynamics::ConstShapePtr& shape1 = o2->getShape(); + const Eigen::Isometry3d& T0 = o1->getTransform(); + const Eigen::Isometry3d& T1 = o2->getTransform(); + dynamics::Shape::ShapeType LeftType = shape0->getShapeType(); dynamics::Shape::ShapeType RightType = shape1->getShapeType(); @@ -1235,13 +1274,15 @@ int collide(dynamics::ConstShapePtr shape0, const Eigen::Isometry3d& T0, case dynamics::Shape::BOX: { const dynamics::BoxShape* box1 = static_cast(shape1.get()); - return collideBoxBox(box0->getSize(), T0, + return collideBoxBox(o1, o2, + box0->getSize(), T0, box1->getSize(), T1, result); } case dynamics::Shape::ELLIPSOID: { const dynamics::EllipsoidShape* ellipsoid1 = static_cast(shape1.get()); - return collideBoxSphere(box0->getSize(), T0, + return collideBoxSphere(o1, o2, + box0->getSize(), T0, ellipsoid1->getSize()[0] * 0.5, T1, result); } @@ -1264,14 +1305,16 @@ int collide(dynamics::ConstShapePtr shape0, const Eigen::Isometry3d& T0, case dynamics::Shape::BOX: { const dynamics::BoxShape* box1 = static_cast(shape1.get()); - return collideSphereBox(ellipsoid0->getSize()[0] * 0.5, T0, + return collideSphereBox(o1, o2, + ellipsoid0->getSize()[0] * 0.5, T0, box1->getSize(), T1, result); } case dynamics::Shape::ELLIPSOID: { const dynamics::EllipsoidShape* ellipsoid1 = static_cast(shape1.get()); - return collideSphereSphere(ellipsoid0->getSize()[0] * 0.5, T0, + return collideSphereSphere(o1, o2, + ellipsoid0->getSize()[0] * 0.5, T0, ellipsoid1->getSize()[0] * 0.5, T1, result); } @@ -1288,6 +1331,8 @@ int collide(dynamics::ConstShapePtr shape0, const Eigen::Isometry3d& T0, break; } + + return false; } } // namespace collision diff --git a/dart/collision/dart/DARTCollide.h b/dart/collision/dart/DARTCollide.h index 4a676c0c168a2..06ce1fb279cec 100644 --- a/dart/collision/dart/DARTCollide.h +++ b/dart/collision/dart/DARTCollide.h @@ -53,33 +53,38 @@ class Shape; namespace dart { namespace collision { -int collide(dart::dynamics::ConstShapePtr shape0, const Eigen::Isometry3d& T0, - dart::dynamics::ConstShapePtr shape1, const Eigen::Isometry3d& T1, +int collide(CollisionObject* o1, CollisionObject* o2, CollisionResult& result); -int collideBoxBox(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, +int collideBoxBox(CollisionObject* o1, CollisionObject* o2, + const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, const Eigen::Vector3d& size1, const Eigen::Isometry3d& T1, CollisionResult& result); -int collideBoxSphere(const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, +int collideBoxSphere(CollisionObject* o1, CollisionObject* o2, + const Eigen::Vector3d& size0, const Eigen::Isometry3d& T0, const double& r1, const Eigen::Isometry3d& T1, CollisionResult& result); -int collideSphereBox(const double& r0, const Eigen::Isometry3d& T0, +int collideSphereBox(CollisionObject* o1, CollisionObject* o2, + const double& r0, const Eigen::Isometry3d& T0, const Eigen::Vector3d& size1, const Eigen::Isometry3d& T1, CollisionResult& result); -int collideSphereSphere(const double& r0, const Eigen::Isometry3d& c0, +int collideSphereSphere(CollisionObject* o1, CollisionObject* o2, + const double& r0, const Eigen::Isometry3d& c0, const double& r1, const Eigen::Isometry3d& c1, CollisionResult& result); int collideCylinderSphere( + CollisionObject* o1, CollisionObject* o2, const double& cyl_rad, const double& half_height, const Eigen::Isometry3d& T0, const double& sphere_rad, const Eigen::Isometry3d& T1, CollisionResult& result); int collideCylinderPlane( + CollisionObject* o1, CollisionObject* o2, const double& cyl_rad, const double& half_height, const Eigen::Isometry3d& T0, const Eigen::Vector3d& plane_normal, const Eigen::Isometry3d& T1, diff --git a/dart/collision/dart/DARTCollisionDetector.cpp b/dart/collision/dart/DARTCollisionDetector.cpp index ba4d3a9d599d8..4bdcc6740bba6 100644 --- a/dart/collision/dart/DARTCollisionDetector.cpp +++ b/dart/collision/dart/DARTCollisionDetector.cpp @@ -254,9 +254,7 @@ bool checkPair(CollisionObject* o1, CollisionObject* o2, CollisionResult pairResult; // Perform narrow-phase detection - auto colliding = collide(o1->getShape(), o1->getTransform(), - o2->getShape(), o2->getTransform(), - pairResult); + auto colliding = collide(o1, o2, pairResult); postProcess(o1, o2, option, result, pairResult); diff --git a/dart/dynamics/BodyNode.h b/dart/dynamics/BodyNode.h index f5507da750220..97179a22902c8 100644 --- a/dart/dynamics/BodyNode.h +++ b/dart/dynamics/BodyNode.h @@ -711,10 +711,12 @@ class BodyNode : /// this status is set by the constraint solver during dynamics simulation but /// not by collision detector. /// \param[in] True if this body node is colliding. + DEPRECATED(6.0) void setColliding(bool _isColliding); /// Return whether this body node is set to be colliding with other objects. /// \return True if this body node is colliding. + DEPRECATED(6.0) bool isColliding(); /// Add applying linear Cartesian forces to this node @@ -1033,6 +1035,7 @@ class BodyNode : UniqueProperties mBodyP; /// Whether the node is currently in collision with another node. + DEPRECATED(6.0) bool mIsColliding; //-------------------------------------------------------------------------- diff --git a/dart/dynamics/MetaSkeleton.h b/dart/dynamics/MetaSkeleton.h index 0b8c816fcc4d6..53e4aa36fce5c 100644 --- a/dart/dynamics/MetaSkeleton.h +++ b/dart/dynamics/MetaSkeleton.h @@ -538,6 +538,7 @@ class MetaSkeleton : public common::Subject virtual double getPotentialEnergy() const = 0; /// Clear collision flags of the BodyNodes in this MetaSkeleton + DEPRECATED(6.0) virtual void clearCollidingBodies() = 0; /// \} diff --git a/dart/dynamics/ReferentialSkeleton.h b/dart/dynamics/ReferentialSkeleton.h index d7a44d24ed891..fc69bad483f07 100644 --- a/dart/dynamics/ReferentialSkeleton.h +++ b/dart/dynamics/ReferentialSkeleton.h @@ -274,6 +274,7 @@ class ReferentialSkeleton : public MetaSkeleton double getPotentialEnergy() const override; // Documentation inherited + DEPRECATED(6.0) void clearCollidingBodies() override; /// \} diff --git a/dart/dynamics/Skeleton.h b/dart/dynamics/Skeleton.h index 2bf283e515019..c65a5431f0512 100644 --- a/dart/dynamics/Skeleton.h +++ b/dart/dynamics/Skeleton.h @@ -879,6 +879,7 @@ class Skeleton : double getPotentialEnergy() const override; // Documentation inherited + DEPRECATED(6.0) void clearCollidingBodies() override; /// \} From 88dadaaaa0b4e3a224730ef964d6790992089915 Mon Sep 17 00:00:00 2001 From: "M.X. Grey" Date: Fri, 15 Apr 2016 14:43:32 -0400 Subject: [PATCH 20/26] Function to access the last collision result of a World's constraint solver --- dart/simulation/World.cpp | 6 ++++++ dart/simulation/World.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dart/simulation/World.cpp b/dart/simulation/World.cpp index df49a363091de..3e115f77b7811 100644 --- a/dart/simulation/World.cpp +++ b/dart/simulation/World.cpp @@ -502,6 +502,12 @@ bool World::checkCollision(bool checkAllCollisions) return mConstraintSolver->getCollisionGroup()->collide(option, result); } +//============================================================================== +const collision::CollisionResult& World::getLastCollisionResult() const +{ + return mConstraintSolver->getLastCollisionResult(); +} + //============================================================================== constraint::ConstraintSolver* World::getConstraintSolver() const { diff --git a/dart/simulation/World.h b/dart/simulation/World.h index f43b23ba24ea6..66315383109ab 100644 --- a/dart/simulation/World.h +++ b/dart/simulation/World.h @@ -70,6 +70,10 @@ namespace constraint { class ConstraintSolver; } // namespace constraint +namespace collision { +class CollisionResult; +} // namespace collision + namespace simulation { /// class World @@ -174,6 +178,8 @@ class World : public virtual common::Subject /// Return whether there is any collision between bodies bool checkCollision(bool _checkAllCollisions = false); + const collision::CollisionResult& getLastCollisionResult() const; + //-------------------------------------------------------------------------- // Simulation //-------------------------------------------------------------------------- From 8b27d8267233cc5258630b88caaac4077360dcc1 Mon Sep 17 00:00:00 2001 From: "M.X. Grey" Date: Fri, 15 Apr 2016 14:59:52 -0400 Subject: [PATCH 21/26] created test for new CollisionResult function --- dart/collision/Contact.cpp | 2 +- dart/dynamics/ShapeNode.cpp | 2 ++ unittests/testCollision.cpp | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dart/collision/Contact.cpp b/dart/collision/Contact.cpp index 57a825822bb1b..d67ade9aed02f 100644 --- a/dart/collision/Contact.cpp +++ b/dart/collision/Contact.cpp @@ -2,7 +2,7 @@ * Copyright (c) 2016, Georgia Tech Research Corporation * All rights reserved. * - * Author(s): Jeongseok Lee + * Author(s): Jeongseok Lee , * Michael X. Grey * * Georgia Tech Graphics Lab and Humanoid Robotics Lab diff --git a/dart/dynamics/ShapeNode.cpp b/dart/dynamics/ShapeNode.cpp index c3933fccc403b..82c194b87328d 100644 --- a/dart/dynamics/ShapeNode.cpp +++ b/dart/dynamics/ShapeNode.cpp @@ -337,6 +337,7 @@ ShapeNode::ShapeNode(BodyNode* bodyNode, const Properties& properties) onShapeUpdated(mShapeUpdatedSignal), onRelativeTransformUpdated(mRelativeTransformUpdatedSignal) { + mAmShapeNode = true; setProperties(properties); } @@ -354,6 +355,7 @@ ShapeNode::ShapeNode(BodyNode* bodyNode, onShapeUpdated(mShapeUpdatedSignal), onRelativeTransformUpdated(mRelativeTransformUpdatedSignal) { + mAmShapeNode = true; Properties prop; prop.mShape = shape; prop.mName = name; diff --git a/unittests/testCollision.cpp b/unittests/testCollision.cpp index 757306b90b434..f7b0eaf1eb49f 100644 --- a/unittests/testCollision.cpp +++ b/unittests/testCollision.cpp @@ -811,9 +811,19 @@ void testCreateCollisionGroups(const std::shared_ptr& cd) EXPECT_FALSE(boxBodyNode1->isColliding()); EXPECT_FALSE(boxBodyNode2->isColliding()); + const collision::CollisionResult& result1 = world->getLastCollisionResult(); + EXPECT_FALSE(result1.inCollision(boxBodyNode1)); + EXPECT_FALSE(result1.inCollision(boxBodyNode2)); + world->step(); EXPECT_TRUE(boxBodyNode1->isColliding()); EXPECT_TRUE(boxBodyNode2->isColliding()); + + const collision::CollisionResult& result2 = world->getLastCollisionResult(); + EXPECT_TRUE(result2.inCollision(boxBodyNode1)); + EXPECT_TRUE(result2.inCollision(boxBodyNode2)); + + std::cout << "Num body nodes: " << result2.getCollidingBodyNodes().size() << std::endl; } //============================================================================== From 0cf7037d66565496c6a66882ce3e3619304fe72f Mon Sep 17 00:00:00 2001 From: "M.X. Grey" Date: Fri, 15 Apr 2016 15:00:37 -0400 Subject: [PATCH 22/26] removed unnecessary printout --- unittests/testCollision.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/unittests/testCollision.cpp b/unittests/testCollision.cpp index f7b0eaf1eb49f..cfde092532b69 100644 --- a/unittests/testCollision.cpp +++ b/unittests/testCollision.cpp @@ -822,8 +822,6 @@ void testCreateCollisionGroups(const std::shared_ptr& cd) const collision::CollisionResult& result2 = world->getLastCollisionResult(); EXPECT_TRUE(result2.inCollision(boxBodyNode1)); EXPECT_TRUE(result2.inCollision(boxBodyNode2)); - - std::cout << "Num body nodes: " << result2.getCollidingBodyNodes().size() << std::endl; } //============================================================================== From 7cfbb56a2d7270b731025e157c343be88cefcd2a Mon Sep 17 00:00:00 2001 From: "M.X. Grey" Date: Fri, 15 Apr 2016 16:05:16 -0400 Subject: [PATCH 23/26] Return a const reference instead of a const value --- dart/collision/Result.cpp | 8 +++----- dart/collision/Result.h | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dart/collision/Result.cpp b/dart/collision/Result.cpp index 485af81942a8f..e8e8d1ff65a3f 100644 --- a/dart/collision/Result.cpp +++ b/dart/collision/Result.cpp @@ -81,14 +81,14 @@ const std::vector& CollisionResult::getContacts() const } //============================================================================== -const std::unordered_set +const std::unordered_set& CollisionResult::getCollidingBodyNodes() const { return mCollidingBodyNodes; } //============================================================================== -const std::unordered_set +const std::unordered_set& CollisionResult::getCollidingShapeFrames() const { return mCollidingShapeFrames; @@ -143,9 +143,7 @@ void CollisionResult::addObject(CollisionObject* object) if(frame->isShapeNode()) { - const dynamics::ShapeNode* node = - dynamic_cast(frame); - + const dynamics::ShapeNode* node = frame->asShapeNode(); mCollidingBodyNodes.insert(node->getBodyNodePtr()); } } diff --git a/dart/collision/Result.h b/dart/collision/Result.h index 053a05a117ec3..aad8149a2c30e 100644 --- a/dart/collision/Result.h +++ b/dart/collision/Result.h @@ -72,11 +72,11 @@ class CollisionResult const std::vector& getContacts() const; /// Return the set of BodyNodes that are in collision - const std::unordered_set + const std::unordered_set& getCollidingBodyNodes() const; /// Return the set of ShapeFrames that are in collision - const std::unordered_set + const std::unordered_set& getCollidingShapeFrames() const; /// Returns true if the given BodyNode is in collision From 2eafa54a769aaf562bfdcd263a559425ac2628cf Mon Sep 17 00:00:00 2001 From: "M.X. Grey" Date: Fri, 15 Apr 2016 16:05:49 -0400 Subject: [PATCH 24/26] Add a comment to motivate asShapeNode() --- dart/dynamics/ShapeFrame.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dart/dynamics/ShapeFrame.h b/dart/dynamics/ShapeFrame.h index c0b7c9a8279e5..6da6b95d77541 100644 --- a/dart/dynamics/ShapeFrame.h +++ b/dart/dynamics/ShapeFrame.h @@ -323,7 +323,10 @@ class ShapeFrame : virtual ShapeNode* asShapeNode(); /// Convert 'const this' into a ShapeNode pointer if ShapeFrame is a ShapeNode, - /// otherwise return nullptr + /// otherwise return nullptr. + /// + /// This should be preferred over performing a dynamic_cast when you want to + /// cast a ShapeFrame into a ShapeNode, because this method costs less. virtual const ShapeNode* asShapeNode() const; protected: From aeedcbf3bca6b2a582a71b0bd31473c605fee7d2 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Fri, 15 Apr 2016 22:05:40 -0400 Subject: [PATCH 25/26] Suppress warnings --- apps/atlasSimbicon/TerminalCondition.cpp | 2 ++ dart/constraint/ConstraintSolver.cpp | 4 +++ dart/dynamics/BodyNode.h | 2 +- dart/dynamics/ReferentialSkeleton.cpp | 4 +++ dart/dynamics/Shape.h | 1 - dart/dynamics/Skeleton.cpp | 3 ++ dart/utils/SkelParser.cpp | 2 ++ dart/utils/sdf/SdfParser.cpp | 37 +++--------------------- unittests/testCollision.cpp | 4 +++ 9 files changed, 24 insertions(+), 35 deletions(-) diff --git a/apps/atlasSimbicon/TerminalCondition.cpp b/apps/atlasSimbicon/TerminalCondition.cpp index 9d46a0da12e73..b215db4780eaa 100644 --- a/apps/atlasSimbicon/TerminalCondition.cpp +++ b/apps/atlasSimbicon/TerminalCondition.cpp @@ -113,7 +113,9 @@ bool BodyContactCondition::isSatisfied() } // TODO(JS): Need more elegant condition check method +DART_SUPPRESS_DEPRECATED_BEGIN if (mBodyNode->isColliding() > 0) +DART_SUPPRESS_DEPRECATED_END { // dtmsg << "BodyNode [" << mBodyNode->getName() << "] is in contact." // << std::endl; diff --git a/dart/constraint/ConstraintSolver.cpp b/dart/constraint/ConstraintSolver.cpp index c4dc820c89356..0ba8b795b35f2 100644 --- a/dart/constraint/ConstraintSolver.cpp +++ b/dart/constraint/ConstraintSolver.cpp @@ -293,7 +293,9 @@ void ConstraintSolver::solve() for (size_t i = 0; i < mSkeletons.size(); ++i) { mSkeletons[i]->clearConstraintImpulses(); +DART_SUPPRESS_DEPRECATED_BEGIN mSkeletons[i]->clearCollidingBodies(); +DART_SUPPRESS_DEPRECATED_END } // Update constraints and collect active constraints @@ -403,8 +405,10 @@ void ConstraintSolver::updateConstraints() auto shapeFrame2 = const_cast( ct.collisionObject2->getShapeFrame()); +DART_SUPPRESS_DEPRECATED_BEGIN shapeFrame1->asShapeNode()->getBodyNodePtr()->setColliding(true); shapeFrame2->asShapeNode()->getBodyNodePtr()->setColliding(true); +DART_SUPPRESS_DEPRECATED_END if (isSoftContact(ct)) { diff --git a/dart/dynamics/BodyNode.h b/dart/dynamics/BodyNode.h index 97179a22902c8..c5812aa2377ca 100644 --- a/dart/dynamics/BodyNode.h +++ b/dart/dynamics/BodyNode.h @@ -1035,7 +1035,7 @@ class BodyNode : UniqueProperties mBodyP; /// Whether the node is currently in collision with another node. - DEPRECATED(6.0) + /// \deprecated DEPRECATED(6.0) See #670 for more detail. bool mIsColliding; //-------------------------------------------------------------------------- diff --git a/dart/dynamics/ReferentialSkeleton.cpp b/dart/dynamics/ReferentialSkeleton.cpp index 676fe22287370..9743a19742d5f 100644 --- a/dart/dynamics/ReferentialSkeleton.cpp +++ b/dart/dynamics/ReferentialSkeleton.cpp @@ -35,6 +35,8 @@ */ #include "dart/dynamics/ReferentialSkeleton.h" + +#include "dart/common/Deprecated.h" #include "dart/dynamics/BodyNode.h" #include "dart/dynamics/SoftBodyNode.h" #include "dart/dynamics/Joint.h" @@ -792,7 +794,9 @@ void ReferentialSkeleton::clearCollidingBodies() for (auto i = 0u; i < getNumBodyNodes(); ++i) { auto bodyNode = getBodyNode(i); +DART_SUPPRESS_DEPRECATED_BEGIN bodyNode->setColliding(false); +DART_SUPPRESS_DEPRECATED_END auto softBodyNode = bodyNode->asSoftBodyNode(); if (softBodyNode) diff --git a/dart/dynamics/Shape.h b/dart/dynamics/Shape.h index 4ecfa28299a32..b5d62a454374d 100644 --- a/dart/dynamics/Shape.h +++ b/dart/dynamics/Shape.h @@ -46,7 +46,6 @@ #include "dart/common/Deprecated.h" #include "dart/common/Subject.h" #include "dart/dynamics/SmartPointer.h" -#include "dart/common/Deprecated.h" namespace dart { namespace dynamics { diff --git a/dart/dynamics/Skeleton.cpp b/dart/dynamics/Skeleton.cpp index 6a6a6c1226e0e..dff047911c588 100644 --- a/dart/dynamics/Skeleton.cpp +++ b/dart/dynamics/Skeleton.cpp @@ -43,6 +43,7 @@ #include #include "dart/common/Console.h" +#include "dart/common/Deprecated.h" #include "dart/common/StlHelpers.h" #include "dart/math/Geometry.h" #include "dart/math/Helpers.h" @@ -3619,7 +3620,9 @@ void Skeleton::clearCollidingBodies() for (auto i = 0u; i < getNumBodyNodes(); ++i) { auto bodyNode = getBodyNode(i); +DART_SUPPRESS_DEPRECATED_BEGIN bodyNode->setColliding(false); +DART_SUPPRESS_DEPRECATED_END auto softBodyNode = bodyNode->asSoftBodyNode(); if (softBodyNode) diff --git a/dart/utils/SkelParser.cpp b/dart/utils/SkelParser.cpp index 99d29659fe4bd..145a47334bb12 100644 --- a/dart/utils/SkelParser.cpp +++ b/dart/utils/SkelParser.cpp @@ -1367,6 +1367,8 @@ void readJoint(tinyxml2::XMLElement* _jointElement, joint.properties = readPrismaticJoint(_jointElement, joint, name); else if (joint.type == std::string("revolute")) joint.properties = readRevoluteJoint(_jointElement, joint, name); + else if (joint.type == std::string("screw")) + joint.properties = readScrewJoint(_jointElement, joint, name); else if (joint.type == std::string("universal")) joint.properties = readUniversalJoint(_jointElement, joint, name); else if (joint.type == std::string("ball")) diff --git a/dart/utils/sdf/SdfParser.cpp b/dart/utils/sdf/SdfParser.cpp index 8ad4e2dbdcbe1..789d402e6f74e 100644 --- a/dart/utils/sdf/SdfParser.cpp +++ b/dart/utils/sdf/SdfParser.cpp @@ -58,10 +58,8 @@ #include "dart/dynamics/PrismaticJoint.h" #include "dart/dynamics/RevoluteJoint.h" #include "dart/dynamics/ScrewJoint.h" -#include "dart/dynamics/TranslationalJoint.h" #include "dart/dynamics/BallJoint.h" #include "dart/dynamics/FreeJoint.h" -#include "dart/dynamics/EulerJoint.h" #include "dart/dynamics/UniversalJoint.h" #include "dart/dynamics/Skeleton.h" #include "dart/simulation/World.h" @@ -231,21 +229,6 @@ dynamics::BallJoint::Properties readBallJoint( const Eigen::Isometry3d& parentModelFrame, const std::string& name); -dart::dynamics::EulerJoint* readEulerJoint( - tinyxml2::XMLElement* jointElement, - const Eigen::Isometry3d& parentModelFrame, - const std::string& name); - -dart::dynamics::TranslationalJoint::Properties readTranslationalJoint( - tinyxml2::XMLElement* jointElement, - const Eigen::Isometry3d& parentModelFrame, - const std::string& name); - -dynamics::FreeJoint::Properties readFreeJoint( - tinyxml2::XMLElement* jointElement, - const Eigen::Isometry3d& parentModelFrame, - const std::string& name); - common::ResourceRetrieverPtr getRetriever( const common::ResourceRetrieverPtr& retriever); @@ -1184,6 +1167,10 @@ SDFJoint readJoint(tinyxml2::XMLElement* _jointElement, Eigen::Isometry3d parentModelFrame = (childWorld * childToJoint).inverse() * _skeletonFrame; + if (type == std::string("fixed")) + newJoint.properties = + Eigen::make_aligned_shared( + readWeldJoint(_jointElement, parentModelFrame, name)); if (type == std::string("prismatic")) newJoint.properties = Eigen::make_aligned_shared( @@ -1466,22 +1453,6 @@ dynamics::BallJoint::Properties readBallJoint( return dynamics::BallJoint::Properties(); } -dynamics::TranslationalJoint::Properties readTranslationalJoint( - tinyxml2::XMLElement* /*_jointElement*/, - const Eigen::Isometry3d&, - const std::string&) -{ - return dynamics::TranslationalJoint::Properties(); -} - -dynamics::FreeJoint::Properties readFreeJoint( - tinyxml2::XMLElement* /*_jointElement*/, - const Eigen::Isometry3d&, - const std::string&) -{ - return dynamics::FreeJoint::Properties(); -} - //============================================================================== common::ResourceRetrieverPtr getRetriever( const common::ResourceRetrieverPtr& retriever) diff --git a/unittests/testCollision.cpp b/unittests/testCollision.cpp index cfde092532b69..d37d442979dc2 100644 --- a/unittests/testCollision.cpp +++ b/unittests/testCollision.cpp @@ -808,16 +808,20 @@ void testCreateCollisionGroups(const std::shared_ptr& cd) world->getConstraintSolver()->setCollisionDetector(cd); world->addSkeleton(boxSkeleton1); world->addSkeleton(boxSkeleton2); +DART_SUPPRESS_DEPRECATED_BEGIN EXPECT_FALSE(boxBodyNode1->isColliding()); EXPECT_FALSE(boxBodyNode2->isColliding()); +DART_SUPPRESS_DEPRECATED_END const collision::CollisionResult& result1 = world->getLastCollisionResult(); EXPECT_FALSE(result1.inCollision(boxBodyNode1)); EXPECT_FALSE(result1.inCollision(boxBodyNode2)); world->step(); +DART_SUPPRESS_DEPRECATED_BEGIN EXPECT_TRUE(boxBodyNode1->isColliding()); EXPECT_TRUE(boxBodyNode2->isColliding()); +DART_SUPPRESS_DEPRECATED_END const collision::CollisionResult& result2 = world->getLastCollisionResult(); EXPECT_TRUE(result2.inCollision(boxBodyNode1)); From 9499a5a8ec2e8cb58400912b291d8634627aa536 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Fri, 15 Apr 2016 22:06:55 -0400 Subject: [PATCH 26/26] Update DART_PKG_EXTERNAL_DEPS --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b81d3c856916a..e51eb2db060b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ set(DART_MINOR_VERSION "0") set(DART_PATCH_VERSION "0") set(DART_VERSION "${DART_MAJOR_VERSION}.${DART_MINOR_VERSION}.${DART_PATCH_VERSION}") set(DART_PKG_DESC "Dynamic Animation and Robotics Toolkit.") -set(DART_PKG_EXTERNAL_DEPS "flann, ccd, fcl") +set(DART_PKG_EXTERNAL_DEPS "eigen, ccd, fcl, assimp, boost") #=============================================================================== # Print intro