Skip to content

Commit 08ecfa3

Browse files
authored
Replace linking to moprim controller my using its include directories (#1853)
only headers (enums) are used from motion_primitives_controllers. Linking against its shared library causes it to be eagerly loaded as a DT_NEEDED dependency of this plugin, which breaks class_loader's registration of the MotionPrimitivesForwardController controller (results in "MultiLibraryClassLoader: no factory exists for it" at runtime).
1 parent 956851a commit 08ecfa3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ur_robot_driver/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,17 @@ target_link_libraries(ur_robot_driver_plugin PUBLIC
7373
rclcpp::rclcpp
7474
rclcpp_lifecycle::rclcpp_lifecycle
7575
ur_client_library::urcl
76-
motion_primitives_controllers::motion_primitives_controllers
7776
)
77+
# NOTE: only headers (enums) are used from motion_primitives_controllers. Linking
78+
# against its shared library causes it to be eagerly loaded as a DT_NEEDED
79+
# dependency of this plugin, which breaks class_loader's registration of the
80+
# MotionPrimitivesForwardController controller (results in
81+
# "MultiLibraryClassLoader: no factory exists for it" at runtime).
7882
target_include_directories(
7983
ur_robot_driver_plugin
8084
PRIVATE
8185
include
86+
${motion_primitives_controllers_INCLUDE_DIRS}
8287
)
8388
pluginlib_export_plugin_description_file(hardware_interface hardware_interface_plugin.xml)
8489

0 commit comments

Comments
 (0)