From d36921f5b3c8f1ea9a0f8fa345a564720505c226 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 114b61d..ceb5907 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,13 @@ target_include_directories(lane_route_core PUBLIC ) # The workspace builds Debug by default. This runs on the planner thread of a 2-core NUC, so it stays optimised. target_compile_options(lane_route_core PRIVATE -O3) +if(NOT BUILDING_WITH_CATKIN) + # Same output directory as the other standalone libraries, so build_robot ships as one flat directory. + set_target_properties(lane_route_core PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} + BUILD_RPATH "${CMAKE_BINARY_DIR}" + ) +endif() if(BUILD_LANE_ROUTE_TESTS) find_package(GTest REQUIRED)