Skip to content
Merged
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
9 changes: 5 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
DISPLAY=:1
HOST_DATA_PATH=/home/bmaacaron-iit.local/Documents/Datasets/2026_PRIMI/

# These versions mirror the upstream event-driven Dockerfile as a starting point.
YCM_VERSION=v0.15.2
YARP_VERSION=v3.8.0
ED_VERSION=master
# These defaults track the latest upstream refs validated in this repo.
YCM_VERSION=v0.18.4
YARP_VERSION=v3.12.2
ED_VERSION=main
ED_COMMIT=bf0a4d71c1013d2bbdf911d0ba88678ce3909ae8
9 changes: 5 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ HOST_DATA_PATH=./data
# Default base image avoids anonymous Docker Hub pull-rate limits.
BASE_IMAGE=public.ecr.aws/ubuntu/ubuntu:22.04

# These versions mirror the upstream event-driven Dockerfile as a starting point.
YCM_VERSION=v0.15.2
YARP_VERSION=v3.8.0
ED_VERSION=master
# These defaults track the latest upstream refs validated in this repo.
YCM_VERSION=v0.18.4
YARP_VERSION=v3.12.2
ED_VERSION=main
ED_COMMIT=bf0a4d71c1013d2bbdf911d0ba88678ce3909ae8
7 changes: 7 additions & 0 deletions DEVELOPER_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ The most important values are:
- `YCM_VERSION`
- `YARP_VERSION`
- `ED_VERSION`
- `ED_COMMIT`

### `BASE_IMAGE`

Expand All @@ -100,6 +101,12 @@ and [compose.yaml](compose.yaml) passes that through as a build arg.

This keeps Ubuntu 22.04 compatibility while avoiding anonymous Docker Hub pull-rate limits by default.

### `ED_VERSION` And `ED_COMMIT`

`event-driven` now tracks the upstream `main` branch name through `ED_VERSION`, and the Dockerfile verifies that checkout against `ED_COMMIT`.

Update both together when you intentionally refresh to a newer upstream snapshot.

### `vFramer` Defaults

There are intentionally two configuration points now, because there are still two real launch engines:
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ ENV DEBIAN_FRONTEND=noninteractive

ARG CODE_DIR=/usr/local/src
ARG BASE_IMAGE
ARG YCM_VERSION=v0.15.2
ARG YARP_VERSION=v3.8.0
ARG ED_VERSION=master
ARG YCM_VERSION=v0.18.4
ARG YARP_VERSION=v3.12.2
ARG ED_VERSION=main
ARG ED_COMMIT=bf0a4d71c1013d2bbdf911d0ba88678ce3909ae8

RUN apt-get update && apt-get install -y \
ca-certificates \
Expand Down Expand Up @@ -56,7 +57,7 @@ RUN echo "deb [arch=amd64 trusted=yes] https://apt.prophesee.ai/dists/public/bai
&& apt-get install -y metavision-sdk \
&& rm -rf /var/lib/apt/lists/*

RUN git clone --depth 1 --branch "${YCM_VERSION}" https://github.com/robotology/ycm.git "${CODE_DIR}/ycm" \
RUN git clone --depth 1 --branch "${YCM_VERSION}" https://github.com/robotology/ycm-cmake-modules.git "${CODE_DIR}/ycm" \
&& cmake -S "${CODE_DIR}/ycm" -B "${CODE_DIR}/ycm/build" \
&& cmake --build "${CODE_DIR}/ycm/build" -j"$(nproc)" \
&& cmake --install "${CODE_DIR}/ycm/build"
Expand All @@ -68,6 +69,7 @@ RUN git clone --depth 1 --branch "${YARP_VERSION}" https://github.com/robotology
&& yarp check

RUN git clone --depth 1 --branch "${ED_VERSION}" https://github.com/robotology/event-driven.git "${CODE_DIR}/event-driven" \
&& test "$(git -C "${CODE_DIR}/event-driven" rev-parse HEAD)" = "${ED_COMMIT}" \
&& cmake -S "${CODE_DIR}/event-driven" -B "${CODE_DIR}/event-driven/build" \
&& cmake --build "${CODE_DIR}/event-driven/build" -j"$(nproc)" \
&& cmake --install "${CODE_DIR}/event-driven/build"
Expand Down
1 change: 1 addition & 0 deletions REPOSITORY_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ These are the main scripts people are expected to run from the host machine.
| [scripts/start-workstation.sh](scripts/start-workstation.sh) | Starts the container if needed, ensures `yarpserver` is up, and exits once the workstation is ready. |
| [scripts/start-yarpserver.sh](scripts/start-yarpserver.sh) | Ensures `yarpserver` is running inside the already-started container. It is safe to call repeatedly. |
| [scripts/status.sh](scripts/status.sh) | Shows the Compose service status and reports whether the YARP name server is currently detectable inside the container. |
| [scripts/show-versions.sh](scripts/show-versions.sh) | Prints the configured build refs and, when the container is running, the installed `YARP` and `event-driven` versions from inside the image. |
| [scripts/stop-workstation.sh](scripts/stop-workstation.sh) | Stops and removes the Compose-managed container with `docker compose down`. |
| [scripts/shell.sh](scripts/shell.sh) | Opens an interactive shell inside the running container as the `robotology` user. |
| [scripts/list-data.sh](scripts/list-data.sh) | Prints the mounted container data path and lists the contents of `/workspace/data`. Useful for checking that the host dataset mount is correct. |
Expand Down
19 changes: 19 additions & 0 deletions USER_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ cd ~/Documents/Dockers/PRIMI_IIT_Docker
./scripts/build.sh
```

Check the configured build refs and the currently installed container versions:

```bash
./scripts/show-versions.sh
```

If your repository owner has already published a GHCR image for this project, they may give you a pull-first path instead of a local build. This guide keeps the local build as the default operator workflow.

Pull-first alternative:
Expand Down Expand Up @@ -241,6 +247,19 @@ yarp detect
yarp name list
```

From the host, the quickest combined version check is:

```bash
./scripts/show-versions.sh
```

If you change `YCM_VERSION`, `YARP_VERSION`, `ED_VERSION`, or `ED_COMMIT`, rebuild the image before expecting the installed versions to change:

```bash
./scripts/build.sh
./scripts/start-workstation.sh
```

## Important Behavior

- BallBalance demos use `yarpdataplayer` replay outputs under `/yarpdataplayer/...`
Expand Down
7 changes: 4 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ services:
dockerfile: Dockerfile
args:
BASE_IMAGE: ${BASE_IMAGE:-public.ecr.aws/ubuntu/ubuntu:22.04}
YCM_VERSION: ${YCM_VERSION:-v0.15.2}
YARP_VERSION: ${YARP_VERSION:-v3.8.0}
ED_VERSION: ${ED_VERSION:-master}
YCM_VERSION: ${YCM_VERSION:-v0.18.4}
YARP_VERSION: ${YARP_VERSION:-v3.12.2}
ED_VERSION: ${ED_VERSION:-main}
ED_COMMIT: ${ED_COMMIT:-bf0a4d71c1013d2bbdf911d0ba88678ce3909ae8}
container_name: robotology-dev
command: ["bash", "-lc", "sleep infinity"]
privileged: true
Expand Down
2 changes: 1 addition & 1 deletion scripts/internal/launch-vframer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ fi

VFRAMER_SRC="${VFRAMER_SRC:-/zynqGrabber/left/AE:o}"

exec vFramer --src "$VFRAMER_SRC" "$@"
exec vFramer --src "$VFRAMER_SRC" "$@" --height 480 --width 640
43 changes: 43 additions & 0 deletions scripts/show-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
set -euo pipefail

SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/common.sh"

require_docker

config_output="$(compose_cmd config)"

extract_build_arg() {
local key="$1"
awk -v key="$key" '$1 == key ":" { print $2; exit }' <<<"$config_output"
}

echo "Configured build refs:"
echo " YCM: $(extract_build_arg YCM_VERSION)"
echo " YARP: $(extract_build_arg YARP_VERSION)"
echo " event-driven ref: $(extract_build_arg ED_VERSION)"
echo " event-driven commit: $(extract_build_arg ED_COMMIT)"
echo
echo "Installed versions:"

if ! compose_cmd ps --status running --services | grep -qx "$COMPOSE_SERVICE"; then
echo " container is not running"
echo " start it with ./scripts/start-workstation.sh to inspect the built image"
exit 0
fi

compose_exec bash -lc '
set -euo pipefail

yarp_version="$(yarp version 2>/dev/null | sed -n "s/^YARP version //p")"
ed_package_version="$(sed -n "s/^set(PACKAGE_VERSION \"\\(.*\\)\")/\\1/p" /usr/local/lib/cmake/event-driven/event-driven-config-version.cmake 2>/dev/null || true)"
ed_source_ref="$(git -c safe.directory=/usr/local/src/event-driven -C /usr/local/src/event-driven log -1 --format="%H %cs %s" 2>/dev/null || true)"

echo " YARP: ${yarp_version:-unknown}"
echo " event-driven package: ${ed_package_version:-unknown}"

if [[ -n "${ed_source_ref:-}" ]]; then
echo " event-driven source: ${ed_source_ref}"
fi
'
Loading