# Simulation Commands

When coding robotics application with Robpod Studio, a set of special functions called **Simulation Commands** is available to better interact with the simulation environment from the robot program.

Simualtion Commands are particullary suited during [Off-Line Programming ](/simulation/off-line-programming.md)to let the robot grasp and move objects inside the simulation environment.

{% embed url="<https://youtu.be/a5Q0Mru767E>" %}

All Simulation Commands starts with the **sim\_** prefix, i.e. **sim\_grasp()**.&#x20;

Here the complete list of simulation commands:

<table><thead><tr><th width="203">Command Name</th><th>Description</th><th>Parameters</th></tr></thead><tbody><tr><td><strong>sim_grasp</strong>(object)</td><td>Attach an object to robot tool. </td><td><strong>object</strong>: string - Name of object to attach to robot tool. If object is not specified, closest object to robot tool will be used.</td></tr><tr><td><strong>sim_release</strong>(object)</td><td>Detach an object from robot tool.</td><td><strong>object</strong>: string - Name of object to detach from robot tool. If object is not specified, all attached objects will be detached from robot tool.</td></tr><tr><td><strong>sim_set_parent</strong>(object, parent)</td><td>Attach an object to another parent while maintaining the current absolute position in the simulation.</td><td><strong>object</strong>: string - Name of the object to set the parent to. <strong>parent</strong>: string - Name of parent. If parent is not specified, object is attached to simulation workstation.</td></tr></tbody></table>

You can find here an example of pick and place application using Simulation Commands:

{% file src="/files/1DRNyd3wxPfrTQd4Oa4j" %}
UR Script file
{% endfile %}

{% file src="/files/lLofXXrbjHY5B5GSSwPN" %}
RoboDK workstation
{% endfile %}


---

# 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/simulation/simulation-commands.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.
