POSIM v1.0.1Platform for Ocean Simulation · Documentation
Documentation menu
POSIM / Getting started

Windows: WSL installation

Install POSIM directly in Ubuntu 26.04 running under Windows Subsystem for Linux 2 (WSL2). WSLg displays Gazebo windows on your Windows desktop. To use a prepared image instead, choose Windows: WSL + Docker.

1. Install WSL and Ubuntu

Open PowerShell as Administrator and run:

wsl --install -d Ubuntu-26.04

Restart Windows if requested. Open Ubuntu and create your Linux username and password. In PowerShell, check that the Ubuntu distribution uses version 2:

wsl --list --verbose

See Microsoft's WSL installation guide for an existing WSL installation or a failed setup.

2. Prepare the graphics driver and WSLg

Install or update the Windows graphics driver for your Intel, AMD or NVIDIA GPU. NVIDIA users need this step too. WSLg uses the Windows driver to display accelerated Linux graphics; follow Microsoft's GUI application setup.

For NVIDIA, follow CUDA on WSL: install the Windows driver, not a Linux display driver inside WSL. The CUDA toolkit is needed only when building the CUDA sonar backend.

Update WSL from PowerShell:

wsl --update

Save work in any running WSL terminals before applying a requested restart. Reopen Ubuntu after the update.

3. Install POSIM in the Ubuntu terminal

Use the Ubuntu profile in Windows Terminal for Linux commands. Check the distribution:

cat /etc/os-release

Follow Ubuntu: native installation from downloading the source through dependency installation and building. Store the workspace at ~/posim_ws in the Linux home directory. The installer uses sudo and updates packages inside Ubuntu.

If image topics are visible but frames stall, use large-image transport troubleshooting. For subsequent experiments, Prepare your terminals explains the two Ubuntu terminal windows.

4. Run the demo world

Run this in the Ubuntu terminal. A Gazebo window should appear on the Windows desktop and display the ocean scene. First use may download Fuel models. Stop the simulation with Ctrl+C before starting another example.

source /opt/ros/lyrical/setup.bash
source "$HOME/.ros_ardusub_env/env"
source ~/posim_ws/install/setup.bash
ros2 launch posim_demos posim_world.launch.py \
  world_name:=posim_ocean_waves headless:=false

Run the Linux version of QGC in the same Ubuntu distribution as POSIM. Do not open the Windows-installed application for this setup. Follow QGC setup.