Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docker/docker_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SCRIPTPATH=$(dirname "$SCRIPT")
NO_GUI=false
NVIDIA=false
TMUX_LAYOUT=false
WAYLAND=false

while [[ $# -gt 0 ]]; do
case $1 in
Expand All @@ -20,9 +21,13 @@ while [[ $# -gt 0 ]]; do
TMUX_LAYOUT=true
shift
;;
--wayland)
WAYLAND=true
shift
;;
*)
echo "Unknown argument: $1"
echo "Usage: $0 [--no-gui] [--nvidia] [--tmux]"
echo "Usage: $0 [--no-gui] [--nvidia] [--tmux] [--wayland]"
exit 1
;;
esac
Expand All @@ -49,6 +54,12 @@ if [ "$NO_GUI" = false ]; then
DOCKER_CMD="$DOCKER_CMD -v /tmp/.X11-unix:/tmp/.X11-unix:ro"
DOCKER_CMD="$DOCKER_CMD -e DISPLAY=$DISPLAY"

# WAYLAND support through X11 Compatibility Layer
# We need it so QT can talk to the display for Gazebo
if [ $WAYLAND = true ]; then
DOCKER_CMD="$DOCKER_CMD -e QT_QPA_PLATFORM=xcb"
fi

# Always forward /dev/dri so Mesa has a working DRM path. The nvidia
# runtime by itself only provides NVIDIA's GL stack; it does not expose
# the integrated GPU. Without /dev/dri the iris/i915 Mesa driver fails
Expand Down
1 change: 1 addition & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ You can use also use these options:
This option also forwards port `18570` to allow external (Host) QGC connection.
- `--nvidia` to run the container with the `nvidia` runtime (it requires the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) installed and registered with Docker on the host; see `nvidia-ctk runtime configure --runtime=docker` followed by `sudo systemctl restart docker`).
- `--tmux` to drop straight into the preconfigured workshop `tmux` layout (see [Option C](simulation.md#option-c--the-preconfigured-workshop-layout-workshop-tmux)) instead of a plain shell. Detaching the session (`Ctrl+b d`) leaves you in a normal shell with the simulation still running; reattach with `workshop-tmux`.
- `--wayland` to use Wayland's X11 Compatibility layer so Gazebo can run on machines using Wayland as Window Manager, make sure to run `xhost +local:docker` on your host terminal first.

When using this method you can attach new shell to your container by running

Expand Down