Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/docker/nexus-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG ROS_DISTRO=jazzy
FROM docker.io/ros:$ROS_DISTRO-ros-base
ARG NEXUS_BRANCH=main

RUN apt update && apt install -y git curl libclang-dev clang clang-tools lld

RUN mkdir -p /ws_nexus_base/src && cd /ws_nexus_base \
&& curl --output abb.repos https://raw.githubusercontent.com/osrf/nexus/refs/heads/$NEXUS_BRANCH/abb.repos \
&& vcs import /ws_nexus_base/src < abb.repos \
&& curl --output rmf.repos https://raw.githubusercontent.com/osrf/nexus/refs/heads/$NEXUS_BRANCH/rmf.repos \
&& vcs import /ws_nexus_base/src < rmf.repos

RUN rosdep update && rosdep install --ignore-src --from-paths /ws_nexus_base/src -yir

RUN cd /ws_nexus_base \
&& . /opt/ros/$ROS_DISTRO/setup.sh \
&& colcon build --merge-install --install-base /opt/nexus_base --cmake-args -DCMAKE_BUILD_TYPE=Release \
&& rm -rf /ws_nexus_base

RUN rm -rf \
/var/lib/apt/lists \
/dist
16 changes: 5 additions & 11 deletions .github/workflows/nexus_integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
docker_image: ['ros:jazzy-ros-base']
docker_image: ['ghcr.io/osrf/nexus/nexus-base:jazzy-latest']
container:
image: ${{ matrix.docker_image }}
timeout-minutes: 60
steps:
- name: Install deps for Rust
run: |
apt update && apt install -y git curl libclang-dev
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: ~/.cache/ccache
key: ccache
- name: vcs
run: |
vcs import . < abb.repos
vcs import . < rmf.repos
- name: rosdep
run: |
apt update
Expand All @@ -37,8 +30,9 @@ jobs:
rosdep update
rosdep install --from-paths . -yir
- name: build
run: /ros_entrypoint.sh colcon build --packages-up-to nexus_calibration nexus_gazebo nexus_integration_tests nexus_motion_planner --mixin release lld --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
run: |
. /opt/nexus_base/setup.bash && colcon build --packages-up-to nexus_calibration nexus_gazebo nexus_integration_tests nexus_motion_planner --mixin release lld --cmake-args -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Test - Unit Tests
run: . ./install/setup.bash && RMW_IMPLEMENTATION=rmw_cyclonedds_cpp /ros_entrypoint.sh colcon test --packages-select nexus_motion_planner --event-handlers=console_direct+
run: . ./install/setup.bash && RMW_IMPLEMENTATION=rmw_cyclonedds_cpp colcon test --packages-select nexus_motion_planner --event-handlers=console_direct+
- name: Test - Integration Test
run: . ./install/setup.bash && cd nexus_integration_tests && RMW_IMPLEMENTATION=rmw_cyclonedds_cpp /ros_entrypoint.sh python3 -m unittest
run: . ./install/setup.bash && cd nexus_integration_tests && RMW_IMPLEMENTATION=rmw_cyclonedds_cpp python3 -m unittest
36 changes: 36 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: nightly

on:
schedule:
# 2am SGT
- cron: '0 18 * * *'

jobs:
build-nexus-base-image:
name: Push nexus base docker image to GitHub Packages
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution: [jazzy]
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to docker
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push nexus-base
uses: docker/build-push-action@v5
with:
push: true
build-args: |
ROS_DISTRO=${{ matrix.ros_distribution }}
NEXUS_BRANCH=base-docker-images
tags: ghcr.io/${{ github.repository }}/nexus-base:${{ matrix.ros_distribution }}-latest
context: .github/docker/nexus-base
2 changes: 1 addition & 1 deletion nexus_integration_tests/launch/zenoh_bridge.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def launch_setup(context, *args, **kwargs):

cmd = [
ExecutableInPackage(
executable="zenoh_bridge_ros2dds",
executable="zenoh-bridge-ros2dds",
package="nexus_zenoh_bridge_dds_vendor",
),
"--config",
Expand Down
23 changes: 15 additions & 8 deletions nexus_zenoh_bridge_dds_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,26 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

find_package(ament_cmake REQUIRED)
find_package(ament_cmake_vendor_package REQUIRED)

ament_vendor(zeno_bridge_dds_vendor
VCS_URL https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds.git
VCS_VERSION 1.0.3
set(ZENOH_VERSION "1.0.3")
set(BINARY_URL "https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds/releases/download/${ZENOH_VERSION}/zenoh-plugin-ros2dds-${ZENOH_VERSION}-x86_64-unknown-linux-gnu-standalone.zip")
set(BINARY_DIR "${CMAKE_BINARY_DIR}/download")
file(DOWNLOAD ${BINARY_URL} ${BINARY_DIR}/zenoh-plugin-ros2dds.zip)

find_program(UNZIP_EXECUTABLE unzip)
if(NOT UNZIP_EXECUTABLE)
message(FATAL_ERROR "unzip command not found. Please install it.")
endif()

execute_process(
COMMAND ${UNZIP_EXECUTABLE} ${BINARY_DIR}/zenoh-plugin-ros2dds.zip
WORKING_DIRECTORY ${BINARY_DIR}
)

# TODO(sloretz) make a nice way to get this path from ament_vendor
set(INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/zeno_bridge_dds_vendor-prefix/install")
install(
DIRECTORY "${INSTALL_DIR}/lib/zenoh_bridge_ros2dds/"
FILES ${BINARY_DIR}/zenoh-bridge-ros2dds
DESTINATION "lib/${PROJECT_NAME}"
USE_SOURCE_PERMISSIONS
PERMISSIONS OWNER_EXECUTE
)

ament_package()
1 change: 0 additions & 1 deletion nexus_zenoh_bridge_dds_vendor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_vendor_package</buildtool_depend>

<build_depend>cargo</build_depend>
<build_depend>clang</build_depend>
Expand Down