From 78543651030dc7061604800f6c3ad5edc85d26c8 Mon Sep 17 00:00:00 2001 From: v4hn Date: Fri, 12 Dec 2025 19:57:31 +0100 Subject: [PATCH] rely on post-noetic pybind11_catkin ros-o's pybind11_catkin bundles a sufficient pybind11 and ensures python_add_library is available also with ros-o catkin, where the implicit `find_package(Python COMPONENTS Interpreter)` does not provide it by default anymore. --- core/CMakeLists.txt | 1 + core/package.xml | 1 + core/python/CMakeLists.txt | 4 ---- core/python/bindings/CMakeLists.txt | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 1b01d4167..999bd58c2 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -14,6 +14,7 @@ find_package(catkin REQUIRED COMPONENTS roscpp visualization_msgs rviz_marker_tools + pybind11_catkin py_binding_tools ) diff --git a/core/package.xml b/core/package.xml index 7e3d68b9c..1c302f67f 100644 --- a/core/package.xml +++ b/core/package.xml @@ -17,6 +17,7 @@ roscpp roslint + pybind11_catkin roscpp fmt diff --git a/core/python/CMakeLists.txt b/core/python/CMakeLists.txt index 98d40fca7..f7e81eb8e 100644 --- a/core/python/CMakeLists.txt +++ b/core/python/CMakeLists.txt @@ -1,7 +1,3 @@ -# pybind11 must use the ROS python version -set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION}) -find_package(pybind11 3.0 REQUIRED) - # C++ wrapper code add_subdirectory(bindings) diff --git a/core/python/bindings/CMakeLists.txt b/core/python/bindings/CMakeLists.txt index eb962b751..abcec0ad0 100644 --- a/core/python/bindings/CMakeLists.txt +++ b/core/python/bindings/CMakeLists.txt @@ -11,7 +11,7 @@ target_link_libraries(${PROJECT_NAME}_python_tools PUBLIC pybind11::opt_size) #catkin_lint: ignore undefined_target # moveit.task_constructor -pybind11_add_module(pymoveit_mtc +pybind_add_module(pymoveit_mtc src/solvers.cpp src/core.cpp src/stages.cpp