diff --git a/CMakeLists.txt b/CMakeLists.txt index a89c96599fb378617d488a7b50e2a84fe73c8441..cdbaa0a7b3e4daf5ed315551a187d20d7331f7fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ add_library(air_navigation SHARED src/python_controller.cpp src/python_interpreter.cpp) target_compile_definitions(air_navigation PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") -target_link_libraries(air_navigation ${PYTHON_LIBRARY} ${CMAKE_CURRENT_BINARY_DIR}/python/air_navigation_.so) +target_link_libraries(air_navigation ${PYTHON_LIBRARY} ) ament_target_dependencies(air_navigation ${dependencies} ) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index c93b4e8a179ce175e1ddc02ba8f5c67c4cfbcbe1..bd84e6c094af1232a1de7367b5083d75ebe99b6b 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -20,7 +20,7 @@ set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_ file(GLOB_RECURSE AIR_NAVIGATION_SIP_FILES *.sip) set(SIP_EXTRA_FILES_DEPEND ${AIR_NAVIGATION_SIP_FILES}) -add_sip_python_module(air_navigation_ ./air_navigation/mod.sip) +add_sip_python_module(air_navigation_ ./air_navigation/mod.sip air_navigation) install(FILES air_navigation/__init__.py diff --git a/src/python_interpreter.cpp b/src/python_interpreter.cpp index 53ea9bbaaae172f43917c539d3b6ba3d1ab76b18..8df356e8bf675ead8e9ba2ec21c2ab634e7f5cdd 100644 --- a/src/python_interpreter.cpp +++ b/src/python_interpreter.cpp @@ -1,7 +1,7 @@ #include <air_navigation/python_interpreter.h> #include <Python.h> -#include <python/air_navigation/sipAPIair_navigation_.h> +#include <sip.h> #include <rclcpp/rclcpp.hpp> #include <dlfcn.h> @@ -75,7 +75,7 @@ py_interface::Controller* python_interpreter::create_controller(const std::strin int state; const sipTypeDef *td = get_sip_api()->api_find_type("air_navigation::py_interface::Controller"); py_interface::Controller* controller = reinterpret_cast<py_interface::Controller*>(get_sip_api()->api_convert_to_type(pValue, td, NULL, SIP_NOT_NONE, &state, &isErr)); - sipTransferTo(pValue, Py_None); + get_sip_api()->api_transfer_to(pValue, Py_None); release_lock(); return controller; } else {