diff --git a/core/python/pybind11 b/core/python/pybind11 index f4bc71f98..4070a64f8 160000 --- a/core/python/pybind11 +++ b/core/python/pybind11 @@ -1 +1 @@ -Subproject commit f4bc71f981d4eb2dd780215fd3c5a7420f1f03aa +Subproject commit 4070a64f867c60842476f74a2212110ea5e05230 diff --git a/core/src/CMakeLists.txt b/core/src/CMakeLists.txt index 135b0c986..b75f3c3b4 100644 --- a/core/src/CMakeLists.txt +++ b/core/src/CMakeLists.txt @@ -37,7 +37,8 @@ add_library(${PROJECT_NAME} solvers/pipeline_planner.cpp solvers/multi_planner.cpp ) -target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} fmt::fmt) +find_package(pybind11 REQUIRED) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} fmt::fmt pybind11::module) target_include_directories(${PROJECT_NAME} PUBLIC $ PUBLIC $ diff --git a/core/src/task.cpp b/core/src/task.cpp index f6c3b864d..64876279d 100644 --- a/core/src/task.cpp +++ b/core/src/task.cpp @@ -48,6 +48,8 @@ #include +#include + namespace { std::string rosNormalizeName(const std::string& name) { std::string n; @@ -236,6 +238,8 @@ moveit::core::MoveItErrorCode Task::plan(size_t max_solutions) { auto impl = pimpl(); init(); + pybind11::gil_scoped_release release; + // Print state and return success if there are solutions otherwise the input error_code const auto success_or = [this](const int32_t error_code) -> int32_t { if (numSolutions() > 0) @@ -258,6 +262,9 @@ moveit::core::MoveItErrorCode Task::plan(size_t max_solutions) { if (impl->introspection_) impl->introspection_->publishTaskState(); }; + + pybind11::gil_scoped_acquire acquire; + return success_or(moveit::core::MoveItErrorCode::PLANNING_FAILED); }