Prerequisite

Before you begin, make sure you have the following prerequisites in place:

  • SDK zipfile: The SDK provided by Universal Robots unzipped somewhere on your computer. You have most likely already done this and is reading this document from the unzipped folder.

    • Note that if you are using Windows, we recommend unzipping the SDK file, and running the DevContainer in WSL Linux, for much better performance (see section ‘WSL on Windows’).

  • Chrome: The only supported browser is Chrome. You can download it from here.

    • Note that it is possible to run the PolyScope X simulator in other browsers, but you might experience errors which would not occur in Chrome.

  • Docker: Ensure you have Docker installed on your system. You can download and install Docker from the Docker website.

    Note

    If you are using a Mac with Apple Silicon, ensure that the ‘Use Rosetta for x86_64/amd64 emulation on Apple Silicon’ option is enabled in your Docker Desktop settings.

  • An IDE supporting DevContainers: i.e. Visual Studio Code (VSCode) or a Jetbrains IDE (e.g. IntelliJ)

Install the DevContainer extension

  • VSCode

    1. Open VSCode

    2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VSCode.

    3. Search for “Dev Containers” and install the extension provided by Microsoft. This extension enables DevContainer support in VSCode.

  • IntelliJ

    • The DevContainer plugin is bundled with IntelliJ on installation.

Opening the SDK in a DevContainer - VSCode

  1. With VSCode open, press Ctrl+Shift+N, or Command+Shift+N on Mac, to open up a new window

  2. Press Open Folder to get a File manager and navigate to where you have extracted the “polyscopex.zip” file and choose the polyscopex folder

vsc vsc_explorer_view

  1. When opened the project structure should look similar to this

vsc project_view

Where .devcontainer, ursim-polyscope and sdk-polyscope are toplevel directories.

  1. VSCode will detect the .devcontainer folder and prompt you to Reopen in Container. Click on this option to create and start the DevContainer.

vsc dev_view

If you accidentally close the prompt you can also open up the DevContainer by pressing the small blue icon in the lower left corner, and when a menu drops down select Reopen in Container

vsc small_blue_icon

  1. VSCode will build the Docker image and start the DevContainer based on your configuration.

Opening the SDK in a DevContainer - IntelliJ

  1. When you open up the project in IntelliJ you want the project structure to look similar to this

intellij intellij_project

Where .devcontainer, ursim-polyscope and sdk-polyscope are toplevel directories.

  1. In the project window, open the .devcontainer folder and open the devcontainer.json file.

  2. In the upper left corner press the blue gutter icon and choose “Create Dev Container and Mount Sources”

intellij gutter icon

  1. IntelliJ will build the Docker image and start the DevContainer based on your configuration.

Verify you are working in a DevContainer

When the devcontainer has started you can do the following steps to set up the simulator for usage. You can verify that you are working inside the devcontainer by writing whoami

intellij whoami

it which case it will say that it is psxdev.