diff --git a/.github/workflows/ros-ci.yml b/.github/workflows/ros-ci.yml index 09fdb2c5c1..c5cbe4e768 100644 --- a/.github/workflows/ros-ci.yml +++ b/.github/workflows/ros-ci.yml @@ -12,8 +12,10 @@ 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 CTEST_OUTPUT_ON_FAILURE: ON @@ -25,7 +27,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/CHANGELOG.md b/CHANGELOG.md index 01a03f00b8..d07fcba5e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### 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)) +- 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 ### Added 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) 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/bindings/python/utils/conversions.cpp b/bindings/python/utils/conversions.cpp index 87800d2b85..c73707e588 100644 --- a/bindings/python/utils/conversions.cpp +++ b/bindings/python/utils/conversions.cpp @@ -37,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( diff --git a/cmake b/cmake index 02719f3288..b7a4177f26 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 02719f3288d3f79d2269fe784bd071657ba59f6d +Subproject commit b7a4177f2694c50dc95e64317f1260c7cfae93a3 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}") 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 { diff --git a/package.xml b/package.xml index 3b4c2d48e9..8ef6203408 100644 --- a/package.xml +++ b/package.xml @@ -15,12 +15,12 @@ doxygen doxygen texlive-latex-base + + ros_environment catkin - python - python3 - python-numpy - python3-numpy + python3 + python3-numpy liburdfdom-dev eigen boost