Skip to content

Commit

Permalink
feat(arcor2_ur): updated ROS packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ZdenekM authored and ZdenekM committed Sep 27, 2024
1 parent 03eb8dc commit 672e9b4
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 22 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions build-support/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shell_source(name="install_ur_dependencies.sh", source="install_ur_dependencies.sh")
6 changes: 6 additions & 0 deletions build-support/install_ur_dependencies.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions compose-files/ur-demo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/docker/arcor2_ur/BUILD
Original file line number Diff line number Diff line change
@@ -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"])
17 changes: 6 additions & 11 deletions src/docker/arcor2_ur/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion src/docker/arcor2_ur/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/docker/arcor2_ur_ot/BUILD
Original file line number Diff line number Diff line change
@@ -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"])
6 changes: 6 additions & 0 deletions src/python/arcor2_ur/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/python/arcor2_ur/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.0

0 comments on commit 672e9b4

Please sign in to comment.