Skip to content

Commit

Permalink
Merge pull request #591 from dartsim/grey/addons_merging_master
Browse files Browse the repository at this point in the history
Merge master branch into #531
  • Loading branch information
jslee02 committed Jan 22, 2016
2 parents c07f7db + b10b4a3 commit bded530
Show file tree
Hide file tree
Showing 124 changed files with 4,917 additions and 2,773 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ language: cpp
os:
- linux
- osx
sudo: required
dist: trusty
compiler:
- gcc
- clang
Expand All @@ -27,3 +29,4 @@ script:
after_failure:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then '../ci/after_failure_linux.sh' ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then '../ci/after_failure_osx.sh' ; fi

74 changes: 65 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#===============================================================================
# CMake settings
#===============================================================================
cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
if(MSVC)
cmake_minimum_required(VERSION 3.1.3)
else()
cmake_minimum_required(VERSION 2.8.6)
endif()

# Use MACOSX_RPATH by default on OS X. This was added in CMake 2.8.12 and
# became default in CMake 3.0. Explicitly setting this policy is necessary to
Expand Down Expand Up @@ -41,7 +45,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 +66,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 +155,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 All @@ -168,7 +222,7 @@ endif()

# Boost
set(DART_MIN_BOOST_VERSION 1.46.0 CACHE INTERNAL "Boost min version requirement" FORCE)
if(MSVC OR MSVC90 OR MSVC10)
if(MSVC)
add_definitions(-DBOOST_ALL_NO_LIB)
endif()
add_definitions(-DBOOST_TEST_DYN_LINK)
Expand Down Expand Up @@ -410,7 +464,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 +474,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.")
if(NOT MSVC14)
message(FATAL_ERROR "${PROJECT_NAME} requires VS 2015 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
37 changes: 35 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
### Version 6.0.0 (2015-12-19)

1. Added missing `liburdfdom-dev` dependency in Ubuntu package
* [Pull request #574](https://github.com/dartsim/dart/pull/574)

### 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 Expand Up @@ -292,7 +326,7 @@
* [Pull request #277](https://github.com/dartsim/dart/pull/277)
1. Added all-inclusive header and namespace headers
* [Pull request #278](https://github.com/dartsim/dart/pull/278)
1. Added DegreeOfFreedom class for getting/setting data of individual generalized coordinates
1. Added DegreeOfFreedom class for getting/setting data of individual generalized coordinates
* [Pull request #288](https://github.com/dartsim/dart/pull/288)
1. Added hybrid dynamics
* [Pull request #298](https://github.com/dartsim/dart/pull/298)
Expand Down Expand Up @@ -445,4 +479,3 @@
1. Clean-up of the Robot class
1. Removed Object class
1. More robust build and installation process on Linux

6 changes: 3 additions & 3 deletions apps/atlasSimbicon/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void Controller::harnessPelvis()
return;

BodyNode* bd = mAtlasRobot->getBodyNode("pelvis");
mWeldJointConstraintPelvis = new WeldJointConstraint(bd);
mWeldJointConstraintPelvis = std::make_shared<WeldJointConstraint>(bd);
mConstratinSolver->addConstraint(mWeldJointConstraintPelvis);
mPelvisHarnessOn = true;

Expand All @@ -257,7 +257,7 @@ void Controller::harnessLeftFoot()
return;

BodyNode* bd = mAtlasRobot->getBodyNode("l_foot");
mWeldJointConstraintLeftFoot = new WeldJointConstraint(bd);
mWeldJointConstraintLeftFoot = std::make_shared<WeldJointConstraint>(bd);
mLeftFootHarnessOn = true;

dtmsg << "Left foot is harnessed." << std::endl;
Expand All @@ -282,7 +282,7 @@ void Controller::harnessRightFoot()
return;

BodyNode* bd = mAtlasRobot->getBodyNode("r_foot");
mWeldJointConstraintRightFoot = new WeldJointConstraint(bd);
mWeldJointConstraintRightFoot = std::make_shared<WeldJointConstraint>(bd);
mRightFootHarnessOn = true;

dtmsg << "Right foot is harnessed." << std::endl;
Expand Down
6 changes: 3 additions & 3 deletions apps/atlasSimbicon/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ class Controller
dart::dynamics::BodyNode* _getRightFoot() const;

/// \brief Weld joint constraint for pelvis harnessing
dart::constraint::WeldJointConstraint* mWeldJointConstraintPelvis;
dart::constraint::WeldJointConstraintPtr mWeldJointConstraintPelvis;

/// \brief Weld joint constraint for left foot harnessing
dart::constraint::WeldJointConstraint* mWeldJointConstraintLeftFoot;
dart::constraint::WeldJointConstraintPtr mWeldJointConstraintLeftFoot;

/// \brief Weld joint constraint for right foot harnessing
dart::constraint::WeldJointConstraint* mWeldJointConstraintRightFoot;
dart::constraint::WeldJointConstraintPtr mWeldJointConstraintRightFoot;

/// \brief Initial state of the robot
Eigen::VectorXd mInitialState;
Expand Down
2 changes: 1 addition & 1 deletion apps/jointConstraints/MyWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void MyWindow::keyboard(unsigned char key, int x, int y)
if (mHarnessOn)
{
BodyNode* bd = mWorld->getSkeleton(1)->getBodyNode("h_pelvis");
mWeldJoint = new WeldJointConstraint(bd);
mWeldJoint = std::make_shared<WeldJointConstraint>(bd);
mWorld->getConstraintSolver()->addConstraint(mWeldJoint);
}
else
Expand Down
2 changes: 1 addition & 1 deletion apps/jointConstraints/MyWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class MyWindow : public dart::gui::SimWindow
private:
Eigen::Vector3d mForce;
Controller* mController;
dart::constraint::WeldJointConstraint* mWeldJoint;
dart::constraint::WeldJointConstraintPtr mWeldJoint;
int mImpulseDuration;
bool mHarnessOn;

Expand Down
3 changes: 2 additions & 1 deletion apps/rigidLoop/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ int main(int argc, char* argv[])
bd2->getVisualizationShape(0)->setColor(Eigen::Vector3d(1.0, 0.0, 0.0));
Eigen::Vector3d offset(0.0, 0.025, 0.0);
Eigen::Vector3d jointPos = bd1->getTransform() * offset;
BallJointConstraint *cl = new BallJointConstraint( bd1, bd2, jointPos);
BallJointConstraintPtr cl =
std::make_shared<BallJointConstraint>( bd1, bd2, jointPos);
//WeldJointConstraint *cl = new WeldJointConstraint(bd1, bd2);
myWorld->getConstraintSolver()->addConstraint(cl);

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
50 changes: 8 additions & 42 deletions ci/before_install_linux.sh
Original file line number Diff line number Diff line change
@@ -1,61 +1,29 @@
before_install() {
cd /tmp

# Install nlopt from source since Ubuntu 12.04 does not provide debian package for nlopt
curl -o nlopt-2.4.1.tar.gz http://ab-initio.mit.edu/nlopt/nlopt-2.4.1.tar.gz
tar -xf nlopt-2.4.1.tar.gz
cd nlopt-2.4.1/
sh autogen.sh &>/dev/null # mute the output
make CPPFLAGS='-fPIC' && sudo make install &>/dev/null # mute the output
}

# Install gcc-4.8 and g++-4.8 for C++11
sudo apt-get -qq --yes install python-software-properties
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
sudo apt-get -qq update
sudo apt-get -qq --yes install gcc-4.8 g++-4.8
sudo apt-get -qq --yes autoremove
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50

# Install eigen-3.2.1 (for unsupported/Eigen/Splines)
wget --quiet -O libeigen3-dev_3.2.1-1~precise1_all.deb http://packages.yade-dem.org/precise/libeigen3-dev_3.2.1-1~precise1_all.deb
sudo dpkg -i libeigen3-dev_3.2.1-1~precise1_all.deb

# Install boost 1.55 compatible with C++11
wget --quiet -O boost_1_55_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download
tar -xzf boost_1_55_0.tar.gz
cd boost_1_55_0/
sudo apt-get -qq update
sudo apt-get -qq install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev
./bootstrap.sh --prefix=/usr/local &>/dev/null # mute the output
n=`cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}'`
sudo ./b2 --with=all -j $n install &>/dev/null # mute the output
sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf'
sudo ldconfig

sudo add-apt-repository --yes ppa:libccd-debs/ppa
sudo add-apt-repository --yes ppa:fcl-debs/ppa
sudo add-apt-repository --yes ppa:dartsim/ppa
sudo apt-add-repository --yes ppa:libccd-debs/ppa
sudo apt-add-repository --yes ppa:fcl-debs/ppa
sudo apt-add-repository --yes ppa:dartsim/ppa
sudo apt-get -qq update

APT_CORE='
cmake
libassimp-dev
libboost-all-dev
libccd-dev
libeigen3-dev
libfcl-dev
'

APT=$APT_CORE'
APT=$APT_CORE'
freeglut3-dev
libxi-dev
libxmu-dev
libflann-dev
libnlopt-dev
coinor-libipopt-dev
libtinyxml-dev
libtinyxml2-dev
liburdfdom-dev
liburdfdom-headers-dev
libopenscenegraph-dev
'

if [ $BUILD_CORE_ONLY = OFF ]; then
Expand All @@ -64,5 +32,3 @@ else
sudo apt-get -qq --yes --force-yes install $APT_CORE
fi

(before_install)

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
Loading

0 comments on commit bded530

Please sign in to comment.