From 43573cd52a772e950344dbdd506b1584316dd9e3 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Sat, 25 Nov 2023 17:37:15 +0100 Subject: [PATCH 01/14] ci/ros: add iron and humble --- .github/workflows/ros-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ros-ci.yml b/.github/workflows/ros-ci.yml index 90a6864f6e..fbe7c14896 100644 --- a/.github/workflows/ros-ci.yml +++ b/.github/workflows/ros-ci.yml @@ -14,6 +14,8 @@ jobs: env: - {ROS_DISTRO: noetic} - {ROS_DISTRO: rolling, BUILDER: colcon} + - {ROS_DISTRO: iron} + - {ROS_DISTRO: humble} env: CCACHE_DIR: /github/home/.ccache # Enable ccache # The following is a work-around for ROS tooling in conjunction with jrl-cmakemodules: From e99bbf71349328bb2ec5372ebb45e3e2a03a62dc Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Sun, 26 Nov 2023 00:24:47 +0100 Subject: [PATCH 02/14] ci/ros: update commit id --- .github/workflows/ros-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ros-ci.yml b/.github/workflows/ros-ci.yml index fbe7c14896..5cfaf424f8 100644 --- a/.github/workflows/ros-ci.yml +++ b/.github/workflows/ros-ci.yml @@ -40,5 +40,5 @@ jobs: path: ${{ env.CCACHE_DIR }} key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} # Run industrial_ci - - uses: 'ros-industrial/industrial_ci@9e8b4aaec69f7cade96eda5cfcb3e7da57b99c6e' + - uses: 'ros-industrial/industrial_ci@9f963f67ebb889792175776c5ee00134d7bb569b' env: ${{ matrix.env }} From 4cd601b53557c5f4010b692d88cc7766d0514d94 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Mon, 27 Nov 2023 16:17:22 +0100 Subject: [PATCH 03/14] cmake: sync submodule --- cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake b/cmake index 02719f3288..b7a4177f26 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 02719f3288d3f79d2269fe784bd071657ba59f6d +Subproject commit b7a4177f2694c50dc95e64317f1260c7cfae93a3 From a85451a8f1ffb6ca1d98e2df1c798c592b6f1971 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Tue, 28 Nov 2023 12:14:18 +0100 Subject: [PATCH 04/14] python: add missing include --- bindings/python/utils/conversions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/python/utils/conversions.cpp b/bindings/python/utils/conversions.cpp index 87800d2b85..82cf455278 100644 --- a/bindings/python/utils/conversions.cpp +++ b/bindings/python/utils/conversions.cpp @@ -3,6 +3,7 @@ // #include +#include #include "pinocchio/bindings/python/fwd.hpp" #include "pinocchio/bindings/python/spatial/se3.hpp" From f312258e6395482b1ce8124d7cdced625eced3bd Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Tue, 28 Nov 2023 12:17:44 +0100 Subject: [PATCH 05/14] changelog: update --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a03f00b8..68b8898661 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed + +- Add missing include `` for recent version of Windows compilers ([#2101](https://github.com/stack-of-tasks/pinocchio/pull/2101)) + ## [2.6.21] - 2023-11-27 ### Added From ef86a240b70f78aa8ecebbdd893815780f78b05c Mon Sep 17 00:00:00 2001 From: Wolfgang Merkt Date: Tue, 28 Nov 2023 11:40:39 +0000 Subject: [PATCH 06/14] package.xml: Add ros_environment dependency --- package.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.xml b/package.xml index 0c04ca395a..3b637a166e 100644 --- a/package.xml +++ b/package.xml @@ -15,6 +15,8 @@ doxygen doxygen texlive-latex-base + + ros_environment catkin python From 0bbc821de28ad8baf7252ed829c782e61c9205db Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Tue, 28 Nov 2023 16:37:07 +0100 Subject: [PATCH 07/14] python: use bp::ssize_t --- bindings/python/utils/conversions.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bindings/python/utils/conversions.cpp b/bindings/python/utils/conversions.cpp index 82cf455278..c73707e588 100644 --- a/bindings/python/utils/conversions.cpp +++ b/bindings/python/utils/conversions.cpp @@ -3,7 +3,6 @@ // #include -#include #include "pinocchio/bindings/python/fwd.hpp" #include "pinocchio/bindings/python/spatial/se3.hpp" @@ -38,7 +37,7 @@ namespace pinocchio template SE3 XYZQUATToSE3_bp(const TupleOrList& v) { - ssize_t size = bp::len(v); + bp::ssize_t size = bp::len(v); if(size != 7) { throw std::invalid_argument( From bd23aafe3fd90cda876536f67d2da9f856a2ff08 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Tue, 28 Nov 2023 16:40:19 +0100 Subject: [PATCH 08/14] changelog: fix --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b8898661..4afe855dc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed -- Add missing include `` for recent version of Windows compilers ([#2101](https://github.com/stack-of-tasks/pinocchio/pull/2101)) +- Use bp::ssize_t for recent version of Windows compilers ([#2102](https://github.com/stack-of-tasks/pinocchio/pull/2102)) ## [2.6.21] - 2023-11-27 From 1f9b4c0bbbe7980220c1d3baa75200a3ae2a2340 Mon Sep 17 00:00:00 2001 From: Andrew Bylard Date: Tue, 28 Nov 2023 14:42:27 -0800 Subject: [PATCH 09/14] add direct boost is_floating_point import --- include/pinocchio/math/fwd.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/pinocchio/math/fwd.hpp b/include/pinocchio/math/fwd.hpp index d10fe48c8c..deaa12e6eb 100644 --- a/include/pinocchio/math/fwd.hpp +++ b/include/pinocchio/math/fwd.hpp @@ -8,6 +8,7 @@ #include "pinocchio/fwd.hpp" #include #include +#include namespace pinocchio { From b5f7acb4c638560fb6d106b98dd82f564ff59292 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Wed, 29 Nov 2023 08:56:40 +0100 Subject: [PATCH 10/14] changelog: update --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4afe855dc9..cc5e9a46bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Use bp::ssize_t for recent version of Windows compilers ([#2102](https://github.com/stack-of-tasks/pinocchio/pull/2102)) +- Fix missing include for Boost >= 1.83 ([#2103](https://github.com/stack-of-tasks/pinocchio/pull/2103)) ## [2.6.21] - 2023-11-27 From 7b98fae7949ac9231b4ccea81fc89275a25f06fb Mon Sep 17 00:00:00 2001 From: Wolfgang Merkt Date: Wed, 29 Nov 2023 14:57:45 +0000 Subject: [PATCH 11/14] [CI] Use colcon apart from noetic; remove Melodic conditional dependencies --- .github/workflows/ros-ci.yml | 7 +++---- package.xml | 8 +++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ros-ci.yml b/.github/workflows/ros-ci.yml index 1c57a5c5ce..6e57d1abf0 100644 --- a/.github/workflows/ros-ci.yml +++ b/.github/workflows/ros-ci.yml @@ -12,13 +12,13 @@ jobs: strategy: matrix: env: - - {ROS_DISTRO: noetic} - - {ROS_DISTRO: rolling, BUILDER: colcon} + - {ROS_DISTRO: noetic, BUILDER: catkin_tools} + - {ROS_DISTRO: rolling} - {ROS_DISTRO: iron} - {ROS_DISTRO: humble} env: CCACHE_DIR: /github/home/.ccache # Enable ccache - # The following is a work-around for ROS tooling in conjunction with jrl-cmakemodules: + # The following is a work-around for ROS1 tooling in conjunction with jrl-cmakemodules: # - catkin_make_isolated has issues with Industrial-CI right now # - colcon cannot find example-robot-data's python bindings due to ROS1 workspace integration hooks # - catkin_tools correctly finds example-robot-data in the upstream_ws, but does not execute the 'run_tests' target @@ -26,7 +26,6 @@ jobs: # The work-around is thus to use catkin_tools for building and sourcing, and to manually specify execution of the test # target after completion of the regular test target. The output of this step does affect the output of the CI process. # Note, this does not affect projects that do not have pure CMake projects in their upstream_ws. - BUILDER: catkin_tools AFTER_RUN_TARGET_TEST: 'ici_with_unset_variables source /root/target_ws/install/setup.bash && cd /root/target_ws/build/pinocchio && make test' IMMEDIATE_TEST_OUTPUT: 1 runs-on: ubuntu-latest diff --git a/package.xml b/package.xml index 3b637a166e..58397562d3 100644 --- a/package.xml +++ b/package.xml @@ -15,14 +15,12 @@ doxygen doxygen texlive-latex-base - + ros_environment catkin - python - python3 - python-numpy - python3-numpy + python3 + python3-numpy liburdfdom-dev eigen boost From 94cb9f43f0d5f6e5bb422ecfe1bf391481b39bfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 01:07:55 +0000 Subject: [PATCH 12/14] build(deps): bump conda-incubator/setup-miniconda from 2 to 3 Bumps [conda-incubator/setup-miniconda](https://github.com/conda-incubator/setup-miniconda) from 2 to 3. - [Release notes](https://github.com/conda-incubator/setup-miniconda/releases) - [Changelog](https://github.com/conda-incubator/setup-miniconda/blob/main/CHANGELOG.md) - [Commits](https://github.com/conda-incubator/setup-miniconda/compare/v2...v3) --- updated-dependencies: - dependency-name: conda-incubator/setup-miniconda dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/macos-linux-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 10eddac11f..8e09544c32 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -34,7 +34,7 @@ jobs: path: ${{ env.CCACHE_DIR }} key: ccache-conda-${{ matrix.os }}-${{ matrix.build_type }} - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 with: activate-environment: pinocchio auto-update-conda: true From 49eb4d76b5d30789cd7acab8fb18e6624c686267 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 4 Dec 2023 09:04:44 +0100 Subject: [PATCH 13/14] fix for python 2 (#2110) * fix for python 2 * add changelog entry * typo --- CHANGELOG.md | 1 + bindings/python/pinocchio/visualize/meshcat_visualizer.py | 4 ++-- examples/update-model-after-urdf.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc5e9a46bc..774c5e85bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Use bp::ssize_t for recent version of Windows compilers ([#2102](https://github.com/stack-of-tasks/pinocchio/pull/2102)) - Fix missing include for Boost >= 1.83 ([#2103](https://github.com/stack-of-tasks/pinocchio/pull/2103)) +- Remove f-strings to fix install with python 2 ([#2110](https://github.com/stack-of-tasks/pinocchio/pull/2110)) ## [2.6.21] - 2023-11-27 diff --git a/bindings/python/pinocchio/visualize/meshcat_visualizer.py b/bindings/python/pinocchio/visualize/meshcat_visualizer.py index 23c9e48fa6..808ba489bc 100644 --- a/bindings/python/pinocchio/visualize/meshcat_visualizer.py +++ b/bindings/python/pinocchio/visualize/meshcat_visualizer.py @@ -618,7 +618,7 @@ def initializeFrames(self, frame_ids=None, axis_length=0.2, axis_width=2): for fid, frame in enumerate(self.model.frames): if frame_ids is None or fid in frame_ids: - frame_viz_name = f"{self.viewerFramesGroupName}/{frame.name}" + frame_viz_name = "%s/%s" % (self.viewerFramesGroupName, frame.name) self.viewer[frame_viz_name].set_object( mg.LineSegments( mg.PointsGeometry( @@ -640,7 +640,7 @@ def updateFrames(self): pin.updateFramePlacements(self.model, self.data) for fid in self.frame_ids: frame_name = self.model.frames[fid].name - frame_viz_name = f"{self.viewerFramesGroupName}/{frame_name}" + frame_viz_name = "%s/%s" % (self.viewerFramesGroupName, frame_name) self.viewer[frame_viz_name].set_transform( self.data.oMf[fid].homogeneous ) diff --git a/examples/update-model-after-urdf.py b/examples/update-model-after-urdf.py index 7a9b73821f..91d927aa78 100644 --- a/examples/update-model-after-urdf.py +++ b/examples/update-model-after-urdf.py @@ -23,7 +23,7 @@ def check_limb_lengths(limb_length: float) -> bool: - print(f"Checking that limbs are {limb_length} m long... ", end="") + print("Checking that limbs are %s m long... " % limb_length, end="") for side in ("left", "right"): for joint in ("knee", "wheel"): joint_id = model.getJointId(f"{side}_{joint}") From 9c2e38cb47125dbd1696f2ca530405ce5882e5fa Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 4 Dec 2023 16:57:11 +0100 Subject: [PATCH 14/14] CMake: export CppAD finder (#2112) * CMake: export CppAD finder * CMake: fetch submodule if not available * add changelog entry * CMake: stop exporting CppAD & cppadcodegen --- CHANGELOG.md | 1 + CMakeLists.txt | 33 ++++++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 774c5e85bb..d07fcba5e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Use bp::ssize_t for recent version of Windows compilers ([#2102](https://github.com/stack-of-tasks/pinocchio/pull/2102)) - Fix missing include for Boost >= 1.83 ([#2103](https://github.com/stack-of-tasks/pinocchio/pull/2103)) - Remove f-strings to fix install with python 2 ([#2110](https://github.com/stack-of-tasks/pinocchio/pull/2110)) +- CMake: stop exporting CppAd/cppadcodegen & fetch submodule if not available ([#2112](https://github.com/stack-of-tasks/pinocchio/pull/2112)) ## [2.6.21] - 2023-11-27 diff --git a/CMakeLists.txt b/CMakeLists.txt index 9204d02c0c..0f55803364 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,20 +24,35 @@ OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" OFF) # Check if the submodule cmake have been initialized set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake") -IF(NOT EXISTS "${JRL_CMAKE_MODULES}/base.cmake") - MESSAGE(FATAL_ERROR "\nPlease run the following command first:\ngit submodule update --init\n") -ENDIF() +if(NOT EXISTS "${JRL_CMAKE_MODULES}/base.cmake") + if(${CMAKE_VERSION} VERSION_LESS "3.14.0") + message( + FATAL_ERROR + "\nPlease run the following command first:\ngit submodule update --init\n" + ) + else() + message(STATUS "JRL cmakemodules not found. Let's fetch it.") + include(FetchContent) + FetchContent_Declare( + "jrl-cmakemodules" + GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git") + FetchContent_MakeAvailable("jrl-cmakemodules") + FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES) + endif() +endif() + SET(DOXYGEN_USE_MATHJAX YES) SET(DOXYGEN_USE_TEMPLATE_CSS YES) -INCLUDE(${CMAKE_CURRENT_LIST_DIR}/cmake/base.cmake) +INCLUDE("${JRL_CMAKE_MODULES}/base.cmake") + COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX) PROJECT(${PROJECT_NAME} ${PROJECT_ARGS}) -INCLUDE(${CMAKE_CURRENT_LIST_DIR}/cmake/boost.cmake) -INCLUDE(${CMAKE_CURRENT_LIST_DIR}/cmake/ide.cmake) -INCLUDE(${CMAKE_CURRENT_LIST_DIR}/cmake/apple.cmake) +INCLUDE("${JRL_CMAKE_MODULES}/boost.cmake") +INCLUDE("${JRL_CMAKE_MODULES}/ide.cmake") +INCLUDE("${JRL_CMAKE_MODULES}/apple.cmake") IF(APPLE) # Use the handmade approach SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/find-external/OpenMP ${CMAKE_MODULE_PATH}) ENDIF(APPLE) @@ -120,10 +135,10 @@ ENDIF(BUILD_WITH_URDF_SUPPORT) IF(BUILD_WITH_AUTODIFF_SUPPORT) # Check first CppADCodeGen IF(BUILD_WITH_CODEGEN_SUPPORT) - ADD_PROJECT_DEPENDENCY(cppadcg 2.4.1 REQUIRED PKG_CONFIG_REQUIRES "cppadcg >= 2.4.1") # CppADCodeGen 2.4.1 is the first version to check the minimal version of CppAD + FIND_PACKAGE(cppadcg 2.4.1 REQUIRED) ENDIF(BUILD_WITH_CODEGEN_SUPPORT) - ADD_PROJECT_DEPENDENCY(cppad 20180000.0 REQUIRED PKG_CONFIG_REQUIRES "cppad >= 20180000.0") + FIND_PACKAGE(cppad 20180000.0 REQUIRED) ENDIF(BUILD_WITH_AUTODIFF_SUPPORT) IF(BUILD_WITH_CASADI_SUPPORT)