Skip to content

Commit

Permalink
Update supported platforms (#1678)
Browse files Browse the repository at this point in the history
* Remove bionic and add jammy

* Upgrade VS version to 2022

* Upgrade macOS version to macos-12

* Run codecov on jammy

* Upgrade clang-format to 12

* Format code

* Update CHANGELOG.md

* Test VS 2019

* Upgrade vcpkg prebuild

* Revert upgrading vcpkg prebuild

* Fix build on Windows
  • Loading branch information
jslee02 authored Sep 2, 2022
1 parent 95f065b commit b64e6fa
Show file tree
Hide file tree
Showing 21 changed files with 344 additions and 277 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
build:
name: ${{ matrix.build_type }}
runs-on: macos-11
runs-on: macos-12
strategy:
fail-fast: false
matrix:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
build:
if: github.event_name != 'workflow_dispatch'
name: ${{ matrix.os }}.${{ matrix.build_type }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Supported LTS versions
os: [ubuntu-bionic, ubuntu-focal]
os: [ubuntu-focal, ubuntu-jammy]
build_type: [Release]
codecov: [OFF]
check_format: [OFF]
build_dartpy: [ON]
include:
# For code coverage report to Codecov
- os: ubuntu-focal
- os: ubuntu-jammy
build_type: Debug
codecov: ON
check_format: ON
Expand Down
45 changes: 43 additions & 2 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "**"

jobs:
build:
build_2019:
name: ${{ matrix.build_type }}
runs-on: windows-2019
strategy:
Expand All @@ -21,7 +21,7 @@ jobs:
env:
BUILD_TYPE: ${{ matrix.build_type }}
VCPKG_ROOT: "C:/dartsim/vcpkg"
VCPKG_BUILD_TAG: v6.13-c973b49-1
VCPKG_BUILD_TAG: v6.13-2022.07.25-0
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -49,3 +49,44 @@ jobs:
-DBUILD_SHARED_LIBS=${{ matrix.build_shared_libs }}
cmake --build . --config %BUILD_TYPE% --target ALL_BUILD --parallel
ctest --rerun-failed --output-on-failure -C %BUILD_TYPE%
build_2022:
name: ${{ matrix.build_type }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
toolset: [""]
build_type: [Release]
# build_shared_libs: [ON, OFF] # TODO(JS): Enable once shared lib build is resolved
build_shared_libs: [OFF]
env:
BUILD_TYPE: ${{ matrix.build_type }}
VCPKG_ROOT: "C:/dartsim/vcpkg"
VCPKG_BUILD_TAG: v6.13-2022.07.25-0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
shell: cmd
run: |
mkdir -p C:\dartsim
choco install -y wget
wget -q https://github.com/dartsim/vcpkg-build/releases/download/%VCPKG_BUILD_TAG%/vcpkg-dartsim-dependencies.zip
unzip -qq vcpkg-dartsim-dependencies.zip -d C:\dartsim
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -U pytest
- name: Build
shell: cmd
run: |
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64 -Wno-dev ${{ matrix.toolset }} ^
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
-DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" ^
-DDART_MSVC_DEFAULT_OPTIONS=ON ^
-DDART_VERBOSE=ON ^
-DBUILD_SHARED_LIBS=${{ matrix.build_shared_libs }}
cmake --build . --config %BUILD_TYPE% --target ALL_BUILD --parallel
ctest --rerun-failed --output-on-failure -C %BUILD_TYPE%
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

### [DART 6.13.0 (TBD)](https://github.com/dartsim/dart/milestone/69?closed=1)

* Supported Platforms

* Ubuntu Focal on amd64 / GCC 9.3 / amd64
* Ubuntu Jammy on amd64 / GCC 11.2 / amd64
* macOS 12 (Monterey) / Clang 13 / amd64
* Windows / Microsoft Visual Studio 2019 / amd64

* Dependency

* Added required dependencies: fmt
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ endif()

find_program(
CLANG_FORMAT_EXECUTABLE
NAMES clang-format-9
NAMES clang-format-12
)

get_property(formatting_files GLOBAL PROPERTY DART_FORMAT_FILES)
Expand Down
11 changes: 6 additions & 5 deletions dart/collision/CollisionGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,12 @@ auto CollisionGroup::addShapeFrameImpl(
// PRIMITIVE_MAGIC_NUMBER (defined as 1000 in Shape.cpp). Version is not
// likely to be 0 because the Shape class starts its version counter at 1,
// and the version count should monotonically increase.
mObjectInfoList.emplace_back(new ObjectInfo{shapeFrame,
collObj,
shape ? shape->getID() : 0,
shape ? shape->getVersion() : 0,
{}});
mObjectInfoList.emplace_back(new ObjectInfo{
shapeFrame,
collObj,
shape ? shape->getID() : 0,
shape ? shape->getVersion() : 0,
{}});
mObserver.addShapeFrame(shapeFrame);

it = --mObjectInfoList.end();
Expand Down
119 changes: 60 additions & 59 deletions dart/collision/bullet/BulletCollisionDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,65 +816,66 @@ void reportRayHits(
std::unique_ptr<btCollisionShape> createBulletEllipsoidMesh(
float sizeX, float sizeY, float sizeZ)
{
float v[59][3] = {{0, 0, 0},
{0.135299, -0.461940, -0.135299},
{0.000000, -0.461940, -0.191342},
{-0.135299, -0.461940, -0.135299},
{-0.191342, -0.461940, 0.000000},
{-0.135299, -0.461940, 0.135299},
{0.000000, -0.461940, 0.191342},
{0.135299, -0.461940, 0.135299},
{0.191342, -0.461940, 0.000000},
{0.250000, -0.353553, -0.250000},
{0.000000, -0.353553, -0.353553},
{-0.250000, -0.353553, -0.250000},
{-0.353553, -0.353553, 0.000000},
{-0.250000, -0.353553, 0.250000},
{0.000000, -0.353553, 0.353553},
{0.250000, -0.353553, 0.250000},
{0.353553, -0.353553, 0.000000},
{0.326641, -0.191342, -0.326641},
{0.000000, -0.191342, -0.461940},
{-0.326641, -0.191342, -0.326641},
{-0.461940, -0.191342, 0.000000},
{-0.326641, -0.191342, 0.326641},
{0.000000, -0.191342, 0.461940},
{0.326641, -0.191342, 0.326641},
{0.461940, -0.191342, 0.000000},
{0.353553, 0.000000, -0.353553},
{0.000000, 0.000000, -0.500000},
{-0.353553, 0.000000, -0.353553},
{-0.500000, 0.000000, 0.000000},
{-0.353553, 0.000000, 0.353553},
{0.000000, 0.000000, 0.500000},
{0.353553, 0.000000, 0.353553},
{0.500000, 0.000000, 0.000000},
{0.326641, 0.191342, -0.326641},
{0.000000, 0.191342, -0.461940},
{-0.326641, 0.191342, -0.326641},
{-0.461940, 0.191342, 0.000000},
{-0.326641, 0.191342, 0.326641},
{0.000000, 0.191342, 0.461940},
{0.326641, 0.191342, 0.326641},
{0.461940, 0.191342, 0.000000},
{0.250000, 0.353553, -0.250000},
{0.000000, 0.353553, -0.353553},
{-0.250000, 0.353553, -0.250000},
{-0.353553, 0.353553, 0.000000},
{-0.250000, 0.353553, 0.250000},
{0.000000, 0.353553, 0.353553},
{0.250000, 0.353553, 0.250000},
{0.353553, 0.353553, 0.000000},
{0.135299, 0.461940, -0.135299},
{0.000000, 0.461940, -0.191342},
{-0.135299, 0.461940, -0.135299},
{-0.191342, 0.461940, 0.000000},
{-0.135299, 0.461940, 0.135299},
{0.000000, 0.461940, 0.191342},
{0.135299, 0.461940, 0.135299},
{0.191342, 0.461940, 0.000000},
{0.000000, -0.500000, 0.000000},
{0.000000, 0.500000, 0.000000}};
float v[59][3]
= {{0, 0, 0},
{0.135299, -0.461940, -0.135299},
{0.000000, -0.461940, -0.191342},
{-0.135299, -0.461940, -0.135299},
{-0.191342, -0.461940, 0.000000},
{-0.135299, -0.461940, 0.135299},
{0.000000, -0.461940, 0.191342},
{0.135299, -0.461940, 0.135299},
{0.191342, -0.461940, 0.000000},
{0.250000, -0.353553, -0.250000},
{0.000000, -0.353553, -0.353553},
{-0.250000, -0.353553, -0.250000},
{-0.353553, -0.353553, 0.000000},
{-0.250000, -0.353553, 0.250000},
{0.000000, -0.353553, 0.353553},
{0.250000, -0.353553, 0.250000},
{0.353553, -0.353553, 0.000000},
{0.326641, -0.191342, -0.326641},
{0.000000, -0.191342, -0.461940},
{-0.326641, -0.191342, -0.326641},
{-0.461940, -0.191342, 0.000000},
{-0.326641, -0.191342, 0.326641},
{0.000000, -0.191342, 0.461940},
{0.326641, -0.191342, 0.326641},
{0.461940, -0.191342, 0.000000},
{0.353553, 0.000000, -0.353553},
{0.000000, 0.000000, -0.500000},
{-0.353553, 0.000000, -0.353553},
{-0.500000, 0.000000, 0.000000},
{-0.353553, 0.000000, 0.353553},
{0.000000, 0.000000, 0.500000},
{0.353553, 0.000000, 0.353553},
{0.500000, 0.000000, 0.000000},
{0.326641, 0.191342, -0.326641},
{0.000000, 0.191342, -0.461940},
{-0.326641, 0.191342, -0.326641},
{-0.461940, 0.191342, 0.000000},
{-0.326641, 0.191342, 0.326641},
{0.000000, 0.191342, 0.461940},
{0.326641, 0.191342, 0.326641},
{0.461940, 0.191342, 0.000000},
{0.250000, 0.353553, -0.250000},
{0.000000, 0.353553, -0.353553},
{-0.250000, 0.353553, -0.250000},
{-0.353553, 0.353553, 0.000000},
{-0.250000, 0.353553, 0.250000},
{0.000000, 0.353553, 0.353553},
{0.250000, 0.353553, 0.250000},
{0.353553, 0.353553, 0.000000},
{0.135299, 0.461940, -0.135299},
{0.000000, 0.461940, -0.191342},
{-0.135299, 0.461940, -0.135299},
{-0.191342, 0.461940, 0.000000},
{-0.135299, 0.461940, 0.135299},
{0.000000, 0.461940, 0.191342},
{0.135299, 0.461940, 0.135299},
{0.191342, 0.461940, 0.000000},
{0.000000, -0.500000, 0.000000},
{0.000000, 0.500000, 0.000000}};

int f[112][3]
= {{1, 2, 9}, {9, 2, 10}, {2, 3, 10}, {10, 3, 11}, {3, 4, 11},
Expand Down
20 changes: 11 additions & 9 deletions dart/collision/dart/DARTCollide.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1479,15 +1479,17 @@ int collideCylinderPlane(

// four corners c0 = ( -h/2, -r ), c1 = ( +h/2, -r ), c2 = ( +h/2, +r ), c3 =
// ( -h/2, +r )
Eigen::Vector3d c[4] = {Eigen::Vector3d(-half_height, -cyl_rad, 0.0),
Eigen::Vector3d(+half_height, -cyl_rad, 0.0),
Eigen::Vector3d(+half_height, +cyl_rad, 0.0),
Eigen::Vector3d(-half_height, +cyl_rad, 0.0)};

double depth[4] = {(pn - c[0]).dot(nn),
(pn - c[1]).dot(nn),
(pn - c[2]).dot(nn),
(pn - c[3]).dot(nn)};
Eigen::Vector3d c[4]
= {Eigen::Vector3d(-half_height, -cyl_rad, 0.0),
Eigen::Vector3d(+half_height, -cyl_rad, 0.0),
Eigen::Vector3d(+half_height, +cyl_rad, 0.0),
Eigen::Vector3d(-half_height, +cyl_rad, 0.0)};

double depth[4]
= {(pn - c[0]).dot(nn),
(pn - c[1]).dot(nn),
(pn - c[2]).dot(nn),
(pn - c[3]).dot(nn)};

double penetration = -1.0;
int found = -1;
Expand Down
12 changes: 5 additions & 7 deletions dart/collision/fcl/BackwardCompatibility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,27 @@

#if FCL_VERSION_AT_LEAST(0, 6, 0)

#include <fcl/math/geometry.h>

#include <fcl/geometry/bvh/BVH_model.h>
#include <fcl/geometry/geometric_shape_to_BVH_model.h>
#include <fcl/math/bv/OBBRSS.h>
#include <fcl/math/bv/utility.h>
#include <fcl/math/geometry.h>
#include <fcl/narrowphase/collision.h>
#include <fcl/narrowphase/collision_object.h>
#include <fcl/narrowphase/distance.h>

#else

#include <fcl/math/matrix_3f.h>
#include <fcl/math/transform.h>
#include <fcl/math/vec_3f.h>

#include <fcl/BV/OBBRSS.h>
#include <fcl/BVH/BVH_model.h>
#include <fcl/shape/geometric_shape_to_BVH_model.h>
#include <fcl/collision.h>
#include <fcl/collision_data.h>
#include <fcl/collision_object.h>
#include <fcl/distance.h>
#include <fcl/math/matrix_3f.h>
#include <fcl/math/transform.h>
#include <fcl/math/vec_3f.h>
#include <fcl/shape/geometric_shape_to_BVH_model.h>

#endif // FCL_VERSION_AT_LEAST(0,6,0)

Expand Down
Loading

0 comments on commit b64e6fa

Please sign in to comment.