From 8a12a8dd998970217569e4e95dcc75751c2f09c1 Mon Sep 17 00:00:00 2001 From: Nikolaus Correll Date: Fri, 20 Nov 2026 18:26:47 -0500 Subject: [PATCH 1/5] docker: fix the Compose project name to golem Compose names a project after the compose file's directory, docker, so it adopted another checkout's stopped containers whose compose file also sits in a docker/ directory and has a ros service, and docker_stack.sh's `up --force-recreate` deleted one of them to create golem_ros. A fixed `name: golem` keeps the stack to its own containers. Co-Authored-By: Claude Opus 5.5 --- docker/docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 4f67102..b832c58 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -11,6 +11,12 @@ # # All three run on the host network, so they share one DDS domain # (ROS_DOMAIN_ID, 1 when unset; 0 is the real robots' bus). +# +# The project name is fixed: Compose would otherwise name the project after +# this directory, docker, and adopt any other checkout's containers whose +# compose file also sits in a docker/ directory and has a ros or robocasa +# service, which `up --force-recreate` (docker_stack.sh) then deletes. +name: golem services: # Isaac Lab simulator of the H1-2 (IsaacDockerfile, launch_isaac.sh). isaac: From c567132dd85818f73fc526f75758617bc6ee1340 Mon Sep 17 00:00:00 2001 From: Nikolaus Correll Date: Fri, 20 Nov 2026 18:26:47 -0500 Subject: [PATCH 2/5] docker/mac: keep the colcon build trees in Docker volumes Every file a container writes to the bind-mounted checkout reaches the macOS host, and on a university-managed Mac its endpoint security scans each one: under Colima on an M4 Pro a write took ~180 ms, against microseconds on the VM's disk, and a cold core_ws build ran over 40 min at 15% CPU without finishing. core_ws's build, install and log and the sim's msgs_ws now live in named volumes on the VM's disk; the sources stay bind-mounted. A cold build and stack start now takes 2.5 min. Co-Authored-By: Claude Opus 5.5 --- docker/docker-compose.mac.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docker/docker-compose.mac.yml b/docker/docker-compose.mac.yml index c383443..3b85d3c 100644 --- a/docker/docker-compose.mac.yml +++ b/docker/docker-compose.mac.yml @@ -8,8 +8,24 @@ # Linux VM's network, so DDS between them works; the macOS host is not on it, # so ros2 and RViz run inside golem_ros. docs/MAC.md has the flow and what the # Mac leaves out (the GPU vision models, Isaac). +# +# The colcon build trees (core_ws's build, install and log, and the sim's +# msgs_ws) live in Docker volumes on the VM's own disk, not in the checkout: +# every file a container writes through the VM's file sharing reaches the +# macOS host, and on a managed Mac whose endpoint security scans each one, a +# write costs ~180 ms (Colima, measured) against microseconds on the VM's +# disk; a cold core_ws build and stack start fell from over 40 min (the build +# alone, unfinished) to 2.5 min. Sources stay +# bind-mounted from the checkout. `docker volume rm golem_core_build` (and the +# others below) gives a clean build. services: robocasa: + volumes: + # Replaces the base file's container_cache/msgs_ws bind (same target); + # the message sources it binds into msgs_ws/src mount on top. + - type: volume + source: golem_msgs_ws + target: /home/code/msgs_ws build: dockerfile: docker/mac/RobocasaDockerfile image: golem_sim_robocasa:arm64 @@ -51,3 +67,25 @@ services: # OrbStack / Docker Desktop VM does not by default (docs/DDS_TUNING.md # raises it on Linux hosts). CYCLONEDDS_URI: "file:///home/code/cyclonedds.xml," + volumes: + # core_ws's colcon trees on the VM's disk (the header); the sources + # under core_ws/src stay the base file's bind of the checkout. + - type: volume + source: golem_core_build + target: /home/code/core_ws/build + - type: volume + source: golem_core_install + target: /home/code/core_ws/install + - type: volume + source: golem_core_log + target: /home/code/core_ws/log +# Fixed names, whatever the Compose project is called. +volumes: + golem_msgs_ws: + name: golem_msgs_ws + golem_core_build: + name: golem_core_build + golem_core_install: + name: golem_core_install + golem_core_log: + name: golem_core_log From e30e42aba9579f3634723e058520d964eafcaaff Mon Sep 17 00:00:00 2001 From: Nikolaus Correll Date: Fri, 20 Nov 2026 18:27:03 -0500 Subject: [PATCH 3/5] docs: the Mac's build volumes MAC.md's image notes and CLAUDE.md's platform summary say the colcon build trees are Docker volumes on the Mac, why (per-file scanning of writes to the shared checkout on managed Macs) and how to clear them for a clean build. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 2 +- docs/MAC.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 084e4ed..0c6f8c4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -97,7 +97,7 @@ launch bringup**. `docker/scripts/docker_common.sh` owns this, and the platform too: on Darwin arm64 (or `GOLEM_PLATFORM=mac`) every wrapper adds `docker-compose.mac.yml` (the arm64 images of `docker/mac/`, no NVIDIA runtime, `GOLEM_RENDER=cpu`, -`GOLEM_LIDAR_POINTS` 6000 for the H1-2 and 10000 for the G1 unless set; RViz on a virtual display, at `http://localhost:6080/vnc.html`), refuses Isaac, and `docker_stack.sh` starts `h12_mac_sim` or +`GOLEM_LIDAR_POINTS` 6000 for the H1-2 and 10000 for the G1 unless set; RViz on a virtual display, at `http://localhost:6080/vnc.html`; the colcon build trees in Docker volumes, not the checkout), refuses Isaac, and `docker_stack.sh` starts `h12_mac_sim` or `g1_mac_sim`; on Linux nothing changes (`docs/MAC.md`). On simulator and stack wrappers, the robot is `--g1`/`--h12` on the wrapper, else `GOLEM_ROBOT` from the shell, else from `docker/.env`, else `h12`. The selection means "which robot is diff --git a/docs/MAC.md b/docs/MAC.md index ad3c11e..f66fdcd 100644 --- a/docs/MAC.md +++ b/docs/MAC.md @@ -105,6 +105,16 @@ happened once, in an earlier run with the VM overloaded. arm64 the SDK's binding would bind to ROS's copy by their shared soname and segfault in its first topic, so the Mac base renames the SDK's copy (`libddsc_unitree.so.0`) and checks the pair at build time. +- The colcon build trees (`core_ws`'s `build`, `install` and `log`, and the + sim's `msgs_ws`) are Docker volumes on the VM's disk, not folders in the + checkout (`docker-compose.mac.yml`). Every file a container writes through + the VM's file sharing reaches the macOS host, and on a university-managed + Mac its endpoint security scans each one: on an M4 Pro under Colima a write + took about 180 ms, and a cold `core_ws` build ran over 40 minutes at 15% CPU + without finishing; with the volumes a cold build and stack start takes 2.5 + minutes. The sources stay bind-mounted, so edits show up as before; for a clean build, + `docker volume rm golem_core_build golem_core_install golem_core_log + golem_msgs_ws` with the containers stopped. - The Mac's GPU is out of reach: a container gets no OpenGL/EGL on macOS, which MuJoCo's renderer and `mid360.GpuCaster` need. - `core_ws/cyclonedds.xml` requires 16 MB UDP receive buffers, which the VM's From 202020bf5abbce19a13aed737132ab651fec1833 Mon Sep 17 00:00:00 2001 From: Nikolaus Correll Date: Fri, 20 Nov 2026 18:27:03 -0500 Subject: [PATCH 4/5] docs: Colima as a Mac Docker runtime GOLEM's Mac stack builds and runs under Colima (vz VM): an M4 Pro held the G1's g1_mac_sim at RTF 1.00. Colima shares only the home folder with its VM, so the checkout must sit under ~, and its default 30 GB disk is too small for the images. Co-Authored-By: Claude Opus 5.5 --- docs/MAC.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/MAC.md b/docs/MAC.md index f66fdcd..4735da8 100644 --- a/docs/MAC.md +++ b/docs/MAC.md @@ -26,10 +26,14 @@ wrappers make the same docker calls as before. ## Setup -- [OrbStack](https://orbstack.dev) or Docker Desktop (4.34 or later, host - networking turned on), Compose 2.24 or later. Both containers share the Linux - VM's network, so DDS works between them; the macOS host is not on it, so run - `ros2` inside `golem_ros`. +- [OrbStack](https://orbstack.dev), Docker Desktop (4.34 or later, host + networking turned on) or [Colima](https://github.com/abiosoft/colima) (the + `vz` VM), Compose 2.24 or later. Both containers share the Linux VM's + network, so DDS works between them; the macOS host is not on it, so run + `ros2` inside `golem_ros`. Colima shares only your home folder with its VM + by default, so keep the checkout under `~`, and give its VM the disk and + cores below (`colima start --cpu 12 --memory 16 --disk 150`; the disk only + grows). - Submodules and LFS as in [Setup](SETUP.md) §1; `docker/.env` as in §2 (`GEMINI_API_KEY` is not needed). - About 70 GB of disk for the images (the RoboCasa image holds about 10 GB of From a84b09a04846fe88ec5fae7d4c35e2c9f12b0f46 Mon Sep 17 00:00:00 2001 From: Nikolaus Correll Date: Fri, 20 Nov 2026 19:19:25 -0500 Subject: [PATCH 5/5] docs: the Mac's real-time factor by sensor, on an M4 Pro The G1 RoboCasa sim alone and with g1_mac_sim, paced at real time, with the lidar and the head camera each on and off and the real MID-360's 20,000 points; and the sim alone unpaced over three runs each. Every combination holds real time with the sim loop idle about half the time. Co-Authored-By: Claude Opus 5.5 --- docs/MAC.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/MAC.md b/docs/MAC.md index 4735da8..d3e3c6b 100644 --- a/docs/MAC.md +++ b/docs/MAC.md @@ -99,6 +99,51 @@ The H1-2's `estop_node` declares the sim's estop stream stale after 0.1 s, so a VM stall longer than that latches `golem_safety`'s estop and the robot falls; it happened once, in an earlier run with the VM overloaded. +### By sensor, on an M4 Pro + +Measured 2026-11-20 on a MacBook Pro M4 Pro (10 performance + 4 efficiency +cores, 48 GB), Colima with 12 CPUs and 16 GB, headless: the G1, the spawn backed +off 2.0 m, the robot standing after the band's release, no Nav2 goals. RTF is +the sim's own log (`golem_sim`, sim against wall time over 30 s of sim time), +the first 30 s dropped and the next four averaged. Lidar is `GOLEM_LIDAR` at +10,000 points unless noted; the camera is `GOLEM_CAMERAS=1`, the head D435 at +640x360 and 6 Hz. The stack is `g1_mac_sim`, RViz included. + +Paced at real time (`GOLEM_SIM_RATE` unset), one run each: + +| | Lidar | Camera | RTF | Sim loop idle | Camera frames dropped | CPUs: sim / `golem_ros` | +|---|---|---|---|---|---|---| +| Sim alone | off | off | 1.00 | 68% | | 0.3 / - | +| Sim alone | off | on | 1.00 | 73% | 0% | 1.0 / - | +| Sim alone | on | off | 1.00 | 71% | | 0.7 / - | +| Sim alone | on | on | 1.00 | 70% | 0% | 1.8 / - | +| Sim and stack | off | off | 1.00 | 58% | | 0.6 / 4.4 | +| Sim and stack | off | on | 1.00 | 52% | 1% | 2.8 / 4.3 | +| Sim and stack | on | off | 1.00 | 47% | | 1.5 / 5.3 | +| Sim and stack | on | on | 1.00 | 50% | 0% | 2.6 / 5.3 | +| Sim and stack | 20,000 points | off | 1.00 | 50% | | 1.6 / 5.6 | + +No fall or estop in any run, and the sim never waited for a lidar cast. + +The sim alone unpaced (`GOLEM_SIM_RATE=max`), three runs each: + +| Lidar | Camera | RTF | Lidar casts the sim waited for | Camera frames dropped | +|---|---|---|---|---| +| off | off | 4.0-5.9 | | | +| off | on | 4.3-5.3 | | 50% | +| on | off | 4.0-4.6 | 0-71% | | +| on | on | 3.5-4.4 | 0-70% | 50% | +| 20,000 points | off | 2.4-3.2 | 3-99% | | + +The physics alone runs on one core at 4-6 times real time. The lidar's 10,000 +points cost it 10-20%, the real sensor's 20,000 about 40%, and then the cast is +what the sim waits for. The camera takes one to two cores but renders on its own +thread, so it hardly slows the physics: it renders about 16 frames a wall +second, dropping half the frames due when unpaced and at most 1% at real time. +Each run held steady within itself, but the same setup differed by up to 40% +between runs, presumably the VM's physics thread landing on performance or +efficiency cores (not checked). + ## Image notes - The Mac base starts from a dated Ubuntu image older than the apt snapshot