# URSim

Robpod Studio can be used also to connect to **URSim** simulation environment instead of the real robot.

{% tabs %}
{% tab title="Polyscope 5 and erlier" %}
URSim for **Polyscope 5** and erlier versions are provided as a **virtual machine** image.

No particular configuration is needed to connect Robpod Studio to the virtual machine simulator.

Just start the virtual machine, check the virtual machine ip address, and then proceed in the same way as with real robot.
{% endtab %}

{% tab title="Polyscope 6" %}
URSim for **Polyscope 6** is provided as a **docker container** image.

Some configuration is needed before connecting Robpod Studio to the URSim simulation inside the container.

**Port Mapping**

Inside the launch script ***startURSim.bat*** or ***startURSim.sh*** make sure that following ports are mapped: **29999, 30001-30013, 22, 8876**.&#x20;

Inside the script change the **docker run** comand in this way to setup the port mapping:

```batch
docker run --rm -dit --init --privileged -p 5900:5900 -p 6080:6080 -p 29999:29999 -p 30001-30013:30001-30013 -p 22:22 -p 8876:8876 --mount type=volume,source=ursim-dind-var-lib-docker,target=/data/var/lib/docker -v "%LOCAL_WORKSPACE_FOLDER%/staging/programs:/root/programs" -v "%LOCAL_WORKSPACE_FOLDER%/staging/urcaps/osgi:/root/.urcaps/zip" -v "%LOCAL_WORKSPACE_FOLDER%/staging/urcaps:/var/urcaps" --add-host=servicegateway:127.0.0.1 --add-host=urcontrol:127.0.0.1 -e ROBOT_MODEL=%ROBOT_MODEL% --name %URSIM_NAME% %URSIM_DOCKER_IMAGE% >Nul 2>&1
```

**Enable SSH**

SSH channel is not enabled by default inside the docker container.

Run this commands inside the URSim docker container **Terminal** to enable SSH:

```shell
ssh-keygen -A
service ssh start
```

&#x20;**Fix programs folder**

Programs folder is not correctly linked inside the container.

Run this commands inside the URSim docker container **Terminal** to fix the linking:

```shell
rm -fr /programs
ln -s /root/programs /programs
```

Now you can use **Robpod Studio** to connect to the URSim container using **127.0.0.1** IP address.
{% endtab %}
{% endtabs %}
