Skip to content

Commit

Permalink
Merge branch 'devel' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
simeon-ned authored Jul 16, 2024
2 parents f7219cc + 071c564 commit 625eabe
Show file tree
Hide file tree
Showing 16 changed files with 314 additions and 112 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/conda/environment_macos_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dependencies:
- pycppad
- matplotlib
- mpfr
- qhull
- qhull-static
1 change: 1 addition & 0 deletions .github/workflows/conda/environment_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ dependencies:
- pycppad
- matplotlib
- mpfr
- qhull
51 changes: 40 additions & 11 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ concurrency:
jobs:
build:

runs-on: ${{ matrix.os }}

runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
container: ['ubuntu:20.04', 'ubuntu:22.04', 'ubuntu:24.04']

env:
CCACHE_BASEDIR: ${GITHUB_WORKSPACE}
Expand All @@ -41,6 +41,9 @@ jobs:
CCACHE_COMPRESSLEVEL: 5

steps:
- name: Setup Container
run: |
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y sudo lsb-release gnupg2 cmake git python3
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -51,8 +54,8 @@ jobs:
with:
path: .ccache
save-always: true
key: ccache-linux-${{ matrix.os }}-${{ github.sha }}
restore-keys: ccache-linux-${{ matrix.os }}-
key: ccache-linux-${{ matrix.container }}-${{ github.sha }}
restore-keys: ccache-linux-${{ matrix.container }}-

# extract branch name
- name: Get branch name (merge)
Expand All @@ -72,11 +75,11 @@ jobs:

- name: Register robotpkg
run: |
sudo sh -c "echo \"deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg\" >> /etc/apt/sources.list "
sudo apt-key adv --fetch-keys http://robotpkg.openrobots.org/packages/debian/robotpkg.key
sh -c "echo \"deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg\" >> /etc/apt/sources.list "
apt-key adv --fetch-keys http://robotpkg.openrobots.org/packages/debian/robotpkg.key
- name: Set and install dependencies
run: |
sudo rm -rf /usr/local/share/boost/1.69.0
rm -rf /usr/local/share/boost/1.69.0
export PYTHON3_VERSION=$(python3 -c "import sys; print(str(sys.version_info.major)+str(sys.version_info.minor))")
export APT_DEPENDENCIES="doxygen \
ccache \
Expand All @@ -98,14 +101,17 @@ jobs:
robotpkg-py${PYTHON3_VERSION}-hpp-fcl \
robotpkg-py${PYTHON3_VERSION}-casadi"
echo $APT_DEPENDENCIES
sudo apt-get update -qq
sudo apt-get install -qq ${APT_DEPENDENCIES}
apt-get update -qq
DEBIAN_FRONTEND="noninteractive" apt-get install -qq ${APT_DEPENDENCIES}
- name: Free disk space
run: |
sudo apt clean
apt clean
df -h
- name: Run cmake
run: |
# Add cloned repo to safe.directory, since it was not cloned by the container
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git submodule update --init
export PATH=$PATH:/opt/openrobots/bin
export PYTHON3_DOT_VERSION=$(python3 -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))")
Expand Down Expand Up @@ -139,12 +145,15 @@ jobs:
mkdir build
cd build
export CMAKE_PREFIX_PATH=/usr/local
# Test CMake module packaging
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DPYTHON_EXECUTABLE=$(which python3)
make -j2
./run_rnea
./load_urdf
# Test pkg-config packaging
cd ../../pkgconfig
mkdir build
cd build
Expand All @@ -153,6 +162,9 @@ jobs:
-DPYTHON_EXECUTABLE=$(which python3)
make -j2
./run_rnea
./load_urdf
# Test FetchContent packaging
cd ../../external
export PINOCCHIO_GIT_REPOSITORY="file://"$GITHUB_WORKSPACE
#export PINOCCHIO_GIT_REPOSITORY=$(git remote get-url origin)
Expand All @@ -166,6 +178,8 @@ jobs:
make -j2
./run_rnea
./load_urdf
# Test CMake module packaging and pinocchio_header target
cd ../../pinocchio_header
mkdir build
cd build
Expand All @@ -180,3 +194,18 @@ jobs:
run: |
cd build
sudo make uninstall
check:
if: always()
name: check-linux-apt

needs:
- build

runs-on: Ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ci:
autoupdate_branch: devel
autofix_prs: false
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
Expand All @@ -26,7 +27,7 @@ repos:
doc/doxygen-awesome.*
)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.5.2
hooks:
- id: ruff-format
exclude: doc/
Expand All @@ -45,3 +46,4 @@ repos:
hooks:
- id: yamlfmt
args: [--mapping=2, --offset=2, --sequence=4, --implicit_start]
exclude: ^.github/workflows/linux.yml$
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

### Fixed
- Append pinocchio optional libraries into pkg-config file ([#2322](https://github.com/stack-of-tasks/pinocchio/pull/2322))

### Added
- Add getMotionAxis method to helical, prismatic, revolute and ubounded revolute joint ([#2315](https://github.com/stack-of-tasks/pinocchio/pull/2315))

### Changed
- Use eigenpy to expose `GeometryObject::meshMaterial` variant ([#2315](https://github.com/stack-of-tasks/pinocchio/pull/2315))

## [3.1.0] - 2024-07-04

### Fixed

- Fix `appendModel` when joints after the base are in parallel ([#2295](https://github.com/stack-of-tasks/pinocchio/pull/2295))
Expand All @@ -20,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix visualization of meshes in meshcat ([#2294](https://github.com/stack-of-tasks/pinocchio/pull/2294))
- Fix Anymal simulation test ([#2299](https://github.com/stack-of-tasks/pinocchio/pull/2299))
- Fix contact derivatives and impulse dynamics tests ([#2300](https://github.com/stack-of-tasks/pinocchio/pull/2300))
- Fix CMake compatibility with old console_bridge version ([#2312](https://github.com/stack-of-tasks/pinocchio/pull/2312))

### Added

Expand Down Expand Up @@ -988,7 +1000,8 @@ The model can either be parsed from a URDF format or be created by appendending
• Fixed (concatenation of two consecutive bodies)


[Unreleased]: https://github.com/stack-of-tasks/pinocchio/compare/v3.0.0...HEAD
[Unreleased]: https://github.com/stack-of-tasks/pinocchio/compare/v3.1.0...HEAD
[3.1.0]: https://github.com/stack-of-tasks/pinocchio/compare/v3.0.0...v3.1.0
[3.0.0]: https://github.com/stack-of-tasks/pinocchio/compare/v2.7.1...v3.0.0
[2.7.1]: https://github.com/stack-of-tasks/pinocchio/compare/v2.7.0...v2.7.1
[2.7.0]: https://github.com/stack-of-tasks/pinocchio/compare/v2.6.21...v2.7.0
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ authors:
given-names: Guilhem
- family-names: Budhiraja
given-names: Rohan
version: 2.6.3
date-released: "2021-07-21"
version: 3.1.0
date-released: "2024-07-04"
license: BSD-2-Clause
repository-code: "https://github.com/stack-of-tasks/pinocchio"
21 changes: 15 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,15 @@ if(BUILD_WITH_URDF_SUPPORT)
add_project_dependency(urdfdom REQUIRED PKG_CONFIG_REQUIRES "urdfdom >= 0.2.0")
set(urdfdom_VERSION ${urdfdom_headers_VERSION})
list(APPEND CFLAGS_DEPENDENCIES "-DPINOCCHIO_WITH_URDFDOM")
list(APPEND LIBRARIES_DEPENDENCIES "urdfdom_world")

if(${urdfdom_VERSION} VERSION_GREATER "0.4.2")
check_minimal_cxx_standard(11 ENFORCE)
message(
STATUS
"Since urdfdom >= 1.0.0, the default C++ standard is C++11. The project is then compiled with C++11 standard."
)
endif(${urdfdom_VERSION} VERSION_GREATER "0.4.2")
endif(BUILD_WITH_URDF_SUPPORT)
endif()
endif()

if(BUILD_WITH_SDF_SUPPORT)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/sdformat.cmake)
Expand All @@ -207,32 +206,42 @@ if(BUILD_WITH_SDF_SUPPORT)
check_minimal_cxx_standard(11 REQUIRED)
include_directories(${SDFormat_INCLUDE_DIRS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SDFormat_CXX_FLAGS}")
endif(SDFormat_FOUND)
endif(BUILD_WITH_SDF_SUPPORT)
list(APPEND CFLAGS_DEPENDENCIES "-DPINOCCHIO_WITH_SDFORMAT")
endif()
endif()

set(BUILD_WITH_PARSERS_SUPPORT BUILD_WITH_URDF_SUPPORT OR BUILD_WITH_SDF_SUPPORT)

if(BUILD_WITH_PARSERS_SUPPORT)
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_parsers)
endif()

if(BUILD_WITH_AUTODIFF_SUPPORT)
# Check first CppADCodeGen
if(BUILD_WITH_CODEGEN_SUPPORT)
# No need to add cppadcg to pkg-config (no lib and header in the same directory than cppad)
add_project_dependency(cppadcg 2.4.1 REQUIRED)
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_cppadcg)
endif(BUILD_WITH_CODEGEN_SUPPORT)

add_project_dependency(
cppad 20180000.0 REQUIRED
PKG_CONFIG_REQUIRES "cppad >= 20220624.0"
FIND_EXTERNAL "CppAD")
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_cppad)
endif(BUILD_WITH_AUTODIFF_SUPPORT)

if(BUILD_WITH_CASADI_SUPPORT)
add_project_dependency(casadi 3.4.5 REQUIRED PKG_CONFIG_REQUIRES "casadi >= 3.4.5")
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_casadi)
endif(BUILD_WITH_CASADI_SUPPORT)

if(BUILD_WITH_OPENMP_SUPPORT)
add_project_dependency(OpenMP REQUIRED)
endif()

if(BUILD_WITH_EXTRA_SUPPORT)
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_extra qhullcpp qhull_r)
add_project_dependency(Qhull COMPONENTS qhullcpp qhull_r REQUIRED)
message(STATUS "Found Qhull.")
endif()
Expand Down Expand Up @@ -294,7 +303,7 @@ endif()

if(BUILD_WITH_HPP_FCL_SUPPORT)
list(APPEND CFLAGS_DEPENDENCIES "-DPINOCCHIO_WITH_HPP_FCL")
list(APPEND LIBRARIES_DEPENDENCIES "hpp-fcl")
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_collision)
add_project_dependency(hpp-fcl 2.1.2 REQUIRED PKG_CONFIG_REQUIRES "hpp-fcl >= 2.1.2")
endif()

Expand Down
7 changes: 6 additions & 1 deletion bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ function(PINOCCHIO_PYTHON_BINDINGS_SPECIFIC_TYPE scalar_name)
if(BUILD_WITH_URDF_SUPPORT)
# Link directly against console_bridge since we bind some enums and call
# console_bridge::setLogLevel function.
target_link_libraries(${PYTHON_LIB_NAME} PUBLIC console_bridge::console_bridge)
modernize_target_link_libraries(
${PYTHON_LIB_NAME}
SCOPE PUBLIC
TARGETS console_bridge::console_bridge
LIBRARIES ${console_bridge_LIBRARIES}
INCLUDE_DIRS ${console_bridge_INCLUDE_DIRS})
endif()
if(BUILD_WITH_HPP_FCL_SUPPORT)
target_compile_definitions(${PYTHON_LIB_NAME}
Expand Down
Loading

0 comments on commit 625eabe

Please sign in to comment.