Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into travis_ci_trusty
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Dec 8, 2015
2 parents 8e1034c + dca2755 commit 976fbdf
Show file tree
Hide file tree
Showing 137 changed files with 8,061 additions and 2,700 deletions.
62 changes: 57 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ project(dart)

set(DART_MAJOR_VERSION "5")
set(DART_MINOR_VERSION "1")
set(DART_PATCH_VERSION "0")
set(DART_PATCH_VERSION "1")
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")
Expand All @@ -62,6 +62,7 @@ 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)
option(DART_MSVC_DEFAULT_OPTIONS "Build DART with default Visual Studio options" OFF)
else()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
endif()
Expand Down Expand Up @@ -150,6 +151,55 @@ endif()
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})

check_cxx_source_compiles(
"
#include <assimp/scene.h>
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 <assimp/material.h>
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)

else()
if(ASSIMP_VERSION)
message(SEND_ERROR "Looking for ASSIMP - ${ASSIMP_VERSION} found, ${PROJECT_NAME} requires 3.0.0 or greater.")
Expand Down Expand Up @@ -410,7 +460,7 @@ endif()
#===============================================================================
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools/case_sensitive_filesystem
RESULT_VARIABLE FILESYSTEM_CASE_SENSITIVE_RETURN)
if (${FILESYSTEM_CASE_SENSITIVE_RETURN} EQUAL 0)
if(${FILESYSTEM_CASE_SENSITIVE_RETURN} EQUAL 0)
set(FILESYSTEM_CASE_SENSITIVE TRUE)
else()
set(FILESYSTEM_CASE_SENSITIVE FALSE)
Expand All @@ -420,14 +470,16 @@ endif()
# Compiler flags
#===============================================================================
if(MSVC)
message(STATUS "Setup Visual Studio Specific Flags")
# Visual Studio enables c++11 support by default
if(NOT MSVC12)
message(FATAL_ERROR "${PROJECT_NAME} requires VS 2013 or greater.")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DART_RUNTIME_LIBRARY}d /Zi /Gy /W1 /EHsc")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${DART_RUNTIME_LIBRARY} /Zi /GL /Gy /W1 /EHsc /arch:SSE2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP4")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /INCREMENTAL:NO")
if(NOT DART_MSVC_DEFAULT_OPTIONS)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DART_RUNTIME_LIBRARY}d /Zi /Gy /W1 /EHsc")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${DART_RUNTIME_LIBRARY} /Zi /GL /Gy /W1 /EHsc /arch:SSE2")
endif(NOT DART_MSVC_DEFAULT_OPTIONS)
elseif(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "-Wall -msse2 -fPIC")
execute_process(
Expand Down
29 changes: 29 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
### Version 5.1.1 (2015-11-06)

1. Add bullet dependency to package.xml
* [Pull request #523](https://github.com/dartsim/dart/pull/523)

1. Improved handling of missing symbols of Assimp package
* [Pull request #542](https://github.com/dartsim/dart/pull/542)

1. Improved travis-ci build log for Mac
* [Pull request #529](https://github.com/dartsim/dart/pull/529)

1. Fixed warnings in Function.cpp
* [Pull request #550](https://github.com/dartsim/dart/pull/550)

1. Fixed build failures on AppVeyor
* [Pull request #543](https://github.com/dartsim/dart/pull/543)

1. Fixed const qualification of ResourceRetriever
* [Pull request #534](https://github.com/dartsim/dart/pull/534)
* [Issue #532](https://github.com/dartsim/dart/issues/532)

1. Fixed aligned memory allocation with Eigen objects
* [Pull request #527](https://github.com/dartsim/dart/pull/527)

1. Fixed copy safety for various classes
* [Pull request #526](https://github.com/dartsim/dart/pull/526)
* [Pull request #539](https://github.com/dartsim/dart/pull/539)
* [Issue #524](https://github.com/dartsim/dart/issues/524)

### Version 5.1.0 (2015-10-15)

1. Fixed incorrect rotational motion of BallJoint and FreeJoint
Expand Down
7 changes: 4 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ platform:

# specify custom environment variables
environment:
MSVC_DEFAULT_OPTIONS: ON
BOOST_ROOT: C:\Libraries\boost
BOOST_LIBRARYDIR: C:\Libraries\boost\stage\lib
BOOST_LIBRARYDIR: C:\Libraries\boost\lib32-msvc-12.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:
Expand Down Expand Up @@ -43,7 +44,7 @@ branches:

# scripts that run after cloning repository
install:
- ps: cd "C:\projects\dart\ci"
- ps: cd C:\projects\dart\ci
- ps: .\appveyor_install.ps1

# scripts to run before build
Expand All @@ -54,7 +55,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 12
- cmd: if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 12 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%" ..
- 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%" ..

build:
project: C:\projects\dart\build\dart.sln # path to Visual Studio solution or project
Expand Down
4 changes: 2 additions & 2 deletions dart/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ set(dart_core_hdrs
${dart_optimizer_hdrs}
${dart_collision_hdrs}
${dart_constraint_hdrs}
${dart_renderer_hdrs}
${dart_simulation_hdrs}
)
set(dart_core_srcs
Expand All @@ -47,20 +48,19 @@ set(dart_core_srcs
${dart_optimizer_srcs}
${dart_collision_srcs}
${dart_constraint_srcs}
${dart_renderer_srcs}
${dart_simulation_srcs}
)
if(NOT BUILD_CORE_ONLY)
set(dart_hdrs
dart.h
${dart_gui_hdrs}
${dart_planning_hdrs}
${dart_renderer_hdrs}
${dart_utils_hdrs}
)
set(dart_srcs
${dart_gui_srcs}
${dart_planning_srcs}
${dart_renderer_srcs}
${dart_utils_srcs}
)
endif()
Expand Down
44 changes: 44 additions & 0 deletions dart/common/Deprecated.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include "dart/config.h"

#ifndef DART_COMMON_DEPRECATED_H_
#define DART_COMMON_DEPRECATED_H_

Expand All @@ -54,4 +56,46 @@
#define FORCEINLINE
#endif

// We define two convenient macros that can be used to suppress
// deprecated-warnings for a specific code block rather than a whole project.
// This macros would be useful when you need to call deprecated function for
// some reason (e.g., for backward compatibility) but don't want warnings.
//
// Example code:
//
// deprecated_function() // warning
//
// DART_SUPPRESS_DEPRECATED_BEGIN
// deprecated_function() // okay, no warning
// DART_SUPPRESS_DEPRECATED_END
//
#if defined (DART_COMPILER_GCC)

#define DART_SUPPRESS_DEPRECATED_BEGIN \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")

#define DART_SUPPRESS_DEPRECATED_END \
_Pragma("GCC diagnostic pop")

#elif defined (DART_COMPILER_CLANG)

#define DART_SUPPRESS_DEPRECATED_BEGIN \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")

#define DART_SUPPRESS_DEPRECATED_END \
_Pragma("clang diagnostic pop")

#elif defined (DART_COMPILER_MSVC)

#define DART_SUPPRESS_DEPRECATED_BEGIN \
__pragma(warning(push)) \
__pragma(warning(disable:4996))

#define DART_SUPPRESS_DEPRECATED_END \
__pragma(warning(pop))

#endif

#endif // DART_COMMON_DEPRECATED_H_
13 changes: 13 additions & 0 deletions dart/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
(DART_MAJOR_VERSION < x || (DART_MAJOR_VERSION <= x && \
(DART_MINOR_VERSION < y || (DART_MINOR_VERSION <= y))))

// Detect the compiler
#if defined(__clang__)
#define DART_COMPILER_CLANG
#elif defined(__GNUC__) || defined(__GNUG__)
#define DART_COMPILER_GCC
#elif defined(_MSC_VER)
#define DART_COMPILER_MSVC
#endif

#cmakedefine BUILD_TYPE_DEBUG 1
#cmakedefine BUILD_TYPE_RELEASE 1
#cmakedefine BUILD_TYPE_RELWITHDEBINFO 1
Expand All @@ -41,4 +50,8 @@
#define DART_ROOT_PATH "@CMAKE_SOURCE_DIR@/"
#define DART_DATA_PATH "@CMAKE_SOURCE_DIR@/data/"

// See #451
#cmakedefine ASSIMP_AISCENE_CTOR_DTOR_DEFINED 1
#cmakedefine ASSIMP_AIMATERIAL_CTOR_DTOR_DEFINED 1

#endif // #ifndef DART_CONFIG_H_
6 changes: 6 additions & 0 deletions dart/constraint/BalanceConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,12 @@ void BalanceConstraint::setPseudoInverseDamping(double _damping)
clearCaches();
}

//==============================================================================
double BalanceConstraint::getPseudoInverseDamping() const
{
return mDamping;
}

//==============================================================================
const Eigen::Vector3d& BalanceConstraint::getLastError() const
{
Expand Down
2 changes: 1 addition & 1 deletion dart/constraint/BalanceConstraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class BalanceConstraint : public optimizer::Function,
void setPseudoInverseDamping(double _damping);

/// Get the damping factor that will be used when computing the pseudoinverse
double getPseudoInverseDamping();
double getPseudoInverseDamping() const;

/// Get the last error vector that was computed by this BalanceConstraint
const Eigen::Vector3d& getLastError() const;
Expand Down
3 changes: 0 additions & 3 deletions dart/constraint/ConstraintSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ class ConstraintSolver
/// Add a constraint
void addConstraint(ConstraintBase* _constraint);

/// Return the number of constraints
size_t getNumConstraints() const;

/// Remove a constraint
void removeConstraint(ConstraintBase* _constraint);

Expand Down
5 changes: 3 additions & 2 deletions dart/dynamics/BodyNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ void BodyNode::setMomentOfInertia(double _Ixx, double _Iyy, double _Izz,
}

//==============================================================================
void BodyNode::getMomentOfInertia(double& _Ixx, double& _Iyy, double& _Izz,
double& _Ixy, double& _Ixz, double& _Iyz)
void BodyNode::getMomentOfInertia(
double& _Ixx, double& _Iyy, double& _Izz,
double& _Ixy, double& _Ixz, double& _Iyz) const
{
_Ixx = mBodyP.mInertia.getParameter(Inertia::I_XX);
_Iyy = mBodyP.mInertia.getParameter(Inertia::I_YY);
Expand Down
2 changes: 1 addition & 1 deletion dart/dynamics/BodyNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class BodyNode :
/// Return moment of inertia defined around the center of mass
void getMomentOfInertia(
double& _Ixx, double& _Iyy, double& _Izz,
double& _Ixy, double& _Ixz, double& _Iyz);
double& _Ixy, double& _Ixz, double& _Iyz) const;

/// Return spatial inertia
const Eigen::Matrix6d& getSpatialInertia() const;
Expand Down
Loading

0 comments on commit 976fbdf

Please sign in to comment.