Skip to content

Windows dev container GUI support + missing rover_urdf view.rviz#170

Open
jaydizz0 wants to merge 2 commits into
CPRT:mainfrom
jaydizz0:windows-gui-devcontainer
Open

Windows dev container GUI support + missing rover_urdf view.rviz#170
jaydizz0 wants to merge 2 commits into
CPRT:mainfrom
jaydizz0:windows-gui-devcontainer

Conversation

@jaydizz0

Copy link
Copy Markdown

Tested the dev container setup on Windows per Connor's request in discord. The
linux-lite-gui display args don't port over directly — Windows needs a
different mount path.

Why the Linux args don't work on Windows

/tmp/.X11-unix is a WSLg tmpfs inside the user's WSL distro. The Docker
daemon runs in the separate docker-desktop distro and resolves mount
sources against its own filesystem, where that path doesn't exist. Docker's
response to a missing mount source is to silently create an empty directory
and mount that — so the container gets /tmp/.X11-unix with no X0 socket
and no error anywhere.

Verified side by side:

docker run --rm -v /tmp/.X11-unix:/tmp/.X11-unix <img> ls /tmp/.X11-unix
  -> empty

docker run --rm -v /run/desktop/mnt/host/wslg/.X11-unix:/tmp/.X11-unix <img> ls /tmp/.X11-unix
  -> X0

/run/desktop/mnt/host/wslg is where Docker Desktop exposes the host's WSLg
socket inside its VM — reachable by the daemon.

Also ${localEnv:DISPLAY} resolves to 1 (not :0) from a Dev Containers
window, so it's hardcoded to :0. WSLg always serves :0.

.devcontainer/windows-gui/devcontainer.json is a copy of the existing
windows config plus those two runArgs. Device mounts are deliberately
omitted since those host paths don't exist on Windows.

Second commit: missing view.rviz

Unrelated, happy to split into its own PR if preferred.

rover_urdf/launch/launch.py defaults rviz_config_file to
share/rover_urdf/rviz/view.rviz, but that file has never existed in the
repo. setup.py globs rviz/*, which returns an empty list and silently
installs nothing — so RViz gets a path to a nonexistent file and falls back
to its built-in defaults (Fixed Frame map, which nothing publishes without
Nav2, and no RobotModel display). use_rviz:=True has always opened to a
blank grid with a frame error.

Adds the config with Fixed Frame base_link and RobotModel on
/robot_description. setup.py already had the install rule.

Testing

Windows 11 + WSL2 + Docker Desktop, RTX 5060. RViz reports
OpenGl version: 4.5 (GLSL 4.5) and renders the rover URDF at ~31fps with
joint_state_publisher_gui driving the arm. No external X server (no VcXsrv).

Opened from a fork — I don't have push access to CPRT/rover.

jaydizz0 and others added 2 commits July 14, 2026 23:13
The existing windows config has no display flags, so GUI tools like RViz
cannot run from it. The linux-lite-gui args do not port over directly:
/tmp/.X11-unix is a WSLg tmpfs inside the user's WSL distro, but the Docker
daemon runs in the separate docker-desktop distro and resolves mount sources
against its own filesystem. The path is absent there, so Docker silently
creates an empty directory and mounts that, leaving the container with no
X0 socket and no error to diagnose.

Docker Desktop exposes the host's WSLg socket inside its VM at
/run/desktop/mnt/host/wslg, which the daemon can reach:

  -v /tmp/.X11-unix:/tmp/.X11-unix                       -> empty
  -v /run/desktop/mnt/host/wslg/.X11-unix:/tmp/.X11-unix -> X0

DISPLAY is hardcoded to :0 rather than ${localEnv:DISPLAY}, which resolves
to "1" from a Dev Containers window. WSLg always serves :0.

Verified on Windows 11 + WSL2: RViz reports OpenGl version 4.5 and renders
the rover URDF at ~31fps with no external X server.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
launch.py defaults rviz_config_file to share/rover_urdf/rviz/view.rviz, but
that file has never existed in the repo. setup.py globs rviz/*, which returns
an empty list and silently installs nothing, so RViz is handed a path to a
file that is not there and falls back to its built-in defaults: Fixed Frame
"map" (which nothing publishes without Nav2 running) and no RobotModel
display. use_rviz:=True has therefore always opened to a blank grid with a
frame error, requiring manual setup every launch.

Adds the config with Fixed Frame base_link and a RobotModel display
subscribed to /robot_description. setup.py already had the install rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a moveit.rviz in the arm_control package, could you update the urdf launch file to point at that config instead of adding a new one?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this was copied from an old version of the windows config, we now use ROS jazzy and the user is ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants