Skip to content

Commit

Permalink
[Gym] Generic locomotion envs - PART I (#194)
Browse files Browse the repository at this point in the history
* [Viewer] Replace multi args "," delimiter by "|" to allow comma in path. Raise exception is
* [Gym] Major rework to add base locomotion learning environments.
* [Core] Implement methods to add and remove frames from the robot model.
* [Core] Add 'mechanicalReduction' option to the motors.
* [Core] Add support of mesh collisions using HPP-FCL. Migration to pinocchio/eigenpy v2.5.0.
* [misc] Cleanup cmake config file to implement actual legacy mode for Ubuntu18. Update Ubuntu 18 easy install deps.
* [misc] Add official support of Ubuntu 20.
* [Core] Add support of body collision with the ground, but do NOT actually compute the forces.

Co-authored-by: Alexis Duburcq <alexis.duburcq@wandercraft.eu>
  • Loading branch information
duburcqa and Alexis Duburcq authored Sep 9, 2020
1 parent 8421cab commit ccc0f53
Show file tree
Hide file tree
Showing 37 changed files with 1,713 additions and 374 deletions.
37 changes: 28 additions & 9 deletions .github/workflows/ubuntu18.yml → .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ubuntu 18 CI (Easy install dependencies)
name: Ubuntu CI (Easy install dependencies)

on:
# Trigger the workflow on push on the master branch, or for any pull request
Expand All @@ -8,9 +8,13 @@ on:
pull_request:

jobs:
build-test-and-deploy-doc-ubuntu18:
name: (Ubuntu 18) Easy install the dependencies. Build the project and run the unit tests. Generate and deploy the documentation.
runs-on: ubuntu-18.04
build-test-and-deploy-doc-ubuntu:
name: (Ubuntu) Easy install the dependencies. Build the project and run the unit tests. Generate and deploy the documentation.
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]

defaults:
run:
Expand All @@ -27,8 +31,17 @@ jobs:

#####################################################################################

- name: Setup minimal build environment
run: |
# Set Python 3 executable
if [ ${{ matrix.os }} == "ubuntu-18.04" ] ; then
PYTHON_EXECUTABLE="/usr/bin/python3.6"
else
PYTHON_EXECUTABLE="/usr/bin/python3.8"
fi
echo "::set-env name=PYTHON_EXECUTABLE::${PYTHON_EXECUTABLE}"
- name: Installing requirements
run: sudo "${GITHUB_WORKSPACE}/build_tools/easy_install_deps_ubuntu18.sh"
run: sudo "${GITHUB_WORKSPACE}/build_tools/easy_install_deps_ubuntu.sh"

#####################################################################################

Expand All @@ -38,12 +51,18 @@ jobs:
InstallDir="$RootDir/install"
mkdir "$RootDir/build" "$InstallDir"
cd "$RootDir/build"
# Old Eigen3 release 3.2.10 must be used on Ubuntu 18.04 for compatibility with Boost < 1.71
CMAKE_CXX_FLAGS=
if [ ${{ matrix.os }} == "ubuntu-18.04" ] ; then
CMAKE_CXX_FLAGS="-isystem/usr/include/eigen3.2.10"
fi
cmake "$RootDir" -DCMAKE_INSTALL_PREFIX="$InstallDir" \
-DBoost_NO_SYSTEM_PATHS=OFF -DPYTHON_REQUIRED_VERSION="3.6" \
-DBoost_NO_SYSTEM_PATHS=OFF -DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}" \
-DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DBUILD_PYTHON_INTERFACE=ON -DCOMPONENT=doxygen \
-DCMAKE_CXX_FLAGS="-isystem/usr/include/eigen3" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
make install -j2
#####################################################################################
Expand All @@ -52,7 +71,7 @@ jobs:
run: |
"${GITHUB_WORKSPACE}/build/unit/unit"
cd "${GITHUB_WORKSPACE}/unit_py"
python3.6 -m unittest discover -v
"${PYTHON_EXECUTABLE}" -m unittest discover -v
#####################################################################################

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
-DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE `
-DBoost_USE_STATIC_LIBS=OFF -DPYTHON_REQUIRED_VERSION="${{ matrix.python-version }}" `
-DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DBUILD_PYTHON_INTERFACE=ON `
-DCMAKE_CXX_FLAGS="/EHsc /bigobj -D_USE_MATH_DEFINES -DBOOST_ALL_NO_LIB -DBOOST_LIB_DIAGNOSTIC -DEIGENPY_STATIC -DURDFDOM_STATIC -DPINOCCHIO_STATIC"
-DCMAKE_CXX_FLAGS="/EHsc /bigobj -D_USE_MATH_DEFINES -DBOOST_ALL_NO_LIB -DBOOST_LIB_DIAGNOSTIC -DEIGENPY_STATIC -DURDFDOM_STATIC -DHPP_FCL_STATIC -DPINOCCHIO_STATIC"
cmake --build . --config "${Env:BUILD_TYPE}" --parallel 2
if (-not (Test-Path -PathType Container "$RootDir/build/pypi/jiminy_py/src/jiminy_py/core")) {
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ include(${CMAKE_SOURCE_DIR}/build_tools/cmake/buildPythonWheel.cmake)
if(NOT WIN32)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -ftemplate-backtrace-limit=0 ${WARN_FULL}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O3 ${WARN_FULL} -Wno-non-virtual-dtor -Wno-deprecated-declarations -Wno-unused-parameter -Wfatal-errors -Werror")
else(NOT WIN32)
else()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} /EHsc /bigobj -g /Wall")
# It would be great to have the same quality standard for Windows but
# system inlcude of dependencies is not working properly so far.
# - Disabling warning 4820 generated by std time.h, which is included by std chrono
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} /EHsc /bigobj /permissive- -DNDEBUG -DNOMINMAX /O2 /W2 /wd4068 /wd4715 /wd4820 /wd4244 /wd4005 /WX")
endif(NOT WIN32)
endif()

# Sub-projects
add_subdirectory(soup)
Expand Down
60 changes: 47 additions & 13 deletions build_tools/build_install_deps_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ git submodule --quiet update --init --recursive --jobs 8
git clone -b "3.3.7" https://github.com/eigenteam/eigen-git-mirror.git "$RootDir/eigen3"

### Checkout eigenpy and its submodules
git clone -b "v2.4.3" https://github.com/stack-of-tasks/eigenpy.git "$RootDir/eigenpy"
git clone -b "v2.5.0" https://github.com/stack-of-tasks/eigenpy.git "$RootDir/eigenpy"
cd "$RootDir/eigenpy"
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_linux/eigenpy.patch"
Expand All @@ -63,8 +63,19 @@ git clone -b "1.0.4" https://github.com/ros/urdfdom.git "$RootDir/urdfdom"
cd "$RootDir/urdfdom"
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_linux/urdfdom.patch"

### Checkout assimp
git clone -b "v5.0.1" https://github.com/assimp/assimp.git "$RootDir/assimp"
cd "$RootDir/assimp"
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_linux/assimp.patch"

### Checkout hpp-fcl
git clone -b "v1.5.3" https://github.com/humanoid-path-planner/hpp-fcl.git "$RootDir/hpp-fcl"
cd "$RootDir/hpp-fcl"
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_linux/hppfcl.patch"

### Checkout pinocchio and its submodules
git clone -b "v2.4.7" https://github.com/stack-of-tasks/pinocchio.git "$RootDir/pinocchio"
git clone -b "v2.5.0" https://github.com/stack-of-tasks/pinocchio.git "$RootDir/pinocchio"
cd "$RootDir/pinocchio"
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_linux/pinocchio.patch"
Expand Down Expand Up @@ -96,10 +107,11 @@ sed -i "/using python/c ${PYTHON_CONFIG_JAM}" ./project-config.jam
BuildTypeB2="$(echo "$BUILD_TYPE" | tr '[:upper:]' '[:lower:]')"
mkdir -p "$RootDir/boost/build"
./b2 --prefix="$InstallDir" --build-dir="$RootDir/boost/build" \
--with-date_time --with-filesystem --with-headers --with-math --with-python \
--with-serialization --with-stacktrace --with-system --with-test --with-thread \
--with-python --build-type=minimal architecture=x86 address-model=64 \
threading=multi --layout=system link=shared runtime-link=shared \
--with-chrono --with-timer --with-date_time --with-headers --with-math \
--with-stacktrace --with-system --with-filesystem --with-atomic \
--with-thread --with-serialization --with-test --with-python \
--build-type=minimal architecture=x86 address-model=64 threading=multi \
--layout=system link=shared runtime-link=shared \
toolset=gcc cxxflags="-std=c++11 -fPIC" variant="$BuildTypeB2" install -q -d0 -j2

#################################### Build and install eigen3 ##########################################
Expand All @@ -118,8 +130,8 @@ cd "$RootDir/eigenpy/build"
cmake "$RootDir/eigenpy" -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" \
-DCMAKE_PREFIX_PATH="$InstallDir" -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
-DPYTHON_STANDARD_LAYOUT=ON -DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE \
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" \
-DBUILD_TESTING=OFF -DINSTALL_DOCUMENTATION=OFF -DBoost_USE_STATIC_LIBS=OFF \
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" -DBoost_USE_STATIC_LIBS=OFF \
-DBUILD_TESTING=OFF -DINSTALL_DOCUMENTATION=OFF \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
make install -j2

Expand All @@ -128,7 +140,7 @@ make install -j2
mkdir -p "$RootDir/tinyxml/build"
cd "$RootDir/tinyxml/build"
cmake "$RootDir/tinyxml" -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-fPIC -DTIXML_USE_STL" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
make install -j2

############################## Build and install console_bridge ########################################
Expand Down Expand Up @@ -156,6 +168,28 @@ cmake "$RootDir/urdfdom" -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$Instal
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
make install -j2

############################## Build and install assimp ######################################

mkdir -p "$RootDir/assimp/build"
cd "$RootDir/assimp/build"
cmake "$RootDir/assimp" -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" \
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_ZLIB=ON -DASSIMP_BUILD_TESTS=OFF \
-DASSIMP_BUILD_SAMPLES=OFF -DBUILD_DOCS=OFF \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-fPIC -Wno-strict-overflow" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
make install -j2

################################# Build and install hpp-fcl ###########################################

mkdir -p "$RootDir/hpp-fcl/build"
cd "$RootDir/hpp-fcl/build"
cmake "$RootDir/hpp-fcl" -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" \
-DCMAKE_PREFIX_PATH="$InstallDir" -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
-DPYTHON_STANDARD_LAYOUT=ON -DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE \
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" -DBoost_USE_STATIC_LIBS=OFF \
-DBUILD_PYTHON_INTERFACE=ON -DHPP_FCL_HAS_QHULL=OFF -DINSTALL_DOCUMENTATION=OFF \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-fPIC -Wno-unused-parameter" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
make install -j2

################################ Build and install Pinocchio ##########################################

### Build and install pinocchio, finally !
Expand All @@ -164,8 +198,8 @@ cd "$RootDir/pinocchio/build"
cmake "$RootDir/pinocchio" -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" \
-DCMAKE_PREFIX_PATH="$InstallDir" -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
-DPYTHON_STANDARD_LAYOUT=ON -DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE \
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" \
-DBUILD_WITH_COLLISION_SUPPORT=OFF -DBUILD_TESTING=OFF -DINSTALL_DOCUMENTATION=OFF \
-DBUILD_WITH_URDF_SUPPORT=ON -DBUILD_PYTHON_INTERFACE=ON -DBoost_USE_STATIC_LIBS=OFF \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" -DBoost_USE_STATIC_LIBS=OFF \
-DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_TESTING=OFF -DINSTALL_DOCUMENTATION=OFF \
-DBUILD_WITH_URDF_SUPPORT=ON -DBUILD_PYTHON_INTERFACE=ON \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-fPIC -Wno-unused-local-typedefs -Wno-uninitialized" -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
make install -j2
83 changes: 69 additions & 14 deletions build_tools/build_install_deps_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_windows/boo
git clone -b "3.3.7" https://github.com/eigenteam/eigen-git-mirror.git "$RootDir/eigen3"

### Checkout eigenpy and its submodules, then apply some patches (generated using `git diff --submodule=diff`)
git clone -b "v2.4.3" https://github.com/stack-of-tasks/eigenpy.git "$RootDir/eigenpy"
git clone -b "v2.5.0" https://github.com/stack-of-tasks/eigenpy.git "$RootDir/eigenpy"
Set-Location -Path "$RootDir/eigenpy"
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_windows/eigenpy.patch"
Expand All @@ -62,8 +62,20 @@ git clone -b "1.0.4" https://github.com/ros/urdfdom.git "$RootDir/urdfdom"
Set-Location -Path "$RootDir/urdfdom"
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_windows/urdfdom.patch"

### Checkout assimp
git clone -b "v5.0.1" https://github.com/assimp/assimp.git "$RootDir/assimp"
Set-Location -Path "$RootDir/assimp"
dos2unix "$RootDir/build_tools/patch_deps_windows/assimp.patch" # Fix encoding, just in case
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_windows/assimp.patch"

### Checkout hpp-fcl
git clone -b "v1.5.3" https://github.com/humanoid-path-planner/hpp-fcl.git "$RootDir/hpp-fcl"
cd "$RootDir/hpp-fcl"
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_windows/hppfcl.patch"

### Checkout pinocchio and its submodules, then apply some patches (generated using `git diff --submodule=diff`)
git clone -b "v2.4.7" https://github.com/stack-of-tasks/pinocchio.git "$RootDir/pinocchio"
git clone -b "v2.5.0" https://github.com/stack-of-tasks/pinocchio.git "$RootDir/pinocchio"
Set-Location -Path "$RootDir/pinocchio"
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_windows/pinocchio.patch"
Expand All @@ -88,10 +100,11 @@ if (-not (Test-Path -PathType Container "$RootDir/boost/build")) {
New-Item -ItemType "directory" -Force -Path "$RootDir/boost/build"
}
./b2.exe --prefix="$InstallDir" --build-dir="$RootDir/boost/build" `
--with-date_time --with-filesystem --with-headers --with-math --with-python `
--with-serialization --with-stacktrace --with-system --with-test --with-thread `
--with-python --build-type=minimal architecture=x86 address-model=64 `
threading=multi --layout=system link=shared runtime-link=shared `
--with-chrono --with-timer --with-date_time --with-headers --with-math `
--with-stacktrace --with-system --with-filesystem --with-atomic `
--with-thread --with-serialization --with-test --with-python `
--build-type=minimal architecture=x86 address-model=64 threading=multi `
--layout=system link=shared runtime-link=shared `
toolset=msvc-14.2 variant="$BuildTypeB2" install -q -d0 -j2

#################################### Build and install eigen3 ##########################################
Expand All @@ -117,8 +130,8 @@ cmake "$RootDir/eigenpy" -G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATOR_
-DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" `
-DCMAKE_PREFIX_PATH="$InstallDir" -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" `
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" `
-DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE `
-DBUILD_TESTING=OFF -DINSTALL_DOCUMENTATION=OFF -DBoost_USE_STATIC_LIBS=OFF `
-DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_USE_STATIC_LIBS=OFF `
-DBUILD_TESTING=OFF -DINSTALL_DOCUMENTATION=OFF `
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="/EHsc /bigobj $(
) -DBOOST_ALL_NO_LIB -DBOOST_LIB_DIAGNOSTIC -DEIGENPY_STATIC"
cmake --build . --target install --config "${Env:BUILD_TYPE}" --parallel 2
Expand All @@ -135,7 +148,7 @@ if (-not (Test-Path -PathType Container "$RootDir/tinyxml/build")) {
Set-Location -Path "$RootDir/tinyxml/build"
cmake "$RootDir/tinyxml" -G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATOR_PLATFORM=x64 `
-DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" `
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="/EHsc /bigobj"
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="/EHsc /bigobj -DTIXML_USE_STL"
cmake --build . --target install --config "${Env:BUILD_TYPE}" --parallel 2

############################## Build and install console_bridge ########################################
Expand Down Expand Up @@ -175,6 +188,48 @@ cmake "$RootDir/urdfdom" -G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATOR_
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="/EHsc /bigobj -D_USE_MATH_DEFINES -DURDFDOM_STATIC"
cmake --build . --target install --config "${Env:BUILD_TYPE}" --parallel 2

############################## Build and install assimp ######################################

###
if (-not (Test-Path -PathType Container "$RootDir/assimp/build")) {
New-Item -ItemType "directory" -Force -Path "$RootDir/assimp/build"
}
Set-Location -Path "$RootDir/assimp/build"
cmake -G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATOR_PLATFORM=x64 `
-DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" `
-DCMAKE_CXX_FLAGS="/EHsc /bigobj" "$RootDir/assimp" `
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_ZLIB=ON -DASSIMP_BUILD_TESTS=OFF `
-DASSIMP_BUILD_SAMPLES=OFF -DBUILD_DOCS=OFF -DASSIMP_INSTALL_PDB=OFF `
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="/EHsc /bigobj -D_USE_MATH_DEFINES"
cmake --build . --target install --config "${Env:BUILD_TYPE}" --parallel 2

################################# Build and install hpp-fcl ###########################################

### Build hpp-fcl
if (-not (Test-Path -PathType Container "$RootDir/hpp-fcl/build")) {
New-Item -ItemType "directory" -Force -Path "$RootDir/hpp-fcl/build"
}
Set-Location -Path "$RootDir/hpp-fcl/build"
cmake "$RootDir/hpp-fcl" -G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATOR_PLATFORM=x64 `
-DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" `
-DCMAKE_PREFIX_PATH="$InstallDir" -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" `
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" `
-DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_USE_STATIC_LIBS=OFF `
-DBUILD_PYTHON_INTERFACE=ON -DHPP_FCL_HAS_QHULL=OFF -DINSTALL_DOCUMENTATION=OFF `
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="/EHsc /bigobj /wd4068 /wd4267 /permissive- /Zc:__cplusplus $(
) -D_USE_MATH_DEFINES -DBOOST_ALL_NO_LIB -DBOOST_LIB_DIAGNOSTIC -DEIGENPY_STATIC -DHPP_FCL_STATIC"
cmake --build . --target install --config "${Env:BUILD_TYPE}" --parallel 2

### Embedded the required dynamic library in the package folder
Copy-Item -Path "$InstallDir/lib/boost_filesystem*.dll" `
-Destination "$InstallDir/lib/site-packages/hppfcl"
Copy-Item -Path "$InstallDir/lib/boost_timer*.dll" `
-Destination "$InstallDir/lib/site-packages/hppfcl"
Copy-Item -Path "$InstallDir/lib/boost_chrono*.dll" `
-Destination "$InstallDir/lib/site-packages/hppfcl"
Copy-Item -Path "$InstallDir/lib/boost_python*.dll" `
-Destination "$InstallDir/lib/site-packages/hppfcl"

################################ Build and install Pinocchio ##########################################

### Build and install pinocchio, finally !
Expand All @@ -186,11 +241,11 @@ cmake "$RootDir/pinocchio" -G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATO
-DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$InstallDir" `
-DCMAKE_PREFIX_PATH="$InstallDir" -DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" `
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" `
-DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE `
-DBUILD_WITH_COLLISION_SUPPORT=OFF -DBUILD_TESTING=OFF -DINSTALL_DOCUMENTATION=OFF `
-DBUILD_WITH_URDF_SUPPORT=ON -DBUILD_PYTHON_INTERFACE=ON -DBoost_USE_STATIC_LIBS=OFF `
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="/EHsc /bigobj /wd4068 /wd4715 /permissive- $(
) -D_USE_MATH_DEFINES -DNOMINMAX -DBOOST_ALL_NO_LIB -DBOOST_LIB_DIAGNOSTIC -DEIGENPY_STATIC -DURDFDOM_STATIC -DPINOCCHIO_STATIC"
-DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_USE_STATIC_LIBS=OFF `
-DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_TESTING=OFF -DINSTALL_DOCUMENTATION=OFF `
-DBUILD_WITH_URDF_SUPPORT=ON -DBUILD_PYTHON_INTERFACE=ON `
-DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="/EHsc /bigobj /wd4068 /wd4715 /wd4834 /permissive- $(
) -D_USE_MATH_DEFINES -DNOMINMAX -DBOOST_ALL_NO_LIB -DBOOST_LIB_DIAGNOSTIC -DEIGENPY_STATIC -DURDFDOM_STATIC -DHPP_FCL_STATIC -DPINOCCHIO_STATIC"
cmake --build . --target install --config "${Env:BUILD_TYPE}" --parallel 2

### Embedded the required dynamic library in the package folder
Expand Down
Loading

0 comments on commit ccc0f53

Please sign in to comment.