From 8625027af40d210e3408739784ef134dd42ba65f Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Thu, 24 Aug 2023 16:47:09 +0000 Subject: [PATCH 1/7] First pass Humble -> Iron Signed-off-by: Shane Loretz --- .../workflows/nexus_integration_tests.yaml | 2 +- .github/workflows/style.yaml | 6 +-- README.md | 30 +++------------ nexus_common/include/nexus_common/logging.hpp | 6 ++- .../launch/zenoh_bridge.launch.py | 38 ++++++++++--------- .../src/motion_planner_server.cpp | 10 ++--- nexus_network_configuration/README.md | 2 - .../scripts/set_up_network.sh | 4 +- nexus_zenoh_bridge_dds_vendor/CMakeLists.txt | 25 ++++++------ nexus_zenoh_bridge_dds_vendor/package.xml | 4 ++ thirdparty.repos | 21 ---------- 11 files changed, 59 insertions(+), 89 deletions(-) delete mode 100644 thirdparty.repos diff --git a/.github/workflows/nexus_integration_tests.yaml b/.github/workflows/nexus_integration_tests.yaml index 6c1838a..3bad94a 100644 --- a/.github/workflows/nexus_integration_tests.yaml +++ b/.github/workflows/nexus_integration_tests.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - docker_image: ['ros:humble-ros-base'] + docker_image: ['ros:iron-ros-base'] container: image: ${{ matrix.docker_image }} timeout-minutes: 30 diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index af92c2d..fdeaabd 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - docker_image: ['ros:humble-ros-base'] + docker_image: ['ros:iron-ros-base'] container: image: ${{ matrix.docker_image }} steps: @@ -19,8 +19,8 @@ jobs: uses: actions/checkout@v2 - name: uncrustify run: | - sudo apt update && sudo apt install -y ros-humble-rmf-utils - /ros_entrypoint.sh ament_uncrustify -c /opt/ros/humble/share/rmf_utils/rmf_code_style.cfg . --language C++ --exclude nexus_endpoints/nexus_endpoints.hpp + sudo apt update && sudo apt install -y ros-iron-rmf-utils + /ros_entrypoint.sh ament_uncrustify -c /opt/ros/iron/share/rmf_utils/rmf_code_style.cfg . --language C++ --exclude nexus_endpoints/nexus_endpoints.hpp - name: pycodestyle run: | sudo apt update && sudo apt install -y pycodestyle curl diff --git a/README.md b/README.md index 96525a4..44d53c1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A ROS 2 framework which enables configuration and orchestration of process workf For details on architecture and concepts [see](./docs/concepts.md). ## Requirements -* [ROS 2 Humble](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html) on `Ubuntu 22.04` +* [ROS 2 Iron](https://docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html) on `Ubuntu 22.04` ## Setup @@ -21,12 +21,12 @@ cd ~/ws_nexus/src/ git clone git@github.com:OpenSourceRobotics/nexus vcs import . < nexus/abb.repos cd ~/ws_nexus -rosdep install --from-paths src --ignore-src --rosdistro humble -y -r +rosdep install --from-paths src --ignore-src --rosdistro iron -y -r ``` ### Build the NEXUS workspace ```bash -source /opt/ros/humble/setup.bash +source /opt/ros/iron/setup.bash colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release ``` @@ -90,10 +90,10 @@ The linter of choice is `uncrustify` and the configuration used may be reference Instead of invoking `uncrustify` directly, use `ament_uncrustify` instead which is a wrapper around a specific version of `uncrustify`. You may locally run the linter as follows ```bash -sudo apt update && sudo apt install -y ros-humble-rmf-utils # This is a one-time step -source /opt/ros/humble/setup.bash +sudo apt update && sudo apt install -y ros-iron-rmf-utils # This is a one-time step +source /opt/ros/iron/setup.bash cd ~/ws_nexus/src/nexus -ament_uncrustify -c /opt/ros/humble/share/rmf_utils/rmf_code_style.cfg . --language C++ --exclude nexus_endpoints/nexus_endpoints.hpp +ament_uncrustify -c /opt/ros/iron/share/rmf_utils/rmf_code_style.cfg . --language C++ --exclude nexus_endpoints/nexus_endpoints.hpp ``` To automatically reformat the code, append `--reformat` to the `ament_uncrustify` line above. It is highly recommended to audit the changes by the linter before committing. @@ -101,21 +101,3 @@ It is highly recommended to audit the changes by the linter before committing. #### Python The NEXUS codebase adheres to [PEP8](https://peps.python.org/pep-0008/) style format for python scripts. A linter such as `pycodestyle` may be used for linting. - -## Known Issues - -### Unable to scale speeds of cartesian motions in Humble -The `humble` version of `moveit2` [lacks support](https://github.com/ros-planning/moveit2/issues/1967) for scaling velocity and accelerations of motion plans generated from cartesian interpolation. -The fixes are likely to land in further distro releases. - -The workaround for now is to rely on fixes incorporated into custom forks of `moveit2` packages which are compatible with `humble`. - ->Note: First make sure all `moveit2` binaries are purged from the system via `sudo apt purge ros-humble-moveit*`. - -Then as part of the workspace setup, clone in repositories from the [thirdparty.repos](./thirdparty.repos) file. -Follow the reset of the Setup and Build instructions from above. - -```bash -cd ws_nexus/src/ -vcs import . < nexus/thirdparty.repos -``` diff --git a/nexus_common/include/nexus_common/logging.hpp b/nexus_common/include/nexus_common/logging.hpp index 5c31f01..9551fed 100644 --- a/nexus_common/include/nexus_common/logging.hpp +++ b/nexus_common/include/nexus_common/logging.hpp @@ -177,8 +177,10 @@ public: static std::string to_string(const BtLogging::LogReport& report); * @param log_level The log level to set to, if not provided it will be read from * NEXUS_LOG_LEVEL environment variable. If the log level is invalid, it will be ignored. * - * Note: ros2 humble still does not support externally setting log level, using env var - * best supports scenarios like `ros2 launch`. + * Note: ROS Iron only supports externally setting log level using the + * `--log-level` CLI flag. + * This function allows it to be set via an environment variable + * `NEXUS_LOG_LEVEl`. */ template void configure_logging(NodePtrT node, diff --git a/nexus_integration_tests/launch/zenoh_bridge.launch.py b/nexus_integration_tests/launch/zenoh_bridge.launch.py index 8e66d2a..b6adb2c 100644 --- a/nexus_integration_tests/launch/zenoh_bridge.launch.py +++ b/nexus_integration_tests/launch/zenoh_bridge.launch.py @@ -24,7 +24,10 @@ LaunchConfiguration, PathJoinSubstitution, ) -from launch_ros.substitutions import FindPackageShare +from launch_ros.substitutions import ( + ExecutableInPackage, + FindPackageShare, +) def launch_setup(context, *args, **kwargs): @@ -35,28 +38,27 @@ def launch_setup(context, *args, **kwargs): log_level = LaunchConfiguration("log_level") ros_domain_id = LaunchConfiguration("ros_domain_id") - dds_localhost_only_text = "" + cmd = [ + ExecutableInPackage( + executable="zenoh_bridge_dds", + package="nexus_zenoh_bridge_dds_vendor", + ), + "--config", + PathJoinSubstitution([ + FindPackageShare(zenoh_config_package), + zenoh_config_filename + ]), + "--domain", + ros_domain_id, + ] if IfCondition(dds_localhost_only).evaluate(context): - dds_localhost_only_text = " --dds-localhost-only" + cmd.append("--dds-localhost-only") zenoh_bridge_exec = ExecuteProcess( - cmd=[ - "RUST_LOG="+log_level.perform(context), - FindExecutable(name="ros2"), - "run", - "nexus_zenoh_bridge_dds_vendor", - "zenoh_bridge_dds", - "--config", - PathJoinSubstitution([ - FindPackageShare(zenoh_config_package), - zenoh_config_filename - ]), - "--domain", - ros_domain_id, - dds_localhost_only_text, - ], + cmd=cmd, shell=True, + additional_env={"RUST_LOG": log_level.perform(context)}, ) return [zenoh_bridge_exec] diff --git a/nexus_motion_planner/src/motion_planner_server.cpp b/nexus_motion_planner/src/motion_planner_server.cpp index 272f2dd..1ecd6f1 100644 --- a/nexus_motion_planner/src/motion_planner_server.cpp +++ b/nexus_motion_planner/src/motion_planner_server.cpp @@ -269,8 +269,8 @@ bool MotionPlannerServer::initialize_move_group_interfaces() MoveGroupInterface::Options options{std::move(group_name)}; if (_use_namespace) { - options.move_group_namespace_ = name; - options.robot_description_ = name + ".robot_description"; + options.move_group_namespace = name; + options.robot_description = name + ".robot_description"; } try { @@ -520,9 +520,9 @@ void MotionPlannerServer::plan_with_move_group( { MoveGroupInterface::Plan plan; res->result.error_code = interface->plan(plan); - res->result.trajectory_start = std::move(plan.start_state_); - res->result.trajectory = std::move(plan.trajectory_); - res->result.planning_time = std::move(plan.planning_time_); + res->result.trajectory_start = std::move(plan.start_state); + res->result.trajectory = std::move(plan.trajectory); + res->result.planning_time = std::move(plan.planning_time); } if (_execute_trajectory) { diff --git a/nexus_network_configuration/README.md b/nexus_network_configuration/README.md index b3622dc..bcddfd3 100644 --- a/nexus_network_configuration/README.md +++ b/nexus_network_configuration/README.md @@ -54,5 +54,3 @@ workcell_orchestrators: ```bash ros2 run nexus_network_configuration nexus_network_configuration -n -r -o ``` - -> Note: The latest version of [zenoh-plugin-dds](https://github.com/eclipse-zenoh/zenoh-plugin-dds) does not require a custom CycloneDDS configuration to listen to DDS traffic on the loopback interface, and this could simply be toggled by using either `ROS_LOCALHOST_ONLY=1` or specifying the `dds-localhost-only` flag. However, the humble binary does have have these changes in as of 2/10/2022 diff --git a/nexus_network_configuration/scripts/set_up_network.sh b/nexus_network_configuration/scripts/set_up_network.sh index 2bd6840..123f353 100755 --- a/nexus_network_configuration/scripts/set_up_network.sh +++ b/nexus_network_configuration/scripts/set_up_network.sh @@ -1,11 +1,11 @@ #!/bin/bash # This script does the following: -# 1. Install CycloneDDS (Humble dist.) if not already installed +# 1. Install CycloneDDS (Iron dist.) if not already installed # 2. Change RMW_IMPLEMENTATION to CycloneDDS # 3. Enable multicast on loopback interface -RMW_PACKAGE="ros-humble-rmw-cyclonedds-cpp" +RMW_PACKAGE="ros-iron-rmw-cyclonedds-cpp" PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $RMW_PACKAGE|grep "install ok installed") diff --git a/nexus_zenoh_bridge_dds_vendor/CMakeLists.txt b/nexus_zenoh_bridge_dds_vendor/CMakeLists.txt index 50ae8ea..2aa9b33 100644 --- a/nexus_zenoh_bridge_dds_vendor/CMakeLists.txt +++ b/nexus_zenoh_bridge_dds_vendor/CMakeLists.txt @@ -1,22 +1,25 @@ cmake_minimum_required(VERSION 3.16) -set(PROJECT_NAME nexus_zenoh_bridge_dds_vendor) -project(${PROJECT_NAME} VERSION 0.6.0) +project(nexus_zenoh_bridge_dds_vendor VERSION 0.6.0) -include(ExternalProject) +# Default to C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() find_package(ament_cmake REQUIRED) +find_package(ament_cmake_vendor_package REQUIRED) -ExternalProject_Add(zenoh_bridge_dds - URL https://github.com/koonpeng/zenoh-plugin-dds/releases/download/0.6.0-beta.1/zenoh_bridge_dds-0.6.0-beta.1.tar.gz - PREFIX "zenoh_bridge_dds-bin" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" +ament_vendor(zeno_bridge_dds_vendor + VCS_URL https://github.com/eclipse-zenoh/zenoh-plugin-dds.git + VCS_VERSION 0.7.2-rc ) +# TODO(sloretz) make a nice way to get this path from ament_vendor +set(INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/zeno_bridge_dds_vendor-prefix/install") install( - DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/zenoh_bridge_dds-bin/src/zenoh_bridge_dds/lib/zenoh_bridge_dds" - DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}" + DIRECTORY "${INSTALL_DIR}/lib/zenoh_bridge_dds/" + DESTINATION "lib/${PROJECT_NAME}" USE_SOURCE_PERMISSIONS ) diff --git a/nexus_zenoh_bridge_dds_vendor/package.xml b/nexus_zenoh_bridge_dds_vendor/package.xml index 2342303..dee6771 100644 --- a/nexus_zenoh_bridge_dds_vendor/package.xml +++ b/nexus_zenoh_bridge_dds_vendor/package.xml @@ -8,6 +8,10 @@ Apache License 2.0 ament_cmake + ament_cmake_vendor_package + + cargo + clang ament_cmake diff --git a/thirdparty.repos b/thirdparty.repos deleted file mode 100644 index 9c366f5..0000000 --- a/thirdparty.repos +++ /dev/null @@ -1,21 +0,0 @@ -repositories: - thirdparty/moveit/moveit_msgs: - type: git - url: https://github.com/ros-planning/moveit_msgs.git - version: 2.2.2 - thirdparty/moveit/moveit2: - type: git - url: https://github.com/koonpeng/moveit2.git - version: kp/scale_get_cartesian_path_humble - thirdparty/moveit/moveit_resources: - type: git - url: https://github.com/ros-planning/moveit_resources.git - version: humble - thirdparty/moveit/object_recognition_msgs: - type: git - url: https://github.com/wg-perception/object_recognition_msgs - version: ros2 - thirdparty/PickNikRobotics/pick_ik: - type: git - url: https://github.com/picknikrobotics/pick_ik - version: 1.0.0 From 31fbf882d5c06505295512bd345e1fed86bd88dc Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Thu, 24 Aug 2023 19:27:06 +0000 Subject: [PATCH 2/7] Bring back moveit third party repos Signed-off-by: Shane Loretz --- thirdparty.repos | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 thirdparty.repos diff --git a/thirdparty.repos b/thirdparty.repos new file mode 100644 index 0000000..9c366f5 --- /dev/null +++ b/thirdparty.repos @@ -0,0 +1,21 @@ +repositories: + thirdparty/moveit/moveit_msgs: + type: git + url: https://github.com/ros-planning/moveit_msgs.git + version: 2.2.2 + thirdparty/moveit/moveit2: + type: git + url: https://github.com/koonpeng/moveit2.git + version: kp/scale_get_cartesian_path_humble + thirdparty/moveit/moveit_resources: + type: git + url: https://github.com/ros-planning/moveit_resources.git + version: humble + thirdparty/moveit/object_recognition_msgs: + type: git + url: https://github.com/wg-perception/object_recognition_msgs + version: ros2 + thirdparty/PickNikRobotics/pick_ik: + type: git + url: https://github.com/picknikrobotics/pick_ik + version: 1.0.0 From 8f2b8ddec98a0627d6e2b61785d53f4d4c66b837 Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Thu, 24 Aug 2023 19:27:52 +0000 Subject: [PATCH 3/7] Update instructions for thirdparty moveit stuff for Iron Signed-off-by: Shane Loretz --- README.md | 18 ++++++++++++++++++ thirdparty.repos | 10 +++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 44d53c1..b0d4f65 100644 --- a/README.md +++ b/README.md @@ -101,3 +101,21 @@ It is highly recommended to audit the changes by the linter before committing. #### Python The NEXUS codebase adheres to [PEP8](https://peps.python.org/pep-0008/) style format for python scripts. A linter such as `pycodestyle` may be used for linting. + +## Known Issues + +### Unable to scale speeds of cartesian motions in Humble +`moveit2` version 2.7.4 and below has a bug that prevents using `cached_ik_kinematics_plugin/CachedKDLKinematicsPlugin`. +The fixes will be available when [a new release into ROS Iron is made](https://github.com/ros-planning/moveit2/issues/2327). + +The workaround for now is to use the `iron` branch on the upstream repository directly. + +>Note: First make sure all `moveit2` binaries are purged from the system via `sudo apt purge ros-iron-moveit*`. + +Then as part of the workspace setup, clone in repositories from the [thirdparty.repos](./thirdparty.repos) file. +Follow the reset of the Setup and Build instructions from above. + +```bash +cd ws_nexus/src/ +vcs import . < nexus/thirdparty.repos +``` diff --git a/thirdparty.repos b/thirdparty.repos index 9c366f5..15a29e7 100644 --- a/thirdparty.repos +++ b/thirdparty.repos @@ -5,17 +5,17 @@ repositories: version: 2.2.2 thirdparty/moveit/moveit2: type: git - url: https://github.com/koonpeng/moveit2.git - version: kp/scale_get_cartesian_path_humble + url: https://github.com/ros-planning/moveit2.git + version: iron thirdparty/moveit/moveit_resources: type: git url: https://github.com/ros-planning/moveit_resources.git - version: humble + version: 2.1.1 thirdparty/moveit/object_recognition_msgs: type: git url: https://github.com/wg-perception/object_recognition_msgs - version: ros2 + version: 2.0.0 thirdparty/PickNikRobotics/pick_ik: type: git url: https://github.com/picknikrobotics/pick_ik - version: 1.0.0 + version: 1.0.2 From a104550ecdfbbb5e0702dd252fcec363024d9d75 Mon Sep 17 00:00:00 2001 From: Yadunund Date: Wed, 30 Aug 2023 13:57:28 +0800 Subject: [PATCH 4/7] Fix pkg version for zenoh bridge vendor Signed-off-by: Yadunund --- nexus_zenoh_bridge_dds_vendor/CMakeLists.txt | 2 +- nexus_zenoh_bridge_dds_vendor/package.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nexus_zenoh_bridge_dds_vendor/CMakeLists.txt b/nexus_zenoh_bridge_dds_vendor/CMakeLists.txt index 2aa9b33..4cd13dc 100644 --- a/nexus_zenoh_bridge_dds_vendor/CMakeLists.txt +++ b/nexus_zenoh_bridge_dds_vendor/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(nexus_zenoh_bridge_dds_vendor VERSION 0.6.0) +project(nexus_zenoh_bridge_dds_vendor) # Default to C++17 if(NOT CMAKE_CXX_STANDARD) diff --git a/nexus_zenoh_bridge_dds_vendor/package.xml b/nexus_zenoh_bridge_dds_vendor/package.xml index dee6771..3e9aef8 100644 --- a/nexus_zenoh_bridge_dds_vendor/package.xml +++ b/nexus_zenoh_bridge_dds_vendor/package.xml @@ -2,7 +2,7 @@ nexus_zenoh_bridge_dds_vendor - 0.5.0 + 0.0.1 Newer version of zenoh_bridge_dds for NEXUS Teo Koon Peng Apache License 2.0 From 382b01b38c7e56705b351375b890adfe8fdd39e2 Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Wed, 30 Aug 2023 22:10:22 +0000 Subject: [PATCH 5/7] abb_ros2 main branch Signed-off-by: Shane Loretz --- abb.repos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abb.repos b/abb.repos index 0e49f75..ab5d92c 100644 --- a/abb.repos +++ b/abb.repos @@ -18,4 +18,4 @@ repositories: thirdparty/abb/abb_ros2: type: git url: https://github.com/yadunund/abb_ros2.git - version: humble + version: main From a6ddcbc8333faa8d3faa359efdd1a83803e6eebf Mon Sep 17 00:00:00 2001 From: Yadu Date: Thu, 31 Aug 2023 13:22:21 +0530 Subject: [PATCH 6/7] Fix CI for Iron (#11) * Use regular abb control launch Signed-off-by: Yadunund * Interpolate instead of plan Signed-off-by: Yadunund * Increase timeout Signed-off-by: Yadunund --------- Signed-off-by: Yadunund --- .github/workflows/nexus_integration_tests.yaml | 2 +- .../config/workcell_1_bts/place_on_conveyor.xml | 6 +++--- nexus_integration_tests/launch/workcell.launch.py | 6 ++---- nexus_integration_tests/package.xml | 1 - 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nexus_integration_tests.yaml b/.github/workflows/nexus_integration_tests.yaml index 3bad94a..e39130d 100644 --- a/.github/workflows/nexus_integration_tests.yaml +++ b/.github/workflows/nexus_integration_tests.yaml @@ -14,7 +14,7 @@ jobs: docker_image: ['ros:iron-ros-base'] container: image: ${{ matrix.docker_image }} - timeout-minutes: 30 + timeout-minutes: 60 steps: - uses: actions/checkout@v2 - uses: actions/cache@v3 diff --git a/nexus_integration_tests/config/workcell_1_bts/place_on_conveyor.xml b/nexus_integration_tests/config/workcell_1_bts/place_on_conveyor.xml index 9494fa2..75d1b9f 100644 --- a/nexus_integration_tests/config/workcell_1_bts/place_on_conveyor.xml +++ b/nexus_integration_tests/config/workcell_1_bts/place_on_conveyor.xml @@ -5,7 +5,7 @@ - + @@ -14,14 +14,14 @@ - + - + diff --git a/nexus_integration_tests/launch/workcell.launch.py b/nexus_integration_tests/launch/workcell.launch.py index 847b7a2..3cc1b70 100644 --- a/nexus_integration_tests/launch/workcell.launch.py +++ b/nexus_integration_tests/launch/workcell.launch.py @@ -196,10 +196,9 @@ def launch_setup(context, *args, **kwargs): IncludeLaunchDescription( [ PathJoinSubstitution([ - FindPackageShare("nexus_integration_tests"), + FindPackageShare("abb_bringup"), 'launch', - 'include', - 'nexus_control.launch.py', + 'abb_control.launch.py', ]) ], launch_arguments=[ @@ -271,7 +270,6 @@ def launch_setup(context, *args, **kwargs): condition=IfCondition(use_zenoh_bridge), ), activate_node_service("motion_planner_server", ros_domain_id.perform(context)), - activate_node_service("robot_controller_server", ros_domain_id.perform(context)), ] diff --git a/nexus_integration_tests/package.xml b/nexus_integration_tests/package.xml index 730121c..b8f27c9 100644 --- a/nexus_integration_tests/package.xml +++ b/nexus_integration_tests/package.xml @@ -36,7 +36,6 @@ launch_xml nexus_capabilities nexus_motion_planner - nexus_robot_controller nexus_rviz_plugins nexus_system_orchestrator nexus_workcell_orchestrator From 2500abcda19f8250809e146ff52dbcd77a98eb89 Mon Sep 17 00:00:00 2001 From: Yadunund Date: Thu, 31 Aug 2023 18:10:48 +0800 Subject: [PATCH 7/7] Explicitly kill zenoh processes Signed-off-by: Yadunund --- nexus_integration_tests/test_parallel_wo.py | 10 ++++++++++ nexus_integration_tests/test_pick_and_place.py | 11 ++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/nexus_integration_tests/test_parallel_wo.py b/nexus_integration_tests/test_parallel_wo.py index 615a3a0..48d3d8c 100644 --- a/nexus_integration_tests/test_parallel_wo.py +++ b/nexus_integration_tests/test_parallel_wo.py @@ -22,11 +22,21 @@ from rclpy.action import ActionClient from rclpy.action.client import ClientGoalHandle from ros_testcase import RosTestCase +import subprocess class ParallelWoTest(NexusTestCase): @RosTestCase.timeout(60) async def asyncSetUp(self): + # todo(YV): Find a better fix to the problem below. + # zenoh-bridge was bumped to 0.72 as part of the upgrade to + # ROS 2 Iron. However with this upgrade, the bridge does not clearly + # terminate when a SIGINT is received leaving behind zombie bridge + # processes from previous test cases. As a result, workcell registration + # fails for this testcase due to multiple bridges remaining active. + # Hence we explicitly kill any zenoh processes before launching the test. + subprocess.Popen('pkill -9 -f zenoh', shell=True) + self.proc = managed_process( ("ros2", "launch", "nexus_integration_tests", "launch.py"), ) diff --git a/nexus_integration_tests/test_pick_and_place.py b/nexus_integration_tests/test_pick_and_place.py index c49bbc9..6369320 100644 --- a/nexus_integration_tests/test_pick_and_place.py +++ b/nexus_integration_tests/test_pick_and_place.py @@ -25,11 +25,20 @@ from rclpy.action import ActionClient from rclpy.action.client import ClientGoalHandle, GoalStatus from ros_testcase import RosTestCase - +import subprocess class PickAndPlaceTest(NexusTestCase): @RosTestCase.timeout(60) async def asyncSetUp(self): + # todo(YV): Find a better fix to the problem below. + # zenoh-bridge was bumped to 0.72 as part of the upgrade to + # ROS 2 Iron. However with this upgrade, the bridge does not clearly + # terminate when a SIGINT is received leaving behind zombie bridge + # processes from previous test cases. As a result, workcell registration + # fails for this testcase due to multiple bridges remaining active. + # Hence we explicitly kill any zenoh processes before launching the test. + subprocess.Popen('pkill -9 -f zenoh', shell=True) + self.proc = managed_process( ("ros2", "launch", "nexus_integration_tests", "launch.py"), )