# Polishing Example

**HMI Panel File**

<figure><img src="/files/VbSMRnQlAAAMyr46ap9y" alt=""><figcaption></figcaption></figure>

{% file src="/files/mtRCZeskONXPkp9UBTpD" %}

**Robot Program File**

```python
# variables
global step = 100
global radius = 30

# positions (can be defined also as installation variables to store their value)
global pa = p[0, 0, 0, 0, 0, 0]
global pb = p[0, 0, 0, 0, 0, 0]
global pc = p[0, 0, 0, 0, 0, 0]
global pd = p[0, 0, 0, 0, 0, 0]

# functions
def polish():
    d_ab = point_dist(pa, pb)

    repetitions = floor(d_ab / (step/1000))
    percentage_ab = (step/1000) / d_ab
    percentage_cd = 1 / repetitions

    i = 0
    while i < repetitions:
        p1 = interpolate_pose(pa, pb, i * percentage_ab)
        movel(p1, a=0.1, v=0.2, r=radius/1000)

        p2 = interpolate_pose(pc, pd, i * percentage_cd)
        movel(p2, a=0.1, v=0.2, r=radius/1000)

        p3 = interpolate_pose(pc, pd, (i + 1) * percentage_cd)
        movel(p3, a=0.1, v=0.2, r=radius/1000)

        p4 = interpolate_pose(pa, pb, (i + 1) * percentage_ab)
        movel(p4, a=0.1, v=0.2, r=radius/1000)

        i = i + 2

    end
end
```

{% file src="/files/88S0raYdfvxM72sj3h6C" %}


---

# 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/hmi-designer/working-examples/universal-robots/polishing-example.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.
