reload_script
Load a Python controller or module from a file into Isaac Sim for persistent state machines and iterative development.
Instructions
Load a Python controller or module into Isaac Sim from a file on disk.
Use this instead of execute_script for persistent controllers, state machines, or any code longer than ~20 lines. Workflow:
Write the controller as a .py file
reload_script to load it into Isaac Sim
step_simulation to debug the behavior
Edit the file and reload_script again to iterate
The file's directory is auto-added to sys.path.
Args: file_path: Path to the Python file on disk. module_name: Optional module name to reload (e.g. 'my_controller').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| module_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |