From e8e1fef794b21c6df2f8deda253a82a3ec09600d Mon Sep 17 00:00:00 2001 From: krmihaly <134075742+krmihaly@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:21:14 +0200 Subject: [PATCH 1/2] Feature/fri external torque broadcast (#178) * add additional joint state broadcaster with config for external torque * check for zero value in frictioncompensation * format * resolve friction conpensation edge case * Update 3_Sunrise_FRI.md * sorry I stole your branch --------- Co-authored-by: Svastits --- .github/CODEOWNERS | 4 +--- doc/wiki/3_Sunrise_FRI.md | 3 ++- .../kuka_drivers_core/controller_names.hpp | 2 ++ .../external_torque_broadcaster_config.yaml | 15 +++++++++++++++ .../config/ros2_controller_config.yaml | 2 ++ kuka_sunrise_fri_driver/launch/startup.launch.py | 10 ++++++++++ .../src/hardware_interface.cpp | 9 ++++++++- .../src/robot_manager_node.cpp | 6 +++--- 8 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 kuka_sunrise_fri_driver/config/external_torque_broadcaster_config.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4e5c6cf7..d2b36d37 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,2 @@ ## code changes will send PR to following users -* @VX792 -* @Svastits -* @kovacsge11 +* @Svastits @kovacsge11 diff --git a/doc/wiki/3_Sunrise_FRI.md b/doc/wiki/3_Sunrise_FRI.md index 19f8314f..a3c11b7c 100644 --- a/doc/wiki/3_Sunrise_FRI.md +++ b/doc/wiki/3_Sunrise_FRI.md @@ -49,7 +49,7 @@ This starts the 3 core components of every driver (described in the [Non-real-ti - `joint_group_impedance_controller` ([configuration file](https://github.com/kroshu/kuka_drivers/tree/master/kuka_sunrise_fri_driver/config/joint_impedance_controller_config.yaml)) - `effort_controller` (of type `JointGroupEffortController`, [configuration file](https://github.com/kroshu/kuka_drivers/tree/master/kuka_sunrise_fri_driver/config/effort_controller_config.yaml)) - [`control_mode_handler`](https://github.com/kroshu/kuka_controllers?tab=readme-ov-file#control_mode_handler) (no configuration file) - +- `external_torque_broadcaster` (of type `JointStateBroadcaster`, [configuration file](https://github.com/kroshu/kuka_drivers/tree/master/kuka_sunrise_fri_driver/config/external_torque_broadcaster_config.yaml), publishes a `JointState` message type on the topic `external_torque_broadcaster/joint_states` containing the measured external torques for every joint) 3. After successful startup, the `robot_manager` node has to be activated to start the cyclic communication with the robot controller (before this only a collapsed robot is visible in `rviz`): ``` ros2 lifecycle set robot_manager configure @@ -74,6 +74,7 @@ Both launch files support the following argument: - `jtc_config`: the location of the configuration file for the `joint_trajectory_controller` (defaults to `kuka_sunrise_fri_driver/config/joint_trajectory_controller_config.yaml`) - `jic_config`: the location of the configuration file for the `joint_impedance_controller` (defaults to `kuka_sunrise_fri_driver/config/joint_impedance_controller_config.yaml`) - `ec_config`: the location of the configuration file for the `effort_controller` (defaults to `kuka_sunrise_fri_driver/config/effort_controller_config.yaml`) +- `etb_config`: the location of the configuration file for the `external_torque_broadcaster` (defaults to `kuka_sunrise_fri_driver/config/external_torque_broadcaster._config.yaml`) The `startup_with_rviz.launch.py` additionally contains one argument: diff --git a/kuka_drivers_core/include/kuka_drivers_core/controller_names.hpp b/kuka_drivers_core/include/kuka_drivers_core/controller_names.hpp index 41a0bcf6..56999b14 100644 --- a/kuka_drivers_core/include/kuka_drivers_core/controller_names.hpp +++ b/kuka_drivers_core/include/kuka_drivers_core/controller_names.hpp @@ -19,6 +19,8 @@ namespace kuka_drivers_core { /* Fixed controller names */ static constexpr char JOINT_STATE_BROADCASTER[] = "joint_state_broadcaster"; +static constexpr char EXTERNAL_TORQUE_BROADCASTER[] = "external_torque_broadcaster"; + static constexpr char CONTROL_MODE_HANDLER[] = "control_mode_handler"; static constexpr char EVENT_BROADCASTER[] = "event_broadcaster"; static constexpr char FRI_CONFIGURATION_CONTROLLER[] = "fri_configuration_controller"; diff --git a/kuka_sunrise_fri_driver/config/external_torque_broadcaster_config.yaml b/kuka_sunrise_fri_driver/config/external_torque_broadcaster_config.yaml new file mode 100644 index 00000000..5ffea8a8 --- /dev/null +++ b/kuka_sunrise_fri_driver/config/external_torque_broadcaster_config.yaml @@ -0,0 +1,15 @@ +external_torque_broadcaster: + ros__parameters: + interfaces: + - external_torque + joints: + - joint_1 + - joint_2 + - joint_3 + - joint_4 + - joint_5 + - joint_6 + - joint_7 + map_interface_to_joint_state: + effort: external_torque + use_local_topics: true diff --git a/kuka_sunrise_fri_driver/config/ros2_controller_config.yaml b/kuka_sunrise_fri_driver/config/ros2_controller_config.yaml index d340c2b7..bb5edcb1 100755 --- a/kuka_sunrise_fri_driver/config/ros2_controller_config.yaml +++ b/kuka_sunrise_fri_driver/config/ros2_controller_config.yaml @@ -12,6 +12,8 @@ controller_manager: type: kuka_controllers/FRIStateBroadcaster event_broadcaster: type: kuka_controllers/EventBroadcaster + external_torque_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster # Configuration controllers joint_group_impedance_controller: diff --git a/kuka_sunrise_fri_driver/launch/startup.launch.py b/kuka_sunrise_fri_driver/launch/startup.launch.py index 7ab660f0..913a89e1 100644 --- a/kuka_sunrise_fri_driver/launch/startup.launch.py +++ b/kuka_sunrise_fri_driver/launch/startup.launch.py @@ -39,6 +39,7 @@ def launch_setup(context, *args, **kwargs): jtc_config = LaunchConfiguration("jtc_config") jic_config = LaunchConfiguration("jic_config") ec_config = LaunchConfiguration("ec_config") + etb_config = LaunchConfiguration("etb_config") if ns.perform(context) == "": tf_prefix = "" else: @@ -116,6 +117,7 @@ def launch_setup(context, *args, **kwargs): jtc_config, jic_config, ec_config, + etb_config, { "hardware_components_initial_state": { "unconfigured": [tf_prefix + robot_model.perform(context)] @@ -159,6 +161,7 @@ def controller_spawner(controller_names, activate=False): controller_names = [ "joint_state_broadcaster", + "external_torque_broadcaster", "joint_trajectory_controller", "fri_configuration_controller", "fri_state_broadcaster", @@ -222,4 +225,11 @@ def generate_launch_description(): + "/config/effort_controller_config.yaml", ) ) + launch_arguments.append( + DeclareLaunchArgument( + "etb_config", + default_value=get_package_share_directory("kuka_sunrise_fri_driver") + + "/config/external_torque_broadcaster_config.yaml", + ) + ) return LaunchDescription(launch_arguments + [OpaqueFunction(function=launch_setup)]) diff --git a/kuka_sunrise_fri_driver/src/hardware_interface.cpp b/kuka_sunrise_fri_driver/src/hardware_interface.cpp index 4557e65a..dab061e0 100644 --- a/kuka_sunrise_fri_driver/src/hardware_interface.cpp +++ b/kuka_sunrise_fri_driver/src/hardware_interface.cpp @@ -468,7 +468,14 @@ void KukaFRIHardwareInterface::activateFrictionCompensation(double * values) con { for (int i = 0; i < DOF; i++) { - values[i] -= (values[i] / fabs(values[i]) * 0.1); + if (values[i] != 0.0) + { + values[i] -= (values[i] / fabs(values[i]) * 0.1); + } + else + { + values[i] -= 0.1; + } } } diff --git a/kuka_sunrise_fri_driver/src/robot_manager_node.cpp b/kuka_sunrise_fri_driver/src/robot_manager_node.cpp index 85466a23..9c0fc64e 100644 --- a/kuka_sunrise_fri_driver/src/robot_manager_node.cpp +++ b/kuka_sunrise_fri_driver/src/robot_manager_node.cpp @@ -216,8 +216,8 @@ RobotManagerNode::on_activate(const rclcpp_lifecycle::State &) // Activate joint state broadcaster and controller for given control mode if (!kuka_drivers_core::changeControllerState( change_controller_state_client_, - {kuka_drivers_core::JOINT_STATE_BROADCASTER, kuka_drivers_core::FRI_STATE_BROADCASTER, - GetControllerName()}, + {kuka_drivers_core::JOINT_STATE_BROADCASTER, kuka_drivers_core::EXTERNAL_TORQUE_BROADCASTER, + kuka_drivers_core::FRI_STATE_BROADCASTER, GetControllerName()}, {kuka_drivers_core::JOINT_GROUP_IMPEDANCE_CONTROLLER})) { RCLCPP_ERROR(get_logger(), "Could not activate RT controllers"); @@ -245,7 +245,7 @@ RobotManagerNode::on_deactivate(const rclcpp_lifecycle::State &) if (!kuka_drivers_core::changeControllerState( change_controller_state_client_, {kuka_drivers_core::JOINT_GROUP_IMPEDANCE_CONTROLLER}, {GetControllerName(), kuka_drivers_core::JOINT_STATE_BROADCASTER, - kuka_drivers_core::FRI_STATE_BROADCASTER}, + kuka_drivers_core::EXTERNAL_TORQUE_BROADCASTER, kuka_drivers_core::FRI_STATE_BROADCASTER}, SwitchController::Request::BEST_EFFORT)) { RCLCPP_ERROR(get_logger(), "Could not deactivate RT controllers"); From 81a2d2369f34a0400ce5dde131e1fceb4ec61398 Mon Sep 17 00:00:00 2001 From: Adam Peto <61557670+PetoAdam@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:58:39 +0200 Subject: [PATCH 2/2] Migrate master branch to ROS Jazzy (#175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add basic support for ros2 jazzy * change ros-industrial ci to jazzy * temporarily removed "got segment base" check for unittests * temporarily removed got segment base checks for multi robot startups * changed industrial_ci to run on ubuntu 24.04 noble * configured test suite for rsi_simulator and added dummy test * update readme from humble to jazzy * remove unused segment base checks * update readme * update readme (CI and sonarcloud checks for both jazzy and humble) * change readme github industrial ci link to redirect to github actions * address code-formatting requirements (pre-commit) * update README * update tests with robot initialized check --------- Co-authored-by: Áron Svastits <49677296+Svastits@users.noreply.github.com> --- .github/workflows/industrial_ci.yml | 4 ++-- .gitignore | 1 + README.md | 12 ++++++++---- .../include/iiqka_moveit_example/moveit_example.hpp | 6 +++--- .../include/kuka_drivers_core/control_mode.hpp | 2 ++ kuka_iiqka_eac_driver/test/test_driver_activation.py | 2 +- kuka_iiqka_eac_driver/test/test_driver_startup.py | 2 +- .../test/test_multi_robot_startup.py | 3 +-- kuka_kss_rsi_driver/test/test_driver_activation.py | 2 +- kuka_kss_rsi_driver/test/test_driver_startup.py | 2 +- kuka_kss_rsi_driver/test/test_multi_robot_startup.py | 3 +-- kuka_rsi_simulator/setup.cfg | 4 ++++ kuka_rsi_simulator/setup.py | 2 ++ kuka_rsi_simulator/test/__init__.py | 0 kuka_rsi_simulator/test/test_dummy.py | 2 ++ kuka_sunrise_fri_driver/CMakeLists.txt | 8 +++++++- .../kuka_sunrise_fri_driver/tcp_connection.hpp | 1 + .../test/test_driver_activation.py | 2 +- kuka_sunrise_fri_driver/test/test_driver_startup.py | 2 +- .../test/test_multi_robot_startup.py | 3 +-- 20 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 kuka_rsi_simulator/test/__init__.py create mode 100644 kuka_rsi_simulator/test/test_dummy.py diff --git a/.github/workflows/industrial_ci.yml b/.github/workflows/industrial_ci.yml index 5ccbf26e..090345cb 100644 --- a/.github/workflows/industrial_ci.yml +++ b/.github/workflows/industrial_ci.yml @@ -34,7 +34,7 @@ jobs: ANALYZER: sonarqube TEST_COVERAGE: true UPSTREAM_WORKSPACE: 'github:kroshu/kuka_robot_descriptions#master github:kroshu/kuka-external-control-sdk#master' - ROS_DISTRO: humble + ROS_DISTRO: jazzy CCACHE_DIR: /github/home/.ccache # Directory for ccache (and how we enable ccache in industrial_ci) EVENT_NAME: ${{ github.event_name }} BRANCH: ${{ github.event.ref }} @@ -43,7 +43,7 @@ jobs: PR_NUMBER: ${{ github.event.number }} ANALYZER_TOKEN: ${{ secrets.ANALYZER_TOKEN }} DEBUG_BASH: true - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Reset ANALYZER for scheduled and push runs run: | diff --git a/.gitignore b/.gitignore index c18dd8d8..330fdf30 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__/ +.vscode diff --git a/README.md b/README.md index 54346fd8..5922148a 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,16 @@ This repository contains ROS2 drivers for all KUKA operating systems. -Github CI | SonarCloud -------------| --------------- -[![Build Status](https://github.com/kroshu//kuka_drivers/workflows/CI/badge.svg?branch=master)](https://github.com/kroshu/ros2_kuka_sunrise_fri_driver/actions) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kroshu_kuka_drivers&metric=alert_status)](https://sonarcloud.io/dashboard?id=kroshu_kuka_drivers) +ROS2 Distro | Branch | Github CI | SonarCloud +------------ | -------------- | -------------- | -------------- +**Jazzy** | [`master`](https://github.com/kroshu/kuka_drivers/tree/master) | [![Build Status](https://github.com/kroshu//kuka_drivers/actions/workflows/industrial_ci.yml/badge.svg?branch=master)](https://github.com/kroshu/kuka_drivers/actions) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kroshu_kuka_drivers&metric=alert_status)](https://sonarcloud.io/dashboard?id=kroshu_kuka_drivers) +**Humble** | [`humble`](https://github.com/kroshu/kuka_drivers/tree/humble) | [![Build Status](https://github.com/kroshu//kuka_drivers/actions/workflows/industrial_ci.yml/badge.svg?branch=humble)](https://github.com/kroshu/kuka_drivers/actions) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kroshu_kuka_drivers&metric=alert_status&branch=humble)](https://sonarcloud.io/dashboard?id=kroshu_kuka_drivers) # Requirements -The drivers require a system with ROS installed. It is recommended to use Ubuntu 22.04 with ROS humble. Iron Irwini has breaking changes in the moveit API, thus it is not yet supported. +The drivers require a system with ROS installed. It is recommended to use Ubuntu 24.04 with ROS Jazzy. + +Additionally, there exists a ROS Humble version of the drivers, and its corresponding configuration can be found under the `humble` branch. + It is also recommended to use a client machine with a real-time kernel, as all three drivers require cyclic, real-time communication. Due to the real-time requirement, Windows systems are not recommended and covered in the documentation. diff --git a/examples/iiqka_moveit_example/include/iiqka_moveit_example/moveit_example.hpp b/examples/iiqka_moveit_example/include/iiqka_moveit_example/moveit_example.hpp index 0a3d97b4..b29b4a6f 100644 --- a/examples/iiqka_moveit_example/include/iiqka_moveit_example/moveit_example.hpp +++ b/examples/iiqka_moveit_example/include/iiqka_moveit_example/moveit_example.hpp @@ -109,7 +109,7 @@ class MoveitExample : public rclcpp::Node else { RCLCPP_INFO(LOGGER, "Planning successful"); - return std::make_shared(plan.trajectory_); + return std::make_shared(plan.trajectory); } } @@ -127,7 +127,7 @@ class MoveitExample : public rclcpp::Node else { RCLCPP_INFO(LOGGER, "Planning successful"); - return std::make_shared(plan.trajectory_); + return std::make_shared(plan.trajectory); } } @@ -153,7 +153,7 @@ class MoveitExample : public rclcpp::Node auto stop = std::chrono::high_resolution_clock::now(); auto duration = std::chrono::duration_cast(stop - start); RCLCPP_INFO(LOGGER, "Planning successful after %li ms", duration.count()); - return std::make_shared(plan.trajectory_); + return std::make_shared(plan.trajectory); } void AddObject(const moveit_msgs::msg::CollisionObject & object) diff --git a/kuka_drivers_core/include/kuka_drivers_core/control_mode.hpp b/kuka_drivers_core/include/kuka_drivers_core/control_mode.hpp index eb6333e7..6d023393 100644 --- a/kuka_drivers_core/include/kuka_drivers_core/control_mode.hpp +++ b/kuka_drivers_core/include/kuka_drivers_core/control_mode.hpp @@ -15,6 +15,8 @@ #ifndef KUKA_DRIVERS_CORE__CONTROL_MODE_HPP_ #define KUKA_DRIVERS_CORE__CONTROL_MODE_HPP_ +#include + namespace kuka_drivers_core { /** diff --git a/kuka_iiqka_eac_driver/test/test_driver_activation.py b/kuka_iiqka_eac_driver/test/test_driver_activation.py index ff2a2f3c..2b11bbca 100644 --- a/kuka_iiqka_eac_driver/test/test_driver_activation.py +++ b/kuka_iiqka_eac_driver/test/test_driver_activation.py @@ -71,7 +71,7 @@ def generate_test_description(): class TestDriverActivation(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment base", timeout=5) + proc_output.assertWaitFor("Robot initialized", timeout=5) proc_output.assertWaitFor( "Successful initialization of hardware 'lbr_iisy3_r760'", timeout=5 ) diff --git a/kuka_iiqka_eac_driver/test/test_driver_startup.py b/kuka_iiqka_eac_driver/test/test_driver_startup.py index ceb3d46e..cf5d408c 100644 --- a/kuka_iiqka_eac_driver/test/test_driver_startup.py +++ b/kuka_iiqka_eac_driver/test/test_driver_startup.py @@ -50,7 +50,7 @@ def generate_test_description(): class TestDriverStartup(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment base", timeout=5) + proc_output.assertWaitFor("Robot initialized", timeout=5) proc_output.assertWaitFor( "Successful initialization of hardware 'lbr_iisy3_r760'", timeout=5 ) diff --git a/kuka_iiqka_eac_driver/test/test_multi_robot_startup.py b/kuka_iiqka_eac_driver/test/test_multi_robot_startup.py index 85243b6c..c02455f7 100644 --- a/kuka_iiqka_eac_driver/test/test_multi_robot_startup.py +++ b/kuka_iiqka_eac_driver/test/test_multi_robot_startup.py @@ -75,8 +75,7 @@ def generate_test_description(): class TestMultiStartup(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment test1_base", timeout=20) - proc_output.assertWaitFor("got segment test2_base", timeout=20) + proc_output.assertWaitFor("Robot initialized", timeout=20) proc_output.assertWaitFor( "Successful initialization of hardware 'test1_lbr_iisy3_r760'", timeout=20 ) diff --git a/kuka_kss_rsi_driver/test/test_driver_activation.py b/kuka_kss_rsi_driver/test/test_driver_activation.py index 2bedb4eb..213003a5 100644 --- a/kuka_kss_rsi_driver/test/test_driver_activation.py +++ b/kuka_kss_rsi_driver/test/test_driver_activation.py @@ -77,7 +77,7 @@ def generate_test_description(): class TestDriverActivation(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment base", timeout=5) + proc_output.assertWaitFor("Robot initialized", timeout=5) proc_output.assertWaitFor( "Successful initialization of hardware 'kr6_r700_sixx'", timeout=5 ) diff --git a/kuka_kss_rsi_driver/test/test_driver_startup.py b/kuka_kss_rsi_driver/test/test_driver_startup.py index ede3aaa0..8b2ce2bf 100644 --- a/kuka_kss_rsi_driver/test/test_driver_startup.py +++ b/kuka_kss_rsi_driver/test/test_driver_startup.py @@ -50,7 +50,7 @@ def generate_test_description(): class TestDriverStartup(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment base", timeout=5) + proc_output.assertWaitFor("Robot initialized", timeout=5) proc_output.assertWaitFor( "Successful initialization of hardware 'kr6_r700_sixx'", timeout=5 ) diff --git a/kuka_kss_rsi_driver/test/test_multi_robot_startup.py b/kuka_kss_rsi_driver/test/test_multi_robot_startup.py index 2f0994f6..657e9132 100644 --- a/kuka_kss_rsi_driver/test/test_multi_robot_startup.py +++ b/kuka_kss_rsi_driver/test/test_multi_robot_startup.py @@ -71,8 +71,7 @@ def generate_test_description(): class TestMultiStartup(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment test1_base", timeout=20) - proc_output.assertWaitFor("got segment test2_base", timeout=20) + proc_output.assertWaitFor("Robot initialized", timeout=20) proc_output.assertWaitFor( "Successful initialization of hardware 'test1_kr6_r700_sixx'", timeout=20 ) diff --git a/kuka_rsi_simulator/setup.cfg b/kuka_rsi_simulator/setup.cfg index 2922234f..ad664d76 100644 --- a/kuka_rsi_simulator/setup.cfg +++ b/kuka_rsi_simulator/setup.cfg @@ -2,3 +2,7 @@ script_dir=$base/lib/kuka_rsi_simulator [install] install_scripts=$base/lib/kuka_rsi_simulator +[tool:pytest] +minversion = 6.0 +addopts = --strict-markers +norecursedirs = .git build dist diff --git a/kuka_rsi_simulator/setup.py b/kuka_rsi_simulator/setup.py index 3fd55677..1038c6b6 100644 --- a/kuka_rsi_simulator/setup.py +++ b/kuka_rsi_simulator/setup.py @@ -39,4 +39,6 @@ entry_points={ "console_scripts": ["rsi_simulator = kuka_rsi_simulator.rsi_simulator:main"], }, + tests_require=["pytest"], + test_suite="test", ) diff --git a/kuka_rsi_simulator/test/__init__.py b/kuka_rsi_simulator/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/kuka_rsi_simulator/test/test_dummy.py b/kuka_rsi_simulator/test/test_dummy.py new file mode 100644 index 00000000..10cf3ad0 --- /dev/null +++ b/kuka_rsi_simulator/test/test_dummy.py @@ -0,0 +1,2 @@ +def test_dummy(): + pass diff --git a/kuka_sunrise_fri_driver/CMakeLists.txt b/kuka_sunrise_fri_driver/CMakeLists.txt index 7f0c85fe..b1277887 100644 --- a/kuka_sunrise_fri_driver/CMakeLists.txt +++ b/kuka_sunrise_fri_driver/CMakeLists.txt @@ -24,8 +24,14 @@ find_package(pluginlib REQUIRED) find_package(controller_manager_msgs) find_package(std_msgs) find_package(std_srvs) +find_package(nanopb REQUIRED) -include_directories(include src/fri_client_sdk) +find_path(NANOPB_INCLUDE_DIR + NAMES pb.h + PATHS /usr/include/nanopb /usr/local/include/nanopb +) + +include_directories(include src/fri_client_sdk ${NANOPB_INCLUDE_DIR}) add_library(fri_connection SHARED src/connection_helpers/fri_connection.cpp diff --git a/kuka_sunrise_fri_driver/include/kuka_sunrise_fri_driver/tcp_connection.hpp b/kuka_sunrise_fri_driver/include/kuka_sunrise_fri_driver/tcp_connection.hpp index 6a510c9b..c65eab0a 100644 --- a/kuka_sunrise_fri_driver/include/kuka_sunrise_fri_driver/tcp_connection.hpp +++ b/kuka_sunrise_fri_driver/include/kuka_sunrise_fri_driver/tcp_connection.hpp @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/kuka_sunrise_fri_driver/test/test_driver_activation.py b/kuka_sunrise_fri_driver/test/test_driver_activation.py index 80705852..35285fba 100644 --- a/kuka_sunrise_fri_driver/test/test_driver_activation.py +++ b/kuka_sunrise_fri_driver/test/test_driver_activation.py @@ -71,7 +71,7 @@ def generate_test_description(): class TestDriverActivation(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment base", timeout=5) + proc_output.assertWaitFor("Robot initialized", timeout=5) proc_output.assertWaitFor( "Successful initialization of hardware 'lbr_iiwa14_r820'", timeout=5 ) diff --git a/kuka_sunrise_fri_driver/test/test_driver_startup.py b/kuka_sunrise_fri_driver/test/test_driver_startup.py index 2cb9b941..b117ea64 100644 --- a/kuka_sunrise_fri_driver/test/test_driver_startup.py +++ b/kuka_sunrise_fri_driver/test/test_driver_startup.py @@ -50,7 +50,7 @@ def generate_test_description(): class TestDriverStartup(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment base", timeout=5) + proc_output.assertWaitFor("Robot initialized", timeout=5) proc_output.assertWaitFor( "Successful initialization of hardware 'lbr_iiwa14_r820'", timeout=5 ) diff --git a/kuka_sunrise_fri_driver/test/test_multi_robot_startup.py b/kuka_sunrise_fri_driver/test/test_multi_robot_startup.py index b256b304..ed1cbca8 100644 --- a/kuka_sunrise_fri_driver/test/test_multi_robot_startup.py +++ b/kuka_sunrise_fri_driver/test/test_multi_robot_startup.py @@ -71,8 +71,7 @@ def generate_test_description(): class TestMultiStartup(unittest.TestCase): def test_read_stdout(self, proc_output): # Check for successful initialization - proc_output.assertWaitFor("got segment test1_base", timeout=20) - proc_output.assertWaitFor("got segment test2_base", timeout=20) + proc_output.assertWaitFor("Robot initialized", timeout=20) proc_output.assertWaitFor( "Successful initialization of hardware 'test1_lbr_iiwa14_r820'", timeout=20 )