1- # Copied and adapted from diff_drive_controller (https://github.com/ros-controls/ros2_controllers)
1+ # Copied and adapted from diff_drive_controller
2+ # (https://github.com/ros-controls/ros2_controllers)
23
34cmake_minimum_required (VERSION 3.11)
45project (mecanum_drive_controller)
@@ -25,45 +26,42 @@ set(THIS_PACKAGE_INCLUDE_DEPENDS
2526 rcpputils
2627 realtime_tools
2728 tf2
28- tf2_msgs
29- )
29+ tf2_msgs)
3030
3131find_package (ament_cmake REQUIRED)
3232foreach (Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS} )
3333 find_package (${Dependency} REQUIRED)
3434endforeach ()
3535
3636generate_parameter_library(mecanum_drive_controller_parameters
37- src/mecanum_drive_controller_parameter.yaml
38- )
37+ src/mecanum_drive_controller_parameter.yaml)
3938
40- add_library (mecanum_drive_controller SHARED
41- src/mecanum_drive_controller.cpp
42- src/odometry.cpp
43- src/speed_limiter.cpp
44- )
45- target_include_directories (mecanum_drive_controller PUBLIC
46- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include >
47- $<INSTALL_INTERFACE:include /mecanum_drive_controller>
48- )
49- target_link_libraries (mecanum_drive_controller PUBLIC mecanum_drive_controller_parameters)
50- ament_target_dependencies(mecanum_drive_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS} )
51- # Causes the visibility macros to use dllexport rather than dllimport,
52- # which is appropriate when building the dll but not consuming it.
53- target_compile_definitions (mecanum_drive_controller PRIVATE "MECANUM_DRIVE_CONTROLLER_BUILDING_DLL" )
54- pluginlib_export_plugin_description_file(controller_interface mecanum_drive_plugin.xml)
39+ add_library (
40+ mecanum_drive_controller SHARED src/mecanum_drive_controller.cpp
41+ src/odometry.cpp src/speed_limiter.cpp)
42+ target_include_directories (
43+ mecanum_drive_controller
44+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include >
45+ $<INSTALL_INTERFACE:include /mecanum_drive_controller>)
46+ target_link_libraries (mecanum_drive_controller
47+ PUBLIC mecanum_drive_controller_parameters)
48+ ament_target_dependencies(mecanum_drive_controller PUBLIC
49+ ${THIS_PACKAGE_INCLUDE_DEPENDS} )
50+ # Causes the visibility macros to use dllexport rather than dllimport, which is
51+ # appropriate when building the dll but not consuming it.
52+ target_compile_definitions (mecanum_drive_controller
53+ PRIVATE "MECANUM_DRIVE_CONTROLLER_BUILDING_DLL" )
54+ pluginlib_export_plugin_description_file(controller_interface
55+ mecanum_drive_plugin.xml)
5556
56- install (
57- DIRECTORY include /
58- DESTINATION include /mecanum_drive_controller
59- )
57+ install (DIRECTORY include / DESTINATION include /mecanum_drive_controller)
6058
61- install (TARGETS mecanum_drive_controller mecanum_drive_controller_parameters
59+ install (
60+ TARGETS mecanum_drive_controller mecanum_drive_controller_parameters
6261 EXPORT export_mecanum_drive_controller
6362 RUNTIME DESTINATION bin
6463 ARCHIVE DESTINATION lib
65- LIBRARY DESTINATION lib
66- )
64+ LIBRARY DESTINATION lib)
6765
6866ament_export_targets(export_mecanum_drive_controller HAS_LIBRARY_TARGET)
6967ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS} )
0 commit comments