Skip to content

Commit 625eabe

Browse files
authored
Merge branch 'devel' into devel
2 parents f7219cc + 071c564 commit 625eabe

File tree

16 files changed

+314
-112
lines changed

16 files changed

+314
-112
lines changed

.github/workflows/conda/environment_macos_linux.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dependencies:
2222
- pycppad
2323
- matplotlib
2424
- mpfr
25+
- qhull
26+
- qhull-static

.github/workflows/conda/environment_windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ dependencies:
2121
- pycppad
2222
- matplotlib
2323
- mpfr
24+
- qhull

.github/workflows/linux.yml

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ concurrency:
2828
jobs:
2929
build:
3030

31-
runs-on: ${{ matrix.os }}
32-
31+
runs-on: ubuntu-latest
32+
container: ${{ matrix.container }}
3333
strategy:
3434
matrix:
35-
os: [ubuntu-22.04, ubuntu-20.04]
35+
container: ['ubuntu:20.04', 'ubuntu:22.04', 'ubuntu:24.04']
3636

3737
env:
3838
CCACHE_BASEDIR: ${GITHUB_WORKSPACE}
@@ -41,6 +41,9 @@ jobs:
4141
CCACHE_COMPRESSLEVEL: 5
4242

4343
steps:
44+
- name: Setup Container
45+
run: |
46+
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y sudo lsb-release gnupg2 cmake git python3
4447
- uses: actions/checkout@v4
4548
with:
4649
fetch-depth: 0
@@ -51,8 +54,8 @@ jobs:
5154
with:
5255
path: .ccache
5356
save-always: true
54-
key: ccache-linux-${{ matrix.os }}-${{ github.sha }}
55-
restore-keys: ccache-linux-${{ matrix.os }}-
57+
key: ccache-linux-${{ matrix.container }}-${{ github.sha }}
58+
restore-keys: ccache-linux-${{ matrix.container }}-
5659

5760
# extract branch name
5861
- name: Get branch name (merge)
@@ -72,11 +75,11 @@ jobs:
7275

7376
- name: Register robotpkg
7477
run: |
75-
sudo sh -c "echo \"deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg\" >> /etc/apt/sources.list "
76-
sudo apt-key adv --fetch-keys http://robotpkg.openrobots.org/packages/debian/robotpkg.key
78+
sh -c "echo \"deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg\" >> /etc/apt/sources.list "
79+
apt-key adv --fetch-keys http://robotpkg.openrobots.org/packages/debian/robotpkg.key
7780
- name: Set and install dependencies
7881
run: |
79-
sudo rm -rf /usr/local/share/boost/1.69.0
82+
rm -rf /usr/local/share/boost/1.69.0
8083
export PYTHON3_VERSION=$(python3 -c "import sys; print(str(sys.version_info.major)+str(sys.version_info.minor))")
8184
export APT_DEPENDENCIES="doxygen \
8285
ccache \
@@ -98,14 +101,17 @@ jobs:
98101
robotpkg-py${PYTHON3_VERSION}-hpp-fcl \
99102
robotpkg-py${PYTHON3_VERSION}-casadi"
100103
echo $APT_DEPENDENCIES
101-
sudo apt-get update -qq
102-
sudo apt-get install -qq ${APT_DEPENDENCIES}
104+
105+
apt-get update -qq
106+
DEBIAN_FRONTEND="noninteractive" apt-get install -qq ${APT_DEPENDENCIES}
103107
- name: Free disk space
104108
run: |
105-
sudo apt clean
109+
apt clean
106110
df -h
107111
- name: Run cmake
108112
run: |
113+
# Add cloned repo to safe.directory, since it was not cloned by the container
114+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
109115
git submodule update --init
110116
export PATH=$PATH:/opt/openrobots/bin
111117
export PYTHON3_DOT_VERSION=$(python3 -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))")
@@ -139,12 +145,15 @@ jobs:
139145
mkdir build
140146
cd build
141147
export CMAKE_PREFIX_PATH=/usr/local
148+
# Test CMake module packaging
142149
cmake .. \
143150
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
144151
-DPYTHON_EXECUTABLE=$(which python3)
145152
make -j2
146153
./run_rnea
147154
./load_urdf
155+
156+
# Test pkg-config packaging
148157
cd ../../pkgconfig
149158
mkdir build
150159
cd build
@@ -153,6 +162,9 @@ jobs:
153162
-DPYTHON_EXECUTABLE=$(which python3)
154163
make -j2
155164
./run_rnea
165+
./load_urdf
166+
167+
# Test FetchContent packaging
156168
cd ../../external
157169
export PINOCCHIO_GIT_REPOSITORY="file://"$GITHUB_WORKSPACE
158170
#export PINOCCHIO_GIT_REPOSITORY=$(git remote get-url origin)
@@ -166,6 +178,8 @@ jobs:
166178
make -j2
167179
./run_rnea
168180
./load_urdf
181+
182+
# Test CMake module packaging and pinocchio_header target
169183
cd ../../pinocchio_header
170184
mkdir build
171185
cd build
@@ -180,3 +194,18 @@ jobs:
180194
run: |
181195
cd build
182196
sudo make uninstall
197+
198+
check:
199+
if: always()
200+
name: check-linux-apt
201+
202+
needs:
203+
- build
204+
205+
runs-on: Ubuntu-latest
206+
207+
steps:
208+
- name: Decide whether the needed jobs succeeded or failed
209+
uses: re-actors/alls-green@release/v1
210+
with:
211+
jobs: ${{ toJSON(needs) }}

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ci:
22
autoupdate_branch: devel
33
autofix_prs: false
4+
autoupdate_schedule: quarterly
45
repos:
56
- repo: https://github.com/pre-commit/mirrors-clang-format
67
rev: v18.1.8
@@ -26,7 +27,7 @@ repos:
2627
doc/doxygen-awesome.*
2728
)$
2829
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: v0.5.0
30+
rev: v0.5.2
3031
hooks:
3132
- id: ruff-format
3233
exclude: doc/
@@ -45,3 +46,4 @@ repos:
4546
hooks:
4647
- id: yamlfmt
4748
args: [--mapping=2, --offset=2, --sequence=4, --implicit_start]
49+
exclude: ^.github/workflows/linux.yml$

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
### Fixed
10+
- Append pinocchio optional libraries into pkg-config file ([#2322](https://github.com/stack-of-tasks/pinocchio/pull/2322))
11+
12+
### Added
13+
- Add getMotionAxis method to helical, prismatic, revolute and ubounded revolute joint ([#2315](https://github.com/stack-of-tasks/pinocchio/pull/2315))
14+
15+
### Changed
16+
- Use eigenpy to expose `GeometryObject::meshMaterial` variant ([#2315](https://github.com/stack-of-tasks/pinocchio/pull/2315))
17+
18+
## [3.1.0] - 2024-07-04
19+
920
### Fixed
1021

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

2436
### Added
2537

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

9901002

991-
[Unreleased]: https://github.com/stack-of-tasks/pinocchio/compare/v3.0.0...HEAD
1003+
[Unreleased]: https://github.com/stack-of-tasks/pinocchio/compare/v3.1.0...HEAD
1004+
[3.1.0]: https://github.com/stack-of-tasks/pinocchio/compare/v3.0.0...v3.1.0
9921005
[3.0.0]: https://github.com/stack-of-tasks/pinocchio/compare/v2.7.1...v3.0.0
9931006
[2.7.1]: https://github.com/stack-of-tasks/pinocchio/compare/v2.7.0...v2.7.1
9941007
[2.7.0]: https://github.com/stack-of-tasks/pinocchio/compare/v2.6.21...v2.7.0

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ authors:
1717
given-names: Guilhem
1818
- family-names: Budhiraja
1919
given-names: Rohan
20-
version: 2.6.3
21-
date-released: "2021-07-21"
20+
version: 3.1.0
21+
date-released: "2024-07-04"
2222
license: BSD-2-Clause
2323
repository-code: "https://github.com/stack-of-tasks/pinocchio"

CMakeLists.txt

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,15 @@ if(BUILD_WITH_URDF_SUPPORT)
189189
add_project_dependency(urdfdom REQUIRED PKG_CONFIG_REQUIRES "urdfdom >= 0.2.0")
190190
set(urdfdom_VERSION ${urdfdom_headers_VERSION})
191191
list(APPEND CFLAGS_DEPENDENCIES "-DPINOCCHIO_WITH_URDFDOM")
192-
list(APPEND LIBRARIES_DEPENDENCIES "urdfdom_world")
193192

194193
if(${urdfdom_VERSION} VERSION_GREATER "0.4.2")
195194
check_minimal_cxx_standard(11 ENFORCE)
196195
message(
197196
STATUS
198197
"Since urdfdom >= 1.0.0, the default C++ standard is C++11. The project is then compiled with C++11 standard."
199198
)
200-
endif(${urdfdom_VERSION} VERSION_GREATER "0.4.2")
201-
endif(BUILD_WITH_URDF_SUPPORT)
199+
endif()
200+
endif()
202201

203202
if(BUILD_WITH_SDF_SUPPORT)
204203
include(${CMAKE_CURRENT_LIST_DIR}/cmake/sdformat.cmake)
@@ -207,32 +206,42 @@ if(BUILD_WITH_SDF_SUPPORT)
207206
check_minimal_cxx_standard(11 REQUIRED)
208207
include_directories(${SDFormat_INCLUDE_DIRS})
209208
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SDFormat_CXX_FLAGS}")
210-
endif(SDFormat_FOUND)
211-
endif(BUILD_WITH_SDF_SUPPORT)
209+
list(APPEND CFLAGS_DEPENDENCIES "-DPINOCCHIO_WITH_SDFORMAT")
210+
endif()
211+
endif()
212212

213213
set(BUILD_WITH_PARSERS_SUPPORT BUILD_WITH_URDF_SUPPORT OR BUILD_WITH_SDF_SUPPORT)
214214

215+
if(BUILD_WITH_PARSERS_SUPPORT)
216+
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_parsers)
217+
endif()
218+
215219
if(BUILD_WITH_AUTODIFF_SUPPORT)
216220
# Check first CppADCodeGen
217221
if(BUILD_WITH_CODEGEN_SUPPORT)
222+
# No need to add cppadcg to pkg-config (no lib and header in the same directory than cppad)
218223
add_project_dependency(cppadcg 2.4.1 REQUIRED)
224+
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_cppadcg)
219225
endif(BUILD_WITH_CODEGEN_SUPPORT)
220226

221227
add_project_dependency(
222228
cppad 20180000.0 REQUIRED
223229
PKG_CONFIG_REQUIRES "cppad >= 20220624.0"
224230
FIND_EXTERNAL "CppAD")
231+
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_cppad)
225232
endif(BUILD_WITH_AUTODIFF_SUPPORT)
226233

227234
if(BUILD_WITH_CASADI_SUPPORT)
228235
add_project_dependency(casadi 3.4.5 REQUIRED PKG_CONFIG_REQUIRES "casadi >= 3.4.5")
236+
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_casadi)
229237
endif(BUILD_WITH_CASADI_SUPPORT)
230238

231239
if(BUILD_WITH_OPENMP_SUPPORT)
232240
add_project_dependency(OpenMP REQUIRED)
233241
endif()
234242

235243
if(BUILD_WITH_EXTRA_SUPPORT)
244+
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_extra qhullcpp qhull_r)
236245
add_project_dependency(Qhull COMPONENTS qhullcpp qhull_r REQUIRED)
237246
message(STATUS "Found Qhull.")
238247
endif()
@@ -294,7 +303,7 @@ endif()
294303

295304
if(BUILD_WITH_HPP_FCL_SUPPORT)
296305
list(APPEND CFLAGS_DEPENDENCIES "-DPINOCCHIO_WITH_HPP_FCL")
297-
list(APPEND LIBRARIES_DEPENDENCIES "hpp-fcl")
306+
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_collision)
298307
add_project_dependency(hpp-fcl 2.1.2 REQUIRED PKG_CONFIG_REQUIRES "hpp-fcl >= 2.1.2")
299308
endif()
300309

bindings/python/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ function(PINOCCHIO_PYTHON_BINDINGS_SPECIFIC_TYPE scalar_name)
8181
if(BUILD_WITH_URDF_SUPPORT)
8282
# Link directly against console_bridge since we bind some enums and call
8383
# console_bridge::setLogLevel function.
84-
target_link_libraries(${PYTHON_LIB_NAME} PUBLIC console_bridge::console_bridge)
84+
modernize_target_link_libraries(
85+
${PYTHON_LIB_NAME}
86+
SCOPE PUBLIC
87+
TARGETS console_bridge::console_bridge
88+
LIBRARIES ${console_bridge_LIBRARIES}
89+
INCLUDE_DIRS ${console_bridge_INCLUDE_DIRS})
8590
endif()
8691
if(BUILD_WITH_HPP_FCL_SUPPORT)
8792
target_compile_definitions(${PYTHON_LIB_NAME}

0 commit comments

Comments
 (0)