From 1b6c0f111704bbc279bc04c468ad01d8496afdc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Sun, 3 Nov 2024 20:03:32 +0100 Subject: [PATCH 1/5] Example3: Add section on command mode switching (#624) * Add section on command mode switching * Update example_3/doc/userdoc.rst Co-authored-by: Sai Kishor Kothakota --------- Co-authored-by: Sai Kishor Kothakota --- example_3/doc/userdoc.rst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/example_3/doc/userdoc.rst b/example_3/doc/userdoc.rst index 29570224..ac362566 100644 --- a/example_3/doc/userdoc.rst +++ b/example_3/doc/userdoc.rst @@ -142,7 +142,30 @@ Tutorial steps [ros2_control_node-1] pos: 0.67, vel: 5.00, acc: 0.00 for joint 0 [ros2_control_node-1] pos: 0.67, vel: 5.00, acc: 0.00 for joint 1 -6. To demonstrate illegal controller configuration, use one of the following launch file arguments: +6. Now you can also switch controllers during runtime, which also changes the command mode automatically. First, you have to load the new controller, for example the ``forward_position_controller`` if you haven't changed the launch file argument. + + .. code-block:: shell + + ros2 control load_controller forward_position_controller $(ros2 pkg prefix ros2_control_demo_example_3 --share)/config/rrbot_multi_interface_forward_controllers.yaml + ros2 control set_controller_state forward_position_controller inactive + + Then you can switch controllers using the following command: + + .. code-block:: shell + + ros2 control switch_controllers --deactivate forward_velocity_controller --activate forward_position_controller + + Observe the output of the following CLI commands, and see how the command interfaces are claimed by the new controller. + + .. code-block:: shell + + ros2 control list_controllers + ros2 control list_hardware_interfaces + + Try now to send commands to the new controller, as described in the previous step. + + +7. To demonstrate illegal controller configuration, use one of the following launch file arguments: * ``robot_controller:=forward_illegal1_controller`` or * ``robot_controller:=forward_illegal2_controller`` From 7c654908d57a9d6042ee095c5fdce7947b88902a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Sun, 17 Nov 2024 18:08:58 +0100 Subject: [PATCH 2/5] Don't test main on semi-binary (#642) --- .github/workflows/humble-semi-binary-build.yml | 2 +- .github/workflows/iron-semi-binary-build.yml | 2 +- .github/workflows/rolling-semi-binary-build.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/humble-semi-binary-build.yml b/.github/workflows/humble-semi-binary-build.yml index 5ed87435..01aa6d49 100644 --- a/.github/workflows/humble-semi-binary-build.yml +++ b/.github/workflows/humble-semi-binary-build.yml @@ -39,7 +39,7 @@ jobs: fail-fast: false matrix: ROS_DISTRO: [humble] - ROS_REPO: [main, testing] + ROS_REPO: [testing] with: ros_distro: ${{ matrix.ROS_DISTRO }} ros_repo: ${{ matrix.ROS_REPO }} diff --git a/.github/workflows/iron-semi-binary-build.yml b/.github/workflows/iron-semi-binary-build.yml index 9ca613d1..400bc327 100644 --- a/.github/workflows/iron-semi-binary-build.yml +++ b/.github/workflows/iron-semi-binary-build.yml @@ -40,7 +40,7 @@ jobs: fail-fast: false matrix: ROS_DISTRO: [iron] - ROS_REPO: [main, testing] + ROS_REPO: [testing] with: ros_distro: ${{ matrix.ROS_DISTRO }} ros_repo: ${{ matrix.ROS_REPO }} diff --git a/.github/workflows/rolling-semi-binary-build.yml b/.github/workflows/rolling-semi-binary-build.yml index ff3d0788..c8d4f8dc 100644 --- a/.github/workflows/rolling-semi-binary-build.yml +++ b/.github/workflows/rolling-semi-binary-build.yml @@ -39,7 +39,7 @@ jobs: fail-fast: false matrix: ROS_DISTRO: [rolling, jazzy] - ROS_REPO: [main, testing] + ROS_REPO: [testing] with: ros_distro: ${{ matrix.ROS_DISTRO }} ros_repo: ${{ matrix.ROS_REPO }} From 8bddea651c10401b9e57eeed65f003b9ae6cb3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Sun, 17 Nov 2024 21:29:56 +0100 Subject: [PATCH 3/5] Fix several links (#645) --- example_13/doc/userdoc.rst | 5 +++- example_15/doc/userdoc.rst | 57 +++++++++++++++++++++----------------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/example_13/doc/userdoc.rst b/example_13/doc/userdoc.rst index b09fce9b..e9e28c79 100644 --- a/example_13/doc/userdoc.rst +++ b/example_13/doc/userdoc.rst @@ -462,7 +462,10 @@ Files used for this demos - URDF file: `three_robots.urdf.xacro `__ + Description: `threedofbot_description.urdf.xacro `__ - + ``ros2_control`` tag: `three_robots.ros2_control.xacro `__ + + ``ros2_control`` tag: + + `threedofbot.ros2_control.xacro `__ + + `rrbot_system_position_only.ros2_control.xacro `__ + + `rrbot_system_with_sensor.ros2_control.xacro `__ - RViz configuration: `three_robots.rviz `__ Controllers from this demo diff --git a/example_15/doc/userdoc.rst b/example_15/doc/userdoc.rst index 55a9ae20..dc73e704 100644 --- a/example_15/doc/userdoc.rst +++ b/example_15/doc/userdoc.rst @@ -12,21 +12,6 @@ This example shows how to integrate multiple robots under different controller m Scenario: Using ros2_control within a local namespace ----------------------------------------------------- -* Launch file: `rrbot_namespace.launch.py `__ -* Controllers yaml: `rrbot_namespace_controllers.yaml `__ -* URDF file: `rrbot.urdf.xacro `__ - - * Description: `rrbot_description.urdf.xacro `__ - * ``ros2_control`` tag: `rrbot.ros2_control.xacro `__ - -* RViz configuration: `rrbot.rviz `__ -* Test nodes goals configuration: - - + `rrbot_forward_position_publisher `__ - + `rrbot_joint_trajectory_publisher `__ - -* Hardware interface plugin: `rrbot.cpp `__ - .. note:: When running ``ros2 control`` CLI commands you have to use additional parameter with exact controller manager node name, i.e., ``-c /rrbot/controller_manager``. @@ -75,24 +60,26 @@ Commanding the robot using ``JointTrajectoryController`` (name: ``/rrbot/positio ros2 launch ros2_control_demo_example_15 test_joint_trajectory_controller.launch.py publisher_config:=rrbot_namespace_joint_trajectory_publisher.yaml -Scenario: Using multiple controller managers on the same machine ----------------------------------------------------------------- +Files used for this demo: -* Launch file: `multi_controller_manager_example_two_rrbots.launch.py `__ -* Controllers yaml: - - `multi_controller_manager_generic_controllers.yaml `__ -* URDF file: `rrbot.urdf.xacro `__ +* Launch file: `rrbot_namespace.launch.py `__ +* Controllers yaml: `rrbot_namespace_controllers.yaml `__ +* URDF file: `rrbot.urdf.xacro `__ * Description: `rrbot_description.urdf.xacro `__ - * ``ros2_control`` tag: `rrbot.ros2_control.xacro `__ + * ``ros2_control`` tag: `rrbot.ros2_control.xacro `__ * RViz configuration: `rrbot.rviz `__ * Test nodes goals configuration: - + `rrbot_forward_position_publisher `__ - + `rrbot_joint_trajectory_publisher `__ + + `rrbot_forward_position_publisher `__ + + `rrbot_joint_trajectory_publisher `__ -* Hardware interface plugin: `rrbot.cpp `__ +* Hardware interface plugin: `rrbot.cpp `__ + + +Scenario: Using multiple controller managers on the same machine +---------------------------------------------------------------- .. note:: @@ -168,6 +155,26 @@ Commanding the robots using the now activated ``position_trajectory_controller`` ros2 launch ros2_control_demo_example_15 test_multi_controller_manager_joint_trajectory_controller.launch.py + +Files used for this demo: + +* Launch file: `multi_controller_manager_example_two_rrbots.launch.py `__ +* Controllers yaml: + - `multi_controller_manager_rrbot_generic_controllers.yaml `__ +* URDF file: `rrbot.urdf.xacro `__ + + * Description: `rrbot_description.urdf.xacro `__ + * ``ros2_control`` tag: `rrbot.ros2_control.xacro `__ + +* RViz configuration: `rrbot.rviz `__ +* Test nodes goals configuration: + + + `rrbot_forward_position_publisher `__ + + `rrbot_joint_trajectory_publisher `__ + +* Hardware interface plugin: `rrbot.cpp `__ + + Controllers from this demo -------------------------- * ``Joint State Broadcaster`` (`ros2_controllers repository `__): `doc `__ From 0c700923f4da4e239905a05347840e8df828fea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Sun, 17 Nov 2024 23:54:07 +0100 Subject: [PATCH 4/5] Add paths filter to humble docker build job (#648) * Add paths filter * Rename file --- ...ker-build.yaml => humble-docker-build.yml} | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) rename .github/workflows/{humble-docker-build.yaml => humble-docker-build.yml} (50%) diff --git a/.github/workflows/humble-docker-build.yaml b/.github/workflows/humble-docker-build.yml similarity index 50% rename from .github/workflows/humble-docker-build.yaml rename to .github/workflows/humble-docker-build.yml index ad9b2b57..b9eb118a 100644 --- a/.github/workflows/humble-docker-build.yaml +++ b/.github/workflows/humble-docker-build.yml @@ -5,9 +5,31 @@ on: pull_request: branches: - humble + paths: + - '**.hpp' + - '**.cpp' + - Dockerfile/** + - '.github/workflows/humble-docker-build.yml' + - '**/package.xml' + - '**/CMakeLists.txt' + - '**.xacro' + - '**.py' + - '**.yaml' + - 'ros2_control_demos.humble.repos' push: branches: - humble + paths: + - '**.hpp' + - '**.cpp' + - Dockerfile/** + - '.github/workflows/humble-docker-build.yml' + - '**/package.xml' + - '**/CMakeLists.txt' + - '**.xacro' + - '**.py' + - '**.yaml' + - 'ros2_control_demos.humble.repos' schedule: # Run every morning to detect broken dependencies - cron: '40 1 * * *' From 7b7f70c992e1ab6a42ec095a24f2c731573d4e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Mon, 18 Nov 2024 22:10:34 +0100 Subject: [PATCH 5/5] Remove iron workflows and update readme (#612) --- .github/dependabot.yml | 7 --- .github/mergify.yml | 9 ---- .github/workflows/iron-binary-build.yml | 48 -------------------- .github/workflows/iron-check-docs.yml | 17 ------- .github/workflows/iron-docker-build.yaml | 46 ------------------- .github/workflows/iron-pre-commit.yml | 13 ------ .github/workflows/iron-semi-binary-build.yml | 48 -------------------- README.md | 1 - ros2_control_demos-not-released.iron.repos | 1 - ros2_control_demos.iron.repos | 21 --------- 10 files changed, 211 deletions(-) delete mode 100644 .github/workflows/iron-binary-build.yml delete mode 100644 .github/workflows/iron-check-docs.yml delete mode 100644 .github/workflows/iron-docker-build.yaml delete mode 100644 .github/workflows/iron-pre-commit.yml delete mode 100644 .github/workflows/iron-semi-binary-build.yml delete mode 100644 ros2_control_demos-not-released.iron.repos delete mode 100644 ros2_control_demos.iron.repos diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 766bb548..f5e9921f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,13 +11,6 @@ updates: directory: "/" schedule: interval: "weekly" - - package-ecosystem: "github-actions" - # Workflow files stored in the - # default location of `.github/workflows` - directory: "/" - schedule: - interval: "weekly" - target-branch: "iron" - package-ecosystem: "github-actions" # Workflow files stored in the # default location of `.github/workflows` diff --git a/.github/mergify.yml b/.github/mergify.yml index fd185e02..84ad380e 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -8,15 +8,6 @@ pull_request_rules: branches: - humble - - name: Backport to iron at reviewers discretion - conditions: - - base=master - - "label=backport-iron" - actions: - backport: - branches: - - iron - - name: Ask to resolve conflict conditions: - conflict diff --git a/.github/workflows/iron-binary-build.yml b/.github/workflows/iron-binary-build.yml deleted file mode 100644 index 6fdc7600..00000000 --- a/.github/workflows/iron-binary-build.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Iron Binary Build -# author: Denis Štogl -# description: 'Build & test all dependencies from released (binary) packages.' - -on: - pull_request: - branches: - - iron - paths: - - '**.hpp' - - '**.cpp' - - '.github/workflows/iron-binary-build.yml' - - '**/package.xml' - - '**/CMakeLists.txt' - - '**.xacro' - - '**.py' - - '**.yaml' - - 'ros2_control_demos-not-released.iron.repos' - push: - branches: - - iron - paths: - - '**.hpp' - - '**.cpp' - - '.github/workflows/iron-binary-build.yml' - - '**/package.xml' - - '**/CMakeLists.txt' - - '**.xacro' - - '**.py' - - '**.yaml' - - 'ros2_control_demos-not-released.iron.repos' - schedule: - # Run every morning to detect flakiness and broken dependencies - - cron: '03 1 * * *' - -jobs: - binary: - uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master - strategy: - fail-fast: false - matrix: - ROS_DISTRO: [iron] - ROS_REPO: [main, testing] - with: - ros_distro: ${{ matrix.ROS_DISTRO }} - ros_repo: ${{ matrix.ROS_REPO }} - upstream_workspace: ros2_control_demos-not-released.${{ matrix.ROS_DISTRO }}.repos - ref_for_scheduled_build: iron diff --git a/.github/workflows/iron-check-docs.yml b/.github/workflows/iron-check-docs.yml deleted file mode 100644 index cb3b2c06..00000000 --- a/.github/workflows/iron-check-docs.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Iron Check Docs - -on: - workflow_dispatch: - pull_request: - branches: - - iron - paths: - - '**.rst' - - '.github/workflows/iron-check-docs.yml' - -jobs: - check-docs: - name: Check Docs - uses: ros-controls/control.ros.org/.github/workflows/reusable-sphinx-check-single-version.yml@iron - with: - ROS2_CONTROL_DEMOS_PR: ${{ github.ref }} diff --git a/.github/workflows/iron-docker-build.yaml b/.github/workflows/iron-docker-build.yaml deleted file mode 100644 index 03f91c40..00000000 --- a/.github/workflows/iron-docker-build.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: Build Iron Dockerfile -# description: builds the dockerfile contained within the repo - -on: - pull_request: - branches: - - iron - paths: - - '**.hpp' - - '**.cpp' - - Dockerfile/** - - '.github/workflows/iron-docker-build.yml' - - '**/package.xml' - - '**/CMakeLists.txt' - - '**.xacro' - - '**.py' - - '**.yaml' - - 'ros2_control_demos.iron.repos' - push: - branches: - - iron - paths: - - '**.hpp' - - '**.cpp' - - Dockerfile/** - - '.github/workflows/iron-docker-build.yml' - - '**/package.xml' - - '**/CMakeLists.txt' - - '**.xacro' - - '**.py' - - '**.yaml' - - 'ros2_control_demos.iron.repos' - schedule: - # Run every morning to detect broken dependencies - - cron: '50 1 * * *' - - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: iron - - name: Build the Docker image - run: docker build --file Dockerfile/Dockerfile --tag ros2_control_demos_iron --build-arg ROS_DISTRO=iron . diff --git a/.github/workflows/iron-pre-commit.yml b/.github/workflows/iron-pre-commit.yml deleted file mode 100644 index a1289580..00000000 --- a/.github/workflows/iron-pre-commit.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Pre-Commit - Iron - -on: - workflow_dispatch: - pull_request: - branches: - - iron - -jobs: - pre-commit: - uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master - with: - ros_distro: iron diff --git a/.github/workflows/iron-semi-binary-build.yml b/.github/workflows/iron-semi-binary-build.yml deleted file mode 100644 index 400bc327..00000000 --- a/.github/workflows/iron-semi-binary-build.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Iron Semi-Binary Build -# description: 'Build & test that compiles the main dependencies from source.' - -on: - pull_request: - branches: - - iron - paths: - - '**.hpp' - - '**.cpp' - - '.github/workflows/iron-semi-binary-build.yml' - - '**/package.xml' - - '**/CMakeLists.txt' - - '**.xacro' - - '**.py' - - '**.yaml' - - 'ros2_control_demos.iron.repos' - push: - branches: - - iron - paths: - - '**.hpp' - - '**.cpp' - - '.github/workflows/iron-semi-binary-build.yml' - - '**/package.xml' - - '**/CMakeLists.txt' - - '**.xacro' - - '**.py' - - '**.yaml' - - 'ros2_control_demos.iron.repos' - - schedule: - # Run every morning to detect flakiness and broken dependencies - - cron: '33 1 * * *' - -jobs: - semi_binary: - uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master - strategy: - fail-fast: false - matrix: - ROS_DISTRO: [iron] - ROS_REPO: [testing] - with: - ros_distro: ${{ matrix.ROS_DISTRO }} - ros_repo: ${{ matrix.ROS_REPO }} - upstream_workspace: ros2_control_demos.${{ matrix.ROS_DISTRO }}.repos - ref_for_scheduled_build: iron diff --git a/README.md b/README.md index ea154320..fa7a539c 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,6 @@ ROS 2 Distro | Branch | Build status | Documentation :----------: | :----: | :----------: | :-----------: **Rolling** | [`master`](https://github.com/ros-controls/ros2_control_demos/tree/master) | [![Rolling Binary Build](https://github.com/ros-controls/ros2_control_demos/actions/workflows/rolling-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_control_demos/actions/workflows/rolling-binary-build.yml?branch=master)
[![Rolling Semi-Binary Build](https://github.com/ros-controls/ros2_control_demos/actions/workflows/rolling-semi-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_control_demos/actions/workflows/rolling-semi-binary-build.yml?branch=master)
| [Documentation](https://control.ros.org/master/index.html)
[API Reference](https://control.ros.org/master/doc/api/index.html) **Jazzy** | [`master`](https://github.com/ros-controls/ros2_control_demos/tree/master) | [![Rolling Binary Build](https://github.com/ros-controls/ros2_control_demos/actions/workflows/rolling-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_control_demos/actions/workflows/rolling-binary-build.yml?branch=master)
[![Rolling Semi-Binary Build](https://github.com/ros-controls/ros2_control_demos/actions/workflows/rolling-semi-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/ros2_control_demos/actions/workflows/rolling-semi-binary-build.yml?branch=master)
| [Documentation](https://control.ros.org/master/index.html)
[API Reference](https://control.ros.org/jazzy/doc/api/index.html) -**Iron** | [`iron`](https://github.com/ros-controls/ros2_control_demos/tree/iron) | [![Iron Binary Build](https://github.com/ros-controls/ros2_control_demos/actions/workflows/iron-binary-build.yml/badge.svg?branch=iron)](https://github.com/ros-controls/ros2_control_demos/actions/workflows/iron-binary-build.yml?branch=iron)
[![Iron Semi-Binary Build](https://github.com/ros-controls/ros2_control_demos/actions/workflows/iron-semi-binary-build.yml/badge.svg?branch=iron)](https://github.com/ros-controls/ros2_control_demos/actions/workflows/iron-semi-binary-build.yml?branch=iron)
| [Documentation](https://control.ros.org/iron/index.html)
[API Reference](https://control.ros.org/iron/doc/api/index.html) **Humble** | [`humble`](https://github.com/ros-controls/ros2_control_demos/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/ros2_control_demos/actions/workflows/humble-binary-build.yml/badge.svg?branch=humble)](https://github.com/ros-controls/ros2_control_demos/actions/workflows/humble-binary-build.yml?branch=humble)
[![Humble Semi-Binary Build](https://github.com/ros-controls/ros2_control_demos/actions/workflows/humble-semi-binary-build.yml/badge.svg?branch=humble)](https://github.com/ros-controls/ros2_control_demos/actions/workflows/humble-semi-binary-build.yml?branch=humble)
| [Documentation](https://control.ros.org/humble/index.html)
[API Reference](https://control.ros.org/humble/doc/api/index.html) diff --git a/ros2_control_demos-not-released.iron.repos b/ros2_control_demos-not-released.iron.repos deleted file mode 100644 index 56f46b6f..00000000 --- a/ros2_control_demos-not-released.iron.repos +++ /dev/null @@ -1 +0,0 @@ -repositories: diff --git a/ros2_control_demos.iron.repos b/ros2_control_demos.iron.repos deleted file mode 100644 index 29d4ba16..00000000 --- a/ros2_control_demos.iron.repos +++ /dev/null @@ -1,21 +0,0 @@ -repositories: - control_msgs: - type: git - url: https://github.com/ros-controls/control_msgs.git - version: master - realtime_tools: - type: git - url: https://github.com/ros-controls/realtime_tools.git - version: master - ros2_control: - type: git - url: https://github.com/ros-controls/ros2_control.git - version: iron - ros2_controllers: - type: git - url: https://github.com/ros-controls/ros2_controllers.git - version: iron - gazebo_ros2_control: - type: git - url: https://github.com/ros-controls/gazebo_ros2_control.git - version: iron