Skip to content

Commit

Permalink
[ros2] Update releases (#108)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Aug 31, 2020
1 parent f5d376f commit 1ce863c
Show file tree
Hide file tree
Showing 13 changed files with 277 additions and 113 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ sudo: required

env:
matrix:
- DOCKER_IMAGE=ubuntu:20.04 ROS_DISTRO="foxy"
- DOCKER_IMAGE=ubuntu:20.04 IGNITION_VERSION="citadel" ROS_DISTRO="foxy"
- DOCKER_IMAGE=ubuntu:20.04 IGNITION_VERSION="dome" ROS_DISTRO="foxy"

services:
- docker
Expand All @@ -16,7 +17,7 @@ before_install:
- echo $DOCKER_IMAGE
- echo $ROS_DISTRO
- docker pull $DOCKER_IMAGE
- docker run -e ROS_DISTRO -d -v $(pwd):/code $DOCKER_IMAGE /bin/bash -c 'while true; do sleep 1; done'
- docker run -e IGNITION_VERSION -e ROS_DISTRO -d -v $(pwd):/code $DOCKER_IMAGE /bin/bash -c 'while true; do sleep 1; done'
- docker exec $(docker ps -aq) /bin/bash -c 'id'

before_script:
Expand Down
20 changes: 17 additions & 3 deletions .travis/build
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,29 @@ export COLCON_WS_SRC=${COLCON_WS}/src
export DEBIAN_FRONTEND=noninteractive
export ROS_PYTHON_VERSION=3

apt update -qq
apt install -qq -y lsb-release wget curl

# Citadel gets Ignition with rosdep
if [ "$IGNITION_VERSION" == "dome" ]; then
echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list
echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-nightly `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-nightly.list
wget https://packages.osrfoundation.org/gazebo.key -O - | apt-key add -

IGN_DEPS="libignition-msgs6-dev libignition-transport9-dev libignition-gazebo4-dev"
fi

# Dependencies.
echo "deb [trusted=yes] http://packages.ros.org/ros2/ubuntu focal main" > /etc/apt/sources.list.d/ros2-latest.list
echo "deb http://packages.ros.org/ros2/ubuntu focal main" > /etc/apt/sources.list.d/ros2-latest.list
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
apt-get update -qq
apt-get install -qq -y python3-colcon-common-extensions \
apt-get install -qq -y $IGN_DEPS \
python3-colcon-common-extensions \
python3-rosdep

rosdep init
rosdep update
rosdep install --from-paths ./ -i -y --rosdistro $ROS_DISTRO
rosdep install --from-paths ./ -i -y -r --rosdistro $ROS_DISTRO

# Build.
source /opt/ros/$ROS_DISTRO/setup.bash
Expand Down
101 changes: 88 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
[![Build Status](https://travis-ci.org/ignitionrobotics/ros_ign.svg?branch=ros2)](https://travis-ci.org/ignitionrobotics/ros_ign/branches)

* ROS 1 branches:
* [melodic](https://github.com/ignitionrobotics/ros_ign/tree/melodic)
* Blueprint and Citadel
* Melodic
* ROS 2 branches:
* [dashing](https://github.com/ignitionrobotics/ros_ign/tree/dashing)
* Blueprint and Citadel
* Dashing and Eloquent
* [ros2](https://github.com/osrf/ros_ign/tree/ros2)
* Citadel
* Foxy
ROS version | Ignition version | Branch | Binaries hosted at
-- | -- | -- | --
Melodic | Blueprint | [melodic](https://github.com/osrf/ros_ign/tree/melodic) | https://packages.osrfoundation.org
Melodic | Citadel | [melodic](https://github.com/osrf/ros_ign/tree/melodic) | only from source
Melodic | Dome | not supported |
Noetic | Blueprint | not supported |
Noetic | Citadel | [noetic](https://github.com/osrf/ros_ign/tree/noetic) | https://packages.ros.org
Noetic | Dome | [noetic](https://github.com/osrf/ros_ign/tree/noetic) | only from source
Dashing | Blueprint | [dashing](https://github.com/osrf/ros_ign/tree/dashing) | only from source
Dashing | Citadel | [dashing](https://github.com/osrf/ros_ign/tree/dashing) | only from source
Dashing | Dome | not supported |
Eloquent | Blueprint | [dashing](https://github.com/osrf/ros_ign/tree/dashing) | only from source
Eloquent | Citadel | [dashing](https://github.com/osrf/ros_ign/tree/dashing) | only from source
Eloquent | Dome | not supported |
Foxy | Blueprint | not supported |
Foxy | Citadel | [ros2](https://github.com/osrf/ros_ign/tree/ros2) | https://packages.ros.org
Foxy | Dome | [ros2](https://github.com/osrf/ros_ign/tree/ros2) | only from source

> Please [ticket an issue](https://github.com/ignitionrobotics/ros_ign/issues/) if you'd like support to be added for some combination.
# Integration between ROS and Ignition

Expand All @@ -37,3 +43,72 @@ This repository holds packages that provide integration between
* [ros_ign_point_cloud](https://github.com/ignitionrobotics/ros_ign/tree/ros2/ros_ign_point_cloud):
Plugins for publishing point clouds to ROS from
[Ignition Gazebo](https://ignitionrobotics.org/libs/gazebo) simulations.

## Install

This branch supports ROS Foxy. See above for other ROS versions.

### Binaries

Foxy binaries are only available for Citadel.
They are hosted at https://packages.ros.org.

1. Add https://packages.ros.org

sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt-get update

1. Install `ros_ign`

sudo apt install ros-foxy-ros-ign

### From source

### ROS

Be sure you've installed
[ROS Foxy](https://index.ros.org/doc/ros2/Installation/) (at least ROS-Base).
More ROS dependencies will be installed below.

### Ignition

Install either [Citadel or Dome](https://ignitionrobotics.org/docs).

Set the `IGNITION_VERSION` environment variable to the Ignition version you'd
like to compile against. For example:

export IGNITION_VERSION=citadel

> You only need to set this variable when compiling, not when running.
### Compile ros_ign

The following steps are for Linux and OSX.

1. Create a colcon workspace:

```
# Setup the workspace
mkdir -p ~/ws/src
cd ~/ws/src
# Download needed software
git clone https://github.com/osrf/ros_ign.git -b ros2
```

1. Install dependencies:

```
cd ~/ws
rosdep install --from-paths src -i -y --rosdistro foxy
```

1. Build the workspace:

```
# Source ROS distro's setup.bash
source /opt/ros/dashing/setup.bash
# Build and install into workspace
cd ~/ws/
colcon build
```
112 changes: 101 additions & 11 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,105 @@
# Release a new version of ros_ign_bridge
# Release a new version of ros_ign

The package uses the latest versions of ignition libraries, at this moment only
availables in the packages.osrfoundation.org repository. This fact makes
impossible to use bloom to release it. The steps to make a new release of the
package is:
Different branches of this repository support different combinations of
ROS 1, ROS 2 and Ignition. Refer to the [README](README.md) to see what
combinations are supported.

1. Use github to make an official release:
https://github.com/osrf/ros_ign/releases
We use 2 separate approaches for releasing ROS-enabled binaries:

1. Update metadata for packaging in:
https://bitbucket.org/osrf/ros_ign_bridge-release/
* Release upstream into https://packages.ros.org, so it's easily available to
all ROS users.
* Release into https://packages.osrfoundation.org, which requires extra setup
for ROS users.

Releasing into ROS packages is ideal, but that's only possible if the necessary
Ignition libraries are available either through official Ubuntu packages, or
directly from https://packages.ros.org. This situation varies according to the
Ignition version:

* Blueprint and Dome are only available from https://packages.osrfoundation.org
* Citadel is available from:
* https://packages.osrfoundation.org: all Ubuntu versions
* https://packages.ros.org: only Ubuntu Focal

Another factor to take into consideration is which Ignition version is officially
supported for each ROS distro according to the following REPS:

* ROS 1: [REP-0003](https://ros.org/reps/rep-0003.html)
* ROS 2: [REP-2000](https://www.ros.org/reps/rep-2000.html)

These factors determine which ROS + Ignition combinations are released into each
repository.

## Versioning

All `ros_ign` packages are under fast development and haven't reached version
1.0 yet. The team will make an effort to keep changes backwards compatible
within a ROS distribution, but API / ABI / behaviour may be broken if necessary.

The versioning scheme uses the minor version to identify ROS and Ignition
versions:

* 1st digit:
* ROS 1: 1
* ROS 2: 2
* 2nd digit:
* Melodic: 0
* Noetic: 1
* Dashing: 0
* Eloquent: 1
* Foxy: 2
* 3rd digit:
* Blueprint: 0
* Citadel: 1
* Dome: 2

ROS | Ignition | Version
-- | -- | --
Melodic | Blueprint | 0.100.X
Melodic | Citadel | 0.101.X
Noetic | Blueprint | :x:
Noetic | Citadel | 0.111.X
Noetic | Dome | 0.112.X
Dashing | Blueprint | 0.200.X
Dashing | Citadel | 0.201.X
Eloquent | Blueprint | 0.210.X
Eloquent | Citadel | 0.211.X
Foxy | Blueprint | :x:
Foxy | Citadel | 0.221.X
Foxy | Dome | 0.222.X

## Releasing into https://packages.ros.org

1. Follow the [standard ROS release process](http://wiki.ros.org/bloom/Tutorials/ReleaseCatkinPackage).

## Releasing into https://packages.osrfoundation.org

1. From the [standard ROS release process](http://wiki.ros.org/bloom/Tutorials/ReleaseCatkinPackage),
follow just these steps:

* `catkin_generate_changelog`
* `catkin_prepare_release`

1. Install `rosdep` for Ignition packages and run rosdep update
```
sudo bash -c 'echo "yaml https://github.com/osrf/osrf-rosdep/raw/master/ignition/ignition.yaml" >> /etc/ros/rosdep/sources.list.d/00-ignition.list'
rosdep update
```

1. Bloom it into a custom repository
```
BLOOM_RELEASE_REPO_BASE=https://github.com/osrf/ bloom-release --no-pull-request --rosdistro melodic --track melodic ros_ign
```

Will fail fedora: ignore and continue:
```
# Would you like to try again? [Y/n]? n
# Skip generator action and continue with release [y/N]? y
```

1. Use [release-tools](https://bitbucket.org/osrf/release-tools)'s script to launch jenkins jobs:
```
cd release-tools/bloom
./ros_ign_bridge-release.py.bash 0.8.0 https://github.com/osrf/ros_ign-release <ros_distro> <token> --ignition-version <version_name>
```

1. Launch manually the builds in:
https://build.osrfoundation.org/job/ros_ign_bridge-debbuilder/
33 changes: 13 additions & 20 deletions ros_ign_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,24 @@ find_package(rosgraph_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)

find_package(ignition-transport8 QUIET)
# Citadel
if(ignition-transport8_FOUND)
# Dome
if("$ENV{IGNITION_VERSION}" STREQUAL "dome")
find_package(ignition-transport9 REQUIRED)
set(IGN_TRANSPORT_VER ${ignition-transport9_VERSION_MAJOR})

find_package(ignition-msgs6 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs6_VERSION_MAJOR})

message(STATUS "Compiling against Ignition Dome")
# Default to Citadel
else()
find_package(ignition-transport8 REQUIRED)
set(IGN_TRANSPORT_VER ${ignition-transport8_VERSION_MAJOR})

find_package(ignition-msgs5 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs5_VERSION_MAJOR})

else()
find_package(ignition-transport9 QUIET)
# Dome
if(ignition-transport9_FOUND)
set(IGN_TRANSPORT_VER ${ignition-transport9_VERSION_MAJOR})

find_package(ignition-msgs6 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs6_VERSION_MAJOR})

# Blueprint
else()
find_package(ignition-transport7 REQUIRED)
set(IGN_TRANSPORT_VER ${ignition-transport7_VERSION_MAJOR})

find_package(ignition-msgs4 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs4_VERSION_MAJOR})
endif()
message(STATUS "Compiling against Ignition Citadel")
endif()

include_directories(include)
Expand Down
9 changes: 7 additions & 2 deletions ros_ign_bridge/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>pkg-config</buildtool_depend>

<depend>ignition-msgs5</depend>
<depend>ignition-transport8</depend>
<depend>geometry_msgs</depend>
<depend>nav_msgs</depend>
<depend>rclcpp</depend>
<depend>rosgraph_msgs</depend>
<depend>sensor_msgs</depend>
<depend>std_msgs</depend>

<!-- Dome -->
<depend condition="$IGNITION_VERSION == dome">ignition-msgs6</depend>
<depend condition="$IGNITION_VERSION == dome">ignition-transport9</depend>
<!-- Citadel (default) -->
<depend condition="$IGNITION_VERSION != dome">ignition-msgs5</depend>
<depend condition="$IGNITION_VERSION != dome">ignition-transport8</depend>

<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down
33 changes: 13 additions & 20 deletions ros_ign_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,24 @@ find_package(ament_cmake REQUIRED)
find_package(ignition-math6 REQUIRED)
find_package(rclcpp REQUIRED)

find_package(ignition-transport8 QUIET)
# Citadel
if(ignition-transport8_FOUND)
set(IGN_TRANSPORT_VER ${ignition-transport8_VERSION_MAJOR})
# Dome
if("$ENV{IGNITION_VERSION}" STREQUAL "dome")
find_package(ignition-transport9 REQUIRED)
set(IGN_TRANSPORT_VER ${ignition-transport9_VERSION_MAJOR})

find_package(ignition-msgs5 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs5_VERSION_MAJOR})
find_package(ignition-msgs6 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs6_VERSION_MAJOR})

message(STATUS "Compiling against Ignition Dome")
# Default to Citadel
else()
find_package(ignition-transport9 QUIET)
# Dome
if(ignition-transport9_FOUND)
set(IGN_TRANSPORT_VER ${ignition-transport9_VERSION_MAJOR})

find_package(ignition-msgs6 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs6_VERSION_MAJOR})
find_package(ignition-transport8 REQUIRED)
set(IGN_TRANSPORT_VER ${ignition-transport8_VERSION_MAJOR})

# Blueprint
else()
find_package(ignition-transport7 REQUIRED)
set(IGN_TRANSPORT_VER ${ignition-transport7_VERSION_MAJOR})
find_package(ignition-msgs5 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs5_VERSION_MAJOR})

find_package(ignition-msgs4 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs4_VERSION_MAJOR})
endif()
message(STATUS "Compiling against Ignition Citadel")
endif()

ign_find_package(gflags
Expand Down
Loading

0 comments on commit 1ce863c

Please sign in to comment.