From 5aae2d212d30e1c752e5e35906acea75c4703850 Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Wed, 18 Jun 2025 10:12:43 +0200 Subject: [PATCH 01/11] Add ROS Kilted support --- .github/workflows/test.yml | 2 +- .github/workflows/test_develop.yml | 2 +- docker/Dockerfile | 13 +++++++++---- webots_ros2_control/CMakeLists.txt | 2 ++ webots_ros2_driver/CMakeLists.txt | 4 ++++ webots_ros2_epuck/launch/robot_launch.py | 2 +- webots_ros2_tests/test/test_system_epuck.py | 2 +- webots_ros2_tiago/launch/robot_launch.py | 2 +- webots_ros2_turtlebot/launch/robot_launch.py | 2 +- 9 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9703d6c2..3fd76f179 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: ROS_REPO: [main, testing] - ROS_DISTRO: [humble, jazzy, rolling] + ROS_DISTRO: [humble, jazzy, kilted, rolling] runs-on: ubuntu-latest env: AFTER_INIT: ./scripts/ci_after_init.bash ${ROS_DISTRO} ${ROS_REPO} diff --git a/.github/workflows/test_develop.yml b/.github/workflows/test_develop.yml index 2faf8b138..f13b9aac7 100644 --- a/.github/workflows/test_develop.yml +++ b/.github/workflows/test_develop.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: ROS_REPO: [main, testing] - ROS_DISTRO: [humble, jazzy, rolling] + ROS_DISTRO: [humble, jazzy, kilted, rolling] runs-on: ubuntu-latest env: AFTER_INIT: ./scripts/ci_after_init.bash ${ROS_DISTRO} ${ROS_REPO} diff --git a/docker/Dockerfile b/docker/Dockerfile index e7dd8d263..349eb70e4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -39,10 +39,15 @@ RUN apt-get update && apt-get install -y \ gdb \ git -# HOTFIX: https://github.com/ros-controls/ros2_control/pull/1960 -RUN [ "${ROS_DISTRO}" = "humble" ] && wget -O /tmp/hotfix.deb http://snapshots.ros.org/humble/2024-08-28/ubuntu/pool/main/r/ros-humble-hardware-interface/ros-humble-hardware-interface_2.43.0-1jammy.20240823.145349_amd64.deb && \ - apt install -y --allow-downgrades /tmp/hotfix.deb && \ - rm -f /tmp/hotfix.deb || true +# RUN mkdir -p /${DOCKERUSER}/ros2_libs_ws/src && \ +# curl https://raw.githubusercontent.com/ros-controls/ros2_control/refs/heads/master/ros2_control.rolling.repos > /${DOCKERUSER}/ros2_libs_ws/src.repos && \ +# vcs import /${DOCKERUSER}/ros2_libs_ws/src < /${DOCKERUSER}/ros2_libs_ws/src.repos && \ +# git clone https://github.com/ros-controls/ros2_controllers.git /${DOCKERUSER}/ros2_libs_ws/src/ros2_controllers && \ +# git clone --branch=remove/robot_description_param https://github.com/pal-robotics-forks/ros2_control.git /${DOCKERUSER}/ros2_libs_ws/src/ros2_control && \ +# . /opt/ros/${ROS_DISTRO}/setup.sh && \ +# rosdep install --from-paths /${DOCKERUSER}/ros2_libs_ws/src --ignore-src --rosdistro ${ROS_DISTRO} -y && \ +# cd /${DOCKERUSER}/ros2_libs_ws && \ +# colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release COPY ./docker/bashrc /tmp/bashrc COPY ./docker/webots.conf /${DOCKERUSER}/.config/Cyberbotics/Webots-R${WEBOTS_VERSION}.conf diff --git a/webots_ros2_control/CMakeLists.txt b/webots_ros2_control/CMakeLists.txt index 6765df2af..3302f3116 100644 --- a/webots_ros2_control/CMakeLists.txt +++ b/webots_ros2_control/CMakeLists.txt @@ -6,6 +6,8 @@ if($ENV{ROS_DISTRO} MATCHES "humble") add_compile_definitions(HUMBLE) elseif($ENV{ROS_DISTRO} MATCHES "jazzy") add_compile_definitions(JAZZY) +elseif($ENV{ROS_DISTRO} MATCHES "kilted") + add_compile_definitions(KILTED) elseif($ENV{ROS_DISTRO} MATCHES "rolling") add_compile_definitions(ROLLING) endif() diff --git a/webots_ros2_driver/CMakeLists.txt b/webots_ros2_driver/CMakeLists.txt index 693d9eda9..25438d0c3 100644 --- a/webots_ros2_driver/CMakeLists.txt +++ b/webots_ros2_driver/CMakeLists.txt @@ -12,6 +12,8 @@ elseif($ENV{ROS_DISTRO} MATCHES "jazzy") add_compile_definitions(JAZZY) elseif($ENV{ROS_DISTRO} MATCHES "rolling") add_compile_definitions(ROLLING) +elseif($ENV{ROS_DISTRO} MATCHES "kilted") + add_compile_definitions(KILTED) endif() # ROS2 Packages @@ -36,6 +38,8 @@ elseif($ENV{ROS_DISTRO} MATCHES "iron") find_package(Python 3.10 EXACT REQUIRED COMPONENTS Development) elseif($ENV{ROS_DISTRO} MATCHES "jazzy") find_package(Python 3.12 EXACT REQUIRED COMPONENTS Development) +elseif($ENV{ROS_DISTRO} MATCHES "kilted") + find_package(Python 3.12 EXACT REQUIRED COMPONENTS Development) elseif($ENV{ROS_DISTRO} MATCHES "rolling") find_package(Python 3.12 EXACT REQUIRED COMPONENTS Development) endif() diff --git a/webots_ros2_epuck/launch/robot_launch.py b/webots_ros2_epuck/launch/robot_launch.py index be30eec4b..1776278b9 100644 --- a/webots_ros2_epuck/launch/robot_launch.py +++ b/webots_ros2_epuck/launch/robot_launch.py @@ -88,7 +88,7 @@ def generate_launch_description(): robot_description_path = os.path.join(package_dir, 'resource', 'epuck_webots.urdf') ros2_control_params = os.path.join(package_dir, 'resource', 'ros2_control.yml') - use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']) + use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['kilted', 'rolling', 'jazzy']) if use_twist_stamped: mappings = [('/diffdrive_controller/cmd_vel', '/cmd_vel'), ('/diffdrive_controller/odom', '/odom')] else: diff --git a/webots_ros2_tests/test/test_system_epuck.py b/webots_ros2_tests/test/test_system_epuck.py index e451f998b..00c23020d 100644 --- a/webots_ros2_tests/test/test_system_epuck.py +++ b/webots_ros2_tests/test/test_system_epuck.py @@ -89,7 +89,7 @@ def on_range_message_received(message): self.wait_for_messages(self.__node, Range, '/tof', condition=on_range_message_received) def testMovement(self): - use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']) + use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']) if use_twist_stamped: publisher = self.__node.create_publisher(TwistStamped, '/cmd_vel', 1) diff --git a/webots_ros2_tiago/launch/robot_launch.py b/webots_ros2_tiago/launch/robot_launch.py index c2f248637..a4d3a9e77 100644 --- a/webots_ros2_tiago/launch/robot_launch.py +++ b/webots_ros2_tiago/launch/robot_launch.py @@ -84,7 +84,7 @@ def generate_launch_description(): robot_description_path = os.path.join(package_dir, 'resource', 'tiago_webots.urdf') ros2_control_params = os.path.join(package_dir, 'resource', 'ros2_control.yml') - use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']) + use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']) if use_twist_stamped: mappings = [('/diffdrive_controller/cmd_vel', '/cmd_vel'), ('/diffdrive_controller/odom', '/odom')] else: diff --git a/webots_ros2_turtlebot/launch/robot_launch.py b/webots_ros2_turtlebot/launch/robot_launch.py index c374766f2..f7feebfce 100644 --- a/webots_ros2_turtlebot/launch/robot_launch.py +++ b/webots_ros2_turtlebot/launch/robot_launch.py @@ -82,7 +82,7 @@ def generate_launch_description(): robot_description_path = os.path.join(package_dir, 'resource', 'turtlebot_webots.urdf') ros2_control_params = os.path.join(package_dir, 'resource', 'ros2control.yml') - use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']) + use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']) if use_twist_stamped: mappings = [('/diffdrive_controller/cmd_vel', '/cmd_vel'), ('/diffdrive_controller/odom', '/odom')] else: From aec9ed5c33bfca860fbe6c6374ca7140d319e9b4 Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Sun, 29 Jun 2025 18:11:22 +0200 Subject: [PATCH 02/11] fix version guards --- webots_ros2_control/src/Ros2Control.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webots_ros2_control/src/Ros2Control.cpp b/webots_ros2_control/src/Ros2Control.cpp index fb60b50fb..10e35cc39 100644 --- a/webots_ros2_control/src/Ros2Control.cpp +++ b/webots_ros2_control/src/Ros2Control.cpp @@ -36,7 +36,7 @@ const double CONTROLLER_MANAGER_ALLOWED_SAMPLE_ERROR_MS = 1.0; namespace webots_ros2_control { -#if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 && HARDWARE_INTERFACE_VERSION_MINOR >= 12 +#if (HARDWARE_INTERFACE_VERSION_MAJOR >= 4 && HARDWARE_INTERFACE_VERSION_MINOR >= 12) || HARDWARE_INTERFACE_VERSION_MAJOR >= 5 class WebotsResourceManager : public hardware_interface::ResourceManager { public: WebotsResourceManager(webots_ros2_driver::WebotsNode *node) : @@ -118,7 +118,7 @@ namespace webots_ros2_control { } // Control Hardware -#if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 && HARDWARE_INTERFACE_VERSION_MINOR >= 12 +#if (HARDWARE_INTERFACE_VERSION_MAJOR >= 4 && HARDWARE_INTERFACE_VERSION_MINOR >= 12) || HARDWARE_INTERFACE_VERSION_MAJOR >= 5 std::unique_ptr resourceManager = std::make_unique(node); #else @@ -134,7 +134,7 @@ namespace webots_ros2_control { } for (unsigned int i = 0; i < controlHardware.size(); i++) { // Necessary hotfix for renamed variables present in "hardware_interface" package for versions above 3.5 (#590) -#if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 || HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 5 +#if (HARDWARE_INTERFACE_VERSION_MAJOR >= 3 || HARDWARE_INTERFACE_VERSION_MAJOR >= 5) || HARDWARE_INTERFACE_VERSION_MAJOR >= 4 const std::string pluginName = controlHardware[i].hardware_plugin_name; auto webotsSystem = std::unique_ptr(mHardwareLoader->createUnmanagedInstance(pluginName)); From 92111304325e1bf2bf560f243ce9af267a1fa662 Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Sun, 29 Jun 2025 18:46:07 +0200 Subject: [PATCH 03/11] ament_target_dependencies deprecation fix --- webots_ros2_control/CMakeLists.txt | 68 ++++++++++---- webots_ros2_control/src/Ros2Control.cpp | 2 +- webots_ros2_driver/CMakeLists.txt | 120 ++++++++++++++++-------- 3 files changed, 136 insertions(+), 54 deletions(-) diff --git a/webots_ros2_control/CMakeLists.txt b/webots_ros2_control/CMakeLists.txt index 3302f3116..4684acbd3 100644 --- a/webots_ros2_control/CMakeLists.txt +++ b/webots_ros2_control/CMakeLists.txt @@ -52,15 +52,33 @@ target_include_directories( ${PROJECT_NAME} PRIVATE include + ${webots_ros2_driver_INCLUDE_DIRS} ) -ament_target_dependencies( - ${PROJECT_NAME} - hardware_interface - controller_manager - pluginlib - rclcpp - webots_ros2_driver -) +if ($ENV{ROS_DISTRO} MATCHES "humble" OR $ENV{ROS_DISTRO} MATCHES "jazzy") + ament_target_dependencies( + ${PROJECT_NAME} + hardware_interface + controller_manager + pluginlib + rclcpp + webots_ros2_driver + ) +else() + target_link_libraries(${PROJECT_NAME} + PUBLIC + hardware_interface::hardware_interface + controller_manager::controller_manager + pluginlib::pluginlib + rclcpp::rclcpp + webots_ros2_driver::webots_ros2_driver_imu + webots_ros2_driver::webots_ros2_driver_rgbd + ) + target_link_directories(${PROJECT_NAME} + PUBLIC + ${CMAKE_INSTALL_PREFIX}/lib/controller + ${CMAKE_INSTALL_PREFIX}/../webots_ros2_driver/lib/controller + ) +endif() # Prevent pluginlib from using boost target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") @@ -76,15 +94,33 @@ target_include_directories( ${PROJECT_NAME}_system PRIVATE include + ${webots_ros2_driver_INCLUDE_DIRS} ) -ament_target_dependencies( - ${PROJECT_NAME}_system - hardware_interface - pluginlib - rclcpp - rclcpp_lifecycle - webots_ros2_driver -) +if ($ENV{ROS_DISTRO} MATCHES "humble" OR $ENV{ROS_DISTRO} MATCHES "jazzy") + ament_target_dependencies( + ${PROJECT_NAME}_system + hardware_interface + pluginlib + rclcpp + rclcpp_lifecycle + webots_ros2_driver + ) +else() + target_link_libraries(${PROJECT_NAME}_system + PUBLIC + hardware_interface::hardware_interface + pluginlib::pluginlib + rclcpp::rclcpp + rclcpp_lifecycle::rclcpp_lifecycle + webots_ros2_driver::webots_ros2_driver_imu + webots_ros2_driver::webots_ros2_driver_rgbd + ) + target_link_directories(${PROJECT_NAME}_system + PUBLIC + ${CMAKE_INSTALL_PREFIX}/lib/controller + ${CMAKE_INSTALL_PREFIX}/../webots_ros2_driver/lib/controller + ) +endif() # Prevent pluginlib from using boost target_compile_definitions(${PROJECT_NAME}_system PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") diff --git a/webots_ros2_control/src/Ros2Control.cpp b/webots_ros2_control/src/Ros2Control.cpp index 10e35cc39..1b91986fa 100644 --- a/webots_ros2_control/src/Ros2Control.cpp +++ b/webots_ros2_control/src/Ros2Control.cpp @@ -48,7 +48,7 @@ namespace webots_ros2_control { WebotsResourceManager(const WebotsResourceManager &) = delete; - bool load_and_initialize_components(const std::string &urdf, unsigned int update_rate) override { + bool load_and_initialize_components(const std::string &urdf, unsigned int /* update_rate */) override { components_are_loaded_and_initialized_ = true; std::vector controlHardware; diff --git a/webots_ros2_driver/CMakeLists.txt b/webots_ros2_driver/CMakeLists.txt index 25438d0c3..7a43b2a1f 100644 --- a/webots_ros2_driver/CMakeLists.txt +++ b/webots_ros2_driver/CMakeLists.txt @@ -112,27 +112,46 @@ add_executable(driver src/utils/Math.cpp src/utils/Utils.cpp ) -ament_target_dependencies(driver - rosgraph_msgs - rclcpp - pluginlib - sensor_msgs - std_msgs - tf2_geometry_msgs - tf2_ros - vision_msgs - webots_ros2_msgs - tinyxml2_vendor - TinyXML2 -) + +if ($ENV{ROS_DISTRO} MATCHES "humble" OR $ENV{ROS_DISTRO} MATCHES "jazzy") + ament_target_dependencies(driver + rosgraph_msgs + rclcpp + pluginlib + sensor_msgs + std_msgs + tf2_geometry_msgs + tf2_ros + vision_msgs + webots_ros2_msgs + tinyxml2_vendor + TinyXML2 + ) + target_link_libraries(driver + ${WEBOTS_LIB} + ${Python_LIBRARIES} + yaml-cpp + ) +else() + target_link_libraries(driver + ${rosgraph_msgs_TARGETS} + rclcpp::rclcpp + pluginlib::pluginlib + ${sensor_msgs_TARGETS} + ${std_msgs_TARGETS} + tf2_geometry_msgs::tf2_geometry_msgs + tf2_ros::tf2_ros + ${vision_msgs_TARGETS} + ${webots_ros2_msgs_TARGETS} + tinyxml2::tinyxml2 + ${WEBOTS_LIB} + ${Python_LIBRARIES} + yaml-cpp + ) +endif() add_dependencies(driver compile-lib-vehicle ) -target_link_libraries(driver - ${WEBOTS_LIB} - ${Python_LIBRARIES} - yaml-cpp -) install( DIRECTORY include/ DESTINATION include @@ -150,20 +169,32 @@ add_library( src/plugins/Ros2SensorPlugin.cpp src/utils/Utils.cpp ) -ament_target_dependencies(${PROJECT_NAME}_imu - rclcpp - sensor_msgs - webots_ros2_msgs - pluginlib - tf2_ros -) +if ($ENV{ROS_DISTRO} MATCHES "humble" OR $ENV{ROS_DISTRO} MATCHES "jazzy") + ament_target_dependencies(${PROJECT_NAME}_imu + rclcpp + sensor_msgs + webots_ros2_msgs + pluginlib + tf2_ros + ) + target_link_libraries(${PROJECT_NAME}_imu + ${WEBOTS_LIB} + ) +else() + target_link_libraries(${PROJECT_NAME}_imu + rclcpp::rclcpp + ${sensor_msgs_TARGETS} + ${webots_ros2_msgs_TARGETS} + pluginlib::pluginlib + tf2_ros::tf2_ros + ${WEBOTS_LIB} + ) +endif() add_dependencies(${PROJECT_NAME}_imu compile-lib-vehicle ) -target_link_libraries(${PROJECT_NAME}_imu - ${WEBOTS_LIB} -) install(TARGETS ${PROJECT_NAME}_imu + EXPORT export_${PROJECT_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib @@ -178,19 +209,30 @@ add_library( src/plugins/Ros2SensorPlugin.cpp src/utils/Utils.cpp ) -ament_target_dependencies(${PROJECT_NAME}_rgbd - rclcpp - sensor_msgs - pluginlib - tf2_ros -) +if ($ENV{ROS_DISTRO} MATCHES "humble" OR $ENV{ROS_DISTRO} MATCHES "jazzy") + ament_target_dependencies(${PROJECT_NAME}_rgbd + rclcpp + sensor_msgs + pluginlib + tf2_ros + ) + target_link_libraries(${PROJECT_NAME}_rgbd + ${WEBOTS_LIB} + ) +else() + target_link_libraries(${PROJECT_NAME}_rgbd + rclcpp::rclcpp + ${sensor_msgs_TARGETS} + pluginlib::pluginlib + tf2_ros::tf2_ros + ${WEBOTS_LIB} + ) +endif() add_dependencies(${PROJECT_NAME}_rgbd compile-lib-vehicle ) -target_link_libraries(${PROJECT_NAME}_rgbd - ${WEBOTS_LIB} -) install(TARGETS ${PROJECT_NAME}_rgbd + EXPORT export_${PROJECT_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib @@ -276,4 +318,8 @@ ament_export_libraries( ${PROJECT_NAME}_rgbd ${WEBOTS_LIB_PATH} ) + +# Export modern CMake targets +ament_export_targets(export_${PROJECT_NAME}) + ament_package() From a91fd20398aee0d4b7b047b0ef9c38ac7e6e593c Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Sun, 29 Jun 2025 22:01:45 +0200 Subject: [PATCH 04/11] test --- webots_ros2_control/CMakeLists.txt | 14 -------------- webots_ros2_driver/CMakeLists.txt | 5 ----- 2 files changed, 19 deletions(-) diff --git a/webots_ros2_control/CMakeLists.txt b/webots_ros2_control/CMakeLists.txt index 4684acbd3..d8e602d65 100644 --- a/webots_ros2_control/CMakeLists.txt +++ b/webots_ros2_control/CMakeLists.txt @@ -70,13 +70,6 @@ else() controller_manager::controller_manager pluginlib::pluginlib rclcpp::rclcpp - webots_ros2_driver::webots_ros2_driver_imu - webots_ros2_driver::webots_ros2_driver_rgbd - ) - target_link_directories(${PROJECT_NAME} - PUBLIC - ${CMAKE_INSTALL_PREFIX}/lib/controller - ${CMAKE_INSTALL_PREFIX}/../webots_ros2_driver/lib/controller ) endif() @@ -112,13 +105,6 @@ else() pluginlib::pluginlib rclcpp::rclcpp rclcpp_lifecycle::rclcpp_lifecycle - webots_ros2_driver::webots_ros2_driver_imu - webots_ros2_driver::webots_ros2_driver_rgbd - ) - target_link_directories(${PROJECT_NAME}_system - PUBLIC - ${CMAKE_INSTALL_PREFIX}/lib/controller - ${CMAKE_INSTALL_PREFIX}/../webots_ros2_driver/lib/controller ) endif() diff --git a/webots_ros2_driver/CMakeLists.txt b/webots_ros2_driver/CMakeLists.txt index 7a43b2a1f..1f913c1a1 100644 --- a/webots_ros2_driver/CMakeLists.txt +++ b/webots_ros2_driver/CMakeLists.txt @@ -194,7 +194,6 @@ add_dependencies(${PROJECT_NAME}_imu compile-lib-vehicle ) install(TARGETS ${PROJECT_NAME}_imu - EXPORT export_${PROJECT_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib @@ -232,7 +231,6 @@ add_dependencies(${PROJECT_NAME}_rgbd compile-lib-vehicle ) install(TARGETS ${PROJECT_NAME}_rgbd - EXPORT export_${PROJECT_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib @@ -319,7 +317,4 @@ ament_export_libraries( ${WEBOTS_LIB_PATH} ) -# Export modern CMake targets -ament_export_targets(export_${PROJECT_NAME}) - ament_package() From 31c9a912c4289f0e07d75ddef14cbbe9acb417fe Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Fri, 11 Jul 2025 13:09:55 +0200 Subject: [PATCH 05/11] kilted test --- docker/Dockerfile | 10 ---------- webots_ros2_tests/test/test_system_epuck_with_tools.py | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 349eb70e4..18207518f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -39,16 +39,6 @@ RUN apt-get update && apt-get install -y \ gdb \ git -# RUN mkdir -p /${DOCKERUSER}/ros2_libs_ws/src && \ -# curl https://raw.githubusercontent.com/ros-controls/ros2_control/refs/heads/master/ros2_control.rolling.repos > /${DOCKERUSER}/ros2_libs_ws/src.repos && \ -# vcs import /${DOCKERUSER}/ros2_libs_ws/src < /${DOCKERUSER}/ros2_libs_ws/src.repos && \ -# git clone https://github.com/ros-controls/ros2_controllers.git /${DOCKERUSER}/ros2_libs_ws/src/ros2_controllers && \ -# git clone --branch=remove/robot_description_param https://github.com/pal-robotics-forks/ros2_control.git /${DOCKERUSER}/ros2_libs_ws/src/ros2_control && \ -# . /opt/ros/${ROS_DISTRO}/setup.sh && \ -# rosdep install --from-paths /${DOCKERUSER}/ros2_libs_ws/src --ignore-src --rosdistro ${ROS_DISTRO} -y && \ -# cd /${DOCKERUSER}/ros2_libs_ws && \ -# colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release - COPY ./docker/bashrc /tmp/bashrc COPY ./docker/webots.conf /${DOCKERUSER}/.config/Cyberbotics/Webots-R${WEBOTS_VERSION}.conf RUN cat /tmp/bashrc >> /${DOCKERUSER}/.bashrc diff --git a/webots_ros2_tests/test/test_system_epuck_with_tools.py b/webots_ros2_tests/test/test_system_epuck_with_tools.py index d6ae5c83e..542eb17c8 100644 --- a/webots_ros2_tests/test/test_system_epuck_with_tools.py +++ b/webots_ros2_tests/test/test_system_epuck_with_tools.py @@ -35,7 +35,7 @@ def generate_test_description(): initialize_webots_test() # If ROS_DISTRO is rolling, skip the test as some required packages are missing (cf. ci_after_init.bash) - if 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']): + if 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']): pytest.skip('ROS_DISTRO is rolling or jazzy, skipping this test') epuck_with_tools_webots = IncludeLaunchDescription( From b419d4cfe2642c09ff064f3ca5269f1910b1b493 Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Fri, 11 Jul 2025 13:14:22 +0200 Subject: [PATCH 06/11] revert --- webots_ros2_control/src/Ros2Control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webots_ros2_control/src/Ros2Control.cpp b/webots_ros2_control/src/Ros2Control.cpp index 2b9dbcae7..4d4e6e1a4 100644 --- a/webots_ros2_control/src/Ros2Control.cpp +++ b/webots_ros2_control/src/Ros2Control.cpp @@ -183,7 +183,7 @@ namespace webots_ros2_control { } for (unsigned int i = 0; i < controlHardware.size(); i++) { // Necessary hotfix for renamed variables present in "hardware_interface" package for versions above 3.5 (#590) -#if (HARDWARE_INTERFACE_VERSION_MAJOR >= 3 || HARDWARE_INTERFACE_VERSION_MAJOR >= 5) || HARDWARE_INTERFACE_VERSION_MAJOR >= 4 +#if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 || HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 5 const std::string pluginName = controlHardware[i].hardware_plugin_name; auto webotsSystem = std::unique_ptr(mHardwareLoader->createUnmanagedInstance(pluginName)); From 260c1fe495b9beb1c5433e22886f16960802bedf Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Fri, 11 Jul 2025 13:44:31 +0200 Subject: [PATCH 07/11] tests --- webots_ros2_tests/test/test_system_epuck_with_tools.py | 2 +- webots_ros2_tests/test/test_system_rosbot.py | 2 +- webots_ros2_tests/test/test_system_tiago.py | 4 ++-- webots_ros2_tests/test/test_system_turtlebot.py | 2 +- .../test/test_system_turtlebot_tutorial_navigation.py | 2 +- webots_ros2_tests/test/test_system_turtlebot_tutorial_slam.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/webots_ros2_tests/test/test_system_epuck_with_tools.py b/webots_ros2_tests/test/test_system_epuck_with_tools.py index 542eb17c8..f6c116753 100644 --- a/webots_ros2_tests/test/test_system_epuck_with_tools.py +++ b/webots_ros2_tests/test/test_system_epuck_with_tools.py @@ -36,7 +36,7 @@ def generate_test_description(): initialize_webots_test() # If ROS_DISTRO is rolling, skip the test as some required packages are missing (cf. ci_after_init.bash) if 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']): - pytest.skip('ROS_DISTRO is rolling or jazzy, skipping this test') + pytest.skip('ROS_DISTRO is rolling, jazzy or kilted, skipping this test') epuck_with_tools_webots = IncludeLaunchDescription( PythonLaunchDescriptionSource( diff --git a/webots_ros2_tests/test/test_system_rosbot.py b/webots_ros2_tests/test/test_system_rosbot.py index d39ead06a..2b2081669 100644 --- a/webots_ros2_tests/test/test_system_rosbot.py +++ b/webots_ros2_tests/test/test_system_rosbot.py @@ -64,7 +64,7 @@ def setUp(self): self.__node = rclpy.create_node('driver_tester') def testMovement(self): - use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']) + use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']) publisher = None if use_twist_stamped: diff --git a/webots_ros2_tests/test/test_system_tiago.py b/webots_ros2_tests/test/test_system_tiago.py index f2442718f..8c68493b0 100644 --- a/webots_ros2_tests/test/test_system_tiago.py +++ b/webots_ros2_tests/test/test_system_tiago.py @@ -35,8 +35,8 @@ def generate_test_description(): initialize_webots_test() # If ROS_DISTRO is rolling, skip the test as some required packages are missing (cf. ci_after_init.bash) - if 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']): - pytest.skip('ROS_DISTRO is rolling or jazzy, skipping this test') + if 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']): + pytest.skip('ROS_DISTRO is rolling, jazzy or kilted, skipping this test') tiago_webots = IncludeLaunchDescription( PythonLaunchDescriptionSource( diff --git a/webots_ros2_tests/test/test_system_turtlebot.py b/webots_ros2_tests/test/test_system_turtlebot.py index 22d454f5a..381242378 100644 --- a/webots_ros2_tests/test/test_system_turtlebot.py +++ b/webots_ros2_tests/test/test_system_turtlebot.py @@ -61,7 +61,7 @@ def setUp(self): self.wait_for_clock(self.__node, messages_to_receive=20) def testMovement(self): - use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']) + use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']) if use_twist_stamped: publisher = self.__node.create_publisher(TwistStamped, '/cmd_vel', 1) diff --git a/webots_ros2_tests/test/test_system_turtlebot_tutorial_navigation.py b/webots_ros2_tests/test/test_system_turtlebot_tutorial_navigation.py index fd03901fc..f49682b83 100644 --- a/webots_ros2_tests/test/test_system_turtlebot_tutorial_navigation.py +++ b/webots_ros2_tests/test/test_system_turtlebot_tutorial_navigation.py @@ -39,7 +39,7 @@ def generate_test_description(): # If ROS_DISTRO is rolling, skip the test as some required packages are missing (cf. ci_after_init.bash) # If ROS_DISTRO is iron, skip the test as the Navigation packages are not yet available. if 'ROS_DISTRO' in os.environ and os.environ['ROS_DISTRO'] != 'humble': - pytest.skip('ROS_DISTRO is rolling or jazzy, skipping this test') + pytest.skip('ROS_DISTRO is rolling, kilted, or jazzy, skipping this test') # Webots turtlebot_webots = IncludeLaunchDescription( diff --git a/webots_ros2_tests/test/test_system_turtlebot_tutorial_slam.py b/webots_ros2_tests/test/test_system_turtlebot_tutorial_slam.py index 85d70918d..8f687f178 100644 --- a/webots_ros2_tests/test/test_system_turtlebot_tutorial_slam.py +++ b/webots_ros2_tests/test/test_system_turtlebot_tutorial_slam.py @@ -36,7 +36,7 @@ def generate_test_description(): # If ROS_DISTRO is rolling, skip the test as some required packages are missing (cf. ci_after_init.bash) # If ROS_DISTRO is iron, skip the test as the Navigation packages are not yet available. if 'ROS_DISTRO' in os.environ and os.environ['ROS_DISTRO'] != 'humble': - pytest.skip('ROS_DISTRO is rolling or jazzy, skipping this test') + pytest.skip('ROS_DISTRO is rolling, kilted, or jazzy, skipping this test') # Webots turtlebot_webots = IncludeLaunchDescription( From 803a9832477af787574b435cf0082acb8b6adf5e Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Sun, 13 Jul 2025 21:18:37 +0200 Subject: [PATCH 08/11] kilted --- webots_ros2_tests/test/test_system_rosbot_xl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webots_ros2_tests/test/test_system_rosbot_xl.py b/webots_ros2_tests/test/test_system_rosbot_xl.py index 75e5c2c27..d2ea8c74e 100644 --- a/webots_ros2_tests/test/test_system_rosbot_xl.py +++ b/webots_ros2_tests/test/test_system_rosbot_xl.py @@ -68,7 +68,7 @@ def setUp(self): self.__node = rclpy.create_node('driver_tester') def testMovement(self): - use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy']) + use_twist_stamped = 'ROS_DISTRO' in os.environ and (os.environ['ROS_DISTRO'] in ['rolling', 'jazzy', 'kilted']) publisher = None if use_twist_stamped: From d0c2aa86ea881b8223c26919a4028e1225d8a373 Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Sun, 13 Jul 2025 22:50:18 +0200 Subject: [PATCH 09/11] fix rosbot kilted --- webots_ros2_husarion/resource/rosbot_xl_controllers.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/webots_ros2_husarion/resource/rosbot_xl_controllers.yaml b/webots_ros2_husarion/resource/rosbot_xl_controllers.yaml index d83015d3f..877ba391b 100644 --- a/webots_ros2_husarion/resource/rosbot_xl_controllers.yaml +++ b/webots_ros2_husarion/resource/rosbot_xl_controllers.yaml @@ -33,7 +33,6 @@ rosbot_xl_base_controller: # min_velocity - When unspecified, -max_velocity is used max_acceleration: 1.0 # m/s^2 # min_acceleration - When unspecified, -max_acceleration is used. - max_jerk: 0.0 # m/s^3 angular: z: @@ -44,4 +43,3 @@ rosbot_xl_base_controller: # min_velocity - When unspecified, -max_velocity is used max_acceleration: 4.0 # rad/s^2 # min_acceleration - When unspecified, -max_acceleration is used. - max_jerk: 0.0 # rad/s^3 From 236a931e5d09b968ef1980a15c15bbdaa81eaac7 Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Sun, 13 Jul 2025 23:27:48 +0200 Subject: [PATCH 10/11] fix --- webots_ros2_husarion/resource/rosbot_controllers.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/webots_ros2_husarion/resource/rosbot_controllers.yaml b/webots_ros2_husarion/resource/rosbot_controllers.yaml index 01b7d704a..574bdd6bb 100644 --- a/webots_ros2_husarion/resource/rosbot_controllers.yaml +++ b/webots_ros2_husarion/resource/rosbot_controllers.yaml @@ -33,7 +33,6 @@ rosbot_base_controller: # min_velocity - When unspecified, -max_velocity is used max_acceleration: 1.0 # m/s^2 # min_acceleration - When unspecified, -max_acceleration is used. - max_jerk: 0.0 # m/s^3 angular: z: @@ -44,4 +43,3 @@ rosbot_base_controller: # min_velocity - When unspecified, -max_velocity is used max_acceleration: 4.0 # rad/s^2 # min_acceleration - When unspecified, -max_acceleration is used. - max_jerk: 0.0 # rad/s^3 From e972a6c858370c92c9069a513eb0ad2ac04be3e0 Mon Sep 17 00:00:00 2001 From: Darko Lukic Date: Sun, 13 Jul 2025 23:46:55 +0200 Subject: [PATCH 11/11] changelog --- webots_ros2_control/CHANGELOG.rst | 5 +++++ webots_ros2_driver/CHANGELOG.rst | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/webots_ros2_control/CHANGELOG.rst b/webots_ros2_control/CHANGELOG.rst index f8630d6d2..4b66d87f0 100644 --- a/webots_ros2_control/CHANGELOG.rst +++ b/webots_ros2_control/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package webots_ros2_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2025.0.1 (XXXX-XX-XX) +------------------ +* Replaces ament_target_dependencies with target_link_libraries. +* Adds ROS Kilted Kaiju support. + 2023.1.3 (2024-08-07) ------------------ * Added support for the new `ros2_control` API affecting resource_manager and controller_manager. diff --git a/webots_ros2_driver/CHANGELOG.rst b/webots_ros2_driver/CHANGELOG.rst index 2dd6fd701..7fa44d620 100644 --- a/webots_ros2_driver/CHANGELOG.rst +++ b/webots_ros2_driver/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package webots_ros2_driver ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2025.0.1 (XXXX-XX-XX) +------------------ +* Replaces ament_target_dependencies with target_link_libraries. +* Adds ROS Kilted Kaiju support. + 2023.1.3 (2024-08-07) ------------------ * Make webots_ros2_driver scripts executable.