From 4bed23baa749f4b6e9f4862e239d71ecc6607716 Mon Sep 17 00:00:00 2001 From: duongtd Date: Tue, 10 Nov 2026 22:27:14 +0700 Subject: [PATCH] fix(lane_route): put standalone .so files at the top of the build directory PluginLoaderHelper looks only at the top of each PNKX_NAV_CORE_LIBRARY_PATH directory. In the standalone build liblane_route_planner.so ended up in its subdirectory, so move_base2 on the robot could not load LaneRoutePlanner. Set LIBRARY_OUTPUT_DIRECTORY and BUILD_RPATH to CMAKE_BINARY_DIR for both lane_route_planner and lane_route_core, as the other plugin packages do. The catkin branch is unchanged. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index af65bcb..8f954fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,12 @@ else() target_link_libraries(lane_route_planner PUBLIC ${header_target}) endif() endforeach() + # PluginLoaderHelper searches only the top of the build directory, not its subdirectories. + # Without this the .so stays in the subdirectory and move_base2 cannot load LaneRoutePlanner. + set_target_properties(lane_route_planner PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} + BUILD_RPATH "${CMAKE_BINARY_DIR}" + ) endif() target_compile_options(lane_route_planner PRIVATE -O3)