Repository navigation
Show RViz on the Mac through a virtual display and noVNC - #34
Merged
Merged
Conversation
A Mac has no X server a container can render OpenGL through (XQuartz gives none on Apple Silicon), so the Mac golem_ros image starts Xvfb with Mesa's software OpenGL at container start (docker/mac/vnc_display.sh, its entrypoint), shown over x11vnc on port 5901 and noVNC on port 6080: http://localhost:6080/vnc.html. docker-compose.mac.yml sets DISPLAY=:99 for the ros service; GOLEM_VNC=0 starts no display. h12_mac_sim and g1_mac_sim default use_rviz to true, and docker_stack.sh starts RViz on the Mac by default. The x86 images and path are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EG7pDNJLWR31eQmyKaWhr
Mesa's software OpenGL on every core took about 1.5 cores for RViz and the H1-2 stack fell to 0.78-0.83x; on one thread (LP_NUM_THREADS=1, the Mac overlay's default) it holds 0.98-1.00x, both Nav2 goals reached. The virtual display defaults to 1280x800 (GOLEM_VNC_SIZE). The Mac bringup tests compare against the sim bringups with RViz on, which the Mac bringups now start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EG7pDNJLWR31eQmyKaWhr
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.
Show RViz on the Mac
The Mac bringups (
h12_mac_sim,g1_mac_sim) ran without RViz. A Mac has no X server that a container can draw OpenGL through: XQuartz gives no OpenGL on Apple Silicon. This PR adds a virtual display to the Macgolem_rosimage and turns RViz on by default.How it works
docker/mac/vnc_display.shis the Macgolem_rosimage's entrypoint. When the container starts, it starts Xvfb on:99with Mesa's software OpenGL, x11vnc on port 5901, and noVNC on port 6080, then runs the container's command.docker-compose.mac.ymlsetsDISPLAY=:99, so RViz from the bringup or from anydocker execshell draws there.vnc://localhost:5901in Screen Sharing. OrbStack and Docker Desktop forward the VM's host-network ports to the Mac.h12_mac_simandg1_mac_simdefaultuse_rvizto true, anddocker_stack.shturns RViz on by default on the Mac.GOLEM_VNC=0starts no display.GOLEM_VNC_SIZEsets the screen size (default1280x800).LP_NUM_THREADS(default 1) is the number of software-rendering threads.Measured (H1-2 Mac stack, MacBook Air M3, kitchen 9/9/42)
/lowstategapIn both runs RViz reported OpenGL 4.5, noVNC answered from the Mac (HTTP 200), and there were no faults or estop latches.
x86
Unchanged. Only the Mac
rosimage, the Mac compose overlay, the Mac bringups, and the Mac branch ofdocker_stack.shchange.Testing
golem_bringuptests: 90 pass.test_flake8still fails on the two long lines ing1_simandg1_real_robotthat are already onmain.tests/docker/test_workflows.pyandtests/docker/test_source_pins.pypass.🤖 Generated with Claude Code
https://claude.ai/code/session_015EG7pDNJLWR31eQmyKaWhr