From 34039e4a7a9cad8eb8167546764351b4f8726892 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 29 Aug 2024 14:11:35 +0000 Subject: [PATCH] [math/{py-,}pinocchio] Update to v3.2.0 ## [3.2.0] - 2024-08-27 ### Fixed - Append pinocchio optional libraries into pkg-config file (https://github.com/stack-of-tasks/pinocchio/pull/2322) - Fixed support of DAE meshes with MeshCat (https://github.com/stack-of-tasks/pinocchio/pull/2331) - Fixed pointer casts in urdf parser (https://github.com/stack-of-tasks/pinocchio/pull/2339) - Remove CMake CMP0167 warnings (https://github.com/stack-of-tasks/pinocchio/pull/2347) - Fixed urdfdom in ROS packaging (https://github.com/stack-of-tasks/pinocchio/pull/2341) - Fixed overview-urdf cpp example (https://github.com/stack-of-tasks/pinocchio/pull/2384) - Fixed mjcf model without a base link parsing (https://github.com/stack-of-tasks/pinocchio/pull/2386) - Fixed talos-simulation.py, simulation-contact-dynamics.py and simulation-closed-kinematic-chains.py examples (https://github.com/stack-of-tasks/pinocchio/pull/2392) ### Added - Add getMotionAxis method to helical, prismatic, revolute and ubounded revolute joint (https://github.com/stack-of-tasks/pinocchio/pull/2315) - Add initial compatiblity with coal (coal needs `-DCOAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL=ON`) (https://github.com/stack-of-tasks/pinocchio/pull/2323) - Add compatibility with jrl-cmakemodules workspace (https://github.com/stack-of-tasks/pinocchio/pull/2333) - Add ``collision_color`` parameter to `MeshcatVisualizer.loadViewerModel` (https://github.com/stack-of-tasks/pinocchio/pull/2350) - Add ``BuildFromMJCF`` function to RobotWrapper (https://github.com/stack-of-tasks/pinocchio/pull/2363) - Add more CasADi examples (https://github.com/stack-of-tasks/pinocchio/pull/2388) ### Removed - Remove deprecated headers related to joint constraints (https://github.com/stack-of-tasks/pinocchio/pull/2382) ### Changed - Use eigenpy to expose `GeometryObject::meshMaterial` variant (https://github.com/stack-of-tasks/pinocchio/pull/2315) - GepettoViewer is no more the default viewer for RobotWrapper (https://github.com/stack-of-tasks/pinocchio/pull/2331) - Modernize python code base with ruff (https://github.com/stack-of-tasks/pinocchio/pull/2367) - Restructure CppAD and CasADi examples (https://github.com/stack-of-tasks/pinocchio/pull/2388) - Enhance and fix CppAD benchmarks outputs (https://github.com/stack-of-tasks/pinocchio/pull/2393) Packaging Changes: - Removed patches af, an, ap: fixed upstream - Updated patches ag, ak --- math/pinocchio/Makefile | 2 +- math/pinocchio/PLIST | 4 +-- math/pinocchio/distinfo | 10 +++----- math/pinocchio/patches/patch-an | 20 --------------- math/pinocchio/patches/patch-ap | 16 ------------ math/py-pinocchio/Makefile | 4 ++- math/py-pinocchio/distinfo | 13 ++++------ math/py-pinocchio/patches/patch-af | 40 ------------------------------ math/py-pinocchio/patches/patch-ag | 28 ++++++++++----------- math/py-pinocchio/patches/patch-ak | 11 ++++---- 10 files changed, 33 insertions(+), 115 deletions(-) delete mode 100644 math/pinocchio/patches/patch-an delete mode 100644 math/pinocchio/patches/patch-ap delete mode 100644 math/py-pinocchio/patches/patch-af diff --git a/math/pinocchio/Makefile b/math/pinocchio/Makefile index 08a352379..00c0070b5 100644 --- a/math/pinocchio/Makefile +++ b/math/pinocchio/Makefile @@ -4,7 +4,7 @@ ORG= stack-of-tasks NAME= pinocchio -VERSION= 3.1.0 +VERSION= 3.2.0 CATEGORIES= math COMMENT= Efficient rigid body dynamics diff --git a/math/pinocchio/PLIST b/math/pinocchio/PLIST index 95fbd7ed9..69ff530b1 100644 --- a/math/pinocchio/PLIST +++ b/math/pinocchio/PLIST @@ -272,8 +272,6 @@ include/pinocchio/math/taylor-expansion.hpp include/pinocchio/math/tensor.hpp include/pinocchio/math/triangular-matrix.hpp include/pinocchio/math/tridiagonal-matrix.hpp -include/pinocchio/multibody/constraint-base.hpp -include/pinocchio/multibody/constraint-generic.hpp include/pinocchio/multibody/data.hpp include/pinocchio/multibody/data.hxx include/pinocchio/multibody/data.txx @@ -348,6 +346,7 @@ include/pinocchio/multibody/visitor/fusion.hpp include/pinocchio/multibody/visitor/joint-binary-visitor.hpp include/pinocchio/multibody/visitor/joint-unary-visitor.hpp include/pinocchio/parsers/config.hpp +include/pinocchio/parsers/meshloader-fwd.hpp include/pinocchio/parsers/mjcf.hpp include/pinocchio/parsers/mjcf/geometry.hxx include/pinocchio/parsers/mjcf/mjcf-graph.hpp @@ -372,7 +371,6 @@ include/pinocchio/serialization/frame.hpp include/pinocchio/serialization/fwd.hpp include/pinocchio/serialization/geometry.hpp include/pinocchio/serialization/inertia.hpp -include/pinocchio/serialization/joints-constraint.hpp include/pinocchio/serialization/joints-data.hpp include/pinocchio/serialization/joints-model.hpp include/pinocchio/serialization/joints-motion-subspace.hpp diff --git a/math/pinocchio/distinfo b/math/pinocchio/distinfo index 28de0fc9a..d361170a4 100644 --- a/math/pinocchio/distinfo +++ b/math/pinocchio/distinfo @@ -1,8 +1,4 @@ -SHA1 (pinocchio-3.0.0.tar.gz) = 72192a2ea9914c74413b6ef92f066ced802cd62f -RMD160 (pinocchio-3.0.0.tar.gz) = 53ab1059dd86c34ae9a2a71af26ef24b2119d186 -Size (pinocchio-3.0.0.tar.gz) = 100744571 bytes -SHA1 (patch-2264) = eb7cba2191020c3bb6026369fb236239e22e86db -SHA1 (patch-2284) = b179e8b3ef082515af5b4ee48f3b9d9267e509a3 -SHA1 (patch-an) = 99018d12bd2a563b05685fc25fae0dad02303164 +SHA1 (pinocchio-3.2.0.tar.gz) = 01d46b7a1b64feb6874b8b173bb96b8283e100a8 +RMD160 (pinocchio-3.2.0.tar.gz) = 12e75cd4238297d0414daebb61f6c523441e2fec +Size (pinocchio-3.2.0.tar.gz) = 101261496 bytes SHA1 (patch-ao) = 82388cd763283a6d70581fdabcd1ae1035046ab8 -SHA1 (patch-ap) = e68ebc96a023535f8bde33eae5eb027638ec3a1c diff --git a/math/pinocchio/patches/patch-an b/math/pinocchio/patches/patch-an deleted file mode 100644 index f106ab2c8..000000000 --- a/math/pinocchio/patches/patch-an +++ /dev/null @@ -1,20 +0,0 @@ ---- CMakeLists.txt.orig 2024-05-27 21:47:00.000000000 +0200 -+++ CMakeLists.txt 2024-05-28 08:48:46.596303442 +0200 -@@ -297,17 +297,8 @@ - # Check whether hpp-fcl python bindings are available. - set(BUILD_WITH_HPP_FCL_PYTHON_BINDINGS FALSE) - if(BUILD_PYTHON_INTERFACE) -- execute_process( -- COMMAND ${PYTHON_EXECUTABLE} -c "import hppfcl" -- RESULT_VARIABLE _hpp_fcl_python_bindings_not_found -- OUTPUT_QUIET ERROR_QUIET) -- if(_hpp_fcl_python_bindings_not_found EQUAL 0) - set(BUILD_WITH_HPP_FCL_PYTHON_BINDINGS TRUE) - message(STATUS "Found hpp-fcl Python bindings.") -- else() -- message(STATUS "hpp-fcl Python bindings NOT found.") -- endif() -- unset(_hpp_fcl_python_bindings_not_found) - endif(BUILD_PYTHON_INTERFACE) - endif(BUILD_WITH_HPP_FCL_SUPPORT) - diff --git a/math/pinocchio/patches/patch-ap b/math/pinocchio/patches/patch-ap deleted file mode 100644 index d2403a436..000000000 --- a/math/pinocchio/patches/patch-ap +++ /dev/null @@ -1,16 +0,0 @@ -boost-1.85 removed get_child with temporary second argument - ---- src/parsers/mjcf/mjcf-graph.cpp~ 2024-05-27 21:47:00.000000000 +0200 -+++ src/parsers/mjcf/mjcf-graph.cpp 2024-08-06 14:31:31.848800244 +0200 -@@ -37,8 +37,9 @@ - std::string path = el + "."; - if (parent.get_child_optional(path)) - { -- ptree attr_parent = parent.get_child(path, ptree()); -- ptree attr_current = current.get_child(path, ptree()); -+ const ptree dflt; -+ ptree attr_parent = parent.get_child(path, dflt); -+ ptree attr_current = current.get_child(path, dflt); - // To only copy non existing attribute in current, we copy all current - // attribute (replacing) into a parent copy then we replace current with the new - // ptree diff --git a/math/py-pinocchio/Makefile b/math/py-pinocchio/Makefile index effad5ddd..bba03ba8d 100644 --- a/math/py-pinocchio/Makefile +++ b/math/py-pinocchio/Makefile @@ -4,12 +4,13 @@ ORG= stack-of-tasks NAME= pinocchio -VERSION= 3.1.0 +VERSION= 3.2.0 CATEGORIES= math COMMENT= Efficient rigid body dynamics (python bindings) HOMEPAGE= http://${ORG}.github.io/${NAME}/ +#CMAKE_ARGS+= -DBUILD_WITH_CASADI_SUPPORT=ON CMAKE_ARGS+= -DBUILD_WITH_COLLISION_SUPPORT=ON CMAKE_ARGS+= -DBUILD_BENCHMARK=OFF CMAKE_ARGS+= -DBUILD_TESTING=OFF @@ -45,6 +46,7 @@ include ../../math/py-eigenpy/depend.mk include ../../path/hpp-fcl/depend.mk include ../../path/py-hpp-fcl/depend.mk include ../../mapping/octomap/depend.mk +#include ../../optimization/py-casadi/depend.mk include ../../pkgtools/pkg-config/depend.mk include ../../mk/sysdep/boost-headers.mk include ../../mk/sysdep/boost-libs.mk diff --git a/math/py-pinocchio/distinfo b/math/py-pinocchio/distinfo index 8808d1a76..8874b8ba5 100644 --- a/math/py-pinocchio/distinfo +++ b/math/py-pinocchio/distinfo @@ -1,9 +1,6 @@ -SHA1 (pinocchio-3.0.0.tar.gz) = 72192a2ea9914c74413b6ef92f066ced802cd62f -RMD160 (pinocchio-3.0.0.tar.gz) = 53ab1059dd86c34ae9a2a71af26ef24b2119d186 -Size (pinocchio-3.0.0.tar.gz) = 100744571 bytes -SHA1 (patch-2264) = eb7cba2191020c3bb6026369fb236239e22e86db -SHA1 (patch-2284) = b179e8b3ef082515af5b4ee48f3b9d9267e509a3 -SHA1 (patch-af) = bf6c1d2fe04942c52d783be76b2a3d5386189953 -SHA1 (patch-ag) = 929490a70c419afe239844b87f556e3789060c63 +SHA1 (pinocchio-3.2.0.tar.gz) = 01d46b7a1b64feb6874b8b173bb96b8283e100a8 +RMD160 (pinocchio-3.2.0.tar.gz) = 12e75cd4238297d0414daebb61f6c523441e2fec +Size (pinocchio-3.2.0.tar.gz) = 101261496 bytes +SHA1 (patch-ag) = 35b62ca6bd5676f51a5bef1d4a98c74113ca6a03 SHA1 (patch-ah) = 365652d212fc8b2e82c7fee33818d08541491893 -SHA1 (patch-ak) = 59ebee7b94ff79fae81702a21be3763e9502b8ba +SHA1 (patch-ak) = 73bff9b8278abb37c761375b4120b9f93edf9226 diff --git a/math/py-pinocchio/patches/patch-af b/math/py-pinocchio/patches/patch-af deleted file mode 100644 index 7c155f250..000000000 --- a/math/py-pinocchio/patches/patch-af +++ /dev/null @@ -1,40 +0,0 @@ -* From 06c61fcc25077b83a02baf61601e60d8190bfe9c Mon Sep 17 00:00:00 2001 - From: Guilhem Saurel - Date: Wed, 3 Jul 2024 11:00:20 +0200 - Subject: [PATCH] CMake: modernize link to console_bridge - -* Don't install .pc file: it would conflict between installs for - multiple python versions. In case it is needed, something must be found to - handle name conflicts. - ---- bindings/python/CMakeLists.txt~ 2024-05-27 21:47:00.000000000 +0200 -+++ bindings/python/CMakeLists.txt 2024-07-03 19:09:30.772531780 +0200 -@@ -81,7 +81,12 @@ - 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_PYTHON_BINDINGS) - target_compile_definitions(${PYTHON_LIB_NAME} -@@ -270,14 +275,6 @@ - set(_PKG_CONFIG_PYWRAP_CFLAGS "${_PKG_CONFIG_PYWRAP_CFLAGS} ${cflags}") - endforeach() - -- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pinocchiopy.pc.cmake" -- "${CMAKE_CURRENT_BINARY_DIR}/pinocchiopy.pc") -- -- install( -- FILES "${CMAKE_CURRENT_BINARY_DIR}/pinocchiopy.pc" -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE) -- - if(DOXYGEN_FOUND AND DOXYGEN_VERSION VERSION_GREATER 1.8.17) - set(DOXYGEN_GENERATE_HTML YES) - set(DOXYGEN_GENERATE_LATEX NO) diff --git a/math/py-pinocchio/patches/patch-ag b/math/py-pinocchio/patches/patch-ag index 2ea0a4c23..6fe7a0617 100644 --- a/math/py-pinocchio/patches/patch-ag +++ b/math/py-pinocchio/patches/patch-ag @@ -1,29 +1,29 @@ py-pinocchio needs pinocchio ---- CMakeLists.txt.orig 2024-05-27 21:47:00.000000000 +0200 -+++ CMakeLists.txt 2024-05-28 10:17:29.362489152 +0200 -@@ -183,6 +183,7 @@ +--- CMakeLists.txt.orig 2024-08-27 16:45:25.000000000 +0000 ++++ CMakeLists.txt 2024-08-29 13:19:21.747133530 +0000 +@@ -192,6 +192,7 @@ # ---------------------------------------------------- - set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/find-external/CppAD/" ${CMAKE_MODULE_PATH}) + set(CMAKE_MODULE_PATH "${JRL_CMAKE_MODULES}/find-external/CppAD/" ${CMAKE_MODULE_PATH}) add_project_dependency(Eigen3 REQUIRED PKG_CONFIG_REQUIRES "eigen3 >= 3.0.5") +add_project_dependency(${PROJECT_NAME} REQUIRED) if(BUILD_WITH_URDF_SUPPORT) add_project_dependency(urdfdom_headers REQUIRED) ---- bindings/python/CMakeLists.txt.orig 2024-05-27 21:47:00.000000000 +0200 -+++ bindings/python/CMakeLists.txt 2024-05-28 10:18:04.832481756 +0200 -@@ -76,7 +76,7 @@ +--- bindings/python/CMakeLists.txt.orig 2024-08-27 18:45:25.000000000 +0200 ++++ bindings/python/CMakeLists.txt 2024-08-29 15:19:55.570423979 +0200 +@@ -75,7 +75,7 @@ ${PYTHON_LIB_NAME} SCOPE PUBLIC TARGETS eigenpy::eigenpy) - target_link_libraries(${PYTHON_LIB_NAME} PUBLIC ${PROJECT_NAME}) -+ target_link_libraries(${PYTHON_LIB_NAME} PUBLIC ${PROJECT_NAME}::${PROJECT_NAME}) ++ target_link_libraries(${PYTHON_LIB_NAME} PUBLIC ${PROJECT_NAME}::${PROJECT_NAME}) if(BUILD_WITH_URDF_SUPPORT) # Link directly against console_bridge since we bind some enums and call ---- unittest/CMakeLists.txt.orig 2024-05-27 21:47:00.000000000 +0200 -+++ unittest/CMakeLists.txt 2024-05-28 10:18:52.605797982 +0200 -@@ -70,26 +70,26 @@ +--- unittest/CMakeLists.txt.orig 2024-08-27 18:45:25.000000000 +0200 ++++ unittest/CMakeLists.txt 2024-08-29 15:21:21.067157905 +0200 +@@ -71,26 +71,26 @@ target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) if(NOT unit_test_HEADER_ONLY) @@ -56,11 +56,11 @@ py-pinocchio needs pinocchio endif() modernize_target_link_libraries( ---- examples/CMakeLists.txt.orig 2024-05-27 21:47:00.000000000 +0200 -+++ examples/CMakeLists.txt 2024-05-28 10:19:23.895782651 +0200 +--- examples/CMakeLists.txt.orig 2024-08-27 18:45:25.000000000 +0200 ++++ examples/CMakeLists.txt 2024-08-29 15:22:20.099674281 +0200 @@ -14,22 +14,22 @@ get_filename_component(EXAMPLE_NAME ${EXAMPLE} NAME) - set(EXAMPLE_NAME "example-cpp-${EXAMPLE_NAME}") + set(EXAMPLE_NAME "${PROJECT_NAME}-example-cpp-${EXAMPLE_NAME}") add_unit_test(${EXAMPLE_NAME} "${EXAMPLE}.cpp") - target_link_libraries(${EXAMPLE_NAME} PUBLIC ${PROJECT_NAME}) + target_link_libraries(${EXAMPLE_NAME} PUBLIC ${PROJECT_NAME}::${PROJECT_NAME}) diff --git a/math/py-pinocchio/patches/patch-ak b/math/py-pinocchio/patches/patch-ak index d5e2b363a..d8911dcee 100644 --- a/math/py-pinocchio/patches/patch-ak +++ b/math/py-pinocchio/patches/patch-ak @@ -1,7 +1,7 @@ Don't install files already installed by pinocchio ---- CMakeLists.txt.orig 2024-05-27 21:47:00.000000000 +0200 -+++ CMakeLists.txt 2024-05-28 10:22:24.912306337 +0200 +--- CMakeLists.txt.orig 2024-08-27 18:45:25.000000000 +0200 ++++ CMakeLists.txt 2024-08-29 15:24:08.330632746 +0200 @@ -11,7 +11,6 @@ ) set(PROJECT_URL "http://github.com/stack-of-tasks/pinocchio") @@ -10,11 +10,10 @@ Don't install files already installed by pinocchio set(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE) set(PROJECT_COMPATIBILITY_VERSION AnyNewerVersion) set(PINOCCHIO_PROJECT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) -@@ -499,18 +498,3 @@ - endforeach() +@@ -507,19 +506,4 @@ pkg_config_append_cflags("${CFLAGS_DEPENDENCIES}") pkg_config_append_cflags("${CFLAGS_OPTIONS}") -- + -# Install catkin package.xml -install(FILES package.xml DESTINATION share/${PROJECT_NAME}) -# Allows Colcon to find non-Ament packages when using workspace underlays @@ -29,3 +28,5 @@ Don't install files already installed by pinocchio - "prepend-non-duplicate;PYTHONPATH;${PYTHON_SITELIB}") -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/${PROJECT_NAME}/hook/python_path.dsv - DESTINATION share/${PROJECT_NAME}/hook) +- + setup_project_finalize()