Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Dec 16, 2023
2 parents 7a32f17 + 2bd5804 commit 7ad420d
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 15 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,17 @@ 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: "humble"
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "weekly"
target-branch: "iron"
2 changes: 1 addition & 1 deletion .github/workflows/ci-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.10.6
- name: Install system hooks
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/ci-iron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: gz_ros2_control CI - Iron

on:
pull_request:
branches: [ iron ]
push:
branches: [ iron ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- docker-image: "ubuntu:22.04"
gz-version: "fortress"
ros-distro: "iron"
- docker-image: "ubuntu:22.04"
gz-version: "garden"
ros-distro: "iron"
env:
DOCKER_IMAGE: ${{ matrix.docker-image }}
GZ_VERSION: ${{ matrix.gz-version }}
ROS_DISTRO: ${{ matrix.ros-distro }}
container:
image: ${{ matrix.docker-image }}
steps:
- uses: actions/checkout@v4
- name: Setup colcon workspace
id: configure
shell: bash
run: |
export DEBIAN_FRONTEND=noninteractive
apt update -qq
apt install -qq -y lsb-release wget curl gnupg2 git
cd ..
mkdir -p /home/ros2_ws/src
if [ "$ROS_DISTRO" == "rolling" ]; then
git clone https://github.com/gazebosim/ros_gz/
fi
cp -r gz_ros2_control /home/ros2_ws/src/
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
if [ "$GZ_VERSION" == "garden" ]; then
export GZ_DEPS="libgz-sim7-dev libgz-plugin2-dev gz-sim7-cli"
fi
apt-get update && apt-get upgrade -q -y
apt-get update && apt-get install -qq -y \
dirmngr \
python3-colcon-ros \
python3-colcon-common-extensions \
python3-rosdep \
build-essential \
${GZ_DEPS}
if [ "$GZ_VERSION" == "garden" ]; then
export ROSDEP_ARGS="--skip-keys ros_gz_sim --skip-keys gz-plugin2 --skip-keys gz-sim7 --skip-keys gz-transport12 --skip-keys gz-math7 --skip-keys gz-msgs9"
fi
cd /home/ros2_ws/src/
if [ "$ROS_DISTRO" == "rolling" ]; then
git clone https://github.com/gazebosim/ros_gz/
fi
if [ "$ROS_DISTRO" == "iron" ]; then
git clone https://github.com/gazebosim/ros_gz/ -b iron
fi
rosdep init
rosdep update
rosdep install --from-paths ./ -i -y --rosdistro ${ROS_DISTRO} --ignore-src ${ROSDEP_ARGS}
- name: Build project
id: build
run: |
cd /home/ros2_ws/
. /opt/ros/${ROS_DISTRO}/local_setup.sh
colcon build --packages-up-to gz_ros2_control_demos gz_ros2_control_tests
- name: Run tests
id: test
run: |
cd /home/ros2_ws/
. /opt/ros/${ROS_DISTRO}/local_setup.sh
colcon test --event-handlers console_direct+ --packages-select gz_ros2_control gz_ros2_control_demos gz_ros2_control_tests
colcon test-result
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Gazebo-Sim ros2 control CI
name: gz_ros2_control CI - Rolling

on:
pull_request:
branches: [ master ]
push:
branches: [ master ]

Expand All @@ -11,15 +12,9 @@ jobs:
strategy:
matrix:
include:
- docker-image: "ubuntu:22.04"
gz-version: "fortress"
ros-distro: "iron"
- docker-image: "ubuntu:22.04"
gz-version: "fortress"
ros-distro: "rolling"
- docker-image: "ubuntu:22.04"
gz-version: "garden"
ros-distro: "iron"
- docker-image: "ubuntu:22.04"
gz-version: "garden"
ros-distro: "rolling"
Expand Down
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,23 @@ 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) <br /> [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) <br /> [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) <br /> [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) <br /> [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) <br /> [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) <br /> [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)

Expand All @@ -37,6 +42,7 @@ If you want compile this from source, you should choose the Gazebo version. The
```bash
export GZ_VERSION=fortress
export GZ_VERSION=garden
export GZ_VERSION=harmonic
```

Then create a workspace, clone the repo and compile it:
Expand Down
9 changes: 9 additions & 0 deletions gz_ros2_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ if("$ENV{GZ_VERSION}" STREQUAL "garden")
set(GZ_PLUGIN gz-plugin${GZ_PLUGIN_VER}::register)
set(GZ_SIM gz-sim${GZ_SIM_VER}::core)
add_definitions(-DGZ_HEADERS)
elseif("$ENV{GZ_VERSION}" STREQUAL "harmonic")
find_package(gz-sim8 REQUIRED)
set(GZ_SIM_VER ${gz-sim8_VERSION_MAJOR})
message(STATUS "Compiling against Gazebo Harmonic")
find_package(gz-plugin2 REQUIRED)
set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR})
set(GZ_PLUGIN gz-plugin${GZ_PLUGIN_VER}::register)
set(GZ_SIM gz-sim${GZ_SIM_VER}::core)
add_definitions(-DGZ_HEADERS)
else()
find_package(ignition-gazebo6 REQUIRED)
set(GZ_SIM_VER ${ignition-gazebo6_VERSION_MAJOR})
Expand Down
2 changes: 2 additions & 0 deletions gz_ros2_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
<depend condition="$GZ_VERSION == ''">ignition-gazebo6</depend>
<depend condition="$GZ_VERSION == fortress">ignition-gazebo6</depend>
<depend condition="$GZ_VERSION == garden">gz-sim7</depend>
<depend condition="$GZ_VERSION == harmonic">gz-sim8</depend>

<depend condition="$GZ_VERSION == ''">ignition-plugin</depend>
<depend condition="$GZ_VERSION == fortress">ignition-plugin</depend>
<depend condition="$GZ_VERSION == garden">gz-plugin2</depend>
<depend condition="$GZ_VERSION == harmonic">gz-plugin2</depend>
<depend>pluginlib</depend>
<depend>rclcpp</depend>
<depend>yaml_cpp_vendor</depend>
Expand Down
1 change: 1 addition & 0 deletions gz_ros2_control_demos/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<exec_depend>rclcpp</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend condition="$GZ_VERSION == ''">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'harmonic'">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'garden'">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'fortress'">ros_ign_gazebo</exec_depend>
<exec_depend>ros2controlcli</exec_depend>
Expand Down
1 change: 1 addition & 0 deletions gz_ros2_control_tests/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<exec_depend>rclcpp</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend condition="$GZ_VERSION == ''">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'harmonic'">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'garden'">ros_gz_sim</exec_depend>
<exec_depend condition="$GZ_VERSION == 'fortress'">ros_ign_gazebo</exec_depend>
<exec_depend>ros2controlcli</exec_depend>
Expand Down

0 comments on commit 7ad420d

Please sign in to comment.