Repository navigation
Add Mac (Apple Silicon) compatibility: both RoboCasa sims and stacks at real time - #33
Merged
Merged
Conversation
Run either robot's RoboCasa sim and stack natively on arm64, without an NVIDIA GPU: the command path, the legs and walking on /cmd_vel. No lidar, navigation, model servers or Isaac on the Mac. - docker/mac/: arm64 Base, Ros and Robocasa Dockerfiles (Ubuntu 22.04, CPU torch, no GPU vision stack), arm64 locks derived from the amd64 ones (derive_arm64_locks.sh), and a build-time check that the Unitree SDK's DDS and a ROS node share a domain in one process (the SDK's libddsc copy is renamed: on arm64 the shared soname made the binding segfault). - docker-compose.mac.yml: arm64 images, no NVIDIA runtime, CPU rendering, no lidar, and a CycloneDDS URI without the 16 MB buffer minimum the VM refuses. configure_platform adds it on Darwin arm64 (GOLEM_PLATFORM); Isaac is refused there; docker_stack.sh starts the mac bringups. - golem_robocasa: opt-in GOLEM_RENDER=cpu (OSMesa, requires GOLEM_LIDAR=0) past the GPU check; the H1-2 honours GOLEM_LIDAR=0 as the G1 does. Defaults are unchanged. - golem_bringup: h12_sim gains use_nav and use_vision (default true); h12_mac_sim and g1_mac_sim include the sim bringups without nav, vision or skills. - docs/MAC.md: setup, running, and speeds measured on an M3. On Linux the wrappers make the same docker calls as before; the x86 Dockerfiles, compose file and amd64 locks are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GOLEM_RENDER=cpu (the Mac images) now casts the lidar's rays exactly on the CPU with mid360.CpuCaster (mj_multiRay, restored from before fb3c033) instead of refusing the lidar; mid360.make_caster picks the caster by GOLEM_RENDER, and gpu, the default, still builds GpuCaster. The Mac keeps the lidar off by default (GOLEM_LIDAR=0); GOLEM_LIDAR=1 turns it on in the sim, and h12_mac_sim and g1_mac_sim default use_nav to it, so FAST-LIO, SLAM and Nav2 run exactly when the sim has a lidar. Tests: test_mid360_cpu.py (CpuCaster against mj_ray, ray for ray; make_caster), the cpu render mode with the lidar on, and the mac bringups' navigation with and without GOLEM_LIDAR. docs/MAC.md records both robots reaching Nav2 goals on an M3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mits mid360.threads_from_env reads GOLEM_LIDAR_THREADS, the CpuCaster's thread count (default unchanged: a quarter of the CPUs, at most 4), and make_caster takes it; the Mac overlay passes it through. Measured on an M3: more threads speed the G1 sim alone (1.48x at 2 to 2.10x at 6) but not the navigation stack, which stays at 0.80-0.89x because the VM is CPU-bound (ros about 3.75 cores, the sim about 2.4). docs/MAC.md records this, and that the Mac's GPU reaches a Podman libkrun container only as Vulkan, not the OpenGL/EGL MuJoCo needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ks at 1x on the Mac The H1-2 sim's MID-360 takes its points per frame from GOLEM_LIDAR_POINTS (mid360.points_from_env; empty is the real 20,000), as the G1's does. Only docker-compose.mac.yml passes it to the H1-2, so x86 runs are unchanged. Measured on the M3 (navigation stack, kitchen 9/9/42, no recording): the H1-2 holds 1.00x at 6,000 points (0.55x at 20,000, 0.88-0.95x at 10,000), the G1 1.00x at 10,000 with use_hands:=false; every Nav2 goal succeeded, no faults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EG7pDNJLWR31eQmyKaWhr
…c default Navigation is always on on the Mac, at the most lidar points each robot holds real time with on an 8-core M3: configure_robot exports GOLEM_LIDAR_POINTS 6000 (H1-2) or 10000 (G1) unless set, and g1_mac_sim leaves the Dex3-1 hand driver out by default (use_hands:=true adds it). Removed as not needed for that: GOLEM_LIDAR_THREADS (more threads did not speed the stack), the H1-2's GOLEM_LIDAR=0 knob and h12_sim's use_nav, the Mac's GOLEM_LIDAR default and use_nav-from-GOLEM_LIDAR in the Mac bringups, the wrappers' platform line, and check_unitree_dds.py (the same check now runs inline in docker/mac/BaseDockerfile). docs/MAC.md keeps the setup, the run flow and the measurements. Measured on the defaults, nothing set in the shell: both navigation stacks at 1.00x, every goal ahead reached, no faults or estop latches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EG7pDNJLWR31eQmyKaWhr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EG7pDNJLWR31eQmyKaWhr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EG7pDNJLWR31eQmyKaWhr
maxconwa
commented
Nov 19, 2026
maxconwa
left a comment
Contributor
Author
There was a problem hiding this comment.
Big changes shouldn't impact x86 and nvidia usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run both RoboCasa sims and their stacks on an Apple Silicon Mac at real time
Adds a second, reduced platform: an Apple Silicon Mac runs the H1-2 or G1 RoboCasa sim and the robot's stack (safety, arms, legs, SLAM and Nav2) at 1.00x real time, in Docker. The Mac has no model servers, no skills and no Isaac. The x86 / NVIDIA path is unchanged (see Testing). Full write-up:
docs/MAC.md.What changes
docker/mac/{Base,Ros,Robocasa}Dockerfileare native arm64 twins of the x86 images, onubuntu:jammy(pinned by digest) with no CUDA.golem_ros.docker/locks/*-arm64*.txt), generated from the amd64 locks bydocker/mac/derive_arm64_locks.sh.libddsc.so.0copies collide, and the first Unitree topic segfaults. The Mac base renames the SDK's copy (libddsc_unitree.so.0) and points the binding at it, and the image build fails if the pair can't share a process.docker/docker-compose.mac.ymloverlays the base compose file: arm64 images, no NVIDIA runtime,GOLEM_RENDER=cpu, cameras off, and a CycloneDDS override of the 16 MB receive-buffer minimum, which the VM refuses.docker_common.shconfigure_platformadds the overlay on Darwin arm64 (orGOLEM_PLATFORM=mac) and refuses Isaac.configure_robotexports the Mac's lidar density per robot.docker_stack.shstarts the Mac bringups.GOLEM_RENDER=cpulets the sims start without an NVIDIA GPU: OSMesa for the cameras, andmid360.CpuCastercasts the MID-360's rays exactly withmj_multiRay, on threads.mid360.make_casterpicks the GPU or CPU caster. The default staysgpu, with the same GPU check and the sameGpuCaster.GOLEM_LIDAR_POINTS, as the G1's already does. Only the Mac overlay passes it, so the x86 H1-2 stays at the real 20,000 points per frame.h12_mac_simish12_simwithuse_vision:=false(a new argument, default true) and no skills.g1_mac_simisg1_simwith no skills and the Dex3-1 hand driver off by default./lowerbody/confirm_engagecall.Mac defaults and measured speed
Measured on a MacBook Air M3 (8 cores, 16 GB) under OrbStack: the navigation stack in kitchen layout 9 / style 9 / seed 42, with a Nav2 goal 1.5 m ahead and one back to the start.
/lowstategapNo faults or estop latches in these runs.
The VM is CPU-bound.
golem_rostakes about 4 cores, and the CPU lidar is what sets the speed. The H1-2 needs fewer points than the G1 because its rays also hit the collision geoms.These things didn't help:
Testing
main.ros, Isaac, build) are identical tomain's: 33 calls, and the same stderr.h12_simstarts the same node graph as onmainfor its defaults, for skills + RViz on (30 nodes), and for both off (27).tests/robocasa/test_mid360_cpu.py: the CPU caster matchesmj_rayray for ray, and the threads and points settings work.test_gpu_required.py: the default still refuses to start without a GPU, andcpuneeds OSMesa.golem_bringuptests: the Mac bringups run on sim time, have no vision nodes, and the G1's hand driver is off. 90 pass. The 2 flake8 long lines ing1_simandg1_real_robotwere already onmain.tests/docker/test_source_pins.py: the Mac Dockerfiles use only arm64 locks and the same commits as x86, and the arm64 locks match whatderive_arm64_locks.shgenerates.tests/sim/test_sim_stack.sh --h12/--g1andtests/g1.tests/robocasa/surface/run.sh h12|g1).tests/docker/test_workflows.pytests that call/usr/bin/docker.Caveats
🤖 Generated with Claude Code
https://claude.ai/code/session_015EG7pDNJLWR31eQmyKaWhr