Skip to content

Commit

Permalink
Merge branch 'master' into clone
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Apr 20, 2017
2 parents 04d2285 + 52bbd15 commit e8d76f6
Show file tree
Hide file tree
Showing 153 changed files with 3,283 additions and 1,942 deletions.
1 change: 1 addition & 0 deletions ci/install_osx.sh
Expand Up @@ -9,6 +9,7 @@ cmake
assimp
fcl
bullet
ode
flann
boost
eigen
Expand Down
2 changes: 1 addition & 1 deletion ci/script.sh
@@ -1,4 +1,4 @@
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$COMPILER" = "CLANG" ]; then exit; fi
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$COMPILER" = "CLANG" ]; then exit; fi

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDART_VERBOSE=ON -DDART_TREAT_WARNINGS_AS_ERRORS=ON -DDART_COVERALLS=$COVERALLS ..
Expand Down
9 changes: 9 additions & 0 deletions cmake/DARTFindDependencies.cmake
Expand Up @@ -185,6 +185,15 @@ else()
set(HAVE_BULLET_COLLISION FALSE)
endif()

# ODE
find_package(ODE 0.11 QUIET)
dart_check_optional_package(ODE "dart-collision-ode" "ode" "0.11")
if(ODE_FOUND)
set(HAVE_ODE_COLLISION TRUE)
else()
set(HAVE_ODE_COLLISION FALSE)
endif()

#--------------------------------
# Dependencies for dart-planning
#--------------------------------
Expand Down
43 changes: 43 additions & 0 deletions cmake/FindODE.cmake
@@ -0,0 +1,43 @@
# Copyright (c) 2015-2016, Humanoid Lab, Georgia Tech Research Corporation
# Copyright (c) 2015-2017, Graphics Lab, Georgia Tech Research Corporation
# Copyright (c) 2016-2017, Personal Robotics Lab, Carnegie Mellon University
# This file is provided under the "BSD-style" License

# Find ODE
#
# This sets the following variables:
# ODE_FOUND
# ODE_INCLUDE_DIRS
# ODE_LIBRARIES
# ODE_VERSION

find_package(PkgConfig QUIET)

# Check to see if pkgconfig is installed.
pkg_check_modules(PC_ODE ode QUIET)

# Include directories
find_path(ODE_INCLUDE_DIRS
NAMES ode/collision.h
HINTS ${PC_ODE_INCLUDEDIR}
PATHS "${CMAKE_INSTALL_PREFIX}/include")

# Libraries
if(MSVC)
set(ODE_LIBRARIES optimized ode debug oded)
else()
find_library(ODE_LIBRARIES
NAMES ode
HINTS ${PC_ODE_LIBDIR})
endif()

# Version
set(ODE_VERSION ${PC_ODE_VERSION})

# Set (NAME)_FOUND if all the variables and the version are satisfied.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ODE
FAIL_MESSAGE DEFAULT_MSG
REQUIRED_VARS ODE_INCLUDE_DIRS ODE_LIBRARIES
VERSION_VAR ODE_VERSION)

3 changes: 3 additions & 0 deletions dart/collision/CMakeLists.txt
Expand Up @@ -42,6 +42,9 @@ install(
# Add subdirectories
add_subdirectory(dart)
add_subdirectory(fcl)
if(HAVE_ODE_COLLISION)
add_subdirectory(ode)
endif()
if(HAVE_BULLET_COLLISION)
add_subdirectory(bullet)
endif()
3 changes: 2 additions & 1 deletion dart/collision/CollisionDetector.cpp
Expand Up @@ -140,7 +140,8 @@ CollisionDetector::ManagerForSharableCollisionObjects::claimCollisionObject(
{
const auto search = mCollisionObjectMap.find(shapeFrame);

if (mCollisionObjectMap.end() != search)
const auto found = mCollisionObjectMap.end() != search;
if (found)
{
const auto& collObj = search->second;
assert(collObj.lock());
Expand Down

0 comments on commit e8d76f6

Please sign in to comment.