Skip to content

Instantly share code, notes, and snippets.

@Shawn-Armstrong
Last active October 8, 2023 17:03
Show Gist options
  • Save Shawn-Armstrong/65da7cbaddcfbda8489b843f0697d1a8 to your computer and use it in GitHub Desktop.
Save Shawn-Armstrong/65da7cbaddcfbda8489b843f0697d1a8 to your computer and use it in GitHub Desktop.
docker_ur_container.md

docker_ur_container.md

Overview

  • The following document provides instructions for using Docker to start a UR3e container inside Windows Subsystem for Linux 2 (WSL2).

Requirements

  • Docker Desktop
  • WSL2
  • Google Chrome

Details

Instructions

  1. Ensure that the following option is enabled in your Docker settings:

    image1

  2. Create a Docker network and a UR3e container by opening a WSL2 terminal and running the following commands:

    docker network create --subnet=192.168.56.0/24 ursim_net
    docker run -it -e ROBOT_MODEL=UR3e --net ursim_net --ip 192.168.56.101 -p 30002:30002 -p 30004:30004 -p 6080:6080 --name ur3e_container universalrobots/ursim_e-series
  3. Access the VNC by starting Google Chrome inside Windows and navigating to http://localhost:6080/vnc_auto.html

Additional Information

  • 192.168.56.0 is the virtual network we created using Docker; this is where our container lives.

  • WSL2 uses it's own network which can be identified by running ipconfig in a Windows command line, yours will be different.

    image2

  • Our container was setup to use port forwarding, -p 6080:6080, this forwards our container's port 6080 to the WSL port 6080.

  • We can directly access this content at http://YOUR_WSL2_IPv4_HERE:6080/vnc_auto.html

  • Alternatively, due to how WSL2 is configured, we can access this content using the IP address of the Windows host: http://localhost:6080/vnc_auto.html

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