Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
add support for ROS Noetic
Browse files Browse the repository at this point in the history
Co-authored-by: Emerson Knapp <[email protected]>
Signed-off-by: TSC21 <[email protected]>
  • Loading branch information
TSC21 and Emerson Knapp committed Jun 5, 2021
1 parent 86fc2bb commit 08e72e3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
target_arch: [aarch64, armhf, x86_64]
target_os: [ubuntu, debian]
rosdistro: [dashing, foxy, galactic, rolling, melodic]
rosdistro: [melodic, noetic, dashing, foxy, galactic, rolling]
env:
METRICS_OUT_DIR: /tmp/collected_metrics
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pip_e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
target_arch: [aarch64, armhf]
target_os: [ubuntu]
rosdistro: [dashing]
rosdistro: [melodic, noetic, dashing, foxy]
install_type:
- test
- prod
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This tool supports compiling a workspace for all combinations of the following:

* Architecture: `armhf`, `aarch64`, `x86_64`
* ROS Distro
* ROS: `melodic`
* ROS: `melodic`, `noetic`
* ROS 2: `dashing`, `foxy`, `galactic`, `rolling`
* OS: `Ubuntu`, `Debian`

Expand Down Expand Up @@ -307,7 +307,7 @@ Here is a detailed look at the arguments passed to the script (`ros_cross_compil
* `.`
* The first argument to `ros_cross_compile` is the directory of the workspace to be built. This could be any relative or absolute path, in this case it's just `.`, the current working directory.
* `--rosdistro foxy`
* You may specify either a ROS and ROS 2 distribution by name, for example `melodic` (ROS) or `galactic` (ROS 2).
* You may specify either a ROS and ROS 2 distribution by name, for example `noetic` (ROS) or `galactic` (ROS 2).
* `--arch aarch64`
* Target the ARMv8 / ARM64 / aarch64 architecture (which are different names for effectively the same thing).
* `--os ubuntu`
Expand Down
6 changes: 5 additions & 1 deletion ros_cross_compile/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@
SUPPORTED_ARCHITECTURES = tuple(ARCHITECTURE_NAME_MAP.keys())

SUPPORTED_ROS2_DISTROS = ('dashing', 'foxy', 'galactic', 'rolling')
SUPPORTED_ROS_DISTROS = ('melodic',)
SUPPORTED_ROS_DISTROS = ('melodic', 'noetic')

ROSDISTRO_OS_MAP = {
'melodic': {
'ubuntu': 'bionic',
'debian': 'stretch',
},
'noetic': {
'ubuntu': 'focal',
'debian': 'buster',
},
'dashing': {
'ubuntu': 'bionic',
'debian': 'stretch',
Expand Down
12 changes: 10 additions & 2 deletions test/test_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,19 @@ def test_get_docker_base_image():
"""Test that the correct base docker image is used for all arguments."""
verify_base_docker_images('aarch64', 'ubuntu', 'dashing', 'arm64v8/ubuntu:bionic')
verify_base_docker_images('aarch64', 'ubuntu', 'melodic', 'arm64v8/ubuntu:bionic')
verify_base_docker_images('aarch64', 'ubuntu', 'noetic', 'arm64v8/ubuntu:focal')

verify_base_docker_images('aarch64', 'debian', 'dashing', 'arm64v8/debian:stretch')
verify_base_docker_images('aarch64', 'debian', 'melodic', 'arm64v8/debian:stretch')
verify_base_docker_images('aarch64', 'debian', 'noetic', 'arm64v8/debian:buster')

verify_base_docker_images('armhf', 'ubuntu', 'dashing', 'arm32v7/ubuntu:bionic')
verify_base_docker_images('armhf', 'ubuntu', 'melodic', 'arm32v7/ubuntu:bionic')
verify_base_docker_images('armhf', 'ubuntu', 'noetic', 'arm32v7/ubuntu:focal')

verify_base_docker_images('armhf', 'debian', 'dashing', 'arm32v7/debian:stretch')
verify_base_docker_images('armhf', 'debian', 'melodic', 'arm32v7/debian:stretch')
verify_base_docker_images('armhf', 'debian', 'noetic', 'arm32v7/debian:buster')


def test_docker_py_version():
Expand All @@ -94,9 +98,13 @@ def test_docker_py_version():


def test_ros_version_map():
platform = Platform('aarch64', 'ubuntu', 'dashing')
platform = Platform('armhf', 'ubuntu', 'dashing')
assert platform.ros_version == 'ros2'
platform = Platform('aarch64', 'ubuntu', 'melodic')
platform = Platform('x86_64', 'ubuntu', 'foxy')
assert platform.ros_version == 'ros2'
platform = Platform('armhf', 'ubuntu', 'melodic')
assert platform.ros_version == 'ros'
platform = Platform('aarch64', 'ubuntu', 'noetic')
assert platform.ros_version == 'ros'


Expand Down
2 changes: 1 addition & 1 deletion test/test_sysroot_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_prepare_docker_build_basic(tmpdir):

def test_run_twice(tmpdir):
# The test is that this doesn't throw an exception for already existing paths
platform = Platform('armhf', 'debian', 'melodic')
platform = Platform('armhf', 'debian', 'noetic')
tmp = Path(str(tmpdir))
prepare_docker_build_environment(platform, tmp, None, None)
prepare_docker_build_environment(platform, tmp, None, None)
Expand Down

0 comments on commit 08e72e3

Please sign in to comment.