Migrate kuka_drivers to ros2_controllers Lyrical#345
Conversation
|
Warning Review limit reached
More reviews will be available in 23 minutes and 47 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (31)
📝 WalkthroughWalkthroughThe PR modernizes all CMakeLists.txt files by bumping the minimum required CMake version to 3.10 and replacing ChangesCMake Build System Modernization
ForwardCommandController Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
kuka_sunrise_fri_driver/CMakeLists.txt (1)
24-26:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd REQUIRED keyword to find_package calls.
These packages are linked as imported targets in
robot_manager_node(lines 90-95), but thefind_packagecalls lack theREQUIREDkeyword. If any of these packages are not found, CMake will fail during target linking with a cryptic "imported target not found" error instead of a clear "required package not found" message at the find_package stage.🛡️ Proposed fix to add REQUIRED keyword
-find_package(controller_manager_msgs) -find_package(std_msgs) -find_package(std_srvs) +find_package(controller_manager_msgs REQUIRED) +find_package(std_msgs REQUIRED) +find_package(std_srvs REQUIRED)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@kuka_sunrise_fri_driver/CMakeLists.txt` around lines 24 - 26, The find_package calls for controller_manager_msgs, std_msgs, and std_srvs lack the REQUIRED keyword, causing CMake to silently succeed even if packages aren't found, leading to cryptic "imported target not found" errors during target linking later. Add the REQUIRED keyword to each of the three find_package calls to ensure CMake fails immediately with a clear error message if any of these required packages are not found on the system.
🧹 Nitpick comments (2)
kuka_rsi_driver/CMakeLists.txt (1)
51-55: 💤 Low valueConsider consolidating the two
target_link_librariescalls.The
robot_manager_basetarget has two separatetarget_link_librariescalls (lines 51-54 and line 55). For consistency with the rest of the codebase, consider merging them into a single call.♻️ Proposed consolidation
target_link_libraries(robot_manager_base std_msgs::std_msgs kuka_drivers_core::kuka_drivers_core - controller_manager_msgs::controller_manager_msgs) -target_link_libraries(robot_manager_base kuka_drivers_core::communication_helpers) + controller_manager_msgs::controller_manager_msgs + kuka_drivers_core::communication_helpers +)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@kuka_rsi_driver/CMakeLists.txt` around lines 51 - 55, The robot_manager_base target has two separate target_link_libraries calls that should be consolidated into a single call for consistency. Merge the two target_link_libraries calls for robot_manager_base (currently on lines 51-54 and line 55) into one, combining all the library dependencies (std_msgs::std_msgs, kuka_drivers_core::kuka_drivers_core, controller_manager_msgs::controller_manager_msgs, and kuka_drivers_core::communication_helpers) into a single target_link_libraries statement.kuka_sunrise_fri_driver/CMakeLists.txt (1)
85-85: 💤 Low valueConsider splitting long target_link_libraries line for readability.
For consistency with the formatting in
kuka_iiqka_eac_driver/CMakeLists.txtandkuka_rsi_driver/CMakeLists.txt, consider splitting this single-linetarget_link_librariescall across multiple lines.♻️ Proposed formatting improvement
-target_link_libraries(${PROJECT_NAME} kuka_driver_interfaces::kuka_driver_interfaces hardware_interface::hardware_interface kuka_drivers_core::kuka_drivers_core) +target_link_libraries(${PROJECT_NAME} + kuka_driver_interfaces::kuka_driver_interfaces + hardware_interface::hardware_interface + kuka_drivers_core::kuka_drivers_core +)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@kuka_sunrise_fri_driver/CMakeLists.txt` at line 85, The target_link_libraries call in kuka_sunrise_fri_driver/CMakeLists.txt is formatted as a single long line. For consistency with the multi-line formatting used in kuka_iiqka_eac_driver/CMakeLists.txt and kuka_rsi_driver/CMakeLists.txt, split the target_link_libraries call across multiple lines, placing each linked library (kuka_driver_interfaces::kuka_driver_interfaces, hardware_interface::hardware_interface, and kuka_drivers_core::kuka_drivers_core) on a separate line for improved readability.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@controllers/kuka_control_mode_handler/CMakeLists.txt`:
- Around line 22-26: The target_link_libraries call references the
std_msgs::std_msgs imported target, but this target is not defined because there
is no corresponding find_package call for std_msgs. Add a find_package(std_msgs
REQUIRED) call before the target_link_libraries block to ensure the
std_msgs::std_msgs target is imported and available for linking.
In `@kuka_iiqka_eac_driver/test/config/test1_effort_controller_config.yaml`:
- Line 3: The test effort controller configuration files have an
`interface_name` field set to `position` which does not match the production
effort controller config that uses `interface_name: effort`. Update the
`interface_name` value in both test1_effort_controller_config.yaml at line 3 and
test2_effort_controller_config.yaml at line 3 from `position` to `effort` to
align the test contracts with production.
---
Outside diff comments:
In `@kuka_sunrise_fri_driver/CMakeLists.txt`:
- Around line 24-26: The find_package calls for controller_manager_msgs,
std_msgs, and std_srvs lack the REQUIRED keyword, causing CMake to silently
succeed even if packages aren't found, leading to cryptic "imported target not
found" errors during target linking later. Add the REQUIRED keyword to each of
the three find_package calls to ensure CMake fails immediately with a clear
error message if any of these required packages are not found on the system.
---
Nitpick comments:
In `@kuka_rsi_driver/CMakeLists.txt`:
- Around line 51-55: The robot_manager_base target has two separate
target_link_libraries calls that should be consolidated into a single call for
consistency. Merge the two target_link_libraries calls for robot_manager_base
(currently on lines 51-54 and line 55) into one, combining all the library
dependencies (std_msgs::std_msgs, kuka_drivers_core::kuka_drivers_core,
controller_manager_msgs::controller_manager_msgs, and
kuka_drivers_core::communication_helpers) into a single target_link_libraries
statement.
In `@kuka_sunrise_fri_driver/CMakeLists.txt`:
- Line 85: The target_link_libraries call in
kuka_sunrise_fri_driver/CMakeLists.txt is formatted as a single long line. For
consistency with the multi-line formatting used in
kuka_iiqka_eac_driver/CMakeLists.txt and kuka_rsi_driver/CMakeLists.txt, split
the target_link_libraries call across multiple lines, placing each linked
library (kuka_driver_interfaces::kuka_driver_interfaces,
hardware_interface::hardware_interface, and
kuka_drivers_core::kuka_drivers_core) on a separate line for improved
readability.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a0204c3f-78fe-4a2b-a58f-0dbc25504c88
📒 Files selected for processing (31)
controllers/fri_configuration_controller/CMakeLists.txtcontrollers/fri_state_broadcaster/CMakeLists.txtcontrollers/joint_group_impedance_controller/CMakeLists.txtcontrollers/kuka_control_mode_handler/CMakeLists.txtcontrollers/kuka_event_broadcaster/CMakeLists.txtcontrollers/kuka_kss_message_handler/CMakeLists.txtdoc/wiki/1_iiQKA_EAC.mddoc/wiki/4_Sunrise_FRI.mdkuka_driver_interfaces/CMakeLists.txtkuka_drivers_core/CMakeLists.txtkuka_iiqka_eac_driver/CMakeLists.txtkuka_iiqka_eac_driver/config/effort_controller_config.yamlkuka_iiqka_eac_driver/config/ros2_controller_config.yamlkuka_iiqka_eac_driver/launch/startup.launch.pykuka_iiqka_eac_driver/package.xmlkuka_iiqka_eac_driver/test/config/test1_effort_controller_config.yamlkuka_iiqka_eac_driver/test/config/test1_ros2_controller_config.yamlkuka_iiqka_eac_driver/test/config/test2_effort_controller_config.yamlkuka_iiqka_eac_driver/test/config/test2_ros2_controller_config.yamlkuka_rsi_driver/CMakeLists.txtkuka_rsi_driver/launch/startup.launch.pykuka_rsi_driver/package.xmlkuka_rsi_driver/test/config/test1_ros2_controller_config.yamlkuka_rsi_driver/test/config/test2_ros2_controller_config.yamlkuka_sunrise_fri_driver/CMakeLists.txtkuka_sunrise_fri_driver/config/effort_controller_config.yamlkuka_sunrise_fri_driver/config/ros2_controller_config.yamlkuka_sunrise_fri_driver/launch/startup.launch.pykuka_sunrise_fri_driver/package.xmlkuka_sunrise_fri_driver/test/config/test1_ros2_controller_config.yamlkuka_sunrise_fri_driver/test/config/test2_ros2_controller_config.yaml
|
Thanks for your contribution, we will soon migrate the current master to a |
…compatibility - replace deprecated JointGroup* controller plugins with forward_command_controller/ForwardCommandController - add required interface_name parameters for migrated effort/position controllers in runtime and test controller configs - switch package runtime deps from effort_controllers to forward_command_controller where needed - update startup launch spawner arguments for current controller_manager CLI: remove unsupported -n usage, pass controller manager via fully qualified -c target, and use -p for controller param files - update wiki docs to reflect ForwardCommandController usage - raise cmake_minimum_required to 3.10 across kuka_drivers packages to remove deprecated CMake compatibility warnings
Used: https://control.ros.org/lyrical/doc/ros2_controllers/doc/migration.html as reference
Partly done self and partly by GPT 5.3-codex.
Summary by CodeRabbit
Release Notes
Bug Fixes
Documentation
ForwardCommandController.Chores
ForwardCommandController, addedinterface_name, and simplified parameters to joint lists; updated runtime dependencies accordingly.