Skip to content

[T-095] Gazebo worker image (docker/gazebo/Dockerfile): pinned Jazzy/Harmonic/Nav2, ros_ws build, worker venv, compose gazebo profile #200

Open

Description

@CodewithJha

Task T-095 · Milestone M9 — Gazebo backend · Size M · Priority P0 · Epic #9

Implements FR-SIM-003 · NFR-DEP-001 · NFR-REP-001

Branch ci/t-095-gazebo-worker-image-pinned-jazzy — one task = one branch = one PR (doc 32 §6)

Summary

Production image per doc 17 §5 / ADR-0013: Ubuntu 24.04 + ROS 2 Jazzy + Gazebo Harmonic + Nav2 1.3.x + TB4 sim pinned by apt version, built ros_ws, separate Python venv for the RoboProbe worker, non-root user, Cyclone DDS config, EGL/Mesa fallback; compose worker-gazebo service in the gazebo profile with restart: unless-stopped.

Context / motivation

Versions are recorded in every manifest (doc 10 §2); image is large so caching matters.

Scope

In scope

  • ros_versions.json generated at build and read by ManifestBuilder.
  • CI build job (no push) with layer cache.

Implementation guidance

  • docker/gazebo/Dockerfile multi-stage: base ros:jazzy-ros-base-noble pinned by digest; ros-jazzy-ros-gz for the official Harmonic pairing; apt-get install --no-install-recommends with versions from docker/gazebo/apt-pins.txt (from T-090 evidence); Mesa/EGL libraries for headless rendering.
  • Build stage: colcon build --packages-select roboprobe_ros --merge-install; the runtime stage copies install/.
  • Worker venv /opt/roboprobe/venv created with uv from backend/uv.lock (--extra worker), isolated from ROS's system Python; the entrypoint sources the ROS setup and execs roboprobe worker --backend gazebo_nav2.
  • ros_versions.json written at build time (dpkg-query for key packages, Gazebo and Nav2 versions) and read by ManifestBuilder (T-043) for every manifest (doc 10 §2).
  • Cyclone DDS config docker/gazebo/cyclonedds.xml (loopback only); non-root roboprobe user; HEALTHCHECK runs roboprobe worker --healthcheck.
  • Compose worker-gazebo (profile gazebo): restart: unless-stopped, shm_size from .env (ROBOPROBE_GZ_SHM_SIZE, new), artefact volume, no privileged mode, no Docker socket (TM-07).
  • Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff PLR2004); public APIs typed (mypy strict) and documented.

Configuration keys

From the configuration reference (doc 27). Keys marked (new) must be added to the typed settings models and appear in the generated reference (T-003c).

  • backends.gazebo_nav2.image
  • backends.gazebo_nav2.rmw
  • backends.gazebo_nav2.max_parallel_per_host
  • backends.gazebo_nav2.headless_rendering
  • backends.gazebo_nav2.software_rendering
  • ROBOPROBE_GZ_SHM_SIZE (new, .env)

Acceptance criteria

  • Image builds in CI; roboprobe worker --backend gazebo_nav2 starts and registers.
  • Versions file matches pins.
  • Image size and build time recorded in the PR description.
  • ros_versions.json present and parsed by a manifest test.
  • No privileged flags or socket mounts (policy check).
  • Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
  • Docs, config reference and CHANGELOG Unreleased updated where behaviour, keys or interfaces changed.
  • Definition of Done (doc 32 §3) satisfied.

Tests required

  • CI build + container smoke (ros2 pkg list | grep roboprobe_ros).

Dependencies

Blocked by: #199 (T-094d), #27 (T-005b)

Blocks: #202 (T-096b), #216 (T-129), #219 (T-127)

Parallelization notes

Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:

  • docker/gazebo/**
  • docker/compose.yaml (worker-gazebo block)

Infra-only.

Definition of Done

Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-095 (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.

References

Design docs: doc 17 §5 · doc 10 §2 · ADR-0013 · doc 20 §4

Requirements: FR-SIM-003 · NFR-DEP-001 · NFR-REP-001 (traceability: doc 28)

External:

Activity

  1. added
    type:infraCI, build, deployment infrastructure
    area:simulatorSimulator backends (kinematic2d, Gazebo adapter)
    area:rosROS 2 nodes and packages
    area:deployDocker images, compose, release packaging
    priority:P0Critical path / blocks others
    taskChild task of a milestone epic
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:deployDocker images, compose, release packagingarea:rosROS 2 nodes and packagesarea:simulatorSimulator backends (kinematic2d, Gazebo adapter)milestone:M9M9 — Gazebo backendpriority:P0Critical path / blocks otherssize:M1-3 daystaskChild task of a milestone epictype:infraCI, build, deployment infrastructure

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions