diff --git a/.github/workflows/pants.yaml b/.github/workflows/pants.yaml index e54aaed3..f92e8b53 100644 --- a/.github/workflows/pants.yaml +++ b/.github/workflows/pants.yaml @@ -59,10 +59,9 @@ jobs: pants --changed-since=HEAD update-build-files --check - name: install system dependencies run: | # cargo is required to build fastuuid (no wheels for Python 3.11) + sudo apt update sudo apt install jq cargo - - name: install ROS 2 dependencies - run: | # copied from arcor2_ur Dockerfile TODO move it into some bash script to have it in one place - sudo apt install ros-jazzy-ros-base=0.11.0-1noble.20240916.013254 ros-jazzy-ur=2.4.10-1noble.20240916.021917 ros-jazzy-moveit-py=2.10.0-1noble.20240916.020150 + sudo ./build-support/install_ur_dependencies.sh - name: Lint run: | pants --changed-since=origin/master lint diff --git a/build-support/BUILD b/build-support/BUILD new file mode 100644 index 00000000..ab98fcae --- /dev/null +++ b/build-support/BUILD @@ -0,0 +1 @@ +shell_source(name="install_ur_dependencies.sh", source="install_ur_dependencies.sh") \ No newline at end of file diff --git a/build-support/install_ur_dependencies.sh b/build-support/install_ur_dependencies.sh new file mode 100755 index 00000000..c199629a --- /dev/null +++ b/build-support/install_ur_dependencies.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +apt-get install -y -q --no-install-recommends \ + ros-jazzy-ros-base=0.11.0-1noble.20240922.110418 \ + ros-jazzy-ur=2.4.10-1noble.20240922.120253 \ + ros-jazzy-moveit-py=2.10.0-1noble.20240922.114626 diff --git a/compose-files/ur-demo/docker-compose.yml b/compose-files/ur-demo/docker-compose.yml index 1cdb985f..872d616c 100644 --- a/compose-files/ur-demo/docker-compose.yml +++ b/compose-files/ur-demo/docker-compose.yml @@ -1,6 +1,6 @@ services: ur-demo-ursim: - image: universalrobots/ursim_e-series:5.16.0 + image: universalrobots/ursim_e-series:5.17.2 container_name: ur-demo-ursim ports: - "5900:5900" # VNC port @@ -13,11 +13,11 @@ services: - ursim-gui-cache:/ursim/GUI - urcap-build-cache:/ursim/.urcaps ur-demo-robot-api: - image: arcor2/arcor2_ur:1.1.0 + image: arcor2/arcor2_ur:1.2.0 container_name: ur-demo-robot-api ports: - "5012:5012" - networks: + networks: # TODO use network_mode: "host" for the real robot - ur-demo-network restart: always # the service tends to crash when calling PUT /state/stop cap_add: @@ -159,7 +159,7 @@ services: - ur-demo-asset ur-demo-upload-object-types: - image: arcor2/arcor2_ur_ot:1.1.0 + image: arcor2/arcor2_ur_ot:1.2.0 container_name: "ur-demo-upload-object-types" depends_on: ur-demo-project: diff --git a/src/docker/arcor2_ur/BUILD b/src/docker/arcor2_ur/BUILD index d387e534..65093f07 100644 --- a/src/docker/arcor2_ur/BUILD +++ b/src/docker/arcor2_ur/BUILD @@ -1,2 +1,2 @@ shell_source(name="start.sh", source="start.sh") -docker_image(name="arcor2_ur", repository="arcor2/arcor2_ur", dependencies=[":start.sh"], image_tags=["1.1.0"]) +docker_image(name="arcor2_ur", repository="arcor2/arcor2_ur", dependencies=[":start.sh", "build-support:install_ur_dependencies.sh"], image_tags=["1.2.0"]) diff --git a/src/docker/arcor2_ur/Dockerfile b/src/docker/arcor2_ur/Dockerfile index d954167e..428d9c1c 100644 --- a/src/docker/arcor2_ur/Dockerfile +++ b/src/docker/arcor2_ur/Dockerfile @@ -2,13 +2,13 @@ FROM ubuntu:24.04 AS deps COPY src.python.arcor2_ur.scripts/ur.pex /binary.pex RUN apt-get update && apt-get install -y -q --no-install-recommends \ python3=3.12.3-0ubuntu2 -RUN PEX_TOOLS=1 PYTHONOPTIMIZE=1 python3 /binary.pex venv --scope=deps --compile /bin/app +RUN PEX_TOOLS=1 python3 /binary.pex venv --scope=deps --compile /bin/app FROM ubuntu:24.04 AS srcs COPY src.python.arcor2_ur.scripts/ur.pex /binary.pex RUN apt-get update && apt-get install -y -q --no-install-recommends \ python3=3.12.3-0ubuntu2 -RUN PEX_TOOLS=1 PYTHONOPTIMIZE=1 python3 /binary.pex venv --scope=srcs --compile /bin/app +RUN PEX_TOOLS=1 python3 /binary.pex venv --scope=srcs --compile /bin/app FROM ubuntu:24.04 @@ -35,24 +35,19 @@ RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o # hadolint ignore=SC2086 RUN 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 - - -RUN apt-get update && apt-get install -y -q --no-install-recommends \ - ros-jazzy-ros-base=0.11.0-1noble.20240916.013254 \ - ros-jazzy-ur=2.4.10-1noble.20240916.021917 \ - ros-jazzy-moveit-py=2.10.0-1noble.20240916.020150 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* -RUN echo "source /opt/ros/jazzy/setup.bash" >> /etc/bash.bashrc +COPY build-support/install_ur_dependencies.sh /root/install_ur_dependencies.sh # libgl1-mesa-glx ?? RUN apt-get update \ + && /root/install_ur_dependencies.sh \ && apt-get install -y -q --no-install-recommends \ libglib2.0-0=2.80.0-6ubuntu3.1 \ libgomp1=14-20240412-0ubuntu1 libusb-1.0-0=2:1.0.27-1 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +RUN echo "source /opt/ros/jazzy/setup.bash" >> /etc/bash.bashrc + COPY src/docker/arcor2_ur/start.sh /root/start.sh RUN chmod +x /root/start.sh ENTRYPOINT ["/root/start.sh"] diff --git a/src/docker/arcor2_ur/start.sh b/src/docker/arcor2_ur/start.sh index b79f82ff..d43d589a 100755 --- a/src/docker/arcor2_ur/start.sh +++ b/src/docker/arcor2_ur/start.sh @@ -12,4 +12,4 @@ sleep 10s # TODO find a way how to detect that the robot is up and running (test ros2 launch ur_robot_driver ur_control.launch.py ur_type:="$UR_TYPE" robot_ip:="$ROBOT_CONTAINER_IP" launch_rviz:=false & -PEX_EXTRA_SYS_PATH=/opt/ros/jazzy/lib/python3.12/site-packages /bin/app/pex +PEX_EXTRA_SYS_PATH=/opt/ros/jazzy/lib/python3.12/site-packages PYTHONOPTIMIZE=1 /bin/app/pex diff --git a/src/docker/arcor2_ur_ot/BUILD b/src/docker/arcor2_ur_ot/BUILD index 445976bd..25e4d993 100644 --- a/src/docker/arcor2_ur_ot/BUILD +++ b/src/docker/arcor2_ur_ot/BUILD @@ -1 +1 @@ -docker_image(name="arcor2_ur_ot", repository="arcor2/arcor2_ur_ot", image_tags=["1.1.0"]) +docker_image(name="arcor2_ur_ot", repository="arcor2/arcor2_ur_ot", image_tags=["1.2.0"]) diff --git a/src/python/arcor2_ur/CHANGELOG.md b/src/python/arcor2_ur/CHANGELOG.md index 91214a47..f9bd1bd8 100644 --- a/src/python/arcor2_ur/CHANGELOG.md +++ b/src/python/arcor2_ur/CHANGELOG.md @@ -2,6 +2,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +## [1.2.0] - 2024-09-27 + +### Changed + +- Update of ROS 2 dependencies. + ## [1.1.0] - 2024-09-23 ### Changed diff --git a/src/python/arcor2_ur/VERSION b/src/python/arcor2_ur/VERSION index 1cc5f657..867e5243 100644 --- a/src/python/arcor2_ur/VERSION +++ b/src/python/arcor2_ur/VERSION @@ -1 +1 @@ -1.1.0 \ No newline at end of file +1.2.0 \ No newline at end of file