> For the complete documentation index, see [llms.txt](https://docs.robpod.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.robpod.cloud/hmi-designer/working-examples/universal-robots/nudge-example.md).

# Nudge Example

### **HMI Panel File**

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

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

### **Robot Program File**

```python
# Robot functions file
force_threshold = 50
force_z = 0
status = "WAITING NUDGE"

# nudge function
def wait_nudge():
    sleep(1)
    f = get_tcp_force()
    while norm(f[2]) < force_threshold:
        sleep(0.2)
        f = get_tcp_force()
    end
end

thread update_force():
    while True:
        force_z = get_tcp_force()[2]
        sync()
    end
end

run update_force()
```

<pre class="language-python"><code class="lang-python"># Robot task file
status = "WAITING NUDGE"
<strong>wait_nudge()
</strong>status = "NUDGE DETECTED!"

# counter
global i = 0
while i &#x3C; 3:
    # pick
    movej([1.56, -1.86, 2.29, -2.00, -1.57, -0.01], r=0.03)
    movel(p[0.107, -0.331, 0.100, 0.00, 3.14, -0.00])
    movel(p[0.107, -0.331, 0.25, 0.00, 3.14, -0.00], r=0.03)

    # place
    movej([1.56, -1.40, 1.87, -2.04, -1.57, -0.01], r=0.03)
    movel(p[0.107, -0.517, 0.100, -0.00, 3.14, 0.00])
    movel(p[0.107, -0.517, 0.2500, -0.00, 3.14, 0.00], r=0.03)

    i = i + 1
end
</code></pre>

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