diff --git a/.github/workflows/ci-format.yaml b/.github/workflows/ci-format.yaml
index c26fc77a..4db51ac9 100644
--- a/.github/workflows/ci-format.yaml
+++ b/.github/workflows/ci-format.yaml
@@ -12,8 +12,8 @@ jobs:
name: Format
runs-on: ubuntu-22.04
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
with:
python-version: 3.10.6
- name: Install system hooks
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci-humble.yaml
similarity index 92%
rename from .github/workflows/ci.yaml
rename to .github/workflows/ci-humble.yaml
index 5c40c0ca..80677085 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci-humble.yaml
@@ -1,7 +1,10 @@
-name: Ignition ros2 control CI
+name: ign_ros2_control CI - Humble
on:
pull_request:
+ branches: [ humble ]
+ push:
+ branches: [ humble ]
jobs:
build:
@@ -14,7 +17,7 @@ jobs:
container:
image: ubuntu:22.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Setup colcon workspace
id: configure
run: |
diff --git a/README.md b/README.md
index e7368afd..79c31a5c 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
ROS2 Distro | Build Status | Package build |
:---------: | :----: | :----------: |
-[![Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | [![Build Status](http://build.ros2.org/buildStatus/icon?job=Hdev__gz_ros2_control__ubuntu_focal_amd64)](http://build.ros2.org/job/Hdev__gz_ros2_control__ubuntu_focal_amd64) | [![Build Status](http://build.ros2.org/buildStatus/icon?job=Hbin_uF64__gz_ros2_control__ubuntu_focal_amd64__binary)](http://build.ros2.org/job/Hbin_uF64__gz_ros2_control__ubuntu_focal_amd64__binary) |
+[![Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | [![Build Status](https://build.ros2.org/buildStatus/icon?job=Hdev__ign_ros2_control__ubuntu_jammy_amd64)](https://build.ros2.org/job/Hdev__ign_ros2_control__ubuntu_jammy_amd64/) | [![Build Status](https://build.ros2.org/buildStatus/icon?job=Hbin_uJ64__ign_ros2_control__ubuntu_jammy_amd64__binary)](https://build.ros2.org/job/Hbin_uJ64__ign_ros2_control__ubuntu_jammy_amd64__binary/) |
This is a ROS 2 package for integrating the `ros2_control` controller architecture with the [Ignition Gazebo](http://ignitionrobotics.org/) simulator.
More information about `ros2_control` can be found here: https://control.ros.org/
@@ -15,18 +15,24 @@ Foxy | Citadel | [foxy](https://github.com/ros-controls/gz_ros2_control/tree/fox
Foxy | Edifice | [foxy](https://github.com/ros-controls/gz_ros2_control/tree/foxy) | only from source
Galactic | Edifice | [galactic](https://github.com/ros-controls/gz_ros2_control/tree/galactic) | https://packages.ros.org
Galactic | Fortress | [galactic](https://github.com/ros-controls/gz_ros2_control/tree/galactic) | only from source
-Humble | Fortress | [ros2](https://github.com/ros-controls/gz_ros2_control/tree/master) | https://packages.ros.org
-Rolling | Edifice | [ros2](https://github.com/ros-controls/gz_ros2_control/tree/master) | only from source
-Rolling | Fortress | [ros2](https://github.com/ros-controls/gz_ros2_control/tree/master) | https://packages.ros.org
-Rolling | Garden (not released) | [ros2](https://github.com/ros-controls/gz_ros2_control/tree/master) | only from source
+Humble | Fortress | [humble](https://github.com/ros-controls/gz_ros2_control/tree/humble) | https://packages.ros.org
+Iron | Edifice | [iron](https://github.com/ros-controls/gz_ros2_control/tree/iron) | only from source
+Iron | Fortress | [iron](https://github.com/ros-controls/gz_ros2_control/tree/iron) | https://packages.ros.org
+Iron | Garden (not released) | [iron](https://github.com/ros-controls/gz_ros2_control/tree/iron) | only from source
+Iron | Harmonic (not released) | [iron](https://github.com/ros-controls/gz_ros2_control/tree/iron) | only from source
+Rolling | Edifice | [master](https://github.com/ros-controls/gz_ros2_control/tree/master) | only from source
+Rolling | Fortress | [master](https://github.com/ros-controls/gz_ros2_control/tree/master) | https://packages.ros.org
+Rolling | Garden (not released) | [master](https://github.com/ros-controls/gz_ros2_control/tree/master) | only from source
+Rolling | Harmonic (not released) | [master](https://github.com/ros-controls/gz_ros2_control/tree/master) | only from source
## Build status
ROS 2 Distro | Branch | Build status | Documentation
:----------: | :----: | :----------: | :-----------:
-**Rolling** | [`master`](https://github.com/ros-controls/gz_ros2_control/tree/master) | [![Gazebo ros2 control CI](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci.yaml) | [Documentation](https://control.ros.org/master/index.html)
[API Reference](https://control.ros.org/master/doc/api/index.html)
-**Iron** | [`master`](https://github.com/ros-controls/gz_ros2_control/tree/master) | [![Gazebo ros2 control CI](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci.yaml) | [Documentation](https://control.ros.org/master/index.html)
[API Reference](https://control.ros.org/master/doc/api/index.html)
-**Humble** | [`humble`](https://github.com/ros-controls/gz_ros2_control/tree/humble) | [![Gazebo ros2 control CI](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci.yaml/badge.svg?branch=humble)](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci.yaml) | [Documentation](https://control.ros.org/humble/index.html)
[API Reference](https://control.ros.org/humble/doc/api/index.html)
+**Rolling** | [`master`](https://github.com/ros-controls/gz_ros2_control/tree/master) | [![gazebo_ros2_control CI - Rolling](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci-rolling.yaml/badge.svg?branch=master)](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci-rolling.yaml) | [Documentation](https://control.ros.org/master/index.html)
[API Reference](https://control.ros.org/master/doc/api/index.html)
+**Iron** | [`iron`](https://github.com/ros-controls/gz_ros2_control/tree/iron) | [![gazebo_ros2_control CI - Iron](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci-iron.yaml/badge.svg?branch=iron)](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci-iron.yaml) | [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/gz_ros2_control/tree/humble) | [![ign_ros2_control CI - Humble](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci-humble.yaml/badge.svg?branch=humble)](https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci-humble.yaml) | [Documentation](https://control.ros.org/humble/index.html)
[API Reference](https://control.ros.org/humble/doc/api/index.html)
+
## Documentation
See the [documentation file](doc/index.rst) or [control.ros.org](https://control.ros.org/master/doc/simulators/gz_ros2_control/doc/index.html)
diff --git a/ign_ros2_control/src/ign_system.cpp b/ign_ros2_control/src/ign_system.cpp
index 9921523a..ac6d4161 100644
--- a/ign_ros2_control/src/ign_system.cpp
+++ b/ign_ros2_control/src/ign_system.cpp
@@ -64,6 +64,9 @@ struct jointData
/// \brief Current cmd joint effort
double joint_effort_cmd;
+ /// \brief flag if joint is actuated (has command interfaces) or passive
+ bool is_actuated;
+
/// \brief handles to the joints from within Gazebo
ignition::gazebo::Entity sim_joint;
@@ -367,6 +370,9 @@ bool IgnitionSystem::initSim(
this->dataPtr->joints_[j].joint_velocity = initial_velocity;
}
}
+
+ // check if joint is actuated (has command interfaces) or passive
+ this->dataPtr->joints_[j].is_actuated = (joint_info.command_interfaces.size() > 0);
}
registerSensors(hardware_info);
@@ -631,8 +637,8 @@ hardware_interface::return_type IgnitionSystem::write(
*jointEffortCmd = ignition::gazebo::components::JointForceCmd(
{this->dataPtr->joints_[i].joint_effort_cmd});
}
- } else {
- // Fallback case is a velocity command of zero
+ } else if (this->dataPtr->joints_[i].is_actuated) {
+ // Fallback case is a velocity command of zero (only for actuated joints)
double target_vel = 0.0;
auto vel =
this->dataPtr->ecm->Component(