# 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 ](https://docs.robpod.cloud/simulation/off-line-programming)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="<https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2FiHH126o6QRENwY6E2BG2%2Fsim_commands_pick_place.script?alt=media&token=0385ba8f-d715-4e11-80b8-b5d65276d2e4>" %}
UR Script file
{% endfile %}

{% file src="<https://175138337-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fvxlh3prlGsBGF30oqbYW%2Fuploads%2Ftb2DrWKtR4n0yEcQZbA5%2Fworkstation_box_pick_place.rdk?alt=media&token=fcbf2fa5-15ed-41ac-953e-bc9b7cbfa901>" %}
RoboDK workstation
{% endfile %}
