# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.robpod.cloud/appendix/robot-specific-functions/universal-robots/ursim.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
